////////////////////////////////////////////////////////// // This class has been automatically generated on // Tue Dec 19 17:47:17 2017 by ROOT version 5.34/36 // from TTree tree/treeProducerWMass // found on file: /eos/cms/store/user/loccie/WMass/Run13TeV3/DYJetsToLL_M50.root ////////////////////////////////////////////////////////// #ifndef ElectronAnalyser_h #define ElectronAnalyser_h #include #include #include // Header file for the classes stored in the TTree if any. // Fixed size dimensions of array or collections stored in the TTree if any. class ElectronAnalyser { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leaf types ULong64_t evt; Float_t puWeight; Float_t nTrueInt; Int_t nVert; Float_t mZ1; Int_t HLT_SingleEl; Int_t HLT_DoubleEl; Int_t nLepGood; Int_t LepGood_charge[6]; //[nLepGood] Int_t LepGood_tightId[6]; //[nLepGood] Int_t LepGood_hltId[6]; //[nLepGood] Int_t LepGood_convVeto[6]; //[nLepGood] Float_t LepGood_pt[6]; //[nLepGood] Float_t LepGood_eta[6]; //[nLepGood] Float_t LepGood_phi[6]; //[nLepGood] Float_t LepGood_r9[6]; //[nLepGood] Float_t LepGood_eSuperClusterOverP[6]; //[nLepGood] // List of branches TBranch *b_evt; //! TBranch *b_puWeight; //! TBranch *b_nTrueInt; //! TBranch *b_nVert; //! TBranch *b_mZ1; //! TBranch *b_HLT_SingleEl; //! TBranch *b_HLT_DoubleEl; //! TBranch *b_nLepGood; //! TBranch *b_LepGood_charge; //! TBranch *b_LepGood_tightId; //! TBranch *b_LepGood_hltId; //! TBranch *b_LepGood_convVeto; //! TBranch *b_LepGood_pt; //! TBranch *b_LepGood_eta; //! TBranch *b_LepGood_phi; //! TBranch *b_LepGood_r9; //! TBranch *b_LepGood_eSuperClusterOverP; //! ElectronAnalyser(TTree *tree=0); virtual ~ElectronAnalyser(); 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 ElectronAnalyser_cxx ElectronAnalyser::ElectronAnalyser(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("/eos/cms/store/user/loccie/WMass/Run13TeV3/DYJetsToLL_M50.root"); if (!f || !f->IsOpen()) { f = new TFile("/eos/cms/store/user/loccie/WMass/Run13TeV3/DYJetsToLL_M50.root"); } f->GetObject("tree",tree); } Init(tree); } ElectronAnalyser::~ElectronAnalyser() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t ElectronAnalyser::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t ElectronAnalyser::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 ElectronAnalyser::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("evt", &evt, &b_evt); fChain->SetBranchAddress("puWeight", &puWeight, &b_puWeight); fChain->SetBranchAddress("nTrueInt", &nTrueInt, &b_nTrueInt); fChain->SetBranchAddress("nVert", &nVert, &b_nVert); fChain->SetBranchAddress("mZ1", &mZ1, &b_mZ1); fChain->SetBranchAddress("HLT_SingleEl", &HLT_SingleEl, &b_HLT_SingleEl); fChain->SetBranchAddress("HLT_DoubleEl", &HLT_DoubleEl, &b_HLT_DoubleEl); fChain->SetBranchAddress("nLepGood", &nLepGood, &b_nLepGood); fChain->SetBranchAddress("LepGood_charge", LepGood_charge, &b_LepGood_charge); fChain->SetBranchAddress("LepGood_tightId", LepGood_tightId, &b_LepGood_tightId); fChain->SetBranchAddress("LepGood_hltId", LepGood_hltId, &b_LepGood_hltId); fChain->SetBranchAddress("LepGood_convVeto", LepGood_convVeto, &b_LepGood_convVeto); fChain->SetBranchAddress("LepGood_pt", LepGood_pt, &b_LepGood_pt); fChain->SetBranchAddress("LepGood_eta", LepGood_eta, &b_LepGood_eta); fChain->SetBranchAddress("LepGood_phi", LepGood_phi, &b_LepGood_phi); fChain->SetBranchAddress("LepGood_r9", LepGood_r9, &b_LepGood_r9); fChain->SetBranchAddress("LepGood_eSuperClusterOverP", LepGood_eSuperClusterOverP, &b_LepGood_eSuperClusterOverP); Notify(); } Bool_t ElectronAnalyser::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 ElectronAnalyser::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t ElectronAnalyser::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef ElectronAnalyser_cxx