Skip to content

Commit 35a6d96

Browse files
committed
Add ROC#, FEB#, and FEBchannel# to the crvpulses branch.
1 parent 17eac29 commit 35a6d96

6 files changed

Lines changed: 17 additions & 4 deletions

File tree

doc/branches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ The branch is empty if there are no CRV hit during the event.
143143
| crvcoincs | Vector branch | information about a cluster of CRV coincidence triplets| [see CrvHitInfoReco.hh](../inc/CrvHitInfoReco.hh)
144144
| crvcoincsmc | Vector branch | information about the MC track which most likely caused the CRV coincidence triplets| [see CrvHitInfoMC.hh](../inc/CrvHitInfoMC.hh)
145145
| crvcoincsmcplane | Vector branch | information about the point where the MC trajectory crosses the xz plane of CRV-T| [see CrvPlaneInfoMC.hh](../inc/CrvPlaneInfoMC.hh)
146-
| crvpulses | Vector branch | information about CRV reco pulses. `crvHitIndex` gives the index in `crvcoincs`, or -1 if the pulse was not clustered into a CRV hit| [see CrvPulseInfoReco.hh](../inc/CrvPulseInfoReco.hh)
146+
| crvpulses | Vector branch | information about CRV reco pulses, including ROC/FEB/FEB channel IDs. `crvHitIndex` gives the index in `crvcoincs`, or -1 if the pulse was not clustered into a CRV hit| [see CrvPulseInfoReco.hh](../inc/CrvPulseInfoReco.hh)
147147
| crvpulsesmc | Vector branch | MC-truth information corresponding entry-by-entry to `crvpulses`| [see CrvHitInfoMC.hh](../inc/CrvHitInfoMC.hh)
148148
## Trigger Branches
149149

inc/CrvPulseInfoReco.hh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ namespace mu2e
1515
int barId = -1; //CRV counter ID
1616
int sectorId = -1; //CRV sector ID
1717
int SiPMId = -1; //SiPMId number
18+
int ROC = -1; //ROC number
19+
int FEB = -1; //FEB number
20+
int FEBchannel = -1; //FEB channel number
1821
int PEs = -1; //PEs using pulse integral
1922
int PEsPulseHeight = -1; //PEs using pulse height
2023
float pulseHeight = -1; //Pulse height
@@ -24,7 +27,7 @@ namespace mu2e
2427
int crvHitIndex = -1; //index of the CRV hit containing this pulse, or -1 if unclustered
2528

2629
CrvPulseInfoReco(){}
27-
CrvPulseInfoReco(CLHEP::Hep3Vector ppos, int barId, int sectorId, int SiPMId, int PEs, int PEsPulseHeight, float pulseHeight, float pulseBeta, float pulseFitChi2, float time, int crvHitIndex);
30+
CrvPulseInfoReco(CLHEP::Hep3Vector ppos, int barId, int sectorId, int SiPMId, int ROC, int FEB, int FEBchannel, int PEs, int PEsPulseHeight, float pulseHeight, float pulseBeta, float pulseFitChi2, float time, int crvHitIndex);
2831
};
2932

3033
typedef std::vector<CrvPulseInfoReco> CrvPulseInfoRecoCollection; //this is the reco vector which will be stored in the main TTree

