Changeset 5df97ac in git
- Timestamp:
- Nov 10, 2016, 3:15:56 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 9e24b7b
- Parents:
- a7c9002
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesCMSFWLite.cpp
ra7c9002 r5df97ac 64 64 65 65 void ConvertInput(fwlite::Event &event, Long64_t eventCounter, 66 67 68 66 ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt, 67 DelphesFactory *factory, TObjArray *allParticleOutputArray, 68 TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray, Bool_t firstEvent) 69 69 { 70 70 … … 82 82 handleGenEventInfo.getByLabel(event, "generator"); 83 83 84 if 85 { 84 if(!((handleLHEEvent.getBranchNameFor(event, "source")).empty())) 85 { 86 86 handleLHEEvent.getByLabel(event, "source"); 87 87 } 88 else if 88 else if(!((handleLHEEvent.getBranchNameFor(event, "externalLHEProducer")).empty())) 89 89 { 90 90 handleLHEEvent.getByLabel(event, "externalLHEProducer"); 91 91 } 92 else if 93 { 94 std::cout<<"Wrong LHEEvent Label! Please, check the input file."<<std::endl;95 } 96 97 if 92 else if(firstEvent) 93 { 94 cout << "Wrong LHEEvent Label! Please, check the input file." << endl; 95 } 96 97 if(!((handleParticle.getBranchNameFor(event, "genParticles")).empty())) 98 98 { 99 99 handleParticle.getByLabel(event, "genParticles"); 100 100 } 101 else if 101 else if(!((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && !((handleParticle.getBranchNameFor(event,"prunedGenParticles")).empty())) 102 102 { 103 103 handleParticle.getByLabel(event, "prunedGenParticles"); … … 146 146 element->ProcTime = 0.0; 147 147 148 149 148 if(foundLHE) 150 149 { … … 156 155 weight = static_cast<Weight *>(branchRwgt->NewEntry()); 157 156 weight->Weight = itWeightsInfo->wgt; 158 } 157 } 159 158 } 160 159 … … 164 163 { 165 164 const reco::GenParticle &particle = *itParticle; 166 if( !isMiniAOD || particle.status() != 1) vectorCandidate.push_back(&*itParticle);165 if(!isMiniAOD || particle.status() != 1) vectorCandidate.push_back(&*itParticle); 167 166 } 168 167 … … 173 172 pid = particle.pdgId(); 174 173 status = particle.status(); 175 if( isMiniAOD && particle.status() == 1) continue;174 if(isMiniAOD && particle.status() == 1) continue; 176 175 px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.energy(); mass = particle.mass(); 177 176 x = particle.vx(); y = particle.vy(); z = particle.vz(); … … 208 207 if(!pdgParticle) continue; 209 208 210 if( 209 if(status == 1) 211 210 { 212 211 // Prevent duplicated particle. 213 if ( !isMiniAOD) stableParticleOutputArray->Add(candidate);212 if(!isMiniAOD) stableParticleOutputArray->Add(candidate); 214 213 } 215 214 else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15) … … 218 217 } 219 218 } 220 if ( !isMiniAOD) return ; 219 220 if(!isMiniAOD) return; 221 221 // For MiniAOD sample, 222 222 // Only status==1 particles are saved to packedGenParticles. … … 378 378 { 379 379 ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory, 380 380 allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent); 381 381 modularDelphes->ProcessTask(); 382 382
Note:
See TracChangeset
for help on using the changeset viewer.