#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include"Truth.h" #include"ZCandidates.h" #include"HCandidates.h" #include"Trigger.h" #include"Muon.h" #include"Electron.h" #include"RawElectron.h" //______________________________________________________________________________ int main() { TFile hfile("output_200GeV.root","RECREATE"); TH1F *hHeeee_mass = new TH1F("hHeeee_mass","hHeeee_mass",40,100.,400.); TH1F *hHmmmm_mass = new TH1F("hHmmmm_mass","hHmmmm_mass",40,100.,400.); TH1F *hHeemm_mass = new TH1F("hHeemm_mass","hHeemm_mass",40,100.,400.); TH1F *hH_mass = new TH1F("hH_mass","hH_mass",40,100.,400.); // instanciate chains TObjArray Chains; TChain * truth = new TChain("TruthTree"); Chains.Add(truth); TChain * htree = new TChain("HiggsTree"); Chains.Add(htree); for (int i=0; iAdd("/scratch/dervan/H200GeV_Output.root"); // chain->Add("/scratch/dervan/ZZ_1_Output.root"); // chain->Add("/scratch/dervan/ZZ_2_Output.root"); // chain->Add("/scratch/dervan/ZZ_3_Output.root"); // chain->Add("/scratch/dervan/ZZ_4_Output.root"); // chain->Add("/scratch/dervan/Zbb_1_Output.root"); // chain->Add("/scratch/dervan/Zbb_2_Output.root"); // chain->Add("/scratch/dervan/Zbb_3_Output.root"); // chain->Add("/scratch/dervan/Zbb_4_Output.root"); // chain->Add("/scratch/dervan/Zbb_5_Output.root"); // chain->Add("/scratch/dervan/Zbb_6_Output.root"); // chain->Add("/scratch/dervan/Zbb_7_Output.root"); // chain->Add("/scratch/dervan/Zbb_8_Output.root"); // chain->Add("/scratch/dervan/Zbb_9_Output.root"); // chain->Add("/scratch/dervan/Zbb_10_Output.root"); // chain->Add("/scratch/dervan/Zbb_11_Output.root"); // chain->Add("/scratch/dervan/Zbb_12_Output.root"); // chain->Add("/scratch/dervan/Zbb_13_Output.root"); // chain->Add("/scratch/dervan/Zbb_14_Output.root"); // chain->Add("/scratch/dervan/Zbb_15_Output.root"); // chain->Add("/scratch/dervan/Zbb_16_Output.root"); } int TruthNum = truth->GetEntries(); int HNum = htree->GetEntries(); cout << "Number of truth events = " << TruthNum << endl; cout << "Number of H events = " << HNum << endl; getchar(); Truth *TruthTree; HCandidates *HiggsTree; TruthTree = new Truth(truth); HiggsTree = new HCandidates(htree); int const NumEntries = TruthNum; cout << "Number of events = " << NumEntries << endl; for (int jentry=0; jentryLoadTree(jentry); TruthTree->LoadTree(jentry); HiggsTree->LoadTree(jentry); HiggsTree->GetEntry(jentry); if(!(jentry%1000)) { cout << "event number "<H4e_m))[i] << endl; hHeeee_mass->Fill((*(HiggsTree->H4e_m))[i]); hH_mass->Fill((*(HiggsTree->H4e_m))[i]); } for(unsigned int i=0; i< (*(HiggsTree->H4mu_m)).size(); i++) { // cout << "mass H4mu " << (*(HiggsTree->H4mu_m))[i] << endl; hHmmmm_mass->Fill((*(HiggsTree->H4mu_m))[i]); hH_mass->Fill((*(HiggsTree->H4mu_m))[i]); } for(unsigned int i=0; i< (*(HiggsTree->H2e2mu_m)).size(); i++) { // cout << "mass H2e2mu " << (*(HiggsTree->H2e2mu_m))[i] << endl; hHeemm_mass->Fill((*(HiggsTree->H2e2mu_m))[i]); hH_mass->Fill((*(HiggsTree->H2e2mu_m))[i]); } // getchar(); } hfile.Write(); return 0; }