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 // Fri Feb 16 04:13:34 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_v2_h
0009 #define ReadINTTZ_v2_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_v2 {
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    Int_t           Centrality_bin;
0051 
0052    // List of branches
0053    TBranch        *b_eID;   //!
0054    TBranch        *b_bco_full;   //!
0055    TBranch        *b_nclu_inner;   //!
0056    TBranch        *b_nclu_outer;   //!
0057    TBranch        *b_ES_zvtx;   //!
0058    TBranch        *b_ES_zvtxE;   //!
0059    TBranch        *b_ES_rangeL;   //!
0060    TBranch        *b_ES_rangeR;   //!
0061    TBranch        *b_ES_N_good;   //!
0062    TBranch        *b_ES_Width_density;   //!
0063    TBranch        *b_LB_Gaus_Mean_mean;   //!
0064    TBranch        *b_LB_Gaus_Mean_meanE;   //!
0065    TBranch        *b_LB_Gaus_Mean_chi2;   //!
0066    TBranch        *b_LB_Gaus_Mean_width;   //!
0067    TBranch        *b_LB_Gaus_Width_width;   //!
0068    TBranch        *b_LB_Gaus_Width_offset;   //!
0069    TBranch        *b_LB_Gaus_Width_size_width;   //!
0070    TBranch        *b_LB_geo_mean;   //!
0071    TBranch        *b_good_zvtx_tag;   //!
0072    TBranch        *b_mid_cut_Ngroup;   //!
0073    TBranch        *b_mid_cut_peak_width;   //!
0074    TBranch        *b_mid_cut_peak_ratio;   //!
0075    TBranch        *b_LB_cut_Ngroup;   //!
0076    TBranch        *b_LB_cut_peak_width;   //!
0077    TBranch        *b_LB_cut_peak_ratio;   //!
0078    TBranch        *b_MC_true_zvtx;   //!
0079    TBranch        *b_Centrality_bin;   //!
0080 
0081    ReadINTTZ_v2(TTree *tree=0);
0082    virtual ~ReadINTTZ_v2();
0083    virtual Int_t    Cut(Long64_t entry);
0084    virtual Int_t    GetEntry(Long64_t entry);
0085    virtual Long64_t LoadTree(Long64_t entry);
0086    virtual void     Init(TTree *tree);
0087    virtual void     Loop();
0088    virtual Bool_t   Notify();
0089    virtual void     Show(Long64_t entry = -1);
0090 };
0091 
0092 #endif
0093 
0094 #ifdef ReadINTTZ_v2_cxx
0095 ReadINTTZ_v2::ReadINTTZ_v2(TTree *tree) : fChain(0) 
0096 {
0097 // if parameter tree is not specified (or zero), connect the file
0098 // used to generate this class and read the Tree.
0099    if (tree == 0) {
0100       TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("INTT_zvtx.root");
0101       if (!f || !f->IsOpen()) {
0102          f = new TFile("INTT_zvtx.root");
0103       }
0104       f->GetObject("tree_Z",tree);
0105 
0106    }
0107    Init(tree);
0108 }
0109 
0110 ReadINTTZ_v2::~ReadINTTZ_v2()
0111 {
0112    if (!fChain) return;
0113    delete fChain->GetCurrentFile();
0114 }
0115 
0116 Int_t ReadINTTZ_v2::GetEntry(Long64_t entry)
0117 {
0118 // Read contents of entry.
0119    if (!fChain) return 0;
0120    return fChain->GetEntry(entry);
0121 }
0122 Long64_t ReadINTTZ_v2::LoadTree(Long64_t entry)
0123 {
0124 // Set the environment to read one entry
0125    if (!fChain) return -5;
0126    Long64_t centry = fChain->LoadTree(entry);
0127    if (centry < 0) return centry;
0128    if (fChain->GetTreeNumber() != fCurrent) {
0129       fCurrent = fChain->GetTreeNumber();
0130       Notify();
0131    }
0132    return centry;
0133 }
0134 
0135 void ReadINTTZ_v2::Init(TTree *tree)
0136 {
0137    // The Init() function is called when the selector needs to initialize
0138    // a new tree or chain. Typically here the branch addresses and branch
0139    // pointers of the tree will be set.
0140    // It is normally not necessary to make changes to the generated
0141    // code, but the routine can be extended by the user if needed.
0142    // Init() will be called many times when running on PROOF
0143    // (once per file to be processed).
0144 
0145    // Set branch addresses and branch pointers
0146    if (!tree) return;
0147    fChain = tree;
0148    fCurrent = -1;
0149    fChain->SetMakeClass(1);
0150 
0151    fChain->SetBranchAddress("eID", &eID, &b_eID);
0152    fChain->SetBranchAddress("bco_full", &bco_full, &b_bco_full);
0153    fChain->SetBranchAddress("nclu_inner", &nclu_inner, &b_nclu_inner);
0154    fChain->SetBranchAddress("nclu_outer", &nclu_outer, &b_nclu_outer);
0155    fChain->SetBranchAddress("ES_zvtx", &ES_zvtx, &b_ES_zvtx);
0156    fChain->SetBranchAddress("ES_zvtxE", &ES_zvtxE, &b_ES_zvtxE);
0157    fChain->SetBranchAddress("ES_rangeL", &ES_rangeL, &b_ES_rangeL);
0158    fChain->SetBranchAddress("ES_rangeR", &ES_rangeR, &b_ES_rangeR);
0159    fChain->SetBranchAddress("ES_N_good", &ES_N_good, &b_ES_N_good);
0160    fChain->SetBranchAddress("ES_Width_density", &ES_Width_density, &b_ES_Width_density);
0161    fChain->SetBranchAddress("LB_Gaus_Mean_mean", &LB_Gaus_Mean_mean, &b_LB_Gaus_Mean_mean);
0162    fChain->SetBranchAddress("LB_Gaus_Mean_meanE", &LB_Gaus_Mean_meanE, &b_LB_Gaus_Mean_meanE);
0163    fChain->SetBranchAddress("LB_Gaus_Mean_chi2", &LB_Gaus_Mean_chi2, &b_LB_Gaus_Mean_chi2);
0164    fChain->SetBranchAddress("LB_Gaus_Mean_width", &LB_Gaus_Mean_width, &b_LB_Gaus_Mean_width);
0165    fChain->SetBranchAddress("LB_Gaus_Width_width", &LB_Gaus_Width_width, &b_LB_Gaus_Width_width);
0166    fChain->SetBranchAddress("LB_Gaus_Width_offset", &LB_Gaus_Width_offset, &b_LB_Gaus_Width_offset);
0167    fChain->SetBranchAddress("LB_Gaus_Width_size_width", &LB_Gaus_Width_size_width, &b_LB_Gaus_Width_size_width);
0168    fChain->SetBranchAddress("LB_geo_mean", &LB_geo_mean, &b_LB_geo_mean);
0169    fChain->SetBranchAddress("good_zvtx_tag", &good_zvtx_tag, &b_good_zvtx_tag);
0170    fChain->SetBranchAddress("mid_cut_Ngroup", &mid_cut_Ngroup, &b_mid_cut_Ngroup);
0171    fChain->SetBranchAddress("mid_cut_peak_width", &mid_cut_peak_width, &b_mid_cut_peak_width);
0172    fChain->SetBranchAddress("mid_cut_peak_ratio", &mid_cut_peak_ratio, &b_mid_cut_peak_ratio);
0173    fChain->SetBranchAddress("LB_cut_Ngroup", &LB_cut_Ngroup, &b_LB_cut_Ngroup);
0174    fChain->SetBranchAddress("LB_cut_peak_width", &LB_cut_peak_width, &b_LB_cut_peak_width);
0175    fChain->SetBranchAddress("LB_cut_peak_ratio", &LB_cut_peak_ratio, &b_LB_cut_peak_ratio);
0176    fChain->SetBranchAddress("MC_true_zvtx", &MC_true_zvtx, &b_MC_true_zvtx);
0177    fChain->SetBranchAddress("Centrality_bin", &Centrality_bin, &b_Centrality_bin);
0178    Notify();
0179 }
0180 
0181 Bool_t ReadINTTZ_v2::Notify()
0182 {
0183    // The Notify() function is called when a new file is opened. This
0184    // can be either for a new TTree in a TChain or when when a new TTree
0185    // is started when using PROOF. It is normally not necessary to make changes
0186    // to the generated code, but the routine can be extended by the
0187    // user if needed. The return value is currently not used.
0188 
0189    return kTRUE;
0190 }
0191 
0192 void ReadINTTZ_v2::Show(Long64_t entry)
0193 {
0194 // Print contents of entry.
0195 // If entry is not specified, print current entry
0196    if (!fChain) return;
0197    fChain->Show(entry);
0198 }
0199 Int_t ReadINTTZ_v2::Cut(Long64_t entry)
0200 {
0201 // This function may be called from Loop.
0202 // returns  1 if entry is accepted.
0203 // returns -1 otherwise.
0204    return 1;
0205 }
0206 #endif // #ifdef ReadINTTZ_v2_cxx