#ifndef __EEezClusterQA_h__ #define __EEezClusterQA_h__ #include #include "EEezCluster.h" #include "EEezAnalysis.h" #include "EEsmdProfile.h" class TH1F; class TH2F; class TProfile; class EEmcSmdGeom; class EEezClusterQA : public TDirectory { public: EEezClusterQA( const Char_t *name, const Char_t *title = "EEMC cluster QA histograms" ); ~EEezClusterQA() { /* nada */ }; void Init(); void Fill ( EEezClusterPtrVec_t *clusters ); void Fill ( EEezCluster *cluster ); void setAnalysis ( EEezAnalysis *a ) { m_EEezAnaly = a; } void setSmdProfiler ( EEsmdProfile *p ) { m_EEsmdProf = p; } void pass( EEezCluster *cluster, const Char_t *tag = "" ); void fail( EEezCluster *cluster, const Char_t *tag = "" ); void flag( EEezCluster *cluster, const Char_t *tag = "" ); void save( EEezCluster *cluster, Int_t iuv, const Char_t *tag = "" ); void save( TH1F *histo, Int_t iuv=0, const Char_t *tag = "" ); void bookCut ( const Char_t *name, const Char_t *title, Int_t nbin, Float_t min, Float_t max ); void fillCut ( const Char_t *name, Float_t value ); void bookCut ( const Char_t *name, const Char_t *title, Int_t nbinx, Float_t minx, Float_t maxx, Int_t nbiny, Float_t miny, Float_t maxy ); void fillCut ( const Char_t *name, Float_t valuex, Float_t valuey ); private: void bookHistograms(); TList *m_ListOfCuts; TList *m_ListOf2DCuts; TH2F *m_XY; // Tower-weighted y vs x TH2F *m_XY_smd; // X,Y from mean SMD response TH1F *m_Energy; // Tower energy spectrum TH2F *m_EcVsEtot; // Cluster energy vs sector total energy TH1F *m_HitStrips[2]; // Frequency plot of hit strips vs index TH2F *m_Sum9VsEc[2]; // Sum of 9 strips near peak vs eCluster TH2F *m_Sum5VsEc[2]; // Sum of 5 strips near peak vs eCluster TH1F *m_Towers; // Tower energy response TH2F *m_Sum5; // Sum over 5 strips U vs V TH2F *m_Sum9; // Sum over 9 strips U vs V TH1F *m_Frac5to9[2]; // Fractional sum of 5 bins to 9 bins TH2F *m_Yield; // Fit yield U vs V TH2F *m_Sigma; // Fit sigma U vs V TH2F *m_RedChi2; // Fit chi2/ndf U vs V TH2F *m_YieldVsEc[2]; // Fit yield versus Ecluster TH1F *m_YieldToSum[2]; // Fit yield to sum over tower TH1F *m_FreqBigChi2[2]; // Frequency plot of strip w/ largest chi2 from fit TH1F *m_FreqEmpty[2]; // Frequency plot that strip shows no response in fit TH1F *m_MipStrips[2]; // Cumulative # of mips TH1F *m_SeedAdc[4]; // ADC response of TPQR for seeds TH1F *m_NeighborAdc[4]; // ADC response of TPQR for neighboring towers TH2F *m_SumVsEc[2]; // Sum of number of mips in seed tower vs Ec TProfile *m_SumVsEc_pfx[2]; // Sum of number of mips in seed tower vs Ec TH2F *m_SumSmd; // Simple sum of U plane vs V plane beneath seed tower TH1F *m_Parameters[5]; // Histogram of fit parameters EEezAnalysis *m_EEezAnaly; EEsmdProfile *m_EEsmdProf; EEmcSmdGeom *m_EEsmdGeom; // Directories to store examples of SMD profiles which pass/fail // various sets of user-defined cuts. TDirectory *m_UFail; TDirectory *m_VFail; TDirectory *m_UPass; TDirectory *m_VPass; TDirectory *m_UFlag; TDirectory *m_VFlag; protected: ClassDef(EEezClusterQA,1); }; #endif