107 evt.
getByLabel(
"ecalRecHit",
"EcalRecHitsEB", EBRecHits );
108 evt.
getByLabel(
"ecalRecHit",
"EcalRecHitsEE", EERecHits );
115 evt.
getByLabel(
"ecalDigis",
"ebDigis", EBDigis );
116 evt.
getByLabel(
"ecalDigis",
"eeDigis", EEDigis );
120 cout << endl <<
"Evt: "<<
evtCount <<
", Num Jets=" <<caloJets->end() - caloJets->begin() << endl;
121 if(
Dump>=1)
cout <<
" *********************************************************" <<endl;
123 if(
Dump>=1)
for( CaloJetCollection::const_iterator
jet = caloJets->begin();
jet != caloJets->end(); ++
jet ) {
126 std::vector <CaloTowerPtr> towers =
jet->getCaloConstituents ();
128 cout <<
" Jet: "<<jetInd<<
", eta="<<
jet->eta()<<
", phi="<<
jet->phi()<<
", pt="<<
jet->pt()<<\
129 ",E="<<
jet->energy()<<
", EB E="<<
jet->emEnergyInEB()<<
" ,HB E="<<
jet->hadEnergyInHB()<<\
130 ", HO E="<<
jet->hadEnergyInHO()<<
" ,EE E="<<
jet->emEnergyInEE()\
131 <<
", HE E="<<
jet->hadEnergyInHE()<<
", HF E="<<
jet->hadEnergyInHF()+
jet->emEnergyInHF()<<
", Num Towers="<<nConstituents<<endl;
132 if(
Dump>=2)
cout <<
" ====================================================="<<endl;
133 float sumTowerE = 0.0;
136 if (theTower == caloTowers->
end()) {
cerr<<
"Bug? Can't find the tower"<<endl;
return;}
137 int ietaTower = towers[
i]->id().ieta();
138 int iphiTower = towers[
i]->id().iphi();
139 sumTowerE += theTower->energy();
140 size_t numRecHits = theTower->constituentsSize();
141 cout <<
" Tower " <<
i <<
": ieta=" << ietaTower <<
", eta=" << theTower->eta() <<
", iphi=" << iphiTower <<
", phi=" << theTower->phi() << \
142 ", energy=" << theTower->energy() <<
", EM=" << theTower->emEnergy()<<
", HAD=" << theTower->hadEnergy()\
143 <<
", HO=" << theTower->outerEnergy() <<
", Num Rec Hits =" << numRecHits << endl;
144 if(
Dump>=3)
cout <<
" ------------------------------------------------"<<endl;
145 float sumRecHitE = 0.0;
146 if(
Dump>=3)
for(
size_t j = 0; j <numRecHits ; j++) {
147 DetId RecHitDetID=theTower->constituent(j);
155 sumRecHitE += theRecHit->energy();
157 cout <<
" RecHit: " << j <<
": HB, ieta=" << HcalID.
ieta() <<
", iphi=" << HcalID.
iphi()<<
158 ", depth=" << HcalID.
depth() <<
", energy=" << theRecHit->energy() <<
", time=" <<\
159 theRecHit->time() <<
", All Digis=" << theDigis->size() <<
", presamples =" <<\
160 theDigis->presamples() <<endl;
166 float SumDigiCharge = 0.0;
167 float EstimatedPedestal=0.0;
168 int SamplesToAdd = 4;
169 if(
Dump>=4)
cout <<
" ......................................"<<endl;
170 if(
Dump>=4)
for(
int k=0;
k<theDigis->size();
k++){
172 if(
k>=theDigis->presamples()&&
k<theDigis->presamples()+SamplesToAdd)SumDigiCharge+=QIE.
nominal_fC();
173 if(k<theDigis->
presamples()-1)EstimatedPedestal+=QIE.
nominal_fC()*SamplesToAdd/(theDigis->presamples()-1);
174 cout <<
" Digi: " <<
k <<
", cap ID = " << QIE.
capid() <<
": ADC Counts = " << QIE.
adc() <<
", nominal fC = " << QIE.
nominal_fC() <<endl;
176 if(
Dump>=4)
cout <<
" 4 Digi fC ="<<SumDigiCharge<<
", est. ped. fC="<<EstimatedPedestal<<
", est. GeV/fc="<<theRecHit->energy()/(SumDigiCharge-EstimatedPedestal) << endl;
177 if(
Dump>=4)
cout <<
" ......................................"<<endl;
182 sumRecHitE += theRecHit->energy()/2;
185 sumRecHitE += theRecHit->energy();
188 cout <<
" RecHit: " << j <<
": HE, ieta=" << HcalID.
ieta() <<
", iphi=" << HcalID.
iphi()<<
189 ", depth=" << HcalID.
depth() <<
", energy=" << theRecHit->energy() <<
", time=" <<\
190 theRecHit->time() <<
", All Digis=" << theDigis->size() <<
", presamples =" <<\
191 theDigis->presamples() <<endl;
192 float SumDigiCharge = 0.0;
193 float EstimatedPedestal=0.0;
194 int SamplesToAdd = 4;
195 if(
Dump>=4)
cout <<
" ......................................"<<endl;
196 if(
Dump>=4)
for(
int k=0;
k<theDigis->size();
k++){
198 if(
k>=theDigis->presamples()&&
k<theDigis->presamples()+SamplesToAdd)SumDigiCharge+=QIE.
nominal_fC();
199 if(k<theDigis->
presamples()-1)EstimatedPedestal+=QIE.
nominal_fC()*SamplesToAdd/(theDigis->presamples()-1);
200 cout <<
" Digi: " <<
k <<
", cap ID = " << QIE.
capid() <<
": ADC Counts = " << QIE.
adc() <<
", nominal fC = " << QIE.
nominal_fC() <<endl;
202 if(
Dump>=4)
cout <<
" 4 Digi fC ="<<SumDigiCharge<<
", est. ped. fC="<<EstimatedPedestal<<
", est. GeV/fc="<<theRecHit->energy()/(SumDigiCharge-EstimatedPedestal) << endl;
203 if(
Dump>=4)
cout <<
" ......................................"<<endl;
207 sumRecHitE += theRecHit->energy();
209 cout <<
" RecHit: " << j <<
": HO, ieta=" << HcalID.
ieta() <<
", iphi=" << HcalID.
iphi()<<
210 ", depth=" << HcalID.
depth() <<
", energy=" << theRecHit->energy() <<
", time=" <<\
211 theRecHit->time() <<
", All Digis=" << theDigis->size() <<
", presamples =" <<\
212 theDigis->presamples() <<endl;
213 float SumDigiCharge = 0.0;
214 float EstimatedPedestal=0.0;
215 int SamplesToAdd = 4;
216 if(
Dump>=4)
cout <<
" ......................................"<<endl;
217 if(
Dump>=4)
for(
int k=0;
k<theDigis->size();
k++){
219 if(
k>=theDigis->presamples()&&
k<theDigis->presamples()+SamplesToAdd)SumDigiCharge+=QIE.
nominal_fC();
220 if(k<theDigis->
presamples()-1)EstimatedPedestal+=QIE.
nominal_fC()*SamplesToAdd/(theDigis->presamples()-1);
221 cout <<
" Digi: " <<
k <<
", cap ID = " << QIE.
capid() <<
": ADC Counts = " << QIE.
adc() <<
", nominal fC = " << QIE.
nominal_fC() <<endl;
223 if(
Dump>=4)
cout <<
" 4 Digi fC ="<<SumDigiCharge<<
", est. ped. fC="<<EstimatedPedestal<<
", est. GeV/fc="<<theRecHit->energy()/(SumDigiCharge-EstimatedPedestal) << endl;
224 if(
Dump>=4)
cout <<
" ......................................"<<endl;
228 sumRecHitE += theRecHit->energy();
230 cout <<
" RecHit: " << j <<
": HF, ieta=" << HcalID.
ieta() <<
", iphi=" << HcalID.
iphi()<<
231 ", depth=" << HcalID.
depth() <<
", energy=" << theRecHit->energy() <<
", time=" <<\
232 theRecHit->time() <<
", All Digis=" << theDigis->size() <<
", presamples =" <<\
233 theDigis->presamples() <<endl;
234 float SumDigiCharge = 0.0;
235 float EstimatedPedestal=0.0;
236 int SamplesToAdd = 1;
237 if(
Dump>=4)
cout <<
" ......................................"<<endl;
238 if(
Dump>=4)
for(
int k=0;
k<theDigis->size();
k++){
240 if(
k>=theDigis->presamples()&&
k<theDigis->presamples()+SamplesToAdd)SumDigiCharge+=QIE.
nominal_fC();
241 if(k<theDigis->
presamples()-1)EstimatedPedestal+=QIE.
nominal_fC()*SamplesToAdd/(theDigis->presamples()-1);
242 cout <<
" Digi: " <<
k <<
", cap ID = " << QIE.
capid() <<
": ADC Counts = " << QIE.
adc() <<
", nominal fC = " << QIE.
nominal_fC() <<endl;
244 if(
Dump>=4)
cout <<
" 1 Digi fC ="<<SumDigiCharge<<
", est. ped. fC="<<EstimatedPedestal<<
", est. GeV/fc="<<theRecHit->energy()/(SumDigiCharge-EstimatedPedestal) << endl;
245 if(
Dump>=4)
cout <<
" ......................................"<<endl;
249 int EcalNum = RecHitDetID.
subdetId();
254 sumRecHitE += theRecHit->energy();
255 cout <<
" RecHit " << j <<
": EB, ieta=" << EcalID.
ieta() <<
", iphi=" << EcalID.
iphi() <<
", SM=" << EcalID.
ism() <<
", energy=" << theRecHit->energy() <<
", All Digis=" << theDigis->size()<< endl;
256 if(
Dump>=4)
cout <<
" ......................................"<<endl;
257 if(
Dump>=4)
for(
unsigned int k=0;
k<theDigis->size();
k++){
260 cout <<
" Digi: " <<
k <<
": ADC Sample = " << MGPA.
adc() <<
", Gain ID = "<< MGPA.
gainId() <<endl;
262 if(
Dump>=4)
cout <<
" ......................................"<<endl;
264 else if( EcalNum == 2 ){
268 sumRecHitE += theRecHit->energy();
269 cout <<
" RecHit " << j <<
": EE, ix=" << EcalID.
ix() <<
", iy=" << EcalID.
iy() <<
", energy=" << theRecHit->energy() <<
", All Digis=" << theDigis->size()<< endl;
270 if(
Dump>=4)
cout <<
" ......................................"<<endl;
271 if(
Dump>=4)
for(
unsigned int k=0;
k<theDigis->size();
k++){
274 cout <<
" Digi: " <<
k <<
": ADC Sample = " << MGPA.
adc() <<
", Gain ID = "<< MGPA.
gainId() <<endl;
276 if(
Dump>=4)
cout <<
" ......................................"<<endl;
281 if(
abs(ietaTower)==28||
abs(ietaTower)==29){
282 cout <<
" Splitted Sum of RecHit Energies=" << sumRecHitE <<
", CaloTower energy=" << theTower->energy() << endl;
285 cout <<
" Sum of RecHit Energies=" << sumRecHitE <<
", CaloTower energy=" << theTower->energy() << endl;
288 if(
Dump>=3)
cout <<
" ------------------------------------------------"<<endl;
290 if(
Dump>=2)
cout <<
" Sum of tower energies=" << sumTowerE <<
", CaloJet energy=" <<
jet->energy() << endl;
292 if(
Dump>=2)
cout <<
" ====================================================="<<endl;
295 if(
Dump>=1)
cout <<
" *********************************************************" <<endl;
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
HcalSubdetector subdet() const
get the subdetector
int adc() const
get the ADC sample
std::vector< CaloTower >::const_iterator const_iterator
int gainId() const
get the gainId (2 bits)
int ism() const
get the ECAL/SM id
int iphi() const
get the crystal iphi
const_iterator find(id_type i) const
int depth() const
get the tower depth
int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
int ieta() const
get the crystal ieta
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
int iphi() const
get the cell iphi
int capid() const
get the Capacitor id
double nominal_fC() const
get the nominal FC (no calibrations applied)
iterator find(key_type k)
Detector det() const
get the detector field from this detid
int adc() const
get the ADC sample (12 bits)