////////////////////////////////////////////////////////// // This class has been automatically generated on // Thu Jul 24 09:27:14 2008 by ROOT version 5.19/03 // from TTree ZTree/ZTree // found on file: TestNtupleOutput.root ////////////////////////////////////////////////////////// #ifndef ZCandidates_h #define ZCandidates_h #include #include #include #include class ZCandidates { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leaf types Int_t RunNumber; Int_t EventNumber; Char_t Token[153]; vector *Zee_pt; vector *Zee_eta; vector *Zee_rapidity; vector *Zee_phi; vector *Zee_m; vector *Zee_charge; vector *Zee_pdgid; vector > *Zee_element_pt; vector > *Zee_element_eta; vector > *Zee_element_rapidity; vector > *Zee_element_phi; vector > *Zee_element_m; vector > *Zee_element_charge; vector > *Zee_element_pdgid; vector *Zmumu_pt; vector *Zmumu_eta; vector *Zmumu_rapidity; vector *Zmumu_phi; vector *Zmumu_m; vector *Zmumu_charge; vector *Zmumu_pdgid; vector > *Zmumu_element_pt; vector > *Zmumu_element_eta; vector > *Zmumu_element_rapidity; vector > *Zmumu_element_phi; vector > *Zmumu_element_m; vector > *Zmumu_element_charge; vector > *Zmumu_element_pdgid; // List of branches TBranch *b_RunNumber; //! TBranch *b_EventNumber; //! TBranch *b_Token; //! TBranch *b_Zee_pt; //! TBranch *b_Zee_eta; //! TBranch *b_Zee_rapidity; //! TBranch *b_Zee_phi; //! TBranch *b_Zee_m; //! TBranch *b_Zee_charge; //! TBranch *b_Zee_pdgid; //! TBranch *b_Zee_element_pt; //! TBranch *b_Zee_element_eta; //! TBranch *b_Zee_element_rapidity; //! TBranch *b_Zee_element_phi; //! TBranch *b_Zee_element_m; //! TBranch *b_Zee_element_charge; //! TBranch *b_Zee_element_pdgid; //! TBranch *b_Zmumu_pt; //! TBranch *b_Zmumu_eta; //! TBranch *b_Zmumu_rapidity; //! TBranch *b_Zmumu_phi; //! TBranch *b_Zmumu_m; //! TBranch *b_Zmumu_charge; //! TBranch *b_Zmumu_pdgid; //! TBranch *b_Zmumu_element_pt; //! TBranch *b_Zmumu_element_eta; //! TBranch *b_Zmumu_element_rapidity; //! TBranch *b_Zmumu_element_phi; //! TBranch *b_Zmumu_element_m; //! TBranch *b_Zmumu_element_charge; //! TBranch *b_Zmumu_element_pdgid; //! ZCandidates(TTree *tree=0); virtual ~ZCandidates(); 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 ZCandidates_cxx ZCandidates::ZCandidates(TTree *tree) { // 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("TestNtupleOutput.root"); if (!f) { f = new TFile("TestNtupleOutput.root"); } tree = (TTree*)gDirectory->Get("ZTree"); } Init(tree); } ZCandidates::~ZCandidates() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t ZCandidates::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t ZCandidates::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->InheritsFrom(TChain::Class())) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void ZCandidates::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 object pointer Zee_pt = 0; Zee_eta = 0; Zee_rapidity = 0; Zee_phi = 0; Zee_m = 0; Zee_charge = 0; Zee_pdgid = 0; Zee_element_pt = 0; Zee_element_eta = 0; Zee_element_rapidity = 0; Zee_element_phi = 0; Zee_element_m = 0; Zee_element_charge = 0; Zee_element_pdgid = 0; Zmumu_pt = 0; Zmumu_eta = 0; Zmumu_rapidity = 0; Zmumu_phi = 0; Zmumu_m = 0; Zmumu_charge = 0; Zmumu_pdgid = 0; Zmumu_element_pt = 0; Zmumu_element_eta = 0; Zmumu_element_rapidity = 0; Zmumu_element_phi = 0; Zmumu_element_m = 0; Zmumu_element_charge = 0; Zmumu_element_pdgid = 0; // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("RunNumber", &RunNumber, &b_RunNumber); fChain->SetBranchAddress("EventNumber", &EventNumber, &b_EventNumber); fChain->SetBranchAddress("Token", Token, &b_Token); fChain->SetBranchAddress("Zee_pt", &Zee_pt, &b_Zee_pt); fChain->SetBranchAddress("Zee_eta", &Zee_eta, &b_Zee_eta); fChain->SetBranchAddress("Zee_rapidity", &Zee_rapidity, &b_Zee_rapidity); fChain->SetBranchAddress("Zee_phi", &Zee_phi, &b_Zee_phi); fChain->SetBranchAddress("Zee_m", &Zee_m, &b_Zee_m); fChain->SetBranchAddress("Zee_charge", &Zee_charge, &b_Zee_charge); fChain->SetBranchAddress("Zee_pdgid", &Zee_pdgid, &b_Zee_pdgid); fChain->SetBranchAddress("Zee_element_pt", &Zee_element_pt, &b_Zee_element_pt); fChain->SetBranchAddress("Zee_element_eta", &Zee_element_eta, &b_Zee_element_eta); fChain->SetBranchAddress("Zee_element_rapidity", &Zee_element_rapidity, &b_Zee_element_rapidity); fChain->SetBranchAddress("Zee_element_phi", &Zee_element_phi, &b_Zee_element_phi); fChain->SetBranchAddress("Zee_element_m", &Zee_element_m, &b_Zee_element_m); fChain->SetBranchAddress("Zee_element_charge", &Zee_element_charge, &b_Zee_element_charge); fChain->SetBranchAddress("Zee_element_pdgid", &Zee_element_pdgid, &b_Zee_element_pdgid); fChain->SetBranchAddress("Zmumu_pt", &Zmumu_pt, &b_Zmumu_pt); fChain->SetBranchAddress("Zmumu_eta", &Zmumu_eta, &b_Zmumu_eta); fChain->SetBranchAddress("Zmumu_rapidity", &Zmumu_rapidity, &b_Zmumu_rapidity); fChain->SetBranchAddress("Zmumu_phi", &Zmumu_phi, &b_Zmumu_phi); fChain->SetBranchAddress("Zmumu_m", &Zmumu_m, &b_Zmumu_m); fChain->SetBranchAddress("Zmumu_charge", &Zmumu_charge, &b_Zmumu_charge); fChain->SetBranchAddress("Zmumu_pdgid", &Zmumu_pdgid, &b_Zmumu_pdgid); fChain->SetBranchAddress("Zmumu_element_pt", &Zmumu_element_pt, &b_Zmumu_element_pt); fChain->SetBranchAddress("Zmumu_element_eta", &Zmumu_element_eta, &b_Zmumu_element_eta); fChain->SetBranchAddress("Zmumu_element_rapidity", &Zmumu_element_rapidity, &b_Zmumu_element_rapidity); fChain->SetBranchAddress("Zmumu_element_phi", &Zmumu_element_phi, &b_Zmumu_element_phi); fChain->SetBranchAddress("Zmumu_element_m", &Zmumu_element_m, &b_Zmumu_element_m); fChain->SetBranchAddress("Zmumu_element_charge", &Zmumu_element_charge, &b_Zmumu_element_charge); fChain->SetBranchAddress("Zmumu_element_pdgid", &Zmumu_element_pdgid, &b_Zmumu_element_pdgid); Notify(); } Bool_t ZCandidates::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 ZCandidates::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t ZCandidates::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef ZCandidates_cxx