{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Tue Jul 14 10:50:35 2009 by ROOT version5.18/00d) // from TChain PreselectedMuonTree/ ////////////////////////////////////////////////////////// //Reset ROOT and connect tree file gROOT->Reset(); #ifdef SINGLE_TREE // The following code should be used if you want this code to access // a single tree instead of a chain TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/scratch/dervan/H130GeV_Output.root"); if (!f) { f = new TFile("/scratch/dervan/H130GeV_Output.root"); } TTree *PreselectedMuonTree = (TTree*)gDirectory->Get("PreselectedMuonTree"); #else // SINGLE_TREE // The following code should be used if you want this code to access a chain // of trees. TChain *PreselectedMuonTree = new TChain("PreselectedMuonTree",""); PreselectedMuonTree->Add("/scratch/dervan/H130GeV_Output.root/PreselectedMuonTree"); #endif // SINGLE_TREE //Declaration of leaves types Int_t RunNumber; Int_t EventNumber; Char_t Token[153]; Int_t num; vector muon_m; vector muon_pt; vector muon_eta; vector muon_phi; vector > muon_charge; vector > muon_author; vector > muon_isHighPt; vector > muon_isLowPt; vector > muon_isLowPtReconstructedMuon; vector > muon_isStandAloneMuon; vector > muon_isCombinedMuon; vector > muon_bestMatch; vector > muon_isCaloMuonId; vector > muon_hasCluster; vector > muon_hasCombinedMuon; vector > muon_hasInDetTrackParticle; vector > muon_hasInnerExtrapolatedTrackParticle; vector > muon_hasMuonSpectrometerTrackParticle; vector > muon_hasMuonExtrapolatedTrackParticle; vector > muon_hasCombinedMuonTrackParticle; vector muon_fitChi2; vector muon_fitChi2OverDoF; vector muon_matchChi2; vector muon_matchChi2OverDoF; vector > muon_numberOfBLayerHits; vector > muon_numberOfBLayerSharedHits; vector > muon_numberOfPixelHits; vector > muon_numberOfPixelSharedHits; vector > muon_numberOfPixelHoles; vector > muon_numberOfSCTHits; vector > muon_numberOfSCTSharedHits; vector > muon_numberOfSCTHoles; vector > muon_numberOfTRTHits; vector > muon_numberOfTRTHighThresholdHits; vector > muon_numberOfTRTOutliers; vector > muon_numberOfTRTHighThresholdOutliers; vector > muon_numberOfMDTHits; vector > muon_numberOfMDTHoles; vector > muon_numberOfCSCEtaHits; vector > muon_numberOfCSCEtaHoles; vector > muon_numberOfCSCPhiHits; vector > muon_numberOfCSCPhiHoles; vector > muon_numberOfRPCEtaHits; vector > muon_numberOfRPCEtaHoles; vector > muon_numberOfRPCPhiHits; vector > muon_numberOfRPCPhiHoles; vector > muon_numberOfTGCEtaHits; vector > muon_numberOfTGCEtaHoles; vector > muon_numberOfTGCPhiHits; vector > muon_numberOfTGCPhiHoles; vector > muon_numberOfGangedPixels; vector > muon_numberOfOutliersOnTrack; vector muon_etcone10; vector muon_etcone20; vector muon_etcone30; vector muon_etcone40; vector muon_nucone10; vector muon_nucone20; vector muon_nucone30; vector muon_nucone40; vector muon_ptcone10; vector muon_ptcone20; vector muon_ptcone30; vector muon_ptcone40; vector muon_caloEnergyLoss; vector muon_caloEnergyLossError; // Set branch addresses. PreselectedMuonTree->SetBranchAddress("RunNumber",&RunNumber); PreselectedMuonTree->SetBranchAddress("EventNumber",&EventNumber); PreselectedMuonTree->SetBranchAddress("Token",Token); PreselectedMuonTree->SetBranchAddress("muon_num",&num); PreselectedMuonTree->SetBranchAddress("muon_m",&muon_m); PreselectedMuonTree->SetBranchAddress("muon_pt",&muon_pt); PreselectedMuonTree->SetBranchAddress("muon_eta",&muon_eta); PreselectedMuonTree->SetBranchAddress("muon_phi",&muon_phi); PreselectedMuonTree->SetBranchAddress("muon_charge",&muon_charge); PreselectedMuonTree->SetBranchAddress("muon_author",&muon_author); PreselectedMuonTree->SetBranchAddress("muon_isHighPt",&muon_isHighPt); PreselectedMuonTree->SetBranchAddress("muon_isLowPt",&muon_isLowPt); PreselectedMuonTree->SetBranchAddress("muon_isLowPtReconstructedMuon",&muon_isLowPtReconstructedMuon); PreselectedMuonTree->SetBranchAddress("muon_isStandAloneMuon",&muon_isStandAloneMuon); PreselectedMuonTree->SetBranchAddress("muon_isCombinedMuon",&muon_isCombinedMuon); PreselectedMuonTree->SetBranchAddress("muon_bestMatch",&muon_bestMatch); PreselectedMuonTree->SetBranchAddress("muon_isCaloMuonId",&muon_isCaloMuonId); PreselectedMuonTree->SetBranchAddress("muon_hasCluster",&muon_hasCluster); PreselectedMuonTree->SetBranchAddress("muon_hasCombinedMuon",&muon_hasCombinedMuon); PreselectedMuonTree->SetBranchAddress("muon_hasInDetTrackParticle",&muon_hasInDetTrackParticle); PreselectedMuonTree->SetBranchAddress("muon_hasInnerExtrapolatedTrackParticle",&muon_hasInnerExtrapolatedTrackParticle); PreselectedMuonTree->SetBranchAddress("muon_hasMuonSpectrometerTrackParticle",&muon_hasMuonSpectrometerTrackParticle); PreselectedMuonTree->SetBranchAddress("muon_hasMuonExtrapolatedTrackParticle",&muon_hasMuonExtrapolatedTrackParticle); PreselectedMuonTree->SetBranchAddress("muon_hasCombinedMuonTrackParticle",&muon_hasCombinedMuonTrackParticle); PreselectedMuonTree->SetBranchAddress("muon_fitChi2",&muon_fitChi2); PreselectedMuonTree->SetBranchAddress("muon_fitChi2OverDoF",&muon_fitChi2OverDoF); PreselectedMuonTree->SetBranchAddress("muon_matchChi2",&muon_matchChi2); PreselectedMuonTree->SetBranchAddress("muon_matchChi2OverDoF",&muon_matchChi2OverDoF); PreselectedMuonTree->SetBranchAddress("muon_numberOfBLayerHits",&muon_numberOfBLayerHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfBLayerSharedHits",&muon_numberOfBLayerSharedHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfPixelHits",&muon_numberOfPixelHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfPixelSharedHits",&muon_numberOfPixelSharedHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfPixelHoles",&muon_numberOfPixelHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfSCTHits",&muon_numberOfSCTHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfSCTSharedHits",&muon_numberOfSCTSharedHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfSCTHoles",&muon_numberOfSCTHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfTRTHits",&muon_numberOfTRTHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfTRTHighThresholdHits",&muon_numberOfTRTHighThresholdHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfTRTOutliers",&muon_numberOfTRTOutliers); PreselectedMuonTree->SetBranchAddress("muon_numberOfTRTHighThresholdOutliers",&muon_numberOfTRTHighThresholdOutliers); PreselectedMuonTree->SetBranchAddress("muon_numberOfMDTHits",&muon_numberOfMDTHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfMDTHoles",&muon_numberOfMDTHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfCSCEtaHits",&muon_numberOfCSCEtaHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfCSCEtaHoles",&muon_numberOfCSCEtaHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfCSCPhiHits",&muon_numberOfCSCPhiHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfCSCPhiHoles",&muon_numberOfCSCPhiHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfRPCEtaHits",&muon_numberOfRPCEtaHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfRPCEtaHoles",&muon_numberOfRPCEtaHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfRPCPhiHits",&muon_numberOfRPCPhiHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfRPCPhiHoles",&muon_numberOfRPCPhiHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfTGCEtaHits",&muon_numberOfTGCEtaHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfTGCEtaHoles",&muon_numberOfTGCEtaHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfTGCPhiHits",&muon_numberOfTGCPhiHits); PreselectedMuonTree->SetBranchAddress("muon_numberOfTGCPhiHoles",&muon_numberOfTGCPhiHoles); PreselectedMuonTree->SetBranchAddress("muon_numberOfGangedPixels",&muon_numberOfGangedPixels); PreselectedMuonTree->SetBranchAddress("muon_numberOfOutliersOnTrack",&muon_numberOfOutliersOnTrack); PreselectedMuonTree->SetBranchAddress("muon_etcone10",&muon_etcone10); PreselectedMuonTree->SetBranchAddress("muon_etcone20",&muon_etcone20); PreselectedMuonTree->SetBranchAddress("muon_etcone30",&muon_etcone30); PreselectedMuonTree->SetBranchAddress("muon_etcone40",&muon_etcone40); PreselectedMuonTree->SetBranchAddress("muon_nucone10",&muon_nucone10); PreselectedMuonTree->SetBranchAddress("muon_nucone20",&muon_nucone20); PreselectedMuonTree->SetBranchAddress("muon_nucone30",&muon_nucone30); PreselectedMuonTree->SetBranchAddress("muon_nucone40",&muon_nucone40); PreselectedMuonTree->SetBranchAddress("muon_ptcone10",&muon_ptcone10); PreselectedMuonTree->SetBranchAddress("muon_ptcone20",&muon_ptcone20); PreselectedMuonTree->SetBranchAddress("muon_ptcone30",&muon_ptcone30); PreselectedMuonTree->SetBranchAddress("muon_ptcone40",&muon_ptcone40); PreselectedMuonTree->SetBranchAddress("muon_caloEnergyLoss",&muon_caloEnergyLoss); PreselectedMuonTree->SetBranchAddress("muon_caloEnergyLossError",&muon_caloEnergyLossError); // This is the loop skeleton // To read only selected branches, Insert statements like: // PreselectedMuonTree->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Long64_t nentries = PreselectedMuonTree->GetEntries(); Long64_t nbytes = 0; // for (Long64_t i=0; iGetEntry(i); // } }