- Timestamp:
- Apr 17, 2014, 1:41:34 PM (11 years ago)
- Location:
- trunk/examples
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/Example3.C
r1357 r1385 95 95 TClonesArray *branchPhoton = treeReader->UseBranch("Photon"); 96 96 TClonesArray *branchMuon = treeReader->UseBranch("Muon"); 97 98 TClonesArray *branchTrack = treeReader->UseBranch("Track"); 99 TClonesArray *branchTower = treeReader->UseBranch("Tower"); 97 100 98 101 TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack"); … … 167 170 168 171 // Loop over all tracks in event 169 for(i = 0; i < branch EFlowTrack->GetEntriesFast(); ++i)170 { 171 track = (Track*) branch EFlowTrack->At(i);172 for(i = 0; i < branchTrack->GetEntriesFast(); ++i) 173 { 174 track = (Track*) branchTrack->At(i); 172 175 particle = (GenParticle*) track->Particle.GetObject(); 173 176 … … 197 200 if(object->IsA() == GenParticle::Class()) 198 201 { 199 cout<<" GenPart pt: "<<((GenParticle*) object)->PT<<", eta: "<<((GenParticle*) object)->Eta<<", phi: "<<((GenParticle*) object)->Phi<<endl; 200 momentum += ((GenParticle*) object)->P4(); 202 particle = (GenParticle*) object; 203 cout << " GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl; 204 momentum += particle->P4(); 201 205 } 202 206 else if(object->IsA() == Track::Class()) 203 207 { 204 cout<<" Track pt: "<<((Track*) object)->PT<<", eta: "<<((Track*) object)->Eta<<", phi: "<<((Track*) object)->Phi<<endl; 205 momentum += ((Track*) object)->P4(); 208 track = (Track*) object; 209 cout << " Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl; 210 momentum += track->P4(); 206 211 } 207 212 else if(object->IsA() == Tower::Class()) 208 213 { 209 cout<<" Tower pt: "<<((Tower*) object)->ET<<", eta: "<<((Tower*) object)->Eta<<", phi: "<<((Tower*) object)->Phi<<endl; 210 momentum += ((Tower*) object)->P4(); 214 tower = (Tower*) object; 215 cout << " Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl; 216 momentum += tower->P4(); 211 217 } 212 218 else if(object->IsA() == Muon::Class()) 213 219 { 214 cout<<" Muon pt: "<<((Muon*) object)->PT<<", eta: "<<((Muon*) object)->Eta<<", phi: "<<((Muon*) object)->Phi<<endl; 215 momentum += ((Muon*) object)->P4(); 220 muon = (Muon*) object; 221 cout << " Muon pt: " << muon->PT << ", eta: " << muon->Eta << ", phi: " << muon->Phi << endl; 222 momentum += muon->P4(); 216 223 } 217 224 } -
trunk/examples/delphes_card_ATLAS.tcl
r1378 r1385 530 530 add Branch Delphes/allParticles Particle GenParticle 531 531 532 #add Branch TrackMerger/tracks Track Track533 #add Branch Calorimeter/towers Tower Tower534 535 #add Branch Calorimeter/eflowTracks EFlowTrack Track536 #add Branch Calorimeter/eflowPhotons EFlowPhoton Tower537 #add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower532 add Branch TrackMerger/tracks Track Track 533 add Branch Calorimeter/towers Tower Tower 534 535 add Branch Calorimeter/eflowTracks EFlowTrack Track 536 add Branch Calorimeter/eflowPhotons EFlowPhoton Tower 537 add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower 538 538 539 539 add Branch GenJetFinder/jets GenJet Jet -
trunk/examples/delphes_card_CMS.tcl
r1378 r1385 542 542 add Branch Delphes/allParticles Particle GenParticle 543 543 544 #add Branch TrackMerger/tracks Track Track545 #add Branch Calorimeter/towers Tower Tower546 547 #add Branch Calorimeter/eflowTracks EFlowTrack Track548 #add Branch Calorimeter/eflowPhotons EFlowPhoton Tower549 #add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower544 add Branch TrackMerger/tracks Track Track 545 add Branch Calorimeter/towers Tower Tower 546 547 add Branch Calorimeter/eflowTracks EFlowTrack Track 548 add Branch Calorimeter/eflowPhotons EFlowPhoton Tower 549 add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower 550 550 551 551 add Branch GenJetFinder/jets GenJet Jet
Note:
See TracChangeset
for help on using the changeset viewer.