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