CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IsolatedGenParticles.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: IsolatedGenParticles
4 // Class: IsolatedGenParticles
5 //
13 //
14 // Original Author: Seema Sharma
15 // Created: Tue Oct 27 09:46:41 CDT 2009
16 //
17 //
18 
21 
27 
30 
33 #include <iostream>
34 #include <iomanip>
35 #include<list>
36 #include<vector>
37 #include<cmath>
38 
41 
43 
45 
46  genSrc_ = iConfig.getUntrackedParameter("GenSrc",std::string("generator"));
47 
48  tok_hepmc_ = consumes<edm::HepMCProduct>(edm::InputTag(genSrc_));
49  tok_genParticles_ = consumes<reco::GenParticleCollection>(edm::InputTag(genSrc_));
50 
51  useHepMC = iConfig.getUntrackedParameter<bool>("UseHepMC", false );
52  pSeed = iConfig.getUntrackedParameter<double>("ChargedHadronSeedP", 1.0);
53  ptMin = iConfig.getUntrackedParameter<double>("PTMin", 1.0);
54  etaMax = iConfig.getUntrackedParameter<double>("MaxChargedHadronEta", 2.5);
55  a_coneR = iConfig.getUntrackedParameter<double>("ConeRadius",34.98);
56  a_charIsoR = a_coneR + 28.9;
57  a_neutIsoR = a_charIsoR*0.726;
58  a_mipR = iConfig.getUntrackedParameter<double>("ConeRadiusMIP",14.0);
59  a_Isolation= iConfig.getUntrackedParameter<bool>("UseConeIsolation",false);
60  pCutIsolate= iConfig.getUntrackedParameter<double>("PMaxIsolation",20.0);
61  verbosity = iConfig.getUntrackedParameter<int>("Verbosity", 0);
62 
63  debugL1Info_ = iConfig.getUntrackedParameter<bool>( "DebugL1Info", false );
64  L1extraTauJetSource_ = iConfig.getParameter<edm::InputTag>("L1extraTauJetSource");
65  L1extraCenJetSource_ = iConfig.getParameter<edm::InputTag>("L1extraCenJetSource");
66  L1extraFwdJetSource_ = iConfig.getParameter<edm::InputTag>("L1extraFwdJetSource");
67  L1extraMuonSource_ = iConfig.getParameter<edm::InputTag>("L1extraMuonSource");
68  L1extraIsoEmSource_ = iConfig.getParameter<edm::InputTag>("L1extraIsoEmSource");
69  L1extraNonIsoEmSource_ = iConfig.getParameter<edm::InputTag>("L1extraNonIsoEmSource");
70  L1GTReadoutRcdSource_ = iConfig.getParameter<edm::InputTag>("L1GTReadoutRcdSource");
71  L1GTObjectMapRcdSource_= iConfig.getParameter<edm::InputTag>("L1GTObjectMapRcdSource");
72 
73  tok_L1GTrorsrc_ = consumes<L1GlobalTriggerReadoutRecord>( L1GTReadoutRcdSource_ );
74  tok_L1GTobjmap_ = consumes<L1GlobalTriggerObjectMapRecord>( L1GTObjectMapRcdSource_ );
75  tok_L1extMusrc_ = consumes<l1extra::L1MuonParticleCollection>(L1extraMuonSource_);
76  tok_L1Em_ = consumes<l1extra::L1EmParticleCollection>( L1extraIsoEmSource_ );
77  tok_L1extNonIsoEm_= consumes<l1extra::L1EmParticleCollection>( L1extraNonIsoEmSource_ );
78  tok_L1extTauJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraTauJetSource_ );
79  tok_L1extCenJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraCenJetSource_ );
80  tok_L1extFwdJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraFwdJetSource_ );
81 
82 
83 
84  if (!strcmp("Dummy", genSrc_.c_str())) {
85  if (useHepMC) genSrc_ = "generator";
86  else genSrc_ = "genParticles";
87  }
88  std::cout << "Generator Source " << genSrc_ << " Use HepMC " << useHepMC
89  << " pSeed " << pSeed << " ptMin " << ptMin << " etaMax " << etaMax
90  << "\n a_coneR " << a_coneR << " a_charIsoR " << a_charIsoR
91  << " a_neutIsoR " << a_neutIsoR << " a_mipR " << a_mipR
92  << " debug " << verbosity << " debugL1Info " << debugL1Info_ << "\n"
93  << " Isolation Flag " << a_Isolation << " with cut "
94  << pCutIsolate << " GeV\n"
95  << " L1extraTauJetSource_ " << L1extraTauJetSource_
96  << " L1extraCenJetSource_ " << L1extraCenJetSource_
97  << " L1extraFwdJetSource_ " << L1extraFwdJetSource_
98  << " L1extraMuonSource_ " << L1extraMuonSource_
99  << " L1extraIsoEmSource_ " << L1extraIsoEmSource_
100  << " L1extraNonIsoEmSource_ " << L1extraNonIsoEmSource_
101  << " L1GTReadoutRcdSource_ " << L1GTReadoutRcdSource_
102  << " L1GTObjectMapRcdSource_" << L1GTObjectMapRcdSource_
103  << std::endl;
104 }
105 
107 
108 }
109 
111 
113 
114  nEventProc++;
115 
117  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
118  bField = bFieldH.product();
119 
120  // get particle data table
122  iSetup.getData(pdt);
123 
124  // get handle to HEPMCProduct
127  if (useHepMC) iEvent.getByToken(tok_hepmc_, hepmc);
128  else iEvent.getByToken(tok_genParticles_, genParticles);
129 
131  iSetup.get<CaloGeometryRecord>().get(pG);
132  const CaloGeometry* geo = pG.product();
133 
134  edm::ESHandle<CaloTopology> theCaloTopology;
135  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
136  const CaloTopology *caloTopology = theCaloTopology.product();
137 
139  iSetup.get<IdealGeometryRecord>().get(htopo);
140  const HcalTopology* theHBHETopology = htopo.product();
141 
142  //===================== save L1 Trigger information =======================
143  // get L1TriggerReadout records
145  iEvent.getByToken(tok_L1GTrorsrc_, gtRecord);
146 
148  iEvent.getByToken(tok_L1GTobjmap_, gtOMRec);
149 
150  // sanity check on L1 Trigger Records
151  if (!gtRecord.isValid()) {
152  std::cout << "\nL1GlobalTriggerReadoutRecord with \n \nnot found"
153  "\n --> returning false by default!\n" << std::endl;
154  }
155  if (!gtOMRec.isValid()) {
156  std::cout << "\nL1GlobalTriggerObjectMapRecord with \n \nnot found"
157  "\n --> returning false by default!\n" << std::endl;
158  }
159 
160  // L1 decision word
161  const DecisionWord dWord = gtRecord->decisionWord();
162  unsigned int numberTriggerBits= dWord.size();
163 
164  // just print the L1Bit number and AlgoName in first event
165  if ( !initL1){
166  initL1=true;
167  std::cout << "\n Number of Trigger bits " << numberTriggerBits << "\n\n";
168  std::cout << "\tBit \t L1 Algorithm " << std::endl;
169 
170  // get ObjectMaps from ObjectMapRecord
171  const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtOMRec->gtObjectMap();
172  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
173  itMap != objMapVec.end(); ++itMap) {
174 
175  // Get trigger bits
176  int itrig = (*itMap).algoBitNumber();
177 
178  // Get trigger names
179  algoBitToName[itrig] = (*itMap).algoName();
180 
181  std::cout << "\t" << itrig << "\t" << algoBitToName[itrig] << std::endl;
182 
183  // store the algoNames as bin labels of a histogram
184  h_L1AlgoNames->GetXaxis()->SetBinLabel(itrig+1, algoBitToName[itrig].c_str());
185 
186  } // end of for loop
187  } // end of initL1
188 
189  // save L1 decision for each event
190  for (unsigned int iBit = 0; iBit < numberTriggerBits; ++iBit) {
191  bool accept = dWord[iBit];
192  t_L1Decision->push_back(accept);
193  // fill the trigger map
194  if(debugL1Info_) std::cout << "Bit " << iBit << " " << algoBitToName[iBit] << " " << accept << std::endl;
195 
196  if(accept) h_L1AlgoNames->Fill(iBit);
197  }
198 
199  //===================
200  // L1Taus
202  iEvent.getByToken(tok_L1extTauJet_,l1TauHandle);
203  l1extra::L1JetParticleCollection::const_iterator itr;
204  for(itr = l1TauHandle->begin(); itr != l1TauHandle->end(); ++itr ) {
205  t_L1TauJetPt ->push_back( itr->pt() );
206  t_L1TauJetEta ->push_back( itr->eta() );
207  t_L1TauJetPhi ->push_back( itr->phi() );
208  if(debugL1Info_) {
209  std::cout << "tauJ p/pt " << itr->momentum() << " " << itr->pt()
210  << " eta/phi " << itr->eta() << " " << itr->phi()
211  << std::endl;
212  }
213  }
214 
215  // L1 Central Jets
217  iEvent.getByToken(tok_L1extCenJet_,l1CenJetHandle);
218  for( itr = l1CenJetHandle->begin(); itr != l1CenJetHandle->end(); ++itr ) {
219  t_L1CenJetPt ->push_back( itr->pt() );
220  t_L1CenJetEta ->push_back( itr->eta() );
221  t_L1CenJetPhi ->push_back( itr->phi() );
222  if(debugL1Info_) {
223  std::cout << "cenJ p/pt " << itr->momentum() << " " << itr->pt()
224  << " eta/phi " << itr->eta() << " " << itr->phi()
225  << std::endl;
226  }
227  }
228  // L1 Forward Jets
230  iEvent.getByToken(tok_L1extFwdJet_,l1FwdJetHandle);
231  for( itr = l1FwdJetHandle->begin(); itr != l1FwdJetHandle->end(); ++itr ) {
232  t_L1FwdJetPt ->push_back( itr->pt() );
233  t_L1FwdJetEta ->push_back( itr->eta() );
234  t_L1FwdJetPhi ->push_back( itr->phi() );
235  if(debugL1Info_) {
236  std::cout << "fwdJ p/pt " << itr->momentum() << " " << itr->pt()
237  << " eta/phi " << itr->eta() << " " << itr->phi()
238  << std::endl;
239  }
240  }
241  // L1 Isolated EM onjects
242  l1extra::L1EmParticleCollection::const_iterator itrEm;
244  iEvent.getByToken(tok_L1Em_, l1IsoEmHandle);
245  for( itrEm = l1IsoEmHandle->begin(); itrEm != l1IsoEmHandle->end(); ++itrEm ) {
246  t_L1IsoEMPt ->push_back( itrEm->pt() );
247  t_L1IsoEMEta ->push_back( itrEm->eta() );
248  t_L1IsoEMPhi ->push_back( itrEm->phi() );
249  if(debugL1Info_) {
250  std::cout << "isoEm p/pt " << itrEm->momentum() << " " << itrEm->pt()
251  << " eta/phi " << itrEm->eta() << " " << itrEm->phi()
252  << std::endl;
253  }
254  }
255  // L1 Non-Isolated EM onjects
257  iEvent.getByToken(tok_L1extNonIsoEm_, l1NonIsoEmHandle);
258  for( itrEm = l1NonIsoEmHandle->begin(); itrEm != l1NonIsoEmHandle->end(); ++itrEm ) {
259  t_L1NonIsoEMPt ->push_back( itrEm->pt() );
260  t_L1NonIsoEMEta ->push_back( itrEm->eta() );
261  t_L1NonIsoEMPhi ->push_back( itrEm->phi() );
262  if(debugL1Info_) {
263  std::cout << "nonIsoEm p/pt " << itrEm->momentum() << " " << itrEm->pt()
264  << " eta/phi " << itrEm->eta() << " " << itrEm->phi()
265  << std::endl;
266  }
267  }
268 
269  // L1 Muons
270  l1extra::L1MuonParticleCollection::const_iterator itrMu;
272  iEvent.getByToken(tok_L1extMusrc_, l1MuHandle);
273  for( itrMu = l1MuHandle->begin(); itrMu != l1MuHandle->end(); ++itrMu ) {
274  t_L1MuonPt ->push_back( itrMu->pt() );
275  t_L1MuonEta ->push_back( itrMu->eta() );
276  t_L1MuonPhi ->push_back( itrMu->phi() );
277  if(debugL1Info_) {
278  std::cout << "l1muon p/pt " << itrMu->momentum() << " " << itrMu->pt()
279  << " eta/phi " << itrMu->eta() << " " << itrMu->phi()
280  << std::endl;
281  }
282  }
283  //=====================================================================
284 
285  GlobalPoint posVec, posECAL;
287  if (verbosity>0) std::cout << "event number " << iEvent.id().event() <<std::endl;
288  if (useHepMC) {
289  const HepMC::GenEvent *myGenEvent = hepmc->GetEvent();
290  std::vector<spr::propagatedGenTrackID> trackIDs = spr::propagateCALO(myGenEvent, pdt, geo, bField, etaMax, false);
291 
292  for (unsigned int indx=0; indx<trackIDs.size(); ++indx) {
293  int charge = trackIDs[indx].charge;
294  HepMC::GenEvent::particle_const_iterator p = trackIDs[indx].trkItr;
295  momVec = math::XYZTLorentzVector((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
296  if (verbosity>1) std::cout << "trkIndx " << indx << " pdgid " << trackIDs[indx].pdgId << " charge " << charge << " momVec " << momVec << std::endl;
297  // only stable particles avoiding electrons and muons
298  if (trackIDs[indx].ok && (std::abs(trackIDs[indx].pdgId)<11 ||
299  std::abs(trackIDs[indx].pdgId)>=21)) {
300  // consider particles within a phased space
301  if (momVec.Pt() > ptMin && std::abs(momVec.eta()) < etaMax) {
302  posVec = GlobalPoint(0.1*(*p)->production_vertex()->position().x(),
303  0.1*(*p)->production_vertex()->position().y(),
304  0.1*(*p)->production_vertex()->position().z());
305  posECAL = trackIDs[indx].pointECAL;
306  fillTrack (posVec, momVec, posECAL, trackIDs[indx].pdgId, trackIDs[indx].okECAL, true);
307  if (verbosity>1) std::cout << "posECAL " << posECAL << " okECAL " << trackIDs[indx].okECAL << "okHCAL " << trackIDs[indx].okHCAL << std::endl;
308  if (trackIDs[indx].okECAL) {
309  if ( std::abs(charge)>0 ) {
310  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 0, 0, isoinfo1x1, false);
311  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 1, 1, isoinfo3x3, false);
312  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 3, 3, isoinfo7x7, false);
313  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 4, 4, isoinfo9x9, false);
314  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 5, 5, isoinfo11x11, false);
315  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 7, 7, isoinfo15x15, false);
316  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,10,10, isoinfo21x21, false);
317  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,12,12, isoinfo25x25, false);
318  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,15,15, isoinfo31x31, false);
319  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_mipR, trackIDs[indx].directionECAL, isoinfoR, false);
320  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_neutIsoR, trackIDs[indx].directionECAL, isoinfoIsoR, false);
321  if (trackIDs[indx].okHCAL) {
322  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 0, 0, isoinfoHC1x1, false);
323  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 1, 1, isoinfoHC3x3, false);
324  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 2, 2, isoinfoHC5x5, false);
325  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 3, 3, isoinfoHC7x7, false);
326  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_coneR, trackIDs[indx].directionHCAL, isoinfoHCR, false);
327  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_charIsoR, trackIDs[indx].directionHCAL, isoinfoIsoHCR, false);
328  }
329 
330  bool saveTrack = true;
331  if (a_Isolation) saveTrack = (isoinfoR.maxNearP < pCutIsolate);
332  else saveTrack = (isoinfo7x7.maxNearP < pCutIsolate);
333  if (saveTrack) fillIsolatedTrack(momVec, posECAL, trackIDs[indx].pdgId);
334  }
335  }
336  } else { // stabale particles within |eta|=2.5
337  fillTrack (posVec, momVec, posECAL, 0, false, false);
338  }
339  }
340  }
341 
342  unsigned int indx;
343  HepMC::GenEvent::particle_const_iterator p;
344  for (p=myGenEvent->particles_begin(),indx=0; p!=myGenEvent->particles_end();
345  ++p,++indx) {
346  int pdgId = ((*p)->pdg_id());
347  int ix = particleCode(pdgId);
348  if (ix >= 0) {
349  double pp = (*p)->momentum().rho();
350  double eta = (*p)->momentum().eta();
351  h_pEta[ix]->Fill(pp,eta);
352  }
353  }
354  } else { // loop over gen particles
355  std::vector<spr::propagatedGenParticleID> trackIDs = spr::propagateCALO(genParticles, pdt, geo, bField, etaMax, (verbosity>0));
356 
357  for (unsigned int indx=0; indx<trackIDs.size(); ++indx) {
358  int charge = trackIDs[indx].charge;
359  reco::GenParticleCollection::const_iterator p = trackIDs[indx].trkItr;
360 
361  momVec = math::XYZTLorentzVector(p->momentum().x(), p->momentum().y(), p->momentum().z(), p->energy());
362  if (verbosity>1) std::cout << "trkIndx " << indx << " pdgid " << trackIDs[indx].pdgId << " charge " << charge << " momVec " << momVec << std::endl;
363  // only stable particles avoiding electrons and muons
364  if (trackIDs[indx].ok && std::abs(trackIDs[indx].pdgId)>21) {
365  // consider particles within a phased space
366  if (verbosity>1) std::cout << " pt " << momVec.Pt() << " eta " << momVec.eta() << std::endl;
367  if (momVec.Pt() > ptMin && std::abs(momVec.eta()) < etaMax) {
368  posVec = GlobalPoint(p->vertex().x(), p->vertex().y(), p->vertex().z());
369  posECAL = trackIDs[indx].pointECAL;
370  if (verbosity>0) std::cout << "posECAL " << posECAL << " okECAL " << trackIDs[indx].okECAL << "okHCAL " << trackIDs[indx].okHCAL << std::endl;
371  fillTrack (posVec, momVec, posECAL, trackIDs[indx].pdgId, trackIDs[indx].okECAL, true);
372  if (trackIDs[indx].okECAL) {
373  if ( std::abs(charge)>0 ) {
374  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 0, 0, isoinfo1x1, verbosity>1);
375  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 1, 1, isoinfo3x3, verbosity>0);
376  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 3, 3, isoinfo7x7, verbosity>1);
377  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 4, 4, isoinfo9x9, verbosity>1);
378  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 5, 5, isoinfo11x11, verbosity>1);
379  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 7, 7, isoinfo15x15, verbosity>1);
380  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,10,10, isoinfo21x21, verbosity>1);
381  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,12,12, isoinfo25x25, verbosity>1);
382  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,15,15, isoinfo31x31, verbosity>1);
383  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_mipR, trackIDs[indx].directionECAL, isoinfoR, verbosity>1);
384  spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_neutIsoR, trackIDs[indx].directionECAL, isoinfoIsoR, verbosity>1);
385  if (trackIDs[indx].okHCAL) {
386  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 0, 0, isoinfoHC1x1, verbosity>1);
387  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 1, 1, isoinfoHC3x3, verbosity>1);
388  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 2, 2, isoinfoHC5x5, verbosity>1);
389  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 3, 3, isoinfoHC7x7, verbosity>1);
390  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_coneR, trackIDs[indx].directionHCAL, isoinfoHCR, verbosity>1);
391  spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_charIsoR, trackIDs[indx].directionHCAL, isoinfoIsoHCR, verbosity>1);
392  }
393 
394  bool saveTrack = true;
395  if (a_Isolation) saveTrack = (isoinfoIsoR.maxNearP < pCutIsolate);
396  else saveTrack = (isoinfo7x7.maxNearP < pCutIsolate);
397  if (saveTrack) fillIsolatedTrack(momVec, posECAL, trackIDs[indx].pdgId);
398  }
399  }
400  } else { // stabale particles within |eta|=2.5
401  fillTrack (posVec, momVec, posECAL, 0, false, false);
402  }
403  }
404  } // loop over gen particles
405 
406  unsigned int indx;
407  reco::GenParticleCollection::const_iterator p;
408  for (p=genParticles->begin(),indx=0; p!=genParticles->end(); ++p,++indx) {
409  int pdgId = (p->pdgId());
410  int ix = particleCode(pdgId);
411  if (ix >= 0) {
412  double pp = (p->momentum()).R();
413  double eta = (p->momentum()).Eta();
414  h_pEta[ix]->Fill(pp,eta);
415  }
416  }
417 
418  }
419 
420  //t_nEvtProc->push_back(nEventProc);
421  h_NEventProc->SetBinContent(1,nEventProc);
422  tree->Fill();
423 
424 }
425 
427 
428  nEventProc=0;
429 
430  initL1 = false;
431 
432  double tempgen_TH[NPBins+1] = { 0.0, 5.0, 12.0, 300.0};
433  for(int i=0; i<=NPBins; i++) genPartPBins[i] = tempgen_TH[i];
434 
435  double tempgen_Eta[NEtaBins+1] = {0.0, 0.5, 1.1, 1.7, 2.3};
436  for(int i=0; i<=NEtaBins; i++) genPartEtaBins[i] = tempgen_Eta[i];
437 
438  BookHistograms();
439 
440 }
441 
443 }
444 
445 double IsolatedGenParticles::DeltaPhi(double v1, double v2) {
446  // Computes the correctly normalized phi difference
447  // v1, v2 = phi of object 1 and 2
448 
449  double pi = 3.141592654;
450  double twopi = 6.283185307;
451 
452  double diff = std::abs(v2 - v1);
453  double corr = twopi - diff;
454  if (diff < pi){ return diff;} else { return corr;}
455 }
456 
457 double IsolatedGenParticles::DeltaR(double eta1, double phi1, double eta2, double phi2) {
458  double deta = eta1 - eta2;
459  double dphi = DeltaPhi(phi1, phi2);
460  return std::sqrt(deta*deta + dphi*dphi);
461 }
462 
463 double IsolatedGenParticles::DeltaR2(double eta1, double phi1, double eta2, double phi2) {
464  double deta = eta1 - eta2;
465  double dphi = DeltaPhi(phi1, phi2);
466  return deta*deta + dphi*dphi;
467 }
468 
469 void IsolatedGenParticles::fillTrack (GlobalPoint & posVec, math::XYZTLorentzVector & momVec, GlobalPoint & posECAL, int pdgId, bool okECAL, bool accept) {
470 
471  if (accept) {
472  t_isoTrkPAll ->push_back( momVec.P() );
473  t_isoTrkPtAll ->push_back( momVec.Pt() );
474  t_isoTrkPhiAll ->push_back( momVec.phi() );
475  t_isoTrkEtaAll ->push_back( momVec.eta() );
476  t_isoTrkPdgIdAll ->push_back( pdgId ) ;
477  if (okECAL) {
478  double phi1 = momVec.phi();
479  double phi2 = (posECAL - posVec).phi();
480  double dphi = DeltaPhi( phi1, phi2 );
481  double deta = momVec.eta() - (posECAL - posVec).eta();
482  t_isoTrkDPhiAll ->push_back( dphi );
483  t_isoTrkDEtaAll ->push_back( deta );
484  } else {
485  t_isoTrkDPhiAll ->push_back( 999.0 );
486  t_isoTrkDEtaAll ->push_back( 999.0 );
487  }
488  } else {
489  t_isoTrkDPhiAll ->push_back( -999.0 );
490  t_isoTrkDEtaAll ->push_back( -999.0 );
491  }
492 }
493 
495 
496  t_isoTrkP ->push_back(momVec.P());
497  t_isoTrkPt ->push_back(momVec.Pt());
498  t_isoTrkEne ->push_back(momVec.E());
499  t_isoTrkEta ->push_back(momVec.eta());
500  t_isoTrkPhi ->push_back(momVec.phi());
501  t_isoTrkEtaEC ->push_back(posECAL.eta());
502  t_isoTrkPhiEC ->push_back(posECAL.phi());
503  t_isoTrkPdgId ->push_back(pdgId);
504 
512  t_eleEne31x31 ->push_back(isoinfo31x31.eleEne);
513  t_muEne31x31 ->push_back(isoinfo31x31.muEne);
514 
522  t_eleEne25x25 ->push_back(isoinfo25x25.eleEne);
523  t_muEne25x25 ->push_back(isoinfo25x25.muEne);
524 
532  t_eleEne21x21 ->push_back(isoinfo21x21.eleEne);
533  t_muEne21x21 ->push_back(isoinfo21x21.muEne);
534 
542  t_eleEne15x15 ->push_back(isoinfo15x15.eleEne);
543  t_muEne15x15 ->push_back(isoinfo15x15.muEne);
544 
552  t_eleEne11x11 ->push_back(isoinfo11x11.eleEne);
553  t_muEne11x11 ->push_back(isoinfo11x11.muEne);
554 
555  t_maxNearP9x9 ->push_back(isoinfo9x9.maxNearP);
557  t_cHadronEne9x9_1 ->push_back(isoinfo9x9.cHadronEne_[0]);
558  t_cHadronEne9x9_2 ->push_back(isoinfo9x9.cHadronEne_[1]);
559  t_cHadronEne9x9_3 ->push_back(isoinfo9x9.cHadronEne_[2]);
561  t_photonEne9x9 ->push_back(isoinfo9x9.photonEne);
562  t_eleEne9x9 ->push_back(isoinfo9x9.eleEne);
563  t_muEne9x9 ->push_back(isoinfo9x9.muEne);
564 
565  t_maxNearP7x7 ->push_back(isoinfo7x7.maxNearP);
567  t_cHadronEne7x7_1 ->push_back(isoinfo7x7.cHadronEne_[0]);
568  t_cHadronEne7x7_2 ->push_back(isoinfo7x7.cHadronEne_[1]);
569  t_cHadronEne7x7_3 ->push_back(isoinfo7x7.cHadronEne_[2]);
571  t_photonEne7x7 ->push_back(isoinfo7x7.photonEne);
572  t_eleEne7x7 ->push_back(isoinfo7x7.eleEne);
573  t_muEne7x7 ->push_back(isoinfo7x7.muEne);
574 
575  t_maxNearP3x3 ->push_back(isoinfo3x3.maxNearP);
577  t_cHadronEne3x3_1 ->push_back(isoinfo3x3.cHadronEne_[0]);
578  t_cHadronEne3x3_2 ->push_back(isoinfo3x3.cHadronEne_[1]);
579  t_cHadronEne3x3_3 ->push_back(isoinfo3x3.cHadronEne_[2]);
581  t_photonEne3x3 ->push_back(isoinfo3x3.photonEne);
582  t_eleEne3x3 ->push_back(isoinfo3x3.eleEne);
583  t_muEne3x3 ->push_back(isoinfo3x3.muEne);
584 
585  t_maxNearP1x1 ->push_back(isoinfo1x1.maxNearP);
587  t_cHadronEne1x1_1 ->push_back(isoinfo1x1.cHadronEne_[0]);
588  t_cHadronEne1x1_2 ->push_back(isoinfo1x1.cHadronEne_[1]);
589  t_cHadronEne1x1_3 ->push_back(isoinfo1x1.cHadronEne_[2]);
591  t_photonEne1x1 ->push_back(isoinfo1x1.photonEne);
592  t_eleEne1x1 ->push_back(isoinfo1x1.eleEne);
593  t_muEne1x1 ->push_back(isoinfo1x1.muEne);
594 
602  t_eleEneHC1x1 ->push_back(isoinfoHC1x1.eleEne);
603  t_muEneHC1x1 ->push_back(isoinfoHC1x1.muEne);
604 
612  t_eleEneHC3x3 ->push_back(isoinfoHC3x3.eleEne);
613  t_muEneHC3x3 ->push_back(isoinfoHC3x3.muEne);
614 
622  t_eleEneHC5x5 ->push_back(isoinfoHC5x5.eleEne);
623  t_muEneHC5x5 ->push_back(isoinfoHC5x5.muEne);
624 
632  t_eleEneHC7x7 ->push_back(isoinfoHC7x7.eleEne);
633  t_muEneHC7x7 ->push_back(isoinfoHC7x7.muEne);
634 
635  t_maxNearPR ->push_back(isoinfoR.maxNearP);
636  t_cHadronEneR ->push_back(isoinfoR.cHadronEne);
637  t_cHadronEneR_1 ->push_back(isoinfoR.cHadronEne_[0]);
638  t_cHadronEneR_2 ->push_back(isoinfoR.cHadronEne_[1]);
639  t_cHadronEneR_3 ->push_back(isoinfoR.cHadronEne_[2]);
640  t_nHadronEneR ->push_back(isoinfoR.nHadronEne);
641  t_photonEneR ->push_back(isoinfoR.photonEne);
642  t_eleEneR ->push_back(isoinfoR.eleEne);
643  t_muEneR ->push_back(isoinfoR.muEne);
644 
645  t_maxNearPIsoR ->push_back(isoinfoIsoR.maxNearP);
652  t_eleEneIsoR ->push_back(isoinfoIsoR.eleEne);
653  t_muEneIsoR ->push_back(isoinfoIsoR.muEne);
654 
655  t_maxNearPHCR ->push_back(isoinfoHCR.maxNearP);
657  t_cHadronEneHCR_1 ->push_back(isoinfoHCR.cHadronEne_[0]);
658  t_cHadronEneHCR_2 ->push_back(isoinfoHCR.cHadronEne_[1]);
659  t_cHadronEneHCR_3 ->push_back(isoinfoHCR.cHadronEne_[2]);
661  t_photonEneHCR ->push_back(isoinfoHCR.photonEne);
662  t_eleEneHCR ->push_back(isoinfoHCR.eleEne);
663  t_muEneHCR ->push_back(isoinfoHCR.muEne);
664 
672  t_eleEneIsoHCR ->push_back(isoinfoIsoHCR.eleEne);
673  t_muEneIsoHCR ->push_back(isoinfoIsoHCR.muEne);
674 }
675 
677 
678  //char hname[100], htit[100];
679 
680  h_NEventProc = fs->make<TH1I>("h_NEventProc", "h_NEventProc", 2, -0.5, 0.5);
681  h_L1AlgoNames = fs->make<TH1I>("h_L1AlgoNames", "h_L1AlgoNames:Bin Labels", 128, -0.5, 127.5);
682 
683  double pBin[] = {0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 20.0, 30.0, 40.0, 50.0,
684  60.0, 70.0, 80.0, 90.0, 100.0, 150.0, 200.0, 250.0,
685  300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0,
686  650.0, 700.0, 750.0, 800.0, 850.0, 900.0, 950.0,
687  1000.0};
688  constexpr double etaBin[] = {-3.0, -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3,
689  -2.2, -2.1, -2.0, -1.9, -1.8, -1.7, -1.6, -1.5,
690  -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7,
691  -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.0, 0.1,
692  0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
693  1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7,
694  1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5,
695  2.6, 2.7, 2.8, 2.9, 3.0};
696  constexpr char const* particle[] = {"electron", "positron", "#gamma", "#pi^+",
697  "#pi^-", "K^+", "K^-", "p", "n", "pbar",
698  "nbar", "K^0_L"};
699  TFileDirectory dir1 = fs->mkdir( "pEta" );
700  char name[20], title[50];
701  for (int i=0; i<Particles; ++i) {
702  sprintf (name, "pEta%d", i);
703  sprintf (title, "#eta vs momentum for %s", particle[i]);
704  h_pEta[i] = dir1.make<TH2D>(name, title, (sizeof(pBin)/sizeof(double))-1, pBin, (sizeof(etaBin)/sizeof(double))-1, etaBin);
705  }
706 
707  // build the tree
708  tree = fs->make<TTree>("tree", "tree");
709 
710  t_isoTrkPAll = new std::vector<double>();
711  t_isoTrkPtAll = new std::vector<double>();
712  t_isoTrkPhiAll = new std::vector<double>();
713  t_isoTrkEtaAll = new std::vector<double>();
714  t_isoTrkDPhiAll = new std::vector<double>();
715  t_isoTrkDEtaAll = new std::vector<double>();
716  t_isoTrkPdgIdAll = new std::vector<double>();
717 
718  t_isoTrkP = new std::vector<double>();
719  t_isoTrkPt = new std::vector<double>();
720  t_isoTrkEne = new std::vector<double>();
721  t_isoTrkEta = new std::vector<double>();
722  t_isoTrkPhi = new std::vector<double>();
723  t_isoTrkEtaEC = new std::vector<double>();
724  t_isoTrkPhiEC = new std::vector<double>();
725  t_isoTrkPdgId = new std::vector<double>();
726 
727  t_maxNearP31x31 = new std::vector<double>();
728  t_cHadronEne31x31 = new std::vector<double>();
729  t_cHadronEne31x31_1 = new std::vector<double>();
730  t_cHadronEne31x31_2 = new std::vector<double>();
731  t_cHadronEne31x31_3 = new std::vector<double>();
732  t_nHadronEne31x31 = new std::vector<double>();
733  t_photonEne31x31 = new std::vector<double>();
734  t_eleEne31x31 = new std::vector<double>();
735  t_muEne31x31 = new std::vector<double>();
736 
737  t_maxNearP25x25 = new std::vector<double>();
738  t_cHadronEne25x25 = new std::vector<double>();
739  t_cHadronEne25x25_1 = new std::vector<double>();
740  t_cHadronEne25x25_2 = new std::vector<double>();
741  t_cHadronEne25x25_3 = new std::vector<double>();
742  t_nHadronEne25x25 = new std::vector<double>();
743  t_photonEne25x25 = new std::vector<double>();
744  t_eleEne25x25 = new std::vector<double>();
745  t_muEne25x25 = new std::vector<double>();
746 
747  t_maxNearP21x21 = new std::vector<double>();
748  t_cHadronEne21x21 = new std::vector<double>();
749  t_cHadronEne21x21_1 = new std::vector<double>();
750  t_cHadronEne21x21_2 = new std::vector<double>();
751  t_cHadronEne21x21_3 = new std::vector<double>();
752  t_nHadronEne21x21 = new std::vector<double>();
753  t_photonEne21x21 = new std::vector<double>();
754  t_eleEne21x21 = new std::vector<double>();
755  t_muEne21x21 = new std::vector<double>();
756 
757  t_maxNearP15x15 = new std::vector<double>();
758  t_cHadronEne15x15 = new std::vector<double>();
759  t_cHadronEne15x15_1 = new std::vector<double>();
760  t_cHadronEne15x15_2 = new std::vector<double>();
761  t_cHadronEne15x15_3 = new std::vector<double>();
762  t_nHadronEne15x15 = new std::vector<double>();
763  t_photonEne15x15 = new std::vector<double>();
764  t_eleEne15x15 = new std::vector<double>();
765  t_muEne15x15 = new std::vector<double>();
766 
767  t_maxNearP11x11 = new std::vector<double>();
768  t_cHadronEne11x11 = new std::vector<double>();
769  t_cHadronEne11x11_1 = new std::vector<double>();
770  t_cHadronEne11x11_2 = new std::vector<double>();
771  t_cHadronEne11x11_3 = new std::vector<double>();
772  t_nHadronEne11x11 = new std::vector<double>();
773  t_photonEne11x11 = new std::vector<double>();
774  t_eleEne11x11 = new std::vector<double>();
775  t_muEne11x11 = new std::vector<double>();
776 
777  t_maxNearP9x9 = new std::vector<double>();
778  t_cHadronEne9x9 = new std::vector<double>();
779  t_cHadronEne9x9_1 = new std::vector<double>();
780  t_cHadronEne9x9_2 = new std::vector<double>();
781  t_cHadronEne9x9_3 = new std::vector<double>();
782  t_nHadronEne9x9 = new std::vector<double>();
783  t_photonEne9x9 = new std::vector<double>();
784  t_eleEne9x9 = new std::vector<double>();
785  t_muEne9x9 = new std::vector<double>();
786 
787  t_maxNearP7x7 = new std::vector<double>();
788  t_cHadronEne7x7 = new std::vector<double>();
789  t_cHadronEne7x7_1 = new std::vector<double>();
790  t_cHadronEne7x7_2 = new std::vector<double>();
791  t_cHadronEne7x7_3 = new std::vector<double>();
792  t_nHadronEne7x7 = new std::vector<double>();
793  t_photonEne7x7 = new std::vector<double>();
794  t_eleEne7x7 = new std::vector<double>();
795  t_muEne7x7 = new std::vector<double>();
796 
797  t_maxNearP3x3 = new std::vector<double>();
798  t_cHadronEne3x3 = new std::vector<double>();
799  t_cHadronEne3x3_1 = new std::vector<double>();
800  t_cHadronEne3x3_2 = new std::vector<double>();
801  t_cHadronEne3x3_3 = new std::vector<double>();
802  t_nHadronEne3x3 = new std::vector<double>();
803  t_photonEne3x3 = new std::vector<double>();
804  t_eleEne3x3 = new std::vector<double>();
805  t_muEne3x3 = new std::vector<double>();
806 
807  t_maxNearP1x1 = new std::vector<double>();
808  t_cHadronEne1x1 = new std::vector<double>();
809  t_cHadronEne1x1_1 = new std::vector<double>();
810  t_cHadronEne1x1_2 = new std::vector<double>();
811  t_cHadronEne1x1_3 = new std::vector<double>();
812  t_nHadronEne1x1 = new std::vector<double>();
813  t_photonEne1x1 = new std::vector<double>();
814  t_eleEne1x1 = new std::vector<double>();
815  t_muEne1x1 = new std::vector<double>();
816 
817  t_maxNearPHC1x1 = new std::vector<double>();
818  t_cHadronEneHC1x1 = new std::vector<double>();
819  t_cHadronEneHC1x1_1 = new std::vector<double>();
820  t_cHadronEneHC1x1_2 = new std::vector<double>();
821  t_cHadronEneHC1x1_3 = new std::vector<double>();
822  t_nHadronEneHC1x1 = new std::vector<double>();
823  t_photonEneHC1x1 = new std::vector<double>();
824  t_eleEneHC1x1 = new std::vector<double>();
825  t_muEneHC1x1 = new std::vector<double>();
826 
827  t_maxNearPHC3x3 = new std::vector<double>();
828  t_cHadronEneHC3x3 = new std::vector<double>();
829  t_cHadronEneHC3x3_1 = new std::vector<double>();
830  t_cHadronEneHC3x3_2 = new std::vector<double>();
831  t_cHadronEneHC3x3_3 = new std::vector<double>();
832  t_nHadronEneHC3x3 = new std::vector<double>();
833  t_photonEneHC3x3 = new std::vector<double>();
834  t_eleEneHC3x3 = new std::vector<double>();
835  t_muEneHC3x3 = new std::vector<double>();
836 
837  t_maxNearPHC5x5 = new std::vector<double>();
838  t_cHadronEneHC5x5 = new std::vector<double>();
839  t_cHadronEneHC5x5_1 = new std::vector<double>();
840  t_cHadronEneHC5x5_2 = new std::vector<double>();
841  t_cHadronEneHC5x5_3 = new std::vector<double>();
842  t_nHadronEneHC5x5 = new std::vector<double>();
843  t_photonEneHC5x5 = new std::vector<double>();
844  t_eleEneHC5x5 = new std::vector<double>();
845  t_muEneHC5x5 = new std::vector<double>();
846 
847  t_maxNearPHC7x7 = new std::vector<double>();
848  t_cHadronEneHC7x7 = new std::vector<double>();
849  t_cHadronEneHC7x7_1 = new std::vector<double>();
850  t_cHadronEneHC7x7_2 = new std::vector<double>();
851  t_cHadronEneHC7x7_3 = new std::vector<double>();
852  t_nHadronEneHC7x7 = new std::vector<double>();
853  t_photonEneHC7x7 = new std::vector<double>();
854  t_eleEneHC7x7 = new std::vector<double>();
855  t_muEneHC7x7 = new std::vector<double>();
856 
857  t_maxNearPR = new std::vector<double>();
858  t_cHadronEneR = new std::vector<double>();
859  t_cHadronEneR_1 = new std::vector<double>();
860  t_cHadronEneR_2 = new std::vector<double>();
861  t_cHadronEneR_3 = new std::vector<double>();
862  t_nHadronEneR = new std::vector<double>();
863  t_photonEneR = new std::vector<double>();
864  t_eleEneR = new std::vector<double>();
865  t_muEneR = new std::vector<double>();
866 
867  t_maxNearPIsoR = new std::vector<double>();
868  t_cHadronEneIsoR = new std::vector<double>();
869  t_cHadronEneIsoR_1 = new std::vector<double>();
870  t_cHadronEneIsoR_2 = new std::vector<double>();
871  t_cHadronEneIsoR_3 = new std::vector<double>();
872  t_nHadronEneIsoR = new std::vector<double>();
873  t_photonEneIsoR = new std::vector<double>();
874  t_eleEneIsoR = new std::vector<double>();
875  t_muEneIsoR = new std::vector<double>();
876 
877  t_maxNearPHCR = new std::vector<double>();
878  t_cHadronEneHCR = new std::vector<double>();
879  t_cHadronEneHCR_1 = new std::vector<double>();
880  t_cHadronEneHCR_2 = new std::vector<double>();
881  t_cHadronEneHCR_3 = new std::vector<double>();
882  t_nHadronEneHCR = new std::vector<double>();
883  t_photonEneHCR = new std::vector<double>();
884  t_eleEneHCR = new std::vector<double>();
885  t_muEneHCR = new std::vector<double>();
886 
887  t_maxNearPIsoHCR = new std::vector<double>();
888  t_cHadronEneIsoHCR = new std::vector<double>();
889  t_cHadronEneIsoHCR_1 = new std::vector<double>();
890  t_cHadronEneIsoHCR_2 = new std::vector<double>();
891  t_cHadronEneIsoHCR_3 = new std::vector<double>();
892  t_nHadronEneIsoHCR = new std::vector<double>();
893  t_photonEneIsoHCR = new std::vector<double>();
894  t_eleEneIsoHCR = new std::vector<double>();
895  t_muEneIsoHCR = new std::vector<double>();
896 
897  //----- L1Trigger
898  t_L1Decision = new std::vector<int>();
899  t_L1CenJetPt = new std::vector<double>();
900  t_L1CenJetEta = new std::vector<double>();
901  t_L1CenJetPhi = new std::vector<double>();
902  t_L1FwdJetPt = new std::vector<double>();
903  t_L1FwdJetEta = new std::vector<double>();
904  t_L1FwdJetPhi = new std::vector<double>();
905  t_L1TauJetPt = new std::vector<double>();
906  t_L1TauJetEta = new std::vector<double>();
907  t_L1TauJetPhi = new std::vector<double>();
908  t_L1MuonPt = new std::vector<double>();
909  t_L1MuonEta = new std::vector<double>();
910  t_L1MuonPhi = new std::vector<double>();
911  t_L1IsoEMPt = new std::vector<double>();
912  t_L1IsoEMEta = new std::vector<double>();
913  t_L1IsoEMPhi = new std::vector<double>();
914  t_L1NonIsoEMPt = new std::vector<double>();
915  t_L1NonIsoEMEta = new std::vector<double>();
916  t_L1NonIsoEMPhi = new std::vector<double>();
917  t_L1METPt = new std::vector<double>();
918  t_L1METEta = new std::vector<double>();
919  t_L1METPhi = new std::vector<double>();
920 
921  //tree->Branch("t_nEvtProc", "vector<int>", &t_nEvtProc);
922 
923  tree->Branch("t_isoTrkPAll", "vector<double>", &t_isoTrkPAll);
924  tree->Branch("t_isoTrkPtAll", "vector<double>", &t_isoTrkPtAll);
925  tree->Branch("t_isoTrkPhiAll", "vector<double>", &t_isoTrkPhiAll);
926  tree->Branch("t_isoTrkEtaAll", "vector<double>", &t_isoTrkEtaAll);
927  tree->Branch("t_isoTrkDPhiAll", "vector<double>", &t_isoTrkDPhiAll);
928  tree->Branch("t_isoTrkDEtaAll", "vector<double>", &t_isoTrkDEtaAll);
929  tree->Branch("t_isoTrkPdgIdAll", "vector<double>", &t_isoTrkPdgIdAll);
930 
931  tree->Branch("t_isoTrkP", "vector<double>", &t_isoTrkP);
932  tree->Branch("t_isoTrkPt", "vector<double>", &t_isoTrkPt);
933  tree->Branch("t_isoTrkEne", "vector<double>", &t_isoTrkEne);
934  tree->Branch("t_isoTrkEta", "vector<double>", &t_isoTrkEta);
935  tree->Branch("t_isoTrkPhi", "vector<double>", &t_isoTrkPhi);
936  tree->Branch("t_isoTrkEtaEC", "vector<double>", &t_isoTrkEtaEC);
937  tree->Branch("t_isoTrkPhiEC", "vector<double>", &t_isoTrkPhiEC);
938  tree->Branch("t_isoTrkPdgId", "vector<double>", &t_isoTrkPdgId);
939 
940  tree->Branch("t_maxNearP31x31", "vector<double>", &t_maxNearP31x31);
941  tree->Branch("t_cHadronEne31x31", "vector<double>", &t_cHadronEne31x31);
942  tree->Branch("t_cHadronEne31x31_1", "vector<double>", &t_cHadronEne31x31_1);
943  tree->Branch("t_cHadronEne31x31_2", "vector<double>", &t_cHadronEne31x31_2);
944  tree->Branch("t_cHadronEne31x31_3", "vector<double>", &t_cHadronEne31x31_3);
945  tree->Branch("t_nHadronEne31x31", "vector<double>", &t_nHadronEne31x31);
946  tree->Branch("t_photonEne31x31", "vector<double>", &t_photonEne31x31);
947  tree->Branch("t_eleEne31x31", "vector<double>", &t_eleEne31x31);
948  tree->Branch("t_muEne31x31", "vector<double>", &t_muEne31x31);
949 
950  tree->Branch("t_maxNearP25x25", "vector<double>", &t_maxNearP25x25);
951  tree->Branch("t_cHadronEne25x25", "vector<double>", &t_cHadronEne25x25);
952  tree->Branch("t_cHadronEne25x25_1", "vector<double>", &t_cHadronEne25x25_1);
953  tree->Branch("t_cHadronEne25x25_2", "vector<double>", &t_cHadronEne25x25_2);
954  tree->Branch("t_cHadronEne25x25_3", "vector<double>", &t_cHadronEne25x25_3);
955  tree->Branch("t_nHadronEne25x25", "vector<double>", &t_nHadronEne25x25);
956  tree->Branch("t_photonEne25x25", "vector<double>", &t_photonEne25x25);
957  tree->Branch("t_eleEne25x25", "vector<double>", &t_eleEne25x25);
958  tree->Branch("t_muEne25x25", "vector<double>", &t_muEne25x25);
959 
960  tree->Branch("t_maxNearP21x21", "vector<double>", &t_maxNearP21x21);
961  tree->Branch("t_cHadronEne21x21", "vector<double>", &t_cHadronEne21x21);
962  tree->Branch("t_cHadronEne21x21_1", "vector<double>", &t_cHadronEne21x21_1);
963  tree->Branch("t_cHadronEne21x21_2", "vector<double>", &t_cHadronEne21x21_2);
964  tree->Branch("t_cHadronEne21x21_3", "vector<double>", &t_cHadronEne21x21_3);
965  tree->Branch("t_nHadronEne21x21", "vector<double>", &t_nHadronEne21x21);
966  tree->Branch("t_photonEne21x21", "vector<double>", &t_photonEne21x21);
967  tree->Branch("t_eleEne21x21", "vector<double>", &t_eleEne21x21);
968  tree->Branch("t_muEne21x21", "vector<double>", &t_muEne21x21);
969 
970  tree->Branch("t_maxNearP15x15", "vector<double>", &t_maxNearP15x15);
971  tree->Branch("t_cHadronEne15x15", "vector<double>", &t_cHadronEne15x15);
972  tree->Branch("t_cHadronEne15x15_1", "vector<double>", &t_cHadronEne15x15_1);
973  tree->Branch("t_cHadronEne15x15_2", "vector<double>", &t_cHadronEne15x15_2);
974  tree->Branch("t_cHadronEne15x15_3", "vector<double>", &t_cHadronEne15x15_3);
975  tree->Branch("t_nHadronEne15x15", "vector<double>", &t_nHadronEne15x15);
976  tree->Branch("t_photonEne15x15", "vector<double>", &t_photonEne15x15);
977  tree->Branch("t_eleEne15x15", "vector<double>", &t_eleEne15x15);
978  tree->Branch("t_muEne15x15", "vector<double>", &t_muEne15x15);
979 
980  tree->Branch("t_maxNearP11x11", "vector<double>", &t_maxNearP11x11);
981  tree->Branch("t_cHadronEne11x11", "vector<double>", &t_cHadronEne11x11);
982  tree->Branch("t_cHadronEne11x11_1", "vector<double>", &t_cHadronEne11x11_1);
983  tree->Branch("t_cHadronEne11x11_2", "vector<double>", &t_cHadronEne11x11_2);
984  tree->Branch("t_cHadronEne11x11_3", "vector<double>", &t_cHadronEne11x11_3);
985  tree->Branch("t_nHadronEne11x11", "vector<double>", &t_nHadronEne11x11);
986  tree->Branch("t_photonEne11x11", "vector<double>", &t_photonEne11x11);
987  tree->Branch("t_eleEne11x11", "vector<double>", &t_eleEne11x11);
988  tree->Branch("t_muEne11x11", "vector<double>", &t_muEne11x11);
989 
990  tree->Branch("t_maxNearP9x9", "vector<double>", &t_maxNearP9x9);
991  tree->Branch("t_cHadronEne9x9", "vector<double>", &t_cHadronEne9x9);
992  tree->Branch("t_cHadronEne9x9_1", "vector<double>", &t_cHadronEne9x9_1);
993  tree->Branch("t_cHadronEne9x9_2", "vector<double>", &t_cHadronEne9x9_2);
994  tree->Branch("t_cHadronEne9x9_3", "vector<double>", &t_cHadronEne9x9_3);
995  tree->Branch("t_nHadronEne9x9", "vector<double>", &t_nHadronEne9x9);
996  tree->Branch("t_photonEne9x9", "vector<double>", &t_photonEne9x9);
997  tree->Branch("t_eleEne9x9", "vector<double>", &t_eleEne9x9);
998  tree->Branch("t_muEne9x9", "vector<double>", &t_muEne9x9);
999 
1000  tree->Branch("t_maxNearP7x7", "vector<double>", &t_maxNearP7x7);
1001  tree->Branch("t_cHadronEne7x7", "vector<double>", &t_cHadronEne7x7);
1002  tree->Branch("t_cHadronEne7x7_1", "vector<double>", &t_cHadronEne7x7_1);
1003  tree->Branch("t_cHadronEne7x7_2", "vector<double>", &t_cHadronEne7x7_2);
1004  tree->Branch("t_cHadronEne7x7_3", "vector<double>", &t_cHadronEne7x7_3);
1005  tree->Branch("t_nHadronEne7x7", "vector<double>", &t_nHadronEne7x7);
1006  tree->Branch("t_photonEne7x7", "vector<double>", &t_photonEne7x7);
1007  tree->Branch("t_eleEne7x7", "vector<double>", &t_eleEne7x7);
1008  tree->Branch("t_muEne7x7", "vector<double>", &t_muEne7x7);
1009 
1010  tree->Branch("t_maxNearP3x3", "vector<double>", &t_maxNearP3x3);
1011  tree->Branch("t_cHadronEne3x3", "vector<double>", &t_cHadronEne3x3);
1012  tree->Branch("t_cHadronEne3x3_1", "vector<double>", &t_cHadronEne3x3_1);
1013  tree->Branch("t_cHadronEne3x3_2", "vector<double>", &t_cHadronEne3x3_2);
1014  tree->Branch("t_cHadronEne3x3_3", "vector<double>", &t_cHadronEne3x3_3);
1015  tree->Branch("t_nHadronEne3x3", "vector<double>", &t_nHadronEne3x3);
1016  tree->Branch("t_photonEne3x3", "vector<double>", &t_photonEne3x3);
1017  tree->Branch("t_eleEne3x3", "vector<double>", &t_eleEne3x3);
1018  tree->Branch("t_muEne3x3", "vector<double>", &t_muEne3x3);
1019 
1020  tree->Branch("t_maxNearP1x1", "vector<double>", &t_maxNearP1x1);
1021  tree->Branch("t_cHadronEne1x1", "vector<double>", &t_cHadronEne1x1);
1022  tree->Branch("t_cHadronEne1x1_1", "vector<double>", &t_cHadronEne1x1_1);
1023  tree->Branch("t_cHadronEne1x1_2", "vector<double>", &t_cHadronEne1x1_2);
1024  tree->Branch("t_cHadronEne1x1_3", "vector<double>", &t_cHadronEne1x1_3);
1025  tree->Branch("t_nHadronEne1x1", "vector<double>", &t_nHadronEne1x1);
1026  tree->Branch("t_photonEne1x1", "vector<double>", &t_photonEne1x1);
1027  tree->Branch("t_eleEne1x1", "vector<double>", &t_eleEne1x1);
1028  tree->Branch("t_muEne1x1", "vector<double>", &t_muEne1x1);
1029 
1030  tree->Branch("t_maxNearPHC1x1", "vector<double>", &t_maxNearPHC1x1);
1031  tree->Branch("t_cHadronEneHC1x1", "vector<double>", &t_cHadronEneHC1x1);
1032  tree->Branch("t_cHadronEneHC1x1_1", "vector<double>", &t_cHadronEneHC1x1_1);
1033  tree->Branch("t_cHadronEneHC1x1_2", "vector<double>", &t_cHadronEneHC1x1_2);
1034  tree->Branch("t_cHadronEneHC1x1_3", "vector<double>", &t_cHadronEneHC1x1_3);
1035  tree->Branch("t_nHadronEneHC1x1", "vector<double>", &t_nHadronEneHC1x1);
1036  tree->Branch("t_photonEneHC1x1", "vector<double>", &t_photonEneHC1x1);
1037  tree->Branch("t_eleEneHC1x1", "vector<double>", &t_eleEneHC1x1);
1038  tree->Branch("t_muEneHC1x1", "vector<double>", &t_muEneHC1x1);
1039 
1040  tree->Branch("t_maxNearPHC3x3", "vector<double>", &t_maxNearPHC3x3);
1041  tree->Branch("t_cHadronEneHC3x3", "vector<double>", &t_cHadronEneHC3x3);
1042  tree->Branch("t_cHadronEneHC3x3_1", "vector<double>", &t_cHadronEneHC3x3_1);
1043  tree->Branch("t_cHadronEneHC3x3_2", "vector<double>", &t_cHadronEneHC3x3_2);
1044  tree->Branch("t_cHadronEneHC3x3_3", "vector<double>", &t_cHadronEneHC3x3_3);
1045  tree->Branch("t_nHadronEneHC3x3", "vector<double>", &t_nHadronEneHC3x3);
1046  tree->Branch("t_photonEneHC3x3", "vector<double>", &t_photonEneHC3x3);
1047  tree->Branch("t_eleEneHC3x3", "vector<double>", &t_eleEneHC3x3);
1048  tree->Branch("t_muEneHC3x3", "vector<double>", &t_muEneHC3x3);
1049 
1050  tree->Branch("t_maxNearPHC5x5", "vector<double>", &t_maxNearPHC5x5);
1051  tree->Branch("t_cHadronEneHC5x5", "vector<double>", &t_cHadronEneHC5x5);
1052  tree->Branch("t_cHadronEneHC5x5_1", "vector<double>", &t_cHadronEneHC5x5_1);
1053  tree->Branch("t_cHadronEneHC5x5_2", "vector<double>", &t_cHadronEneHC5x5_2);
1054  tree->Branch("t_cHadronEneHC5x5_3", "vector<double>", &t_cHadronEneHC5x5_3);
1055  tree->Branch("t_nHadronEneHC5x5", "vector<double>", &t_nHadronEneHC5x5);
1056  tree->Branch("t_photonEneHC5x5", "vector<double>", &t_photonEneHC5x5);
1057  tree->Branch("t_eleEneHC5x5", "vector<double>", &t_eleEneHC5x5);
1058  tree->Branch("t_muEneHC5x5", "vector<double>", &t_muEneHC5x5);
1059 
1060  tree->Branch("t_maxNearPHC7x7", "vector<double>", &t_maxNearPHC7x7);
1061  tree->Branch("t_cHadronEneHC7x7", "vector<double>", &t_cHadronEneHC7x7);
1062  tree->Branch("t_cHadronEneHC7x7_1", "vector<double>", &t_cHadronEneHC7x7_1);
1063  tree->Branch("t_cHadronEneHC7x7_2", "vector<double>", &t_cHadronEneHC7x7_2);
1064  tree->Branch("t_cHadronEneHC7x7_3", "vector<double>", &t_cHadronEneHC7x7_3);
1065  tree->Branch("t_nHadronEneHC7x7", "vector<double>", &t_nHadronEneHC7x7);
1066  tree->Branch("t_photonEneHC7x7", "vector<double>", &t_photonEneHC7x7);
1067  tree->Branch("t_eleEneHC7x7", "vector<double>", &t_eleEneHC7x7);
1068  tree->Branch("t_muEneHC7x7", "vector<double>", &t_muEneHC7x7);
1069 
1070  tree->Branch("t_maxNearPR", "vector<double>", &t_maxNearPR);
1071  tree->Branch("t_cHadronEneR", "vector<double>", &t_cHadronEneR);
1072  tree->Branch("t_cHadronEneR_1", "vector<double>", &t_cHadronEneR_1);
1073  tree->Branch("t_cHadronEneR_2", "vector<double>", &t_cHadronEneR_2);
1074  tree->Branch("t_cHadronEneR_3", "vector<double>", &t_cHadronEneR_3);
1075  tree->Branch("t_nHadronEneR", "vector<double>", &t_nHadronEneR);
1076  tree->Branch("t_photonEneR", "vector<double>", &t_photonEneR);
1077  tree->Branch("t_eleEneR", "vector<double>", &t_eleEneR);
1078  tree->Branch("t_muEneR", "vector<double>", &t_muEneR);
1079 
1080  tree->Branch("t_maxNearPIsoR", "vector<double>", &t_maxNearPIsoR);
1081  tree->Branch("t_cHadronEneIsoR", "vector<double>", &t_cHadronEneIsoR);
1082  tree->Branch("t_cHadronEneIsoR_1", "vector<double>", &t_cHadronEneIsoR_1);
1083  tree->Branch("t_cHadronEneIsoR_2", "vector<double>", &t_cHadronEneIsoR_2);
1084  tree->Branch("t_cHadronEneIsoR_3", "vector<double>", &t_cHadronEneIsoR_3);
1085  tree->Branch("t_nHadronEneIsoR", "vector<double>", &t_nHadronEneIsoR);
1086  tree->Branch("t_photonEneIsoR", "vector<double>", &t_photonEneIsoR);
1087  tree->Branch("t_eleEneIsoR", "vector<double>", &t_eleEneIsoR);
1088  tree->Branch("t_muEneIsoR", "vector<double>", &t_muEneIsoR);
1089 
1090  tree->Branch("t_maxNearPHCR", "vector<double>", &t_maxNearPHCR);
1091  tree->Branch("t_cHadronEneHCR", "vector<double>", &t_cHadronEneHCR);
1092  tree->Branch("t_cHadronEneHCR_1", "vector<double>", &t_cHadronEneHCR_1);
1093  tree->Branch("t_cHadronEneHCR_2", "vector<double>", &t_cHadronEneHCR_2);
1094  tree->Branch("t_cHadronEneHCR_3", "vector<double>", &t_cHadronEneHCR_3);
1095  tree->Branch("t_nHadronEneHCR", "vector<double>", &t_nHadronEneHCR);
1096  tree->Branch("t_photonEneHCR", "vector<double>", &t_photonEneHCR);
1097  tree->Branch("t_eleEneHCR", "vector<double>", &t_eleEneHCR);
1098  tree->Branch("t_muEneHCR", "vector<double>", &t_muEneHCR);
1099 
1100  tree->Branch("t_maxNearPIsoHCR", "vector<double>", &t_maxNearPIsoHCR);
1101  tree->Branch("t_cHadronEneIsoHCR", "vector<double>", &t_cHadronEneIsoHCR);
1102  tree->Branch("t_cHadronEneIsoHCR_1", "vector<double>", &t_cHadronEneIsoHCR_1);
1103  tree->Branch("t_cHadronEneIsoHCR_2", "vector<double>", &t_cHadronEneIsoHCR_2);
1104  tree->Branch("t_cHadronEneIsoHCR_3", "vector<double>", &t_cHadronEneIsoHCR_3);
1105  tree->Branch("t_nHadronEneIsoHCR", "vector<double>", &t_nHadronEneIsoHCR);
1106  tree->Branch("t_photonEneIsoHCR", "vector<double>", &t_photonEneIsoHCR);
1107  tree->Branch("t_eleEneIsoHCR", "vector<double>", &t_eleEneIsoHCR);
1108  tree->Branch("t_muEneIsoHCR", "vector<double>", &t_muEneIsoHCR);
1109 
1110  tree->Branch("t_L1Decision", "vector<int>", &t_L1Decision);
1111  tree->Branch("t_L1CenJetPt", "vector<double>", &t_L1CenJetPt);
1112  tree->Branch("t_L1CenJetEta", "vector<double>", &t_L1CenJetEta);
1113  tree->Branch("t_L1CenJetPhi", "vector<double>", &t_L1CenJetPhi);
1114  tree->Branch("t_L1FwdJetPt", "vector<double>", &t_L1FwdJetPt);
1115  tree->Branch("t_L1FwdJetEta", "vector<double>", &t_L1FwdJetEta);
1116  tree->Branch("t_L1FwdJetPhi", "vector<double>", &t_L1FwdJetPhi);
1117  tree->Branch("t_L1TauJetPt", "vector<double>", &t_L1TauJetPt);
1118  tree->Branch("t_L1TauJetEta", "vector<double>", &t_L1TauJetEta);
1119  tree->Branch("t_L1TauJetPhi", "vector<double>", &t_L1TauJetPhi);
1120  tree->Branch("t_L1MuonPt", "vector<double>", &t_L1MuonPt);
1121  tree->Branch("t_L1MuonEta", "vector<double>", &t_L1MuonEta);
1122  tree->Branch("t_L1MuonPhi", "vector<double>", &t_L1MuonPhi);
1123  tree->Branch("t_L1IsoEMPt", "vector<double>", &t_L1IsoEMPt);
1124  tree->Branch("t_L1IsoEMEta", "vector<double>", &t_L1IsoEMEta);
1125  tree->Branch("t_L1IsoEMPhi", "vector<double>", &t_L1IsoEMPhi);
1126  tree->Branch("t_L1NonIsoEMPt", "vector<double>", &t_L1NonIsoEMPt);
1127  tree->Branch("t_L1NonIsoEMEta", "vector<double>", &t_L1NonIsoEMEta);
1128  tree->Branch("t_L1NonIsoEMPhi", "vector<double>", &t_L1NonIsoEMPhi);
1129  tree->Branch("t_L1METPt", "vector<double>", &t_L1METPt);
1130  tree->Branch("t_L1METEta", "vector<double>", &t_L1METEta);
1131  tree->Branch("t_L1METPhi", "vector<double>", &t_L1METPhi);
1132 }
1133 
1134 
1136  // t_maxNearP31x31->clear();
1137 
1138  //t_nEvtProc ->clear();
1139 
1140  t_isoTrkPAll ->clear();
1141  t_isoTrkPtAll ->clear();
1142  t_isoTrkPhiAll ->clear();
1143  t_isoTrkEtaAll ->clear();
1144  t_isoTrkDPhiAll ->clear();
1145  t_isoTrkDEtaAll ->clear();
1146  t_isoTrkPdgIdAll ->clear();
1147 
1148  t_isoTrkP ->clear();
1149  t_isoTrkPt ->clear();
1150  t_isoTrkEne ->clear();
1151  t_isoTrkEta ->clear();
1152  t_isoTrkPhi ->clear();
1153  t_isoTrkEtaEC ->clear();
1154  t_isoTrkPhiEC ->clear();
1155  t_isoTrkPdgId ->clear();
1156 
1157  t_maxNearP31x31 ->clear();
1158  t_cHadronEne31x31 ->clear();
1159  t_cHadronEne31x31_1 ->clear();
1160  t_cHadronEne31x31_2 ->clear();
1161  t_cHadronEne31x31_3 ->clear();
1162  t_nHadronEne31x31 ->clear();
1163  t_photonEne31x31 ->clear();
1164  t_eleEne31x31 ->clear();
1165  t_muEne31x31 ->clear();
1166 
1167  t_maxNearP25x25 ->clear();
1168  t_cHadronEne25x25 ->clear();
1169  t_cHadronEne25x25_1 ->clear();
1170  t_cHadronEne25x25_2 ->clear();
1171  t_cHadronEne25x25_3 ->clear();
1172  t_nHadronEne25x25 ->clear();
1173  t_photonEne25x25 ->clear();
1174  t_eleEne25x25 ->clear();
1175  t_muEne25x25 ->clear();
1176 
1177  t_maxNearP21x21 ->clear();
1178  t_cHadronEne21x21 ->clear();
1179  t_cHadronEne21x21_1 ->clear();
1180  t_cHadronEne21x21_2 ->clear();
1181  t_cHadronEne21x21_3 ->clear();
1182  t_nHadronEne21x21 ->clear();
1183  t_photonEne21x21 ->clear();
1184  t_eleEne21x21 ->clear();
1185  t_muEne21x21 ->clear();
1186 
1187  t_maxNearP15x15 ->clear();
1188  t_cHadronEne15x15 ->clear();
1189  t_cHadronEne15x15_1 ->clear();
1190  t_cHadronEne15x15_2 ->clear();
1191  t_cHadronEne15x15_3 ->clear();
1192  t_nHadronEne15x15 ->clear();
1193  t_photonEne15x15 ->clear();
1194  t_eleEne15x15 ->clear();
1195  t_muEne15x15 ->clear();
1196 
1197  t_maxNearP11x11 ->clear();
1198  t_cHadronEne11x11 ->clear();
1199  t_cHadronEne11x11_1 ->clear();
1200  t_cHadronEne11x11_2 ->clear();
1201  t_cHadronEne11x11_3 ->clear();
1202  t_nHadronEne11x11 ->clear();
1203  t_photonEne11x11 ->clear();
1204  t_eleEne11x11 ->clear();
1205  t_muEne11x11 ->clear();
1206 
1207  t_maxNearP9x9 ->clear();
1208  t_cHadronEne9x9 ->clear();
1209  t_cHadronEne9x9_1 ->clear();
1210  t_cHadronEne9x9_2 ->clear();
1211  t_cHadronEne9x9_3 ->clear();
1212  t_nHadronEne9x9 ->clear();
1213  t_photonEne9x9 ->clear();
1214  t_eleEne9x9 ->clear();
1215  t_muEne9x9 ->clear();
1216 
1217  t_maxNearP7x7 ->clear();
1218  t_cHadronEne7x7 ->clear();
1219  t_cHadronEne7x7_1 ->clear();
1220  t_cHadronEne7x7_2 ->clear();
1221  t_cHadronEne7x7_3 ->clear();
1222  t_nHadronEne7x7 ->clear();
1223  t_photonEne7x7 ->clear();
1224  t_eleEne7x7 ->clear();
1225  t_muEne7x7 ->clear();
1226 
1227  t_maxNearP3x3 ->clear();
1228  t_cHadronEne3x3 ->clear();
1229  t_cHadronEne3x3_1 ->clear();
1230  t_cHadronEne3x3_2 ->clear();
1231  t_cHadronEne3x3_3 ->clear();
1232  t_nHadronEne3x3 ->clear();
1233  t_photonEne3x3 ->clear();
1234  t_eleEne3x3 ->clear();
1235  t_muEne3x3 ->clear();
1236 
1237  t_maxNearP1x1 ->clear();
1238  t_cHadronEne1x1 ->clear();
1239  t_cHadronEne1x1_1 ->clear();
1240  t_cHadronEne1x1_2 ->clear();
1241  t_cHadronEne1x1_3 ->clear();
1242  t_nHadronEne1x1 ->clear();
1243  t_photonEne1x1 ->clear();
1244  t_eleEne1x1 ->clear();
1245  t_muEne1x1 ->clear();
1246 
1247  t_maxNearPHC1x1 ->clear();
1248  t_cHadronEneHC1x1 ->clear();
1249  t_cHadronEneHC1x1_1 ->clear();
1250  t_cHadronEneHC1x1_2 ->clear();
1251  t_cHadronEneHC1x1_3 ->clear();
1252  t_nHadronEneHC1x1 ->clear();
1253  t_photonEneHC1x1 ->clear();
1254  t_eleEneHC1x1 ->clear();
1255  t_muEneHC1x1 ->clear();
1256 
1257  t_maxNearPHC3x3 ->clear();
1258  t_cHadronEneHC3x3 ->clear();
1259  t_cHadronEneHC3x3_1 ->clear();
1260  t_cHadronEneHC3x3_2 ->clear();
1261  t_cHadronEneHC3x3_3 ->clear();
1262  t_nHadronEneHC3x3 ->clear();
1263  t_photonEneHC3x3 ->clear();
1264  t_eleEneHC3x3 ->clear();
1265  t_muEneHC3x3 ->clear();
1266 
1267  t_maxNearPHC5x5 ->clear();
1268  t_cHadronEneHC5x5 ->clear();
1269  t_cHadronEneHC5x5_1 ->clear();
1270  t_cHadronEneHC5x5_2 ->clear();
1271  t_cHadronEneHC5x5_3 ->clear();
1272  t_nHadronEneHC5x5 ->clear();
1273  t_photonEneHC5x5 ->clear();
1274  t_eleEneHC5x5 ->clear();
1275  t_muEneHC5x5 ->clear();
1276 
1277  t_maxNearPHC7x7 ->clear();
1278  t_cHadronEneHC7x7 ->clear();
1279  t_cHadronEneHC7x7_1 ->clear();
1280  t_cHadronEneHC7x7_2 ->clear();
1281  t_cHadronEneHC7x7_3 ->clear();
1282  t_nHadronEneHC7x7 ->clear();
1283  t_photonEneHC7x7 ->clear();
1284  t_eleEneHC7x7 ->clear();
1285  t_muEneHC7x7 ->clear();
1286 
1287  t_maxNearPR ->clear();
1288  t_cHadronEneR ->clear();
1289  t_cHadronEneR_1 ->clear();
1290  t_cHadronEneR_2 ->clear();
1291  t_cHadronEneR_3 ->clear();
1292  t_nHadronEneR ->clear();
1293  t_photonEneR ->clear();
1294  t_eleEneR ->clear();
1295  t_muEneR ->clear();
1296 
1297  t_maxNearPIsoR ->clear();
1298  t_cHadronEneIsoR ->clear();
1299  t_cHadronEneIsoR_1 ->clear();
1300  t_cHadronEneIsoR_2 ->clear();
1301  t_cHadronEneIsoR_3 ->clear();
1302  t_nHadronEneIsoR ->clear();
1303  t_photonEneIsoR ->clear();
1304  t_eleEneIsoR ->clear();
1305  t_muEneIsoR ->clear();
1306 
1307  t_maxNearPHCR ->clear();
1308  t_cHadronEneHCR ->clear();
1309  t_cHadronEneHCR_1 ->clear();
1310  t_cHadronEneHCR_2 ->clear();
1311  t_cHadronEneHCR_3 ->clear();
1312  t_nHadronEneHCR ->clear();
1313  t_photonEneHCR ->clear();
1314  t_eleEneHCR ->clear();
1315  t_muEneHCR ->clear();
1316 
1317  t_maxNearPIsoHCR ->clear();
1318  t_cHadronEneIsoHCR ->clear();
1319  t_cHadronEneIsoHCR_1 ->clear();
1320  t_cHadronEneIsoHCR_2 ->clear();
1321  t_cHadronEneIsoHCR_3 ->clear();
1322  t_nHadronEneIsoHCR ->clear();
1323  t_photonEneIsoHCR ->clear();
1324  t_eleEneIsoHCR ->clear();
1325  t_muEneIsoHCR ->clear();
1326 
1327  t_L1Decision ->clear();
1328  t_L1CenJetPt ->clear();
1329  t_L1CenJetEta ->clear();
1330  t_L1CenJetPhi ->clear();
1331  t_L1FwdJetPt ->clear();
1332  t_L1FwdJetEta ->clear();
1333  t_L1FwdJetPhi ->clear();
1334  t_L1TauJetPt ->clear();
1335  t_L1TauJetEta ->clear();
1336  t_L1TauJetPhi ->clear();
1337  t_L1MuonPt ->clear();
1338  t_L1MuonEta ->clear();
1339  t_L1MuonPhi ->clear();
1340  t_L1IsoEMPt ->clear();
1341  t_L1IsoEMEta ->clear();
1342  t_L1IsoEMPhi ->clear();
1343  t_L1NonIsoEMPt ->clear();
1344  t_L1NonIsoEMEta ->clear();
1345  t_L1NonIsoEMPhi ->clear();
1346  t_L1METPt ->clear();
1347  t_L1METEta ->clear();
1348  t_L1METPhi ->clear();
1349 }
1350 
1352 
1353  int partID[Particles]={11,-11,21,211,-211,321,-321,2212,2112,-2212,-2112,130};
1354  int ix = -1;
1355  for (int ik=0; ik<Particles; ++ik) {
1356  if (pdgId == partID[ik]) {
1357  ix = ik; break;
1358  }
1359  }
1360  return ix;
1361 }
1362 
1363 //define this as a plug-in
std::vector< double > * t_cHadronEneHC1x1_3
std::vector< double > * t_eleEne7x7
std::vector< double > * t_nHadronEne21x21
std::vector< double > * t_cHadronEneHC7x7_2
T getParameter(std::string const &) const
spr::genSimInfo isoinfo25x25
EventNumber_t event() const
Definition: EventID.h:44
std::vector< double > * t_isoTrkEtaAll
TH2D * h_pEta[Particles]
std::vector< double > * t_maxNearPHCR
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > * t_isoTrkPdgId
int i
Definition: DBlmapReader.cc:9
std::vector< double > * t_L1FwdJetPhi
std::vector< double > * t_eleEne31x31
std::vector< double > * t_eleEneHC7x7
std::string algoBitToName[nL1BitsMax]
std::vector< int > * t_L1Decision
spr::genSimInfo isoinfo31x31
std::vector< double > * t_cHadronEneIsoR_1
std::vector< double > * t_nHadronEne7x7
std::vector< double > * t_isoTrkPt
std::vector< double > * t_L1TauJetPhi
std::vector< double > * t_L1TauJetPt
std::vector< double > * t_cHadronEneHCR_1
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
std::vector< double > * t_L1CenJetEta
std::vector< double > * t_photonEne7x7
spr::genSimInfo isoinfo21x21
std::vector< double > * t_L1MuonPt
std::vector< double > * t_isoTrkEta
std::vector< double > * t_cHadronEneHC7x7
std::vector< double > * t_cHadronEneHC7x7_3
std::vector< double > * t_cHadronEne7x7_2
double cHadronEne_[3]
Definition: GenSimInfo.h:47
std::vector< double > * t_cHadronEne15x15_3
tuple pp
Definition: createTree.py:15
std::vector< double > * t_maxNearP15x15
double photonEne
Definition: GenSimInfo.h:45
std::vector< double > * t_nHadronEneHC7x7
std::vector< double > * t_photonEne21x21
std::vector< double > * t_cHadronEneIsoHCR_2
std::vector< double > * t_cHadronEne25x25
std::vector< double > * t_photonEneHC5x5
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< double > * t_cHadronEneHC1x1_2
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
std::vector< double > * t_L1IsoEMEta
static const int Particles
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< double > * t_muEneIsoHCR
std::vector< double > * t_eleEne11x11
IsolatedGenParticles(const edm::ParameterSet &)
std::vector< double > * t_cHadronEneR
std::vector< double > * t_eleEne3x3
std::vector< double > * t_L1IsoEMPt
std::vector< double > * t_cHadronEne3x3_2
edm::InputTag L1GTReadoutRcdSource_
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< double > * t_cHadronEneHC3x3_2
std::vector< double > * t_photonEne1x1
std::vector< double > * t_cHadronEne1x1_2
std::vector< double > * t_nHadronEneR
std::vector< double > * t_cHadronEneIsoR_3
std::vector< double > * t_maxNearP11x11
std::vector< double > * t_maxNearPHC7x7
spr::genSimInfo isoinfoHC3x3
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extTauJet_
std::vector< double > * t_cHadronEneHC5x5_2
std::vector< double > * t_photonEneHCR
std::vector< double > * t_L1METEta
edm::InputTag L1extraNonIsoEmSource_
std::vector< double > * t_muEneIsoR
std::vector< double > * t_nHadronEne9x9
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > * t_L1MuonEta
std::vector< double > * t_isoTrkPdgIdAll
edm::Service< TFileService > fs
std::vector< double > * t_muEneHC7x7
std::vector< double > * t_cHadronEne31x31
std::vector< double > * t_nHadronEneIsoHCR
edm::InputTag L1extraTauJetSource_
std::vector< double > * t_L1FwdJetPt
std::vector< double > * t_cHadronEne31x31_1
std::vector< double > * t_photonEneHC3x3
std::vector< double > * t_cHadronEneIsoHCR_1
T eta() const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:26
std::vector< double > * t_muEneR
std::vector< double > * t_muEne9x9
double charge(const std::vector< uint8_t > &Ampls)
std::vector< double > * t_muEne21x21
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_L1GTrorsrc_
std::vector< double > * t_maxNearP7x7
void getData(T &iHolder) const
Definition: EventSetup.h:67
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > tok_L1extMusrc_
spr::genSimInfo isoinfoHC7x7
std::vector< double > * t_muEneHC1x1
std::vector< double > * t_photonEneHC7x7
const Double_t pi
std::vector< double > * t_maxNearPIsoHCR
double cHadronEne
Definition: GenSimInfo.h:45
std::vector< double > * t_L1TauJetEta
std::vector< double > * t_cHadronEneHC5x5
double nHadronEne
Definition: GenSimInfo.h:45
std::vector< double > * t_cHadronEne31x31_2
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< double > * t_isoTrkPAll
std::vector< double > * t_nHadronEneHC1x1
spr::genSimInfo isoinfo11x11
std::vector< double > * t_eleEneIsoHCR
std::vector< double > * t_eleEneHC5x5
std::vector< double > * t_cHadronEneIsoHCR
std::vector< double > * t_muEneHCR
int iEvent
Definition: GenABIO.cc:230
std::vector< double > * t_cHadronEne7x7_1
std::vector< double > * t_maxNearP25x25
std::vector< double > * t_cHadronEne3x3_3
std::vector< double > * t_cHadronEneHC7x7_1
std::vector< double > * t_cHadronEneHC5x5_1
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1Em_
std::vector< double > * t_eleEne25x25
std::vector< double > * t_eleEne9x9
std::vector< double > * t_eleEne1x1
std::vector< double > * t_muEne11x11
std::vector< double > * t_eleEneHCR
std::vector< double > * t_muEne7x7
spr::genSimInfo isoinfoHC5x5
std::vector< double > * t_cHadronEneHC1x1
std::vector< bool > DecisionWord
typedefs
edm::InputTag L1GTObjectMapRcdSource_
std::vector< double > * t_cHadronEneR_3
edm::InputTag L1extraCenJetSource_
std::vector< double > * t_cHadronEne11x11_1
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< double > * t_muEne1x1
std::vector< double > * t_cHadronEne15x15_1
std::vector< double > * t_cHadronEneIsoHCR_3
std::vector< double > * t_cHadronEneIsoR
spr::genSimInfo isoinfoHC1x1
std::vector< double > * t_eleEneHC3x3
std::vector< double > * t_isoTrkDEtaAll
std::vector< double > * t_muEne25x25
std::vector< double > * t_cHadronEne9x9_3
std::vector< double > * t_L1NonIsoEMPt
double DeltaR2(double eta1, double phi1, double eta2, double phi2)
std::vector< double > * t_photonEne25x25
std::vector< double > * t_maxNearP21x21
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< double > * t_maxNearP31x31
std::vector< double > * t_muEneHC3x3
void eGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, spr::genSimInfo &info, bool debug=false)
Definition: GenSimInfo.cc:11
std::vector< double > * t_cHadronEneHC3x3
std::vector< double > * t_cHadronEne11x11
spr::genSimInfo isoinfoIsoHCR
std::vector< double > * t_cHadronEne25x25_3
std::vector< double > * t_cHadronEneHCR_3
T * make(const Args &...args) const
make new ROOT object
std::vector< double > * t_L1CenJetPt
spr::genSimInfo isoinfo15x15
std::vector< double > * t_maxNearPHC5x5
std::vector< double > * t_cHadronEneHCR_2
std::vector< double > * t_cHadronEne11x11_3
std::vector< double > * t_cHadronEneHCR
std::vector< double > * t_cHadronEne1x1
std::vector< double > * t_isoTrkDPhiAll
std::vector< double > * t_photonEneIsoHCR
bool isValid() const
Definition: HandleBase.h:76
std::vector< double > * t_nHadronEne31x31
std::vector< double > * t_maxNearP3x3
std::vector< double > * t_cHadronEne1x1_1
std::vector< double > * t_cHadronEne21x21_1
std::vector< double > * t_isoTrkPhiEC
std::vector< double > * t_cHadronEne11x11_2
std::vector< double > * t_L1CenJetPhi
JetCorrectorParameters corr
Definition: classes.h:5
std::vector< double > * t_maxNearP1x1
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > tok_L1GTobjmap_
std::vector< double > * t_maxNearPHC3x3
double DeltaPhi(double v1, double v2)
std::vector< double > * t_nHadronEneHCR
std::vector< double > * t_eleEneR
std::vector< double > * t_cHadronEneIsoR_2
std::vector< double > * t_cHadronEne9x9_1
std::vector< double > * t_eleEneIsoR
std::vector< double > * t_cHadronEneR_2
std::vector< double > * t_isoTrkPhiAll
void fillTrack(GlobalPoint &posVec, math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId, bool okECAL, bool accpet)
std::vector< double > * t_photonEneHC1x1
std::vector< double > * t_L1FwdJetEta
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
std::vector< double > * t_maxNearPR
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extNonIsoEm_
std::vector< double > * t_muEne31x31
void fillIsolatedTrack(math::XYZTLorentzVector &momVec, GlobalPoint &posECAL, int pdgId)
std::vector< double > * t_isoTrkPtAll
double genPartEtaBins[NEtaBins+1]
edm::InputTag L1extraFwdJetSource_
std::vector< double > * t_isoTrkP
std::vector< double > * t_nHadronEne11x11
std::vector< double > * t_nHadronEneIsoR
std::vector< double > * t_L1NonIsoEMPhi
std::vector< double > * t_eleEne21x21
std::vector< double > * t_maxNearPHC1x1
std::vector< double > * t_cHadronEne9x9_2
std::vector< double > * t_cHadronEne31x31_3
const T & get() const
Definition: EventSetup.h:55
std::vector< double > * t_maxNearP9x9
std::vector< double > * t_photonEne31x31
std::vector< double > * t_nHadronEneHC3x3
std::vector< double > * t_cHadronEne15x15_2
std::vector< double > * t_photonEne15x15
T const * product() const
Definition: ESHandle.h:62
std::vector< double > * t_L1NonIsoEMEta
std::vector< double > * t_isoTrkPhi
std::vector< double > * t_nHadronEne15x15
std::vector< double > * t_cHadronEneHC1x1_1
std::vector< double > * t_photonEneR
std::vector< double > * t_isoTrkEtaEC
std::vector< double > * t_nHadronEne1x1
std::vector< double > * t_cHadronEne3x3
edm::EDGetTokenT< edm::HepMCProduct > tok_hepmc_
std::vector< double > * t_cHadronEne25x25_2
const MagneticField * bField
std::vector< double > * t_L1IsoEMPhi
std::vector< double > * t_cHadronEneHC5x5_3
T eta() const
Definition: PV3DBase.h:76
edm::EDGetTokenT< reco::GenParticleCollection > tok_genParticles_
edm::EventID id() const
Definition: EventBase.h:56
std::vector< double > * t_photonEne9x9
std::vector< double > * t_L1METPhi
std::vector< double > * t_nHadronEne25x25
std::vector< double > * t_photonEne3x3
std::vector< double > * t_cHadronEneHC3x3_3
edm::InputTag L1extraMuonSource_
std::vector< double > * t_eleEneHC1x1
std::vector< double > * t_photonEne11x11
void hGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const HcalTopology *topology, int ieta, int iphi, spr::genSimInfo &info, bool includeHO=false, bool debug=false)
Definition: GenSimInfo.cc:47
tuple cout
Definition: gather_cfg.py:121
std::vector< double > * t_muEne3x3
double genPartPBins[NPBins+1]
volatile std::atomic< bool > shutdown_flag false
std::vector< double > * t_cHadronEne9x9
std::vector< double > * t_muEne15x15
std::vector< double > * t_cHadronEne21x21_2
std::vector< double > * t_cHadronEne3x3_1
std::vector< double > * t_cHadronEneHC3x3_1
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
std::vector< double > * t_cHadronEne25x25_1
std::vector< double > * t_cHadronEne15x15
edm::InputTag L1extraIsoEmSource_
std::vector< double > * t_cHadronEne21x21
std::vector< double > * t_L1METPt
std::vector< double > * t_muEneHC5x5
std::vector< double > * t_cHadronEneR_1
std::vector< double > * t_cHadronEne21x21_3
std::vector< double > * t_L1MuonPhi
double maxNearP
Definition: GenSimInfo.h:44
std::vector< double > * t_cHadronEne7x7_3
double DeltaR(double eta1, double phi1, double eta2, double phi2)
#define constexpr
std::vector< double > * t_photonEneIsoR
std::vector< double > * t_cHadronEne7x7
std::vector< double > * t_eleEne15x15
std::vector< double > * t_maxNearPIsoR
std::vector< double > * t_nHadronEne3x3
std::vector< double > * t_nHadronEneHC5x5
std::vector< double > * t_isoTrkEne
std::vector< double > * t_cHadronEne1x1_3
Definition: DDAxes.h:10