////////////////////////////////////////////////////////// // This class has been automatically generated on // Tue Aug 9 10:19:05 2016 by ROOT version 6.06/02 // from TTree events/events // found on file: mytree.root ////////////////////////////////////////////////////////// #ifndef MyClass_h #define MyClass_h #include #include #include // Header file for the classes stored in the TTree if any. class MyClass { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Fixed size dimensions of array or collections stored in the TTree if any. // Declaration of leaf types Float_t event_number; Float_t Z_mass; Float_t Z_pt; Float_t Z_eta; Float_t Z_phi; Float_t mu1_pt; Float_t mu1_eta; Float_t mu1_phi; Float_t mu1_mass; Float_t mu1_charge; Float_t mu2_pt; Float_t mu2_eta; Float_t mu2_phi; Float_t mu2_mass; Float_t mu2_charge; // List of branches TBranch *b_event_number; //! TBranch *b_Z_mass; //! TBranch *b_Z_pt; //! TBranch *b_Z_eta; //! TBranch *b_Z_phi; //! TBranch *b_mu1_pt; //! TBranch *b_mu1_eta; //! TBranch *b_mu1_phi; //! TBranch *b_mu1_mass; //! TBranch *b_mu1_charge; //! TBranch *b_mu2_pt; //! TBranch *b_mu2_eta; //! TBranch *b_mu2_phi; //! TBranch *b_mu2_mass; //! TBranch *b_mu2_charge; //! MyClass(TTree *tree=0); virtual ~MyClass(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry); virtual void Init(TTree *tree); virtual void Loop(); virtual Bool_t Notify(); virtual void Show(Long64_t entry = -1); }; #endif #ifdef MyClass_cxx MyClass::MyClass(TTree *tree) : fChain(0) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == 0) { TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("mytree.root"); if (!f || !f->IsOpen()) { f = new TFile("mytree.root"); } f->GetObject("events",tree); } Init(tree); } MyClass::~MyClass() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t MyClass::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t MyClass::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (fChain->GetTreeNumber() != fCurrent) { fCurrent = fChain->GetTreeNumber(); Notify(); } return centry; } void MyClass::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normally not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("event_number", &event_number, &b_event_number); fChain->SetBranchAddress("Z_mass", &Z_mass, &b_Z_mass); fChain->SetBranchAddress("Z_pt", &Z_pt, &b_Z_pt); fChain->SetBranchAddress("Z_eta", &Z_eta, &b_Z_eta); fChain->SetBranchAddress("Z_phi", &Z_phi, &b_Z_phi); fChain->SetBranchAddress("mu1_pt", &mu1_pt, &b_mu1_pt); fChain->SetBranchAddress("mu1_eta", &mu1_eta, &b_mu1_eta); fChain->SetBranchAddress("mu1_phi", &mu1_phi, &b_mu1_phi); fChain->SetBranchAddress("mu1_mass", &mu1_mass, &b_mu1_mass); fChain->SetBranchAddress("mu1_charge", &mu1_charge, &b_mu1_charge); fChain->SetBranchAddress("mu2_pt", &mu2_pt, &b_mu2_pt); fChain->SetBranchAddress("mu2_eta", &mu2_eta, &b_mu2_eta); fChain->SetBranchAddress("mu2_phi", &mu2_phi, &b_mu2_phi); fChain->SetBranchAddress("mu2_mass", &mu2_mass, &b_mu2_mass); fChain->SetBranchAddress("mu2_charge", &mu2_charge, &b_mu2_charge); Notify(); } Bool_t MyClass::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } void MyClass::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t MyClass::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef MyClass_cxx