//simple analysis code. See instrutions here: // http://www.hep.ucl.ac.uk/~hesketh/Summer_Project/sandbox.php // Gavin Hesketh, gavin.hesketh@ucl.ac.uk #define analysis_cxx #include "analysis.h" #include "TH1.h" void analysis::Loop() { //there are only 6 variables in the ntuple (vectors, one entry per particle): // _pt // _eta // _phi // _m // _pdgid // _status //and a vector of TLorentzVector for the jets, _jets //--------------------------------------- //declare some histograms to be filled: TFile * output_file = new TFile(output_name, "RECREATE"); output_file->cd(); //here you can declare new histograms: TH1 * h_mass = new TH1F("mass", "mass", 100,0,300); //--------------------------------------- //load in the events: Long64_t nentries = fChain->GetEntriesFast(); cout<<"Looping over "<0 && number_of_anti_muons>0) { TLorentzVector sum = v1 + v2 ; cout<<"Combined Mass: " << sum.M() << endl <<"Combined Momentum: " <Fill( sum.M() ); } } output_file->Write(); }