Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:12:25

0001 //////////////////////////////////////////////////////////
0002 // This class has been automatically generated on
0003 // Sun Jan 14 02:46:21 2024 by ROOT version 6.26/06
0004 // from TTree tree_Z/INTT Z info.
0005 // found on file: INTT_zvtx.root
0006 //////////////////////////////////////////////////////////
0007 
0008 #ifndef ReadINTTZ_h
0009 #define ReadINTTZ_h
0010 
0011 #include <TROOT.h>
0012 #include <TChain.h>
0013 #include <TFile.h>
0014 
0015 // Header file for the classes stored in the TTree if any.
0016 
0017 class ReadINTTZ {
0018 public :
0019    TTree          *fChain;   //!pointer to the analyzed TTree or TChain
0020    Int_t           fCurrent; //!current Tree number in a TChain
0021 
0022 
0023    // Declaration of leaf types
0024    Int_t           eID;
0025    Long64_t        bco_full;
0026    Int_t           nclu_inner;
0027    Int_t           nclu_outer;
0028    Double_t        ES_zvtx;
0029    Double_t        ES_zvtxE;
0030    Double_t        ES_rangeL;
0031    Double_t        ES_rangeR;
0032    Int_t           ES_N_good;
0033    Double_t        ES_Width_density;
0034    Double_t        LB_Gaus_Mean_mean;
0035    Double_t        LB_Gaus_Mean_meanE;
0036    Double_t        LB_Gaus_Mean_chi2;
0037    Double_t        LB_Gaus_Mean_width;
0038    Double_t        LB_Gaus_Width_width;
0039    Double_t        LB_Gaus_Width_offset;
0040    Double_t        LB_Gaus_Width_size_width;
0041    Double_t        LB_geo_mean;
0042    Bool_t          good_zvtx_tag;
0043    Int_t           mid_cut_Ngroup;
0044    Double_t        mid_cut_peak_width;
0045    Double_t        mid_cut_peak_ratio;
0046    Int_t           LB_cut_Ngroup;
0047    Double_t        LB_cut_peak_width;
0048    Double_t        LB_cut_peak_ratio;
0049    Double_t        MC_true_zvtx;
0050 
0051    // List of branches
0052    TBranch        *b_eID;   //!
0053    TBranch        *b_bco_full;   //!
0054    TBranch        *b_nclu_inner;   //!
0055    TBranch        *b_nclu_outer;   //!
0056    TBranch        *b_ES_zvtx;   //!
0057    TBranch        *b_ES_zvtxE;   //!
0058    TBranch        *b_ES_rangeL;   //!
0059    TBranch        *b_ES_rangeR;   //!
0060    TBranch        *b_ES_N_good;   //!
0061    TBranch        *b_ES_Width_density;   //!
0062    TBranch        *b_LB_Gaus_Mean_mean;   //!
0063    TBranch        *b_LB_Gaus_Mean_meanE;   //!
0064    TBranch        *b_LB_Gaus_Mean_chi2;   //!
0065    TBranch        *b_LB_Gaus_Mean_width;   //!
0066    TBranch        *b_LB_Gaus_Width_width;   //!
0067    TBranch        *b_LB_Gaus_Width_offset;   //!
0068    TBranch        *b_LB_Gaus_Width_size_width;   //!
0069    TBranch        *b_LB_geo_mean;   //!
0070    TBranch        *b_good_zvtx_tag;   //!
0071    TBranch        *b_mid_cut_Ngroup;   //!
0072    TBranch        *b_mid_cut_peak_width;   //!
0073    TBranch        *b_mid_cut_peak_ratio;   //!
0074    TBranch        *b_LB_cut_Ngroup;   //!
0075    TBranch        *b_LB_cut_peak_width;   //!
0076    TBranch        *b_LB_cut_peak_ratio;   //!
0077    TBranch        *b_MC_true_zvtx;   //!
0078 
0079    ReadINTTZ(TTree *tree=0);
0080    virtual ~ReadINTTZ();
0081    virtual Int_t    Cut(Long64_t entry);
0082    virtual Int_t    GetEntry(Long64_t entry);
0083    virtual Long64_t LoadTree(Long64_t entry);
0084    virtual void     Init(TTree *tree);
0085    virtual void     Loop();
0086    virtual Bool_t   Notify();
0087    virtual void     Show(Long64_t entry = -1);
0088 };
0089 
0090 #endif
0091 
0092 #ifdef ReadINTTZ_cxx
0093 ReadINTTZ::ReadINTTZ(TTree *tree) : fChain(0) 
0094 {
0095 // if parameter tree is not specified (or zero), connect the file
0096 // used to generate this class and read the Tree.
0097    if (tree == 0) {
0098       TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("INTT_zvtx.root");
0099       if (!f || !f->IsOpen()) {
0100          f = new TFile("INTT_zvtx.root");
0101       }
0102       f->GetObject("tree_Z",tree);
0103 
0104    }
0105    Init(tree);
0106 }
0107 
0108 ReadINTTZ::~ReadINTTZ()
0109 {
0110    if (!fChain) return;
0111    delete fChain->GetCurrentFile();
0112 }
0113 
0114 Int_t ReadINTTZ::GetEntry(Long64_t entry)
0115 {
0116 // Read contents of entry.
0117    if (!fChain) return 0;
0118    return fChain->GetEntry(entry);
0119 }
0120 Long64_t ReadINTTZ::LoadTree(Long64_t entry)
0121 {
0122 // Set the environment to read one entry
0123    if (!fChain) return -5;
0124    Long64_t centry = fChain->LoadTree(entry);
0125    if (centry < 0) return centry;
0126    if (fChain->GetTreeNumber() != fCurrent) {
0127       fCurrent = fChain->GetTreeNumber();
0128       Notify();
0129    }
0130    return centry;
0131 }
0132 
0133 void ReadINTTZ::Init(TTree *tree)
0134 {
0135    // The Init() function is called when the selector needs to initialize
0136    // a new tree or chain. Typically here the branch addresses and branch
0137    // pointers of the tree will be set.
0138    // It is normally not necessary to make changes to the generated
0139    // code, but the routine can be extended by the user if needed.
0140    // Init() will be called many times when running on PROOF
0141    // (once per file to be processed).
0142 
0143    // Set branch addresses and branch pointers
0144    if (!tree) return;
0145    fChain = tree;
0146    fCurrent = -1;
0147    fChain->SetMakeClass(1);
0148 
0149    fChain->SetBranchAddress("eID", &eID, &b_eID);
0150    fChain->SetBranchAddress("bco_full", &bco_full, &b_bco_full);
0151    fChain->SetBranchAddress("nclu_inner", &nclu_inner, &b_nclu_inner);
0152    fChain->SetBranchAddress("nclu_outer", &nclu_outer, &b_nclu_outer);
0153    fChain->SetBranchAddress("ES_zvtx", &ES_zvtx, &b_ES_zvtx);
0154    fChain->SetBranchAddress("ES_zvtxE", &ES_zvtxE, &b_ES_zvtxE);
0155    fChain->SetBranchAddress("ES_rangeL", &ES_rangeL, &b_ES_rangeL);
0156    fChain->SetBranchAddress("ES_rangeR", &ES_rangeR, &b_ES_rangeR);
0157    fChain->SetBranchAddress("ES_N_good", &ES_N_good, &b_ES_N_good);
0158    fChain->SetBranchAddress("ES_Width_density", &ES_Width_density, &b_ES_Width_density);
0159    fChain->SetBranchAddress("LB_Gaus_Mean_mean", &LB_Gaus_Mean_mean, &b_LB_Gaus_Mean_mean);
0160    fChain->SetBranchAddress("LB_Gaus_Mean_meanE", &LB_Gaus_Mean_meanE, &b_LB_Gaus_Mean_meanE);
0161    fChain->SetBranchAddress("LB_Gaus_Mean_chi2", &LB_Gaus_Mean_chi2, &b_LB_Gaus_Mean_chi2);
0162    fChain->SetBranchAddress("LB_Gaus_Mean_width", &LB_Gaus_Mean_width, &b_LB_Gaus_Mean_width);
0163    fChain->SetBranchAddress("LB_Gaus_Width_width", &LB_Gaus_Width_width, &b_LB_Gaus_Width_width);
0164    fChain->SetBranchAddress("LB_Gaus_Width_offset", &LB_Gaus_Width_offset, &b_LB_Gaus_Width_offset);
0165    fChain->SetBranchAddress("LB_Gaus_Width_size_width", &LB_Gaus_Width_size_width, &b_LB_Gaus_Width_size_width);
0166    fChain->SetBranchAddress("LB_geo_mean", &LB_geo_mean, &b_LB_geo_mean);
0167    fChain->SetBranchAddress("good_zvtx_tag", &good_zvtx_tag, &b_good_zvtx_tag);
0168    fChain->SetBranchAddress("mid_cut_Ngroup", &mid_cut_Ngroup, &b_mid_cut_Ngroup);
0169    fChain->SetBranchAddress("mid_cut_peak_width", &mid_cut_peak_width, &b_mid_cut_peak_width);
0170    fChain->SetBranchAddress("mid_cut_peak_ratio", &mid_cut_peak_ratio, &b_mid_cut_peak_ratio);
0171    fChain->SetBranchAddress("LB_cut_Ngroup", &LB_cut_Ngroup, &b_LB_cut_Ngroup);
0172    fChain->SetBranchAddress("LB_cut_peak_width", &LB_cut_peak_width, &b_LB_cut_peak_width);
0173    fChain->SetBranchAddress("LB_cut_peak_ratio", &LB_cut_peak_ratio, &b_LB_cut_peak_ratio);
0174    fChain->SetBranchAddress("MC_true_zvtx", &MC_true_zvtx, &b_MC_true_zvtx);
0175    Notify();
0176 }
0177 
0178 Bool_t ReadINTTZ::Notify()
0179 {
0180    // The Notify() function is called when a new file is opened. This
0181    // can be either for a new TTree in a TChain or when when a new TTree
0182    // is started when using PROOF. It is normally not necessary to make changes
0183    // to the generated code, but the routine can be extended by the
0184    // user if needed. The return value is currently not used.
0185 
0186    return kTRUE;
0187 }
0188 
0189 void ReadINTTZ::Show(Long64_t entry)
0190 {
0191 // Print contents of entry.
0192 // If entry is not specified, print current entry
0193    if (!fChain) return;
0194    fChain->Show(entry);
0195 }
0196 Int_t ReadINTTZ::Cut(Long64_t entry)
0197 {
0198 // This function may be called from Loop.
0199 // returns  1 if entry is accepted.
0200 // returns -1 otherwise.
0201    return 1;
0202 }
0203 #endif // #ifdef ReadINTTZ_cxx