rooutil/examples/PrintEvents.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void PrintEvents(std::string filename) {
212212
// crvpulses branch
213213
if (event.crvpulses != nullptr) {
214214
for (const auto& crvpulse : *(event.crvpulses)) {
215-
std::cout << "crvpulse: " << crvpulse.pos.x() << "," << crvpulse.barId << "," << crvpulse.time << "," << crvpulse.crvHitIndex << std::endl;
215+
std::cout << "crvpulse: " << crvpulse.pos.x() << "," << crvpulse.barId << "," << crvpulse.ROC << "," << crvpulse.FEB << "," << crvpulse.FEBchannel << "," << crvpulse.time << "," << crvpulse.crvHitIndex << std::endl;
216216
}
217217
}
218218

src/CrvInfoHelper.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ namespace mu2e
295295
//Reco pulses information
296296
CLHEP::Hep3Vector HitPos = CrvHelper::GetCrvCounterPos(CRS, barIndex);
297297
recoInfo.emplace_back(tdet->toDetector(HitPos), barIndex.asInt(), sectorNumber, crvRecoPulse->GetSiPMNumber(),
298+
crvRecoPulse->GetROC(), crvRecoPulse->GetFEB(), crvRecoPulse->GetFEBchannel(),
298299
crvRecoPulse->GetPEs(), crvRecoPulse->GetPEsPulseHeight(), crvRecoPulse->GetPulseHeight(),
299300
crvRecoPulse->GetPulseBeta(), crvRecoPulse->GetPulseFitChi2(), crvRecoPulse->GetPulseTime(), crvHitIndex);
300301

src/CrvPulseInfoReco.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#include "EventNtuple/inc/CrvPulseInfoReco.hh"
22
#include "CLHEP/Vector/ThreeVector.h"
33
namespace mu2e {
4-
CrvPulseInfoReco::CrvPulseInfoReco(CLHEP::Hep3Vector ppos, int barId, int sectorId, int SiPMId, int PEs, int PEsPulseHeight, float pulseHeight, float pulseBeta, float pulseFitChi2, float time, int crvHitIndex) :
4+
CrvPulseInfoReco::CrvPulseInfoReco(CLHEP::Hep3Vector ppos, int barId, int sectorId, int SiPMId, int ROC, int FEB, int FEBchannel, int PEs, int PEsPulseHeight, float pulseHeight, float pulseBeta, float pulseFitChi2, float time, int crvHitIndex) :
55
pos(ppos),
66
barId(barId),
77
sectorId(sectorId),
88
SiPMId(SiPMId),
9+
ROC(ROC),
10+
FEB(FEB),
11+
FEBchannel(FEBchannel),
912
PEs(PEs),
1013
PEsPulseHeight(PEsPulseHeight),
1114
pulseHeight(pulseHeight),

validation/create_val_file_rooutil.C

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ void create_val_file_rooutil(std::string filename, std::string outfilename) {
421421
TH1F* h_crvpulses_barId = new TH1F("h_crvpulses_barId", "", 100,0,100);
422422
TH1F* h_crvpulses_sectorId = new TH1F("h_crvpulses_sectorId", "", 100,0,100);
423423
TH1F* h_crvpulses_SiPMId = new TH1F("h_crvpulses_SiPMId", "", 100,0,100);
424+
TH1F* h_crvpulses_ROC = new TH1F("h_crvpulses_ROC", "", 100,0,100);
425+
TH1F* h_crvpulses_FEB = new TH1F("h_crvpulses_FEB", "", 100,0,100);
426+
TH1F* h_crvpulses_FEBchannel = new TH1F("h_crvpulses_FEBchannel", "", 100,0,100);
424427
TH1F* h_crvpulses_PEs = new TH1F("h_crvpulses_PEs", "", 100,0,100);
425428
TH1F* h_crvpulses_PEsPulseHeight = new TH1F("h_crvpulses_PEsPulseHeight", "", 100,0,100);
426429
TH1F* h_crvpulses_pulseHeight = new TH1F("h_crvpulses_pulseHeight", "", 100,0,100);
@@ -1089,6 +1092,9 @@ void create_val_file_rooutil(std::string filename, std::string outfilename) {
10891092
h_crvpulses_barId->Fill(crvpulse.barId);
10901093
h_crvpulses_sectorId->Fill(crvpulse.sectorId);
10911094
h_crvpulses_SiPMId->Fill(crvpulse.SiPMId);
1095+
h_crvpulses_ROC->Fill(crvpulse.ROC);
1096+
h_crvpulses_FEB->Fill(crvpulse.FEB);
1097+
h_crvpulses_FEBchannel->Fill(crvpulse.FEBchannel);
10921098
h_crvpulses_PEs->Fill(crvpulse.PEs);
10931099
h_crvpulses_PEsPulseHeight->Fill(crvpulse.PEsPulseHeight);
10941100
h_crvpulses_pulseHeight->Fill(crvpulse.pulseHeight);

0 commit comments

Comments
 (0)