Changeset 975405a in git
- Timestamp:
- Jul 2, 2013, 5:45:31 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- d4ad7b3
- Parents:
- 6c565cc
- Location:
- examples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/DelphesCMSFWLite.cpp
r6c565cc r975405a 1 #include <algorithm> 1 2 #include <stdexcept> 2 3 #include <iostream> … … 5 6 6 7 #include <map> 8 #include <vector> 7 9 8 10 #include <stdlib.h> … … 41 43 void ConvertInput(fwlite::Event &event, DelphesFactory *factory, TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray) 42 44 { 43 size_t i;44 45 fwlite::Handle< vector< reco::GenParticle > > handleParticle; 46 vector< reco::GenParticle >::const_iterator itParticle; 47 48 vector< const reco::Candidate * > vectorCandidate; 49 vector< const reco::Candidate * >::iterator itCandidate; 50 45 51 handleParticle.getByLabel(event, "genParticles"); 46 52 … … 56 62 pdg = TDatabasePDG::Instance(); 57 63 58 for(i = 0; i < handleParticle->size(); ++i) 59 { 60 const reco::GenParticle &particle = (*handleParticle)[i]; 64 for(itParticle = handleParticle->begin(); itParticle != handleParticle->end(); ++itParticle) 65 { 66 vectorCandidate.push_back(&*itParticle); 67 } 68 69 for(itParticle = handleParticle->begin(); itParticle != handleParticle->end(); ++itParticle) 70 { 71 const reco::GenParticle &particle = *itParticle; 61 72 62 73 pid = particle.pdgId(); … … 71 82 72 83 candidate->Status = status; 84 85 itCandidate = find(vectorCandidate.begin(), vectorCandidate.end(), particle.daughter(0)); 86 if(itCandidate != vectorCandidate.end()) candidate->D1 = distance(vectorCandidate.begin(), itCandidate); 87 88 itCandidate = find(vectorCandidate.begin(), vectorCandidate.end(), particle.daughter(particle.numberOfDaughters() - 1)); 89 if(itCandidate != vectorCandidate.end()) candidate->D2 = distance(vectorCandidate.begin(), itCandidate); 73 90 74 91 pdgParticle = pdg->GetParticle(pid); -
examples/DelphesCMSFWLite.sh
r6c565cc r975405a 1 1 echo ">> Building DelphesCMSFWLite" 2 2 3 INC="`echo -I$CMSSW_FWLITE_INCLUDE_PATH | sed 's/:/ -I/g'` -I$CMSSW_RELEASE_BASE/src" 3 4
Note:
See TracChangeset
for help on using the changeset viewer.