Changeset 6e41190 in git for examples/Example3.C
- Timestamp:
- Apr 20, 2016, 3:36:22 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 61c0925
- Parents:
- ecf5f26
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Example3.C
recf5f26 r6e41190 30 30 TH1 *fMuonDeltaEta; 31 31 32 TH1 *fTrackDeltaPT;33 TH1 *fTrackDeltaEta;34 35 32 TH1 *fJetDeltaPT; 36 33 }; … … 76 73 "muon_delta_eta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}", 77 74 "(#eta^{particle} - #eta^{muon})/#eta^{particle}", "number of muons", 78 100, -0.1, 0.1);79 80 plots->fTrackDeltaPT = result->AddHist1D(81 "track_delta_pt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}",82 "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}", "number of tracks",83 100, -0.1, 0.1);84 85 plots->fTrackDeltaEta = result->AddHist1D(86 "track_delta_eta", "(#eta^{particle} - #eta^{track})/#eta^{particle}",87 "(#eta^{particle} - #eta^{track})/#eta^{particle}", "number of tracks",88 75 100, -0.1, 0.1); 89 76 … … 103 90 TClonesArray *branchPhoton = treeReader->UseBranch("Photon"); 104 91 TClonesArray *branchMuon = treeReader->UseBranch("Muon"); 105 106 TClonesArray *branchTrack = treeReader->UseBranch("Track");107 TClonesArray *branchTower = treeReader->UseBranch("Tower");108 109 92 TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack"); 110 93 TClonesArray *branchEFlowPhoton = treeReader->UseBranch("EFlowPhoton"); … … 175 158 plots->fMuonDeltaPT->Fill((particle->PT - muon->PT)/particle->PT); 176 159 plots->fMuonDeltaEta->Fill((particle->Eta - muon->Eta)/particle->Eta); 177 }178 179 // Loop over all tracks in event180 for(i = 0; i < branchTrack->GetEntriesFast(); ++i)181 {182 track = (Track*) branchTrack->At(i);183 particle = (GenParticle*) track->Particle.GetObject();184 185 plots->fTrackDeltaPT->Fill((particle->PT - track->PT)/particle->PT);186 plots->fTrackDeltaEta->Fill((particle->Eta - track->Eta)/particle->Eta);187 160 } 188 161
Note:
See TracChangeset
for help on using the changeset viewer.