#include <JetMETCorrections/JetPlusTrack/plugins/JetPlusTrackAnalysis.h>
Definition at line 26 of file JetPlusTrackAnalysis.h.
cms::JetPlusTrackAnalysis::JetPlusTrackAnalysis | ( | const edm::ParameterSet & | fParameters | ) |
Definition at line 29 of file JetPlusTrackAnalysis.cc.
References allowMissingInputs_, GenMuonPlsPt100GeV_cfg::cout, ecalLabels_, lat::endl(), fOutputFileName, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hbhelabel_, holabel_, m_inputTrackLabel, mCone, mInputJetsCaloTower, mInputJetsCorrected, and mInputJetsGen.
00030 { 00031 cout<<" Start JetPlusTrackAnalysis now"<<endl; 00032 mCone = iConfig.getParameter<double>("Cone"); 00033 cout<<" Start JetPlusTrackAnalysis Point 0"<<endl; 00034 mInputJetsCaloTower = iConfig.getParameter<edm::InputTag>("src1"); 00035 cout<<" Start JetPlusTrackAnalysis Point 1"<<endl; 00036 mInputJetsGen = iConfig.getParameter<edm::InputTag>("src2"); 00037 cout<<" Start JetPlusTrackAnalysis Point 2"<<endl; 00038 mInputJetsCorrected = iConfig.getParameter<edm::InputTag>("src3"); 00039 00040 m_inputTrackLabel = iConfig.getUntrackedParameter<std::string>("inputTrackLabel"); 00041 00042 hbhelabel_ = iConfig.getParameter<edm::InputTag>("HBHERecHitCollectionLabel"); 00043 cout<<" Start JetPlusTrackAnalysis Point 5"<<endl; 00044 holabel_ = iConfig.getParameter<edm::InputTag>("HORecHitCollectionLabel"); 00045 cout<<" Start JetPlusTrackAnalysis Point 6"<<endl; 00046 ecalLabels_=iConfig.getParameter<std::vector<edm::InputTag> >("ecalInputs"); 00047 cout<<" Start JetPlusTrackAnalysis Point 7"<<endl; 00048 fOutputFileName = iConfig.getUntrackedParameter<string>("HistOutFile"); 00049 cout<<" Start JetPlusTrackAnalysis Point 8"<<endl; 00050 allowMissingInputs_=iConfig.getUntrackedParameter<bool>("AllowMissingInputs",false); 00051 cout<<" JetPlusTrackAnalysis constructor "<<endl; 00052 }
cms::JetPlusTrackAnalysis::~JetPlusTrackAnalysis | ( | ) | [virtual] |
Definition at line 54 of file JetPlusTrackAnalysis.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
void cms::JetPlusTrackAnalysis::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | theEventSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 132 of file JetPlusTrackAnalysis.cc.
References allowMissingInputs_, GenMuonPlsPt100GeV_cfg::cout, EcalEmpty, ecalLabels_, lat::endl(), eta, PV3DBase< T, PVType, FrameType >::eta(), geo, edm::Event::getByLabel(), edm::Event::getByType(), CaloGeometry::getPosition(), hbhelabel_, HcalEmpty, i, i1, i2, edm::Event::id(), int, edm::Handle< T >::isValid(), metsig::jet, JetGenCode, JetGenEt, JetGenEta, JetGenPhi, JetRecoEtaCaloTower, JetRecoEtaCorrected, JetRecoEtCaloTower, JetRecoEtCorrected, JetRecoEtRecHit, JetRecoGenPartonType, JetRecoGenRecType, JetRecoPhiCaloTower, JetRecoPhiCorrected, pfTauBenchmarkGeneric_cfi::jets, m_inputTrackLabel, mCone, mInputJetsCaloTower, mInputJetsCorrected, mInputJetsGen, myTree, NumGenJets, NumRecoJetsCaloTower, NumRecoJetsCorrected, NumRecoTrack, muonGeometry::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, run, funct::sqrt(), TrackRecoEt, TrackRecoEta, TrackRecoPhi, and tracks.
00135 { 00136 cout<<" JetPlusTrack analyze "<<endl; 00137 // std::vector<edm::Provenance const*> theProvenance; 00138 // iEvent.getAllProvenance(theProvenance); 00139 // for( std::vector<edm::Provenance const*>::const_iterator ip = theProvenance.begin(); 00140 // ip != theProvenance.end(); ip++) 00141 // { 00142 // cout<<" Print all module/label names "<<(**ip).moduleName()<<" "<<(**ip).moduleLabel()<< 00143 // " "<<(**ip).productInstanceName()<<endl; 00144 // } 00145 00146 00147 00148 00149 run = iEvent.id().run(); 00150 event = iEvent.id().event(); 00151 // 00152 // Rememeber parton 00153 // 00154 float pt[2],eta[2],phi[2]; 00155 int parton[2]; 00156 // int tagparton; 00157 cout<<" Try to take HepMCProduct "<<endl; 00158 edm::Handle< edm::HepMCProduct > EvtHandles ; 00159 iEvent.getByType( EvtHandles ) ; 00160 00161 //NR================================================== 00162 00163 if (!EvtHandles.isValid()) { 00164 // can't find it! 00165 if (!allowMissingInputs_) {cout<<" GenParticles are missed "<<endl;} 00166 *EvtHandles; // will throw the proper exception 00167 } else { 00168 const HepMC::GenEvent* Evt = EvtHandles->GetEvent() ; 00169 00170 int ihep = 0; 00171 00172 for (HepMC::GenEvent::particle_const_iterator 00173 Part = Evt->particles_begin() ; Part!=Evt->particles_end(); Part++ ) 00174 { 00175 if(ihep == 6 || ihep == 7) 00176 { 00177 cout<<" parton "<<(*Part)->pdg_id()<<" "<<(*Part)->status()<<" "<<((*Part)->momentum()).perp()<<endl; 00178 pt[ihep-6] = ((*Part)->momentum()).perp(); 00179 eta[ihep-6] = ((*Part)->momentum()).eta(); 00180 phi[ihep-6] = ((*Part)->momentum()).phi(); 00181 parton[ihep-6] = (*Part)->pdg_id(); 00182 } 00183 // Code[ihep] = (*Part)->pdg_id(); 00184 // partpx[ihep] = (*Part)->momentum().px(); 00185 // partpy[ihep] = (*Part)->momentum().py(); 00186 // partpz[ihep] = (*Part)->momentum().pz(); 00187 // parte[ihep] = (*Part)->momentum().e(); 00188 // partm[ihep] = (*Part)->momentum().m(); 00189 ihep++; 00190 // NumPart = ihep; 00191 } 00192 } 00193 // Generated jet 00194 NumGenJets = 0; 00195 int icode = -1; 00196 { 00197 edm::Handle<reco::GenJetCollection> jets; 00198 iEvent.getByLabel(mInputJetsGen, jets); 00199 if (!jets.isValid()) { 00200 // can't find it! 00201 if (!allowMissingInputs_) { 00202 *jets; // will throw the proper exception 00203 } 00204 } else { 00205 reco::GenJetCollection::const_iterator jet = jets->begin (); 00206 if(jets->size() > 0 ) 00207 { 00208 for (; jet != jets->end (); jet++) 00209 { 00210 if( NumGenJets < 4 ) 00211 { 00212 // Find the parton and associated jet 00213 double dphi1 = fabs((*jet).phi()-phi[0]); 00214 if(dphi1 > 4.*atan(1.)) dphi1 = 8.*atan(1.) - dphi1; 00215 double dphi2 = fabs((*jet).phi()-phi[1]); 00216 if(dphi2 > 4.*atan(1.)) dphi2 = 8.*atan(1.) - dphi2; 00217 double deta1 = (*jet).eta()-eta[0]; 00218 double deta2 = (*jet).eta()-eta[1]; 00219 double dr1 = sqrt(dphi1*dphi1+deta1*deta1); 00220 double dr2 = sqrt(dphi2*dphi2+deta2*deta2); 00221 if(dr1 < 0.5 || dr2 < 0.5) { 00222 JetGenEt[NumGenJets] = (*jet).et(); 00223 JetGenEta[NumGenJets] = (*jet).eta(); 00224 JetGenPhi[NumGenJets] = (*jet).phi(); 00225 cout<<" Associated jet: Phi, eta gen "<< JetGenPhi[NumGenJets]<<" "<< JetGenEta[NumGenJets]<<endl; 00226 00227 if(dr1 < 0.5) icode = 0; 00228 if(dr2 < 0.5) icode = 1; 00229 JetGenCode[NumGenJets] = icode; 00230 cout<<" Gen jet "<<NumGenJets<<" "<<JetGenEt[NumGenJets]<<" "<<JetGenEta[NumGenJets]<<" "<<JetGenPhi[NumGenJets]<<" "<<JetGenCode[NumGenJets]<<endl; 00231 NumGenJets++; 00232 } 00233 } 00234 } 00235 } 00236 } 00237 } 00238 00239 // CaloJets 00240 00241 NumRecoJetsCaloTower = 0; 00242 { 00243 edm::Handle<reco::CaloJetCollection> jets; 00244 iEvent.getByLabel(mInputJetsCaloTower, jets); 00245 if (!jets.isValid()) { 00246 // can't find it! 00247 if (!allowMissingInputs_) {cout<<"CaloTowers are missed "<<endl; 00248 *jets; // will throw the proper exception 00249 } 00250 } else { 00251 reco::CaloJetCollection::const_iterator jet = jets->begin (); 00252 00253 cout<<" Size of jets "<<jets->size()<<endl; 00254 00255 if(jets->size() > 0 ) 00256 { 00257 for (; jet != jets->end (); jet++) 00258 { 00259 00260 if( NumRecoJetsCaloTower < 100 ) 00261 { 00262 00263 // Association with gen jet 00264 00265 JetRecoEtCaloTower[NumRecoJetsCaloTower] = (*jet).et(); 00266 JetRecoEtaCaloTower[NumRecoJetsCaloTower] = (*jet).eta(); 00267 JetRecoPhiCaloTower[NumRecoJetsCaloTower] = (*jet).phi(); 00268 // cout<<" Phi, eta gen "<< JetRecoPhiCaloTower[NumRecoJetsCaloTower]<<" "<< JetRecoEtaCaloTower[NumRecoJetsCaloTower]<<endl; 00269 JetRecoGenRecType[NumRecoJetsCaloTower] = -1; 00270 JetRecoGenPartonType[NumRecoJetsCaloTower] = -1; 00271 NumRecoJetsCaloTower++; 00272 00273 } 00274 } 00275 } 00276 } 00277 } 00278 00279 if( NumRecoJetsCaloTower > 0 && NumGenJets > 0 ) 00280 { 00281 for(int iii=0; iii<NumRecoJetsCaloTower; iii++) 00282 { 00283 for(int jjj=0; jjj<NumGenJets; jjj++) 00284 { 00285 double dphi1 = fabs(JetRecoPhiCaloTower[iii]-JetGenPhi[jjj]); 00286 if(dphi1 > 4.*atan(1.)) dphi1 = 8.*atan(1.) - dphi1; 00287 double deta1 = JetRecoEtaCaloTower[iii]-JetGenEta[jjj]; 00288 double dr1 = sqrt(dphi1*dphi1+deta1*deta1); 00289 if(dr1 < 0.3) {JetRecoGenRecType[iii] = jjj;JetRecoGenPartonType[iii] = JetGenCode[jjj]; 00290 cout<<" Associated jet "<< iii<<" "<<JetRecoGenRecType[iii]<<" "<<JetRecoGenPartonType[iii]<<endl; 00291 cout<<" Etcalo "<<JetRecoEtCaloTower[iii]<<" ETgen "<<JetGenEt[jjj]<<endl; 00292 } 00293 } 00294 } 00295 } 00296 00297 // JetPlusTrack correction 00298 NumRecoJetsCorrected = 0; 00299 { 00300 edm::Handle<reco::CaloJetCollection> jets; 00301 iEvent.getByLabel(mInputJetsCorrected, jets); 00302 if (!jets.isValid()) { 00303 // can't find it! 00304 if (!allowMissingInputs_) {cout<<"JetPlusTrack CaloTowers are missed "<<endl; 00305 *jets; // will throw the proper exception 00306 } 00307 } else { 00308 reco::CaloJetCollection::const_iterator jet = jets->begin (); 00309 00310 cout<<" Size of jets "<<jets->size()<<endl; 00311 if(jets->size() > 0 ) 00312 { 00313 for (; jet != jets->end (); jet++) 00314 { 00315 if( NumRecoJetsCorrected < 100 ) 00316 { 00317 JetRecoEtCorrected[NumRecoJetsCorrected] = (*jet).et(); 00318 JetRecoEtaCorrected[NumRecoJetsCorrected] = (*jet).eta(); 00319 JetRecoPhiCorrected[NumRecoJetsCorrected] = (*jet).phi(); 00320 00321 if( JetRecoGenRecType[NumRecoJetsCorrected] > -1 )cout<<" Calo jet "<<JetRecoEtCaloTower[NumRecoJetsCorrected]<<" Cor "<<JetRecoEtCorrected[NumRecoJetsCorrected]<<" Gen "<<JetGenEt[(int)(JetRecoGenRecType[NumRecoJetsCorrected])]<<endl; 00322 00323 NumRecoJetsCorrected++; 00324 } 00325 } 00326 } 00327 } 00328 } 00329 00330 00331 // CaloTowers from RecHits 00332 // Load EcalRecHits 00333 00334 std::vector<edm::InputTag>::const_iterator i; 00335 int iecal = 0; 00336 double empty_jet_energy_ecal = 0.; 00337 00338 00339 for(int jjj=0; jjj<NumRecoJetsCaloTower; jjj++) 00340 { 00341 JetRecoEtRecHit[jjj] = 0.; 00342 00343 for (i=ecalLabels_.begin(); i!=ecalLabels_.end(); i++) { 00344 { 00345 edm::Handle<EcalRecHitCollection> ec; 00346 iEvent.getByLabel(*i,ec); 00347 if (!ec.isValid()) { 00348 // can't find it! 00349 if (!allowMissingInputs_) {cout<<" Ecal rechits are missed "<<endl; 00350 *ec; // will throw the proper exception 00351 } 00352 } else { 00353 // EcalBarrel = 1, EcalEndcap = 2 00354 for(EcalRecHitCollection::const_iterator recHit = (*ec).begin(); 00355 recHit != (*ec).end(); ++recHit) 00356 { 00357 00358 GlobalPoint pos = geo->getPosition(recHit->detid()); 00359 double deta = pos.eta() - JetRecoEtaCaloTower[jjj]; 00360 double dphi = fabs(pos.phi() - JetRecoPhiCaloTower[jjj]); 00361 if(dphi > 4.*atan(1.)) dphi = 8.*atan(1.) - dphi; 00362 double dr = sqrt(dphi*dphi + deta*deta); 00363 double dphi_empty = fabs(pos.phi()+4.*atan(1.) - JetRecoPhiCaloTower[jjj]); 00364 if(dphi_empty > 4.*atan(1.)) dphi_empty = 8.*atan(1.) - dphi_empty; 00365 double dr_empty = sqrt(dphi_empty*dphi_empty + deta*deta); 00366 00367 00368 if(dr<mCone) 00369 { 00370 // cout<<" Ecal digis "<<jjj<<" "<<JetRecoEtCaloTower[jjj]<<" "<<JetRecoEtaCaloTower[jjj]<<" "<<JetRecoPhiCaloTower[jjj]<<" "<<(*recHit).energy()<<endl; 00371 // cout<<" Ecal detid "<<pos.eta()<<" "<<pos.phi()<<" "<<dr<<" JetRecoEtRecHit[jjj] "<<JetRecoEtRecHit[jjj]<<endl; 00372 JetRecoEtRecHit[jjj] = JetRecoEtRecHit[jjj] + (*recHit).energy(); 00373 // cout<<" New Ecal energy "<<(*recHit).energy()<<endl; 00374 } 00375 if(dr_empty<mCone) 00376 { 00377 empty_jet_energy_ecal = empty_jet_energy_ecal + (*recHit).energy(); 00378 } 00379 } 00380 } 00381 } 00382 iecal++; 00383 } 00384 // cout<<" Additional ECAL "<<jjj<<" "<<JetRecoEtRecHit[jjj]<<" Eta "<<JetRecoEtaCaloTower[jjj]<<endl; 00385 } 00386 // Hcal Barrel and endcap for isolation 00387 double empty_jet_energy_hcal = 0.; 00388 { 00389 edm::Handle<HBHERecHitCollection> hbhe; 00390 iEvent.getByLabel(hbhelabel_,hbhe); 00391 if (!hbhe.isValid()) { 00392 // can't find it! 00393 cout<<" Exception in hbhe "<<endl; 00394 if (!allowMissingInputs_) { 00395 *hbhe; // will throw the proper exception 00396 } 00397 } else { 00398 for(int jjj=0; jjj<NumRecoJetsCaloTower; jjj++) 00399 { 00400 for(HBHERecHitCollection::const_iterator hbheItr = (*hbhe).begin(); 00401 hbheItr != (*hbhe).end(); ++hbheItr) 00402 { 00403 DetId id = (hbheItr)->detid(); 00404 GlobalPoint pos = geo->getPosition(hbheItr->detid()); 00405 double deta = pos.eta() - JetRecoEtaCaloTower[jjj]; 00406 double dphi = fabs(pos.phi() - JetRecoPhiCaloTower[jjj]); 00407 if(dphi > 4.*atan(1.)) dphi = 8.*atan(1.) - dphi; 00408 double dr = sqrt(dphi*dphi + deta*deta); 00409 double dphi_empty = fabs(pos.phi()+4.*atan(1.) - JetRecoPhiCaloTower[jjj]); 00410 if(dphi_empty > 4.*atan(1.)) dphi_empty = 8.*atan(1.) - dphi_empty; 00411 double dr_empty = sqrt(dphi_empty*dphi_empty + deta*deta); 00412 00413 if(dr<mCone) 00414 { 00415 // cout<<" HCAL JetRecoEtRecHit[jjj] "<<JetRecoEtRecHit[jjj]<<endl; 00416 JetRecoEtRecHit[jjj] = JetRecoEtRecHit[jjj] + (*hbheItr).energy(); 00417 } 00418 if(dr_empty<mCone) 00419 { 00420 empty_jet_energy_hcal = empty_jet_energy_hcal + (*hbheItr).energy(); 00421 } 00422 } 00423 // cout<<" Additional HCAL energy "<<jjj<<" "<<JetRecoEtRecHit[jjj]<<" "<<JetRecoEtaCaloTower[jjj]<<" "<<JetRecoEtaCaloTower[jjj]<<endl; 00424 } 00425 } 00426 } 00427 00428 // } 00429 EcalEmpty[0] = empty_jet_energy_ecal; 00430 HcalEmpty[0] = empty_jet_energy_hcal; 00431 00432 // Tracker 00433 00434 edm::Handle<reco::TrackCollection> tracks; 00435 iEvent.getByLabel(m_inputTrackLabel, tracks); 00436 00437 reco::TrackCollection::const_iterator trk; 00438 int iTracks = 0; 00439 for ( trk = tracks->begin(); trk != tracks->end(); ++trk){ 00440 TrackRecoEt[iTracks] = trk->pt(); 00441 TrackRecoEta[iTracks] = trk->eta(); 00442 TrackRecoPhi[iTracks] = trk->phi(); 00443 iTracks++; 00444 } 00445 NumRecoTrack = iTracks; 00446 cout<<" Number of tracks "<<NumRecoTrack<<endl; 00447 00448 for(int jjj = 0; jjj<NumRecoJetsCaloTower; jjj++) 00449 { 00450 if(JetRecoGenPartonType[jjj] > -1){ 00451 cout<<" Calo energy "<<JetRecoEtCaloTower[jjj]<<" RecHit energy "<<JetRecoEtRecHit[jjj]<<" Empty cone ECAL "<<empty_jet_energy_ecal<< 00452 " Empty cone HCAL "<<empty_jet_energy_hcal <<" association with gen jet "<<JetRecoGenRecType[jjj] 00453 <<" Association with parton "<<JetRecoGenPartonType[jjj]<<endl; 00454 int i1 = (int) JetRecoGenPartonType[jjj]; 00455 int i2 = (int) JetRecoGenPartonType[jjj]; 00456 cout<<" Parton energy "<<pt[i1]<<" type "<<parton[i2]<<endl; 00457 } 00458 } 00459 myTree->Fill(); 00460 00461 }
void cms::JetPlusTrackAnalysis::beginJob | ( | const edm::EventSetup & | iSetup | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 59 of file JetPlusTrackAnalysis.cc.
References Charge, Code, GenMuonPlsPt100GeV_cfg::cout, EcalEmpty, lat::endl(), event, fOutputFileName, geo, edm::EventSetup::get(), HcalEmpty, hOutputFile, JetGenCode, JetGenEt, JetGenEta, JetGenPhi, JetRecoEtaCaloTower, JetRecoEtaCorrected, JetRecoEtCaloTower, JetRecoEtCorrected, JetRecoEtCorrectedZS, JetRecoEtRecHit, JetRecoGenPartonType, JetRecoGenRecType, JetRecoPhiCaloTower, JetRecoPhiCorrected, myTree, NumGenJets, NumPart, NumRecoJetsCaloTower, NumRecoJetsCorrected, NumRecoJetsRecHit, NumRecoTrack, parte, partm, partpx, partpy, partpz, edm::ESHandle< T >::product(), run, TrackRecoEt, TrackRecoEta, and TrackRecoPhi.
00060 { 00061 00062 cout<<" Begin job "<<endl; 00063 00064 hOutputFile = new TFile( fOutputFileName.c_str(), "RECREATE" ) ; 00065 myTree = new TTree("JetPlusTrack","JetPlusTrack Tree"); 00066 myTree->Branch("run", &run, "run/I"); 00067 myTree->Branch("event", &event, "event/I"); 00068 00069 NumRecoJetsCaloTower = 0; 00070 NumRecoJetsCorrected = 0; 00071 NumRecoJetsRecHit = 0; 00072 NumGenJets = 0; 00073 NumPart = 0; 00074 NumRecoTrack = 0; 00075 00076 // Jet Reco CaloTower 00077 myTree->Branch("NumRecoJetsCaloTower", &NumRecoJetsCaloTower, "NumRecoJetsCaloTower/I"); 00078 myTree->Branch("JetRecoEtCaloTower", JetRecoEtCaloTower, "JetRecoEtCaloTower[100]/F"); 00079 myTree->Branch("JetRecoEtaCaloTower", JetRecoEtaCaloTower, "JetRecoEtaCaloTower[100]/F"); 00080 myTree->Branch("JetRecoPhiCaloTower", JetRecoPhiCaloTower, "JetRecoPhiCaloTower[100]/F"); 00081 myTree->Branch("JetRecoEtRecHit", JetRecoEtRecHit, "JetRecoEtRecHit[100]/F"); 00082 myTree->Branch("JetRecoGenRecType", JetRecoGenRecType, "JetRecoGenRecType[100]/F"); 00083 myTree->Branch("JetRecoGenPartonType", JetRecoGenPartonType , "JetRecoGenPartonType[100]/F"); 00084 myTree->Branch("EcalEmpty", EcalEmpty , "EcalEmpty[100]/F"); 00085 myTree->Branch("HcalEmpty", HcalEmpty , "HcalEmpty[100]/F"); 00086 // 00087 myTree->Branch("NumRecoJetsCorrected", &NumRecoJetsCorrected, "NumRecoJetsCorrected/I"); 00088 myTree->Branch("JetRecoEtCorrected", JetRecoEtCorrected, "JetRecoEtCorrected[100]/F"); 00089 myTree->Branch("JetRecoEtCorrectedZS", JetRecoEtCorrectedZS, "JetRecoEtCorrectedZS[100]/F"); 00090 myTree->Branch("JetRecoEtaCorrected", JetRecoEtaCorrected, "JetRecoEtaCorrected[100]/F"); 00091 myTree->Branch("JetRecoPhiCorrected", JetRecoPhiCorrected, "JetRecoPhiCorrected[100]/F"); 00092 // GenJet block 00093 myTree->Branch("NumGenJets", &NumGenJets, "NumGenJets/I"); 00094 myTree->Branch("JetGenEt", JetGenEt, "JetGenEt[10]/F"); 00095 myTree->Branch("JetGenEta", JetGenEta, "JetGenEta[10]/F"); 00096 myTree->Branch("JetGenPhi", JetGenPhi, "JetGenPhi[10]/F"); 00097 myTree->Branch("JetGenCode", JetGenCode, "JetGenCode[10]/I"); 00098 // Particle block 00099 myTree->Branch("NumPart", &NumPart, "NumPart/I"); 00100 myTree->Branch("Code", Code, "Code[4000]/I"); 00101 myTree->Branch("Charge", Charge, "Charge[4000]/I"); 00102 myTree->Branch("partpx", partpx, "partpx[4000]/F"); 00103 myTree->Branch("partpy", partpy, "partpy[4000]/F"); 00104 myTree->Branch("partpz", partpz, "partpz[4000]/F"); 00105 myTree->Branch("parte", parte, "parte[4000]/F"); 00106 myTree->Branch("partm", partm, "partm[4000]/F"); 00107 // Tracks block 00108 myTree->Branch("NumRecoTrack", &NumRecoTrack, "NumRecoTrack/I"); 00109 myTree->Branch("TrackRecoEt", TrackRecoEt, "TrackRecoEt[NumRecoTrack]/F"); 00110 myTree->Branch("TrackRecoEta", TrackRecoEta, "TrackRecoEta[NumRecoTrack]/F"); 00111 myTree->Branch("TrackRecoPhi", TrackRecoPhi, "TrackRecoPhi[NumRecoTrack]/F"); 00112 00113 // Calo Geometry 00114 edm::ESHandle<CaloGeometry> pG; 00115 iSetup.get<CaloGeometryRecord>().get(pG); 00116 geo = pG.product(); 00117 00118 00119 }
Reimplemented from edm::EDAnalyzer.
Definition at line 120 of file JetPlusTrackAnalysis.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), hOutputFile, and myTree.
00121 { 00122 00123 cout << "===== Start writing user histograms =====" << endl; 00124 hOutputFile->SetCompressionLevel(2); 00125 hOutputFile->cd(); 00126 myTree->Write(); 00127 hOutputFile->Close() ; 00128 cout << "===== End writing user histograms =======" << endl; 00129 00130 }
Definition at line 41 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
Definition at line 66 of file JetPlusTrackAnalysis.h.
int cms::JetPlusTrackAnalysis::Charge[4000] [private] |
int cms::JetPlusTrackAnalysis::Code[4000] [private] |
Definition at line 70 of file JetPlusTrackAnalysis.h.
Definition at line 69 of file JetPlusTrackAnalysis.h.
Definition at line 64 of file JetPlusTrackAnalysis.h.
float cms::JetPlusTrackAnalysis::EcalEmpty[100] [private] |
std::vector<edm::InputTag> cms::JetPlusTrackAnalysis::ecalLabels_ [private] |
Definition at line 63 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
Definition at line 65 of file JetPlusTrackAnalysis.h.
int cms::JetPlusTrackAnalysis::event [private] |
std::string cms::JetPlusTrackAnalysis::fOutputFileName [private] |
Definition at line 40 of file JetPlusTrackAnalysis.h.
Referenced by beginJob(), and JetPlusTrackAnalysis().
const CaloGeometry* cms::JetPlusTrackAnalysis::geo [private] |
Definition at line 67 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
float cms::JetPlusTrackAnalysis::HcalEmpty[100] [private] |
TFile* cms::JetPlusTrackAnalysis::hOutputFile [private] |
float cms::JetPlusTrackAnalysis::JetGenCode[10] [private] |
float cms::JetPlusTrackAnalysis::JetGenEt[10] [private] |
float cms::JetPlusTrackAnalysis::JetGenEta[10] [private] |
float cms::JetPlusTrackAnalysis::JetGenPhi[10] [private] |
float cms::JetPlusTrackAnalysis::JetRecoEtaCaloTower[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoEtaCorrected[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoEtaJetPlusTrack[100] [private] |
Definition at line 49 of file JetPlusTrackAnalysis.h.
float cms::JetPlusTrackAnalysis::JetRecoEtCaloTower[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoEtCorrected[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoEtCorrectedZS[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoEtJetPlusTrack[100] [private] |
Definition at line 49 of file JetPlusTrackAnalysis.h.
float cms::JetPlusTrackAnalysis::JetRecoEtRecHit[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoGenPartonType[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoGenRecType[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoPhiCaloTower[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoPhiCorrected[100] [private] |
float cms::JetPlusTrackAnalysis::JetRecoPhiJetPlusTrack[100] [private] |
Definition at line 49 of file JetPlusTrackAnalysis.h.
std::string cms::JetPlusTrackAnalysis::m_inputTrackLabel [private] |
Definition at line 62 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
double cms::JetPlusTrackAnalysis::mCone [private] |
Definition at line 56 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
Definition at line 60 of file JetPlusTrackAnalysis.h.
Definition at line 57 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
Definition at line 58 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
Definition at line 59 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), and JetPlusTrackAnalysis().
Definition at line 61 of file JetPlusTrackAnalysis.h.
TTree* cms::JetPlusTrackAnalysis::myTree [private] |
Definition at line 43 of file JetPlusTrackAnalysis.h.
Referenced by analyze(), beginJob(), and endJob().
int cms::JetPlusTrackAnalysis::NumGenJets [private] |
int cms::JetPlusTrackAnalysis::NumPart [private] |
Definition at line 44 of file JetPlusTrackAnalysis.h.
int cms::JetPlusTrackAnalysis::NumRecoTrack [private] |
float cms::JetPlusTrackAnalysis::parte[4000] [private] |
float cms::JetPlusTrackAnalysis::partm[4000] [private] |
float cms::JetPlusTrackAnalysis::partpx[4000] [private] |
float cms::JetPlusTrackAnalysis::partpy[4000] [private] |
float cms::JetPlusTrackAnalysis::partpz[4000] [private] |
int cms::JetPlusTrackAnalysis::run [private] |
float cms::JetPlusTrackAnalysis::TrackRecoEt[5000] [private] |
float cms::JetPlusTrackAnalysis::TrackRecoEta[5000] [private] |
float cms::JetPlusTrackAnalysis::TrackRecoPhi[5000] [private] |