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 // Thu May  9 01:28:41 2024 by ROOT version 6.26/06
0004 // from TTree EventTree/EventTree
0005 // found on file: Data_CombinedNtuple_Run20869_HotDead_BCO_ADC_Survey.root
0006 //////////////////////////////////////////////////////////
0007 
0008 #ifndef ReadF4ANtupleData_h
0009 #define ReadF4ANtupleData_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 #include "vector"
0017 #include "vector"
0018 #include "vector"
0019 #include "vector"
0020 #include "vector"
0021 
0022 class ReadF4ANtupleData {
0023 public :
0024    TTree          *fChain;   //!pointer to the analyzed TTree or TChain
0025    Int_t           fCurrent; //!current Tree number in a TChain
0026 
0027    // Declaration of leaf types
0028    Int_t           event;
0029    ULong_t         INTT_BCO;
0030    Int_t           NTrkrhits;
0031    vector<unsigned short> *TrkrHitRow;
0032    vector<unsigned short> *TrkrHitColumn;
0033    vector<unsigned char> *TrkrHitLadderZId;
0034    vector<unsigned char> *TrkrHitLadderPhiId;
0035    vector<unsigned char> *TrkrHitLayer;
0036    vector<unsigned short> *TrkrHitADC;
0037    Int_t           NClus_Layer1;
0038    Int_t           NClus;
0039    vector<int>     *ClusLayer;
0040    vector<float>   *ClusX;
0041    vector<float>   *ClusY;
0042    vector<float>   *ClusZ;
0043    vector<float>   *ClusR;
0044    vector<float>   *ClusPhi;
0045    vector<float>   *ClusEta;
0046    vector<unsigned int> *ClusAdc;
0047    vector<float>   *ClusPhiSize;
0048    vector<float>   *ClusZSize;
0049    vector<unsigned char> *ClusLadderZId;
0050    vector<unsigned char> *ClusLadderPhiId;
0051    vector<unsigned int> *ClusTrkrHitSetKey;
0052    vector<int>     *ClusTimeBucketId;
0053    // Int_t           event;
0054    UShort_t        clk;
0055    UShort_t        femclk;
0056    Bool_t          is_min_bias;
0057    Bool_t          is_min_bias_wozdc;
0058    Float_t         MBD_centrality;
0059    Float_t         MBD_z_vtx;
0060    Short_t         MBD_south_npmt;
0061    Short_t         MBD_north_npmt;
0062    Float_t         MBD_south_charge_sum;
0063    Float_t         MBD_north_charge_sum;
0064    Float_t         MBD_charge_sum;
0065    Float_t         MBD_charge_asymm;
0066 
0067    // List of branches
0068    TBranch        *b_event;   //!
0069    TBranch        *b_INTT_BCO;   //!
0070    TBranch        *b_NTrkrhits;   //!
0071    TBranch        *b_TrkrHitRow;   //!
0072    TBranch        *b_TrkrHitColumn;   //!
0073    TBranch        *b_TrkrHitLadderZId;   //!
0074    TBranch        *b_TrkrHitLadderPhiId;   //!
0075    TBranch        *b_TrkrHitLayer;   //!
0076    TBranch        *b_TrkrHitADC;   //!
0077    TBranch        *b_NClus_Layer1;   //!
0078    TBranch        *b_NClus;   //!
0079    TBranch        *b_ClusLayer;   //!
0080    TBranch        *b_ClusX;   //!
0081    TBranch        *b_ClusY;   //!
0082    TBranch        *b_ClusZ;   //!
0083    TBranch        *b_ClusR;   //!
0084    TBranch        *b_ClusPhi;   //!
0085    TBranch        *b_ClusEta;   //!
0086    TBranch        *b_ClusAdc;   //!
0087    TBranch        *b_ClusPhiSize;   //!
0088    TBranch        *b_ClusZSize;   //!
0089    TBranch        *b_ClusLadderZId;   //!
0090    TBranch        *b_ClusLadderPhiId;   //!
0091    TBranch        *b_ClusTrkrHitSetKey;   //!
0092    TBranch        *b_ClusTimeBucketId;   //!
0093    // TBranch        *b_event;   //!
0094    TBranch        *b_clk;   //!
0095    TBranch        *b_femclk;   //!
0096    TBranch        *b_is_min_bias;   //!
0097    TBranch        *b_is_min_bias_wozdc;   //!
0098    TBranch        *b_MBD_centrality;   //!
0099    TBranch        *b_MBD_z_vtx;   //!
0100    TBranch        *b_MBD_south_npmt;   //!
0101    TBranch        *b_MBD_north_npmt;   //!
0102    TBranch        *b_MBD_south_charge_sum;   //!
0103    TBranch        *b_MBD_north_charge_sum;   //!
0104    TBranch        *b_MBD_charge_sum;   //!
0105    TBranch        *b_MBD_charge_asymm;   //!
0106 
0107    ReadF4ANtupleData(TTree *tree=0);
0108    virtual ~ReadF4ANtupleData();
0109    virtual Int_t    Cut(Long64_t entry);
0110    virtual Int_t    GetEntry(Long64_t entry);
0111    virtual Long64_t LoadTree(Long64_t entry);
0112    virtual void     Init(TTree *tree);
0113    virtual void     Loop();
0114    virtual Bool_t   Notify();
0115    virtual void     Show(Long64_t entry = -1);
0116 };
0117 
0118 #endif
0119 
0120 #ifdef ReadF4ANtupleData_cxx
0121 ReadF4ANtupleData::ReadF4ANtupleData(TTree *tree) : fChain(0) 
0122 {
0123 // if parameter tree is not specified (or zero), connect the file
0124 // used to generate this class and read the Tree.
0125    if (tree == 0) {
0126       TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("Data_CombinedNtuple_Run20869_HotDead_BCO_ADC_Survey.root");
0127       if (!f || !f->IsOpen()) {
0128          f = new TFile("Data_CombinedNtuple_Run20869_HotDead_BCO_ADC_Survey.root");
0129       }
0130       f->GetObject("EventTree",tree);
0131 
0132    }
0133    Init(tree);
0134 }
0135 
0136 ReadF4ANtupleData::~ReadF4ANtupleData()
0137 {
0138    if (!fChain) return;
0139    delete fChain->GetCurrentFile();
0140 }
0141 
0142 Int_t ReadF4ANtupleData::GetEntry(Long64_t entry)
0143 {
0144 // Read contents of entry.
0145    if (!fChain) return 0;
0146    return fChain->GetEntry(entry);
0147 }
0148 Long64_t ReadF4ANtupleData::LoadTree(Long64_t entry)
0149 {
0150 // Set the environment to read one entry
0151    if (!fChain) return -5;
0152    Long64_t centry = fChain->LoadTree(entry);
0153    if (centry < 0) return centry;
0154    if (fChain->GetTreeNumber() != fCurrent) {
0155       fCurrent = fChain->GetTreeNumber();
0156       Notify();
0157    }
0158    return centry;
0159 }
0160 
0161 void ReadF4ANtupleData::Init(TTree *tree)
0162 {
0163    // The Init() function is called when the selector needs to initialize
0164    // a new tree or chain. Typically here the branch addresses and branch
0165    // pointers of the tree will be set.
0166    // It is normally not necessary to make changes to the generated
0167    // code, but the routine can be extended by the user if needed.
0168    // Init() will be called many times when running on PROOF
0169    // (once per file to be processed).
0170 
0171    // Set object pointer
0172    TrkrHitRow = 0;
0173    TrkrHitColumn = 0;
0174    TrkrHitLadderZId = 0;
0175    TrkrHitLadderPhiId = 0;
0176    TrkrHitLayer = 0;
0177    TrkrHitADC = 0;
0178    ClusLayer = 0;
0179    ClusX = 0;
0180    ClusY = 0;
0181    ClusZ = 0;
0182    ClusR = 0;
0183    ClusPhi = 0;
0184    ClusEta = 0;
0185    ClusAdc = 0;
0186    ClusPhiSize = 0;
0187    ClusZSize = 0;
0188    ClusLadderZId = 0;
0189    ClusLadderPhiId = 0;
0190    ClusTrkrHitSetKey = 0;
0191    ClusTimeBucketId = 0;
0192    // Set branch addresses and branch pointers
0193    if (!tree) return;
0194    fChain = tree;
0195    fCurrent = -1;
0196    fChain->SetMakeClass(1);
0197 
0198    fChain->SetBranchAddress("event", &event, &b_event);
0199    fChain->SetBranchAddress("INTT_BCO", &INTT_BCO, &b_INTT_BCO);
0200    fChain->SetBranchAddress("NTrkrhits", &NTrkrhits, &b_NTrkrhits);
0201    fChain->SetBranchAddress("TrkrHitRow", &TrkrHitRow, &b_TrkrHitRow);
0202    fChain->SetBranchAddress("TrkrHitColumn", &TrkrHitColumn, &b_TrkrHitColumn);
0203    fChain->SetBranchAddress("TrkrHitLadderZId", &TrkrHitLadderZId, &b_TrkrHitLadderZId);
0204    fChain->SetBranchAddress("TrkrHitLadderPhiId", &TrkrHitLadderPhiId, &b_TrkrHitLadderPhiId);
0205    fChain->SetBranchAddress("TrkrHitLayer", &TrkrHitLayer, &b_TrkrHitLayer);
0206    fChain->SetBranchAddress("TrkrHitADC", &TrkrHitADC, &b_TrkrHitADC);
0207    fChain->SetBranchAddress("NClus_Layer1", &NClus_Layer1, &b_NClus_Layer1);
0208    fChain->SetBranchAddress("NClus", &NClus, &b_NClus);
0209    fChain->SetBranchAddress("ClusLayer", &ClusLayer, &b_ClusLayer);
0210    fChain->SetBranchAddress("ClusX", &ClusX, &b_ClusX);
0211    fChain->SetBranchAddress("ClusY", &ClusY, &b_ClusY);
0212    fChain->SetBranchAddress("ClusZ", &ClusZ, &b_ClusZ);
0213    fChain->SetBranchAddress("ClusR", &ClusR, &b_ClusR);
0214    fChain->SetBranchAddress("ClusPhi", &ClusPhi, &b_ClusPhi);
0215    fChain->SetBranchAddress("ClusEta", &ClusEta, &b_ClusEta);
0216    fChain->SetBranchAddress("ClusAdc", &ClusAdc, &b_ClusAdc);
0217    fChain->SetBranchAddress("ClusPhiSize", &ClusPhiSize, &b_ClusPhiSize);
0218    fChain->SetBranchAddress("ClusZSize", &ClusZSize, &b_ClusZSize);
0219    fChain->SetBranchAddress("ClusLadderZId", &ClusLadderZId, &b_ClusLadderZId);
0220    fChain->SetBranchAddress("ClusLadderPhiId", &ClusLadderPhiId, &b_ClusLadderPhiId);
0221    fChain->SetBranchAddress("ClusTrkrHitSetKey", &ClusTrkrHitSetKey, &b_ClusTrkrHitSetKey);
0222    fChain->SetBranchAddress("ClusTimeBucketId", &ClusTimeBucketId, &b_ClusTimeBucketId);
0223 //    fChain->SetBranchAddress("event", &event, &b_event);
0224    fChain->SetBranchAddress("clk", &clk, &b_clk);
0225    fChain->SetBranchAddress("femclk", &femclk, &b_femclk);
0226    fChain->SetBranchAddress("is_min_bias", &is_min_bias, &b_is_min_bias);
0227    fChain->SetBranchAddress("is_min_bias_wozdc", &is_min_bias_wozdc, &b_is_min_bias_wozdc);
0228    fChain->SetBranchAddress("MBD_centrality", &MBD_centrality, &b_MBD_centrality);
0229    fChain->SetBranchAddress("MBD_z_vtx", &MBD_z_vtx, &b_MBD_z_vtx);
0230    fChain->SetBranchAddress("MBD_south_npmt", &MBD_south_npmt, &b_MBD_south_npmt);
0231    fChain->SetBranchAddress("MBD_north_npmt", &MBD_north_npmt, &b_MBD_north_npmt);
0232    fChain->SetBranchAddress("MBD_south_charge_sum", &MBD_south_charge_sum, &b_MBD_south_charge_sum);
0233    fChain->SetBranchAddress("MBD_north_charge_sum", &MBD_north_charge_sum, &b_MBD_north_charge_sum);
0234    fChain->SetBranchAddress("MBD_charge_sum", &MBD_charge_sum, &b_MBD_charge_sum);
0235    fChain->SetBranchAddress("MBD_charge_asymm", &MBD_charge_asymm, &b_MBD_charge_asymm);
0236    Notify();
0237 }
0238 
0239 Bool_t ReadF4ANtupleData::Notify()
0240 {
0241    // The Notify() function is called when a new file is opened. This
0242    // can be either for a new TTree in a TChain or when when a new TTree
0243    // is started when using PROOF. It is normally not necessary to make changes
0244    // to the generated code, but the routine can be extended by the
0245    // user if needed. The return value is currently not used.
0246 
0247    return kTRUE;
0248 }
0249 
0250 void ReadF4ANtupleData::Show(Long64_t entry)
0251 {
0252 // Print contents of entry.
0253 // If entry is not specified, print current entry
0254    if (!fChain) return;
0255    fChain->Show(entry);
0256 }
0257 Int_t ReadF4ANtupleData::Cut(Long64_t entry)
0258 {
0259 // This function may be called from Loop.
0260 // returns  1 if entry is accepted.
0261 // returns -1 otherwise.
0262    return 1;
0263 }
0264 #endif // #ifdef ReadF4ANtupleData_cxx