10 outFile =
new TFile(outName,
"RECREATE");
11 ZdcAnalize =
new TTree(
"ZdcAnaTree",
"ZdcAnaTree");
12 ZdcAnalize->Branch(
"Trigger",0,
"run/I:event/I:beamTrigger/I:fakeTrigger/I:" 13 "pedestalTrigger/I:outSpillPedestalTrigger/I:inSpillPedestalTrigger/I:" 14 "laserTrigger/I:laserTrigger/I:ledTrigger/I:spillTrigger/I");
15 ZdcAnalize->Branch(
"TDC",0,
"trigger/D:ttcL1/D:beamCoincidence/D:laserFlash/D:qiePhase/D:" 16 "TTOF1/D:TTOF2/D:m1[5]/D:m2[5]/D:m3[5]/D:" 17 "s1[5]/D:s2[5]/D:s3[5]/D:s4[5]/D:" 18 "bh1[5]/D:bh2[5]/D:bh3[5]/D:bh4[5]/D");
19 ZdcAnalize->Branch(
"ADC",0,
"VM/D:V3/D:V6/D:VH1/D:VH2/D:VH3/D:VH4/D:Ecal7x7/D:" 20 "Sci521/D:Sci528/D:CK1/D:CK2/D:CK3/D:SciVLE/D:S1/D:S2/D:S3/D:S4/D:" 21 "VMF/D:VMB/D:VM1/D:VM2/D:VM3/D:VM4/D:VM5/D:VM6/D:VM7/D:VM8/D:" 22 "TOF1/D:TOF2/D:BH1/D:BH2/D:BH3/BH4/D");
23 ZdcAnalize->Branch(
"Chamb",0,
"WCAx[5]/D:WCAy[5]/D:WCBx[5]/D:WCBy[5]/D:" 24 "WCCx[5]/D:WCCy[5]/D:WCDx[5]/D:WCDy[5]/D:WCEx[5]/D:WCEy[5]/D:" 25 "WCFx[5]/D:WCFy[5]/D:WCGx[5]/D:WCGy[5]/D:WCHx[5]/D:WCHy[5]/D");
26 ZdcAnalize->Branch(
"ZDCP",0,
"zdcHAD1/D:zdcHAD2/D:zdcHAD3/D:zdcHAD4/D:" 27 "zdcEM1/D:zdcEM2/D:zdcEM3/D:zdcEM4/D:zdcEM5/D:" 28 "zdcScint1/D:zdcScint2/D:" 30 ZdcAnalize->Branch(
"ZDCN",0,
"zdcHAD1/D:zdcHAD2/D:zdcHAD3/D:zdcHAD4/D:" 31 "zdcEM1/D:zdcEM2/D:zdcEM3/D:zdcEM4/D:zdcEM5/D:" 32 "zdcScint1/D:zdcScint2/D:" 86 for (indx=0; indx<times.
M1Count(); indx++)
88 for (indx=0; indx<times.
M2Count(); indx++)
90 for (indx=0; indx<times.
M3Count(); indx++)
92 for (indx=0; indx<times.
S1Count(); indx++)
94 for (indx=0; indx<times.
S2Count(); indx++)
96 for (indx=0; indx<times.
S3Count() ; indx++)
98 for (indx=0; indx<times.
S4Count(); indx++)
100 for (indx=0; indx<times.
BH1Count(); indx++)
102 for (indx=0; indx<times.
BH2Count(); indx++)
104 for (indx=0; indx<times.
BH3Count() ; indx++)
106 for (indx=0; indx<times.
BH4Count(); indx++)
160 unsigned int indTop = 5;
161 unsigned int indx = 0;
162 for (indx = 0; indx <
wcax.size(); indx++)
164 for (indx = 0; indx <
wcay.size(); indx++)
166 for (indx = 0; indx <
wcbx.size(); indx++)
168 for (indx = 0; indx <
wcby.size(); indx++)
170 for (indx = 0; indx <
wccx.size(); indx++)
172 for (indx = 0; indx <
wccy.size(); indx++)
174 for (indx = 0; indx <
wcdx.size(); indx++)
176 for (indx = 0; indx <
wcdy.size(); indx++)
178 for (indx = 0; indx <
wcdx.size(); indx++)
180 for (indx = 0; indx <
wcey.size(); indx++)
182 for (indx = 0; indx <
wcfx.size(); indx++)
184 for (indx = 0; indx <
wcfy.size(); indx++)
186 for (indx = 0; indx <
wcgx.size(); indx++)
188 for (indx = 0; indx <
wcgy.size(); indx++)
190 for (indx = 0; indx <
wchx.size(); indx++)
192 for (indx = 0; indx <
wchy.size(); indx++)
198 std::cout<<
"****************************************************"<<std::endl;
200 for(i = zdcHits.
begin(); i!=zdcHits.
end(); i++){
std::vector< double > wcfx
std::vector< double > wcgx
int S4Count() const
Returns the number of hits from scintillator S4, which is 12cm x 12cm.
double VMadc() const
Muon Veto adc.
std::vector< double > wcex
bool wasLEDTrigger() const
returns true if this was a LED trigger
std::vector< double > wchx
std::vector< double > wcax
std::vector< double > wccx
double M2Hits(int index) const
Returns the indexed hit time from muon veto scintillator M2.
int zside() const
get the z-side of the cell (1/-1)
std::vector< double > wchy
std::vector< T >::const_iterator const_iterator
double beamCoincidence[5]
double S1Hits(int index) const
Returns the indexed hit time from scintillator S1, which is 12cm x 12cm.
double beam_coincidence[5]
int S2Count() const
Returns the number of hits from scintillator S2, which is 4cm x 4cm.
double M3Hits(int index) const
Returns the indexed hit time from muon veto scintillator M3.
bool wasFakeTrigger() const
returns true if this trigger was fake (from a non-H2 manager)
void analyze(const ZDCRecHitCollection &hf)
int S3Count() const
Returns the number of hits from scintillator S3, which is 2cm x 2cm.
std::vector< double > wcbx
std::vector< double > wccy
double triggerTime() const
Returns the trigger time in ns.
void setup(const std::string &histoFileName)
double ttcL1Atime() const
Returns the Level 1 Accept time in ns.
int S1Count() const
Returns the number of hits from scintillator S1, which is 12cm x 12cm.
std::vector< double > wcgy
std::vector< double > wcey
double BH1Hits(int index) const
Returns the indexed hit time from beam halo counter UP HORIZONTAL.
int BH2Count() const
Returns the number of hits from beam halo counter left from particle view.
std::vector< double > wcdy
bool wasOutSpillPedestalTrigger() const
returns true if this was an out-of-spill pedestal trigger
std::vector< double > wcfy
bool wasInSpill() const
returns true if the "spill" bit was set
double TOF2Stime() const
Returns the TOF2S time (zero otherwise)
int BH1Count() const
Returns the number of hits from beam halo counter up horizontal.
double S4Hits(int index) const
Returns the indexed hit time from scintillator S4, which is 12cm x 12cm.
double BH4Hits(int index) const
Returns the indexed hit time from beam halo counter DOWN HORZINTAL.
int BH3Count() const
Returns the number of hits from beam halo counter right from particle view.
double S3Hits(int index) const
Returns the indexed hit time from scintillator S3, which is 2cm x 2cm.
double BeamCoincidenceHits(int index) const
Returns the indexed hit time from Beam Coincidence.
double BH3Hits(int index) const
Returns the indexed hit time from beam halo counter BEAM RIGHT FROM PARTICLE'S VIEW.
const_iterator end() const
double M1Hits(int index) const
Returns the indexed hit time from muon veto scintillator M1.
double laserFlash() const
Returns the laser activation time in ns.
double TOF1Stime() const
Returns the TOF1S time (zero otherwise)
uint16_t eventNumber() const
Returns the event number of this trigger.
int depth() const
get the depth (1 for EM, channel + 1 for HAD, 2 for RPD, not sure yet for LUM, leave as default) ...
std::vector< double > wcdx
int channel() const
get the channel
int BeamCoincidenceCount() const
Returns the number of hits from Beam Coincidence.
Section section() const
get the section
bool wasSpillIgnorantPedestalTrigger() const
returns true if this trigger was a calibration trigger
int M2Count() const
Returns the number of hits from muon veto scintillator M2.
int BH4Count() const
Returns the number of hits from beam halo counter down horizontal.
std::vector< double > wcby
void getChamberHits(char chamberch, std::vector< double > &xvec, std::vector< double > &yvec) const
Get the wire chamber hits for the specified chamber For HB/HE/HO running, chambers A...
bool wasInSpillPedestalTrigger() const
returns true if this was an in-spill pedestal trigger
bool isOutSpillPedestalTrigger
int M3Count() const
Returns the number of hits from muon veto scintillator M3.
bool wasBeamTrigger() const
returns true if this trigger came from beam data
double BH2Hits(int index) const
Returns the indexed hit time from from beam halo counter BEAM LEFT FROM PARTICLE'S VIEW...
bool wasLaserTrigger() const
returns true if this was a laser trigger
bool isInSpillPedestalTrigger
double S2Hits(int index) const
Returns the indexed hit time from scintillator S2, which is 4cm x 4cm.
uint32_t runNumber() const
Returns the current run number.
std::vector< double > wcay
double qiePhase() const
Returns the QIE phase for 2003 testbeam data (zero otherwise)
int M1Count() const
Returns the number of hits from muon veto scintillator M1.
const_iterator begin() const