//////////////////////////////////////////////////////////////////// /// \class RAT::ECAHists /// /// \brief Declaration of histograms for the ECA processor /// /// \author Gabriel D. Orebi Gann Author and contact /// \author Javier Caravaca - Contact /// /// REVISION HISTORY:\n /// /// \details This class declares, initialises and writes out /// the histograms for the ECAProc processor /// /// /// /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_ECAHists__ #define __RAT_ECAHists__ #include "TH1F.h" #include "TH2F.h" #include "TH1I.h" #include "TFile.h" namespace RAT { class ECAHists{ public: ECAHists(); virtual ~ECAHists(); void InitialiseHists(int eca_type, int dodroop=1); void WriteHists(int eca_type, TFile *rootfile, int dodroop=1); void SetAxes(int eca_type, int dodroop=1); void Beautify(); // Histograms for Pedestal runs // Arrays go: [qhs,qhl,qlx,tac, (QHS+TAC)] // Individual cell values TH1F *fPedestal[4]; TH1F *fPWidth[4]; TH1F *fDiff[4]; TH1I *fNCeEv; // Droop: diff between event i and the median for each cell // Illustrates trend in Q(t) // [4 quants][i=0,1] TH1F *fDroop[4][10]; TH1F *fDroopValid[4][10]; // Only enabled channels TH1F *fDroopByCell[16]; // For TAC,i=0 only, split by cell# in order they were hit // e.g. droop for all the cells that were hit 1st /chan // Per-Crate values TH1F *fPedAve[4]; TH1F *fWidthAve[4]; TH1F *fWidthCrates[19]; TH1F *fWidthPoints[50]; TH1F *fDiffAve[4]; TH1F *fAbsDiffAve[4]; TH1I *fNBadSeq; TH1I *fNBadMB; TH1I *fNBadDB; TH1I *fNBadNev; TH1I *fNBad0ev; TH1I *fNBadPed[5][4]; //[overall][med][width][diff] TH1I *fNBad; // Histograms for Time Slope runs // Arrays go: [parameter ^1-3][value, diff, absdiff] // Individual cell/step values TH1F *fCubFitPar[3][2]; // Actual cubic fit pars TH1F *fCubInt; // Cubic fit par, 0th order TH1F *fCubIntDiff; // Cubic fit par, 0th order diff TH1I *fNUsed; // N injected TSteps used in fit TH1F *fWidth; // Individual widths TH1I *fNBadCeWidth; // Num steps/cell with bad widths TH1I *fNEvPerTStep; // Nev at each TStep TH1I *fNBadStepNev; // Num steps/cell failing Nev //TH1F *fFratiTimeResid; // Frati time residuals //TH1F *fFratiChisqu; // Frati chisqu //TH1I *fNBadStepResid; // Num steps/cell with bad resid TH1I *fNSuspStep; // Num suspicious steps/cell // Per-Crate values TH1F *fCubFitParAve[3][3]; // Cubic fit par average TH1I *fNBadChCub[3][2]; // NChannels failing due to fit par values TH1I *fNBadChNfit; // NChannels failing due to Nused TH1I *fNBadChWidth; // NChannels failing due to widths TH1I *fNBadChNev; // NChannels failing due to numEv TH1I *fNBadCh0ev; // NChannels failing due to 0ev TH1I *fNBadChSeq; // NChannels failing due to bad seq TH1I *fNBadChMB; // NChannels failing due to bad MB TH1I *fNBadChDB; // NChannels failing due to bad DB //TH1I *fNBadChFrati; // NChannels failing due to frati tac jump tests TH1I *fNBadChSusp; // Num suspicious channels TH1I *fNBadCh; // NChannels failing overall //Javi extra TH1I* NCellFailedPed; // Absolute number of cells failing any pedestal test TH1I* NCellFailedTSlope; // Absolute number of cells failing any TSlope test TH2F *fQHSvsQHL; //Javi post-reset debug TH1F *fPResetNPoints; // Difference between post reset and comparison point TH1F *fPResetDiffComp; // Difference between post reset and comparison point TH1F *fPResetDiffCompFailed; // Difference between post reset and comparison point TH1F *fPResetNev; // N events in post reset points TH1F *fPResetNevFailed; // N events in post reset points protected: }; } // namespace RAT #endif