68 |
|
#define MAXHITS 1000000 |
69 |
|
|
70 |
|
struct MyRecHit{ |
71 |
< |
|
71 |
> |
int depth[MAXHITS]; |
72 |
|
int n; |
73 |
|
|
74 |
|
float e[MAXHITS]; |
140 |
|
MyRecHit myTowers; |
141 |
|
MyBkg bkg; |
142 |
|
|
143 |
< |
|
143 |
> |
TNtuple* nt; |
144 |
|
TTree* hbheTree; |
145 |
|
TTree* hfTree; |
146 |
|
TTree* ebTree; |
150 |
|
TTree* bkgTree; |
151 |
|
|
152 |
|
double cone; |
153 |
+ |
double hfTowerThreshold_; |
154 |
+ |
double hfLongThreshold_; |
155 |
+ |
double hfShortThreshold_; |
156 |
+ |
double hbheThreshold_; |
157 |
+ |
double ebThreshold_; |
158 |
+ |
double eeThreshold_; |
159 |
|
|
160 |
|
edm::Service<TFileService> fs; |
161 |
|
const CentralityBins * cbins_; |
179 |
|
bool doHcal_; |
180 |
|
|
181 |
|
bool doFastJet_; |
182 |
+ |
|
183 |
+ |
bool doEbyEonly_; |
184 |
|
}; |
185 |
|
|
186 |
|
// |
214 |
|
doHcal_ = iConfig.getUntrackedParameter<bool>("doHcal",true); |
215 |
|
doFastJet_ = iConfig.getUntrackedParameter<bool>("doFastJet",true); |
216 |
|
FastJetTag_ = iConfig.getUntrackedParameter<edm::InputTag>("FastJetTag",edm::InputTag("kt4CaloJets")); |
217 |
< |
|
217 |
> |
doEbyEonly_ = iConfig.getUntrackedParameter<bool>("doEbyEonly",false); |
218 |
> |
hfTowerThreshold_ = iConfig.getUntrackedParameter<double>("HFtowerMin",3.); |
219 |
> |
hfLongThreshold_ = iConfig.getUntrackedParameter<double>("HFlongMin",3.); |
220 |
> |
hfShortThreshold_ = iConfig.getUntrackedParameter<double>("HFshortMin",3.); |
221 |
|
} |
222 |
|
|
223 |
|
|
284 |
|
iSetup.get<CaloGeometryRecord>().get(pGeo); |
285 |
|
geo = pGeo.product(); |
286 |
|
} |
287 |
+ |
|
288 |
+ |
int nHFlong = 0; |
289 |
+ |
int nHFshort = 0; |
290 |
+ |
int nHFtower = 0; |
291 |
|
|
292 |
|
if(doHcal_){ |
293 |
|
for(unsigned int i = 0; i < hfHits->size(); ++i){ |
297 |
|
hfRecHit.eta[hfRecHit.n] = getEta(hit.id()); |
298 |
|
hfRecHit.phi[hfRecHit.n] = getPhi(hit.id()); |
299 |
|
hfRecHit.isjet[hfRecHit.n] = false; |
300 |
+ |
hfRecHit.depth[hfRecHit.n] = hit.id().depth(); |
301 |
+ |
if(hit.energy() > hfShortThreshold_ && hit.id().depth() != 1) nHFshort++; |
302 |
+ |
if(hit.energy() > hfLongThreshold_ && hit.id().depth() == 1) nHFlong++; |
303 |
+ |
|
304 |
|
if(useJets_){ |
305 |
|
for(unsigned int j = 0 ; j < jets->size(); ++j){ |
306 |
|
const reco::Jet& jet = (*jets)[j]; |
310 |
|
} |
311 |
|
hfRecHit.n++; |
312 |
|
} |
313 |
< |
|
313 |
> |
if(!doEbyEonly_){ |
314 |
|
for(unsigned int i = 0; i < hbheHits->size(); ++i){ |
315 |
|
const HBHERecHit & hit= (*hbheHits)[i]; |
316 |
|
hbheRecHit.e[hbheRecHit.n] = hit.energy(); |
328 |
|
hbheRecHit.n++; |
329 |
|
} |
330 |
|
} |
331 |
< |
if(doEcal_){ |
331 |
> |
} |
332 |
> |
if(doEcal_ && !doEbyEonly_){ |
333 |
|
for(unsigned int i = 0; i < ebHits->size(); ++i){ |
334 |
|
const EcalRecHit & hit= (*ebHits)[i]; |
335 |
|
ebRecHit.e[ebRecHit.n] = hit.energy(); |
374 |
|
myTowers.eta[myTowers.n] = getEta(hit.id()); |
375 |
|
myTowers.phi[myTowers.n] = getPhi(hit.id()); |
376 |
|
myTowers.isjet[myTowers.n] = false; |
377 |
+ |
|
378 |
+ |
if(hit.ieta() > 29 && hit.energy() > hfTowerThreshold_) nHFtower++; |
379 |
+ |
|
380 |
|
if(useJets_){ |
381 |
|
for(unsigned int j = 0 ; j < jets->size(); ++j){ |
382 |
|
const reco::Jet& jet = (*jets)[j]; |
389 |
|
|
390 |
|
} |
391 |
|
|
392 |
< |
if(doBasicClusters_){ |
392 |
> |
if(doBasicClusters_ && !doEbyEonly_){ |
393 |
|
for(unsigned int j = 0 ; j < jets->size(); ++j){ |
394 |
|
const reco::Jet& jet = (*jets)[j]; |
395 |
|
myBC.n = 0; |
412 |
|
} |
413 |
|
} |
414 |
|
|
415 |
< |
towerTree->Fill(); |
416 |
< |
|
417 |
< |
eeTree->Fill(); |
418 |
< |
ebTree->Fill(); |
419 |
< |
|
420 |
< |
hbheTree->Fill(); |
421 |
< |
hfTree->Fill(); |
415 |
> |
if(!doEbyEonly_){ |
416 |
> |
towerTree->Fill(); |
417 |
> |
|
418 |
> |
eeTree->Fill(); |
419 |
> |
ebTree->Fill(); |
420 |
> |
|
421 |
> |
hbheTree->Fill(); |
422 |
> |
hfTree->Fill(); |
423 |
> |
|
424 |
> |
if (doFastJet_) { |
425 |
> |
bkgTree->Fill(); |
426 |
> |
} |
427 |
> |
} |
428 |
> |
|
429 |
> |
nt->Fill(nHFtower,nHFlong,nHFshort); |
430 |
|
|
400 |
– |
if (doFastJet_) { |
401 |
– |
bkgTree->Fill(); |
402 |
– |
} |
431 |
|
} |
432 |
|
|
433 |
|
|
450 |
|
hfTree->Branch("et",hfRecHit.et,"et[n]/F"); |
451 |
|
hfTree->Branch("eta",hfRecHit.eta,"eta[n]/F"); |
452 |
|
hfTree->Branch("phi",hfRecHit.phi,"phi[n]/F"); |
453 |
+ |
hfTree->Branch("depth",hfRecHit.depth,"depth[n]/I"); |
454 |
|
hfTree->Branch("isjet",hfRecHit.isjet,"isjet[n]/O"); |
455 |
|
|
456 |
|
eeTree = fs->make<TTree>("ee",""); |
497 |
|
bkgTree->Branch("rho",bkg.rho,"rho[n]/F"); |
498 |
|
bkgTree->Branch("sigma",bkg.sigma,"sigma[n]/F"); |
499 |
|
} |
500 |
+ |
|
501 |
+ |
nt = fs->make<TNtuple>("ntEvent","","nHF:nHFlong:nHFshort"); |
502 |
|
|
503 |
|
} |
504 |
|
|