Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-07 09:25:16

0001 #ifndef CompareHGCROCCalib_H
0002 #define CompareHGCROCCalib_H
0003 
0004 #include <iostream>
0005 #include <fstream>
0006 #include "TString.h"
0007 #include "TFile.h"
0008 #include "TTree.h"
0009 #include "TChain.h"
0010 #include "TObjString.h"
0011 
0012 #include "Setup.h"
0013 #include "RootSetupWrapper.h"
0014 #include "Calib.h"
0015 #include "Event.h"
0016 #include "Tile.h"
0017 #include "HGCROC.h"
0018 #include "Caen.h"
0019 
0020 // compare ADC and TOT from .csv outputs from H2GCROCCalib as function of injection 
0021 
0022 class CompareHGCROCCalib{
0023     public:
0024         CompareHGCROCCalib(){
0025             TsetupIn    = new TChain("Setup");
0026             TdataIn     = new TChain("CalibSample");
0027             rswptr=&rsw;
0028             eventptr=&event;
0029         }
0030         ~CompareHGCROCCalib(){}
0031 
0032     //     // getter methods
0033 
0034 
0035     //     // setter methods
0036         inline void EnableDebug(int i)                  {debug=i;};
0037         inline void SetInputFile(TString name)          {inputFileList=name;};
0038         inline void SetPlotDirectory(TString name)      {outputDirPlots=name;};
0039 
0040 
0041         // general methods
0042         bool CheckAndOpenIO(void);
0043         bool Process(void);
0044 
0045     //     // variable members 
0046         TString         inputFileList;                  // path to the input file
0047         std::fstream    MapInput;                       // file streamer for geometry mapping
0048         TString         outputDirPlots;                 // directory for plots
0049         TFile*          RootCalibInput  = nullptr;      // root file input with calib object
0050         TFile*          RootOutput      = nullptr;      // root file output 
0051         TFile*          RootOutputHist  = nullptr;      // root file output for histos
0052         int             debug           = 0;            // debug level
0053         int             optParse        = 0;            // 0 - default .csv file from H2GCalib, 1 - pedestal extracted with .py script
0054 
0055         Event       event;                              // basically the tree branch
0056         Event*      eventptr;
0057         RootSetupWrapper    rsw;                        // Wrapper singleton class for setup
0058         RootSetupWrapper*   rswptr;                     // Pointer to wrapper for singleton class for setup
0059         Setup*      setup;                              // geometry setup - read from the mapping file
0060         TTree*      dataTree;   
0061 
0062         TChain*     TdataIn     = nullptr;
0063         TChain*     TsetupIn    = nullptr;
0064 
0065     protected:
0066 
0067     private:
0068         bool CompareTOT();
0069 };
0070 
0071 #endif