LCOV - code coverage report
Current view: top level - EMCAL/EMCALrec - AliEMCALQADataMakerRec.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 35 2.9 %
Date: 2016-06-14 17:26:59 Functions: 2 41 4.9 %

          Line data    Source code
       1             : #ifndef ALIEMCALQADATAMAKERREC_H
       2             : #define ALIEMCALQADATAMAKERREC_H
       3             : 
       4             : //_________________________________________________________________________
       5             : /// \class AliEMCALQADataMakerRec
       6             : /// \brief EMCal reconstruction QA
       7             : ///
       8             : /// Produces the data needed to calculate the quality assurance. 
       9             : /// All data must be mergeable objects
      10             : /// 
      11             : /// Based on PHOS code written by
      12             : /// Y. Schutz CERN July 2007
      13             : ///
      14             : ///  Created one histogram for QA shifter;-- Yaxian Mao: 11/2009
      15             : ///  The idea:average counts for all the towers should be flat 
      16             : ///  Change all existing histograms as experts
      17             : ///
      18             : /// Change histograms for DQM shifter: --  Yaxian Mao 04/2010
      19             : /// Calculate the amplitude ratio from current run and the LED reference, for QAChecker use
      20             : /// Also calculate the ratio of amplitude from LED Monitor system (current/Reference), 
      21             : /// to check LED system  
      22             : ///
      23             : /// \author Jenn Klay, Cal Poly, 2008 
      24             : /// \author Sevil Salur, LBL, 2008 
      25             : /// \author Yaxian Mao <Yaxian.Mao@cern.ch>, CCNU, 2009-2011
      26             : /// \author Davide Lodato <davide.francesco.lodato@cern.ch>, Nikhef, 2015
      27             : ///
      28             : 
      29             : // --- ROOT system ---
      30             : class TH1F ; 
      31             : class TH1I ;
      32             : class TH2F ;
      33             : class TH2 ; 
      34             : class TLine ;
      35             : class TText ;
      36             : class TProfile ;
      37             : class TObjArray ; 
      38             : 
      39             : // --- AliRoot header files ---
      40             : #include "AliQADataMakerRec.h"
      41             : class AliCaloRawAnalyzer;
      42             : class AliEMCALGeometry;
      43             : #include "AliCaloConstants.h"
      44             : #include "AliEMCALTriggerMappingV2.h"
      45             : 
      46             : class AliEMCALQADataMakerRec: public AliQADataMakerRec {
      47             : 
      48             : public:
      49             :   
      50             :   // Histograms for Raw data control
      51             :   enum HRawType_t { 
      52             :     // first normal Low Gain and High Gain info
      53             :     kNsmodLG,kNsmodHG,kTimeLG,kTimeHG,
      54             :     kNtotLG,kNtotHG,kSigHG,kSigLG,
      55             :     kPedLG,kPedHG,
      56             :     k2DRatioAmp,kRatioDist, kLEDMonRatio, kLEDMonRatioDist,
      57             :     // then TRU info
      58             :     kNsmodTRU,
      59             :     kSigTRU,kNtotTRU,
      60             :     kNL0TRU, kTimeL0TRU,
      61             :     kNL0FirstTRU, kTimeL0FirstTRU,kNL0TRUSamples,kNL0TRURMS,
      62             :     // and also LED Mon info
      63             :     kNsmodLGLEDMon,kNsmodHGLEDMon,kTimeLGLEDMon,kTimeHGLEDMon,
      64             :     kSigLGLEDMon,kSigHGLEDMon,kNtotLGLEDMon,kNtotHGLEDMon,
      65             :     kPedLGLEDMon,kPedHGLEDMon,
      66             :     //and STU info
      67             :     kAmpL1, kGL1, kJL1,
      68             :     kGL1V0, kJL1V0, kSTUTRU  
      69             :   } ;
      70             : 
      71             :   // Histograms for RecPoints  control
      72             :   enum HRPType_t {kRecPE,kRecPM,kRecPDigM};
      73             : 
      74             :   // Histograms for ESDs  control
      75             :   enum HESDType_t {kESDCaloClusE,kESDCaloClusM,kESDCaloCellA,kESDCaloCellM} ;
      76             :   
      77             : public:
      78             :   // ctor
      79             :   AliEMCALQADataMakerRec(Int_t fitAlgo = Algo::kStandard) ;  
      80             :   // Default fitter is kStandard=0 (see AliCaloConstants)
      81             :   
      82             :   AliEMCALQADataMakerRec             (const AliEMCALQADataMakerRec& qadm) ;   
      83             :   AliEMCALQADataMakerRec& operator = (const AliEMCALQADataMakerRec& qadm) ;
      84           0 :   virtual ~AliEMCALQADataMakerRec() {;} // dtor
      85             : 
      86           0 :   Int_t GetFittingAlgorithm() const {return fFittingAlgorithm;}
      87             :   void  SetFittingAlgorithm(Int_t val);
      88             :   
      89           0 :   AliCaloRawAnalyzer *GetRawAnalyzer()    const {return fRawAnalyzer   ;}
      90           0 :   AliCaloRawAnalyzer *GetRawAnalyzerTRU() const {return fRawAnalyzerTRU;}
      91             :   
      92             :   // The number of SuperModules
      93           0 :   void SetSuperModules(int i) {fSuperModules = i;}; 
      94           0 :   int GetSuperModules() const {return fSuperModules;}; 
      95             : 
      96             :   // For pedestal calculation with raw data
      97           0 :   void SetFirstPedestalSample(int i)  {fFirstPedestalSample = i;}          //  first sample
      98           0 :   int  GetFirstPedestalSample() const {return fFirstPedestalSample;}       //  first sample
      99           0 :   void SetLastPedestalSample(int i)   {fLastPedestalSample = i;}           //  last sample
     100           0 :   int  GetLastPedestalSample() const  {return fLastPedestalSample;}        //  last sample
     101             :   
     102           0 :   void SetFirstPedestalSampleTRU(int i)  {fFirstPedestalSampleTRU = i;}    //  first sample, TRU
     103           0 :   int  GetFirstPedestalSampleTRU() const {return fFirstPedestalSampleTRU;} //  first sample, TRU
     104           0 :   void SetLastPedestalSampleTRU(int i)   {fLastPedestalSampleTRU = i;}     //  last sample, TRU
     105           0 :   int  GetLastPedestalSampleTRU() const  {return fLastPedestalSampleTRU;}  //  last sample, TRU
     106             :   
     107             :   // For selection of interesting signal (max-min) range 
     108             :   // Low Gain channels
     109           0 :   void SetMinSignalLG(int i)  {fMinSignalLG = i;}
     110           0 :   int  GetMinSignalLG() const {return fMinSignalLG;}
     111           0 :   void SetMaxSignalLG(int i)  {fMaxSignalLG = i;}
     112           0 :   int  GetMaxSignalLG() const {return fMaxSignalLG;}
     113             :   
     114             :   // High Gain channels
     115           0 :   void SetMinSignalHG(int i)  {fMinSignalHG = i;}
     116           0 :   int  GetMinSignalHG() const {return fMinSignalHG;}
     117           0 :   void SetMaxSignalHG(int i)  {fMaxSignalHG = i;}
     118           0 :   int  GetMaxSignalHG() const {return fMaxSignalHG;}
     119             :   
     120             :   // TRU channels
     121           0 :   void SetMinSignalTRU(int i) {fMinSignalTRU = i;}
     122           0 :   int GetMinSignalTRU() const {return fMinSignalTRU;}
     123           0 :   void SetMaxSignalTRU(int i) {fMaxSignalTRU = i;}
     124           0 :   int GetMaxSignalTRU() const {return fMaxSignalTRU;}
     125             :   
     126             :   // LEDMon channels
     127           0 :   void SetMinSignalLGLEDMon(int i) {fMinSignalLGLEDMon = i;}
     128           0 :   int GetMinSignalLGLEDMon() const {return fMinSignalLGLEDMon;}
     129           0 :   void SetMaxSignalLGLEDMon(int i) {fMaxSignalLGLEDMon = i;}
     130           0 :   int GetMaxSignalLGLEDMon() const {return fMaxSignalLGLEDMon;}
     131           0 :   void SetMinSignalHGLEDMon(int i) {fMinSignalHGLEDMon = i;}
     132           0 :   int GetMinSignalHGLEDMon() const {return fMinSignalHGLEDMon;}
     133           0 :   void SetMaxSignalHGLEDMon(int i) {fMaxSignalHGLEDMon = i;}
     134           0 :   int GetMaxSignalHGLEDMon() const {return fMaxSignalHGLEDMon;}
     135             : 
     136             :   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
     137             :   void           GetCalibRefFromOCDB() ;
     138             :   //void                       GetTruChannelPosition( Int_t &globRow, Int_t &globColumn, Int_t module, Int_t ddl, Int_t branch, Int_t column ) const;
     139             :   virtual void   InitESDs() ; 
     140             :   virtual void   InitDigits() ; 
     141             :   virtual void   InitRecPoints() ; 
     142             :   virtual void   InitRaws() ; 
     143             :   virtual void   MakeESDs(AliESDEvent * esd) ;
     144             :   virtual void   MakeDigits() ;
     145             :   virtual void   MakeDigits(TTree * digTree) ; 
     146             :   virtual void   MakeRecPoints(TTree * recpoTree) ; 
     147             :   virtual void   MakeRaws(AliRawReader* rawReader) ;
     148             :   virtual void   MakeRawsSTU(AliRawReader* rawReader);
     149             :   virtual void   StartOfDetectorCycle() ; 
     150             : 
     151             : private:
     152             :   
     153             :   void ConvertProfile2H(TProfile * p, TH2 * histo) ; 
     154             :   
     155             :   Int_t fFittingAlgorithm;              ///< Select the fitting algorithm, only used in copy ctor ...
     156             : 
     157             :   AliCaloRawAnalyzer *fRawAnalyzer;     ///< For signal fitting
     158             :   AliCaloRawAnalyzer *fRawAnalyzerTRU;  ///< For TRU signal fitting
     159             :   AliEMCALGeometry   *fGeom;            ///< EMCAL geometry, needed for STU decoding
     160             : 
     161             :   int fSuperModules;                    ///< The number of SuperModules activated
     162             :   int fFirstPedestalSample;             ///< First sample for pedestal calculation, in bunch
     163             :   int fLastPedestalSample;              ///< Last sample for pedestal calculation, in bunch
     164             :   int fFirstPedestalSampleTRU;          ///< First sample for pedestal calculation, in bunch
     165             :   int fLastPedestalSampleTRU;           ///< Last sample for pedestal calculation, in bunch
     166             :   
     167             :   int fMinSignalLG;                     ///< Minimum signal, for Low Gain channels
     168             :   int fMaxSignalLG;                     ///< Maximum signal, for Low Gain channels
     169             :   int fMinSignalHG;                     ///< Minimum signal, for High Gain channels
     170             :   int fMaxSignalHG;                     ///< Maximum signal, for High Gain channels
     171             :   int fMinSignalTRU;                    ///< Minimum signal, for TRU channels
     172             :   int fMaxSignalTRU;                    ///< Maximum signal, for TRU channels
     173             :   int fMinSignalLGLEDMon;               ///< Minimum signal, for LEDMon channels, low gain
     174             :   int fMaxSignalLGLEDMon;               ///< Maximum signal, for LEDMon channels, low gain
     175             :   int fMinSignalHGLEDMon;               ///< Minimum signal, for LEDMon channels, high gain
     176             :   int fMaxSignalHGLEDMon;               ///< Maximum signal, for LEDMon channels, high gain
     177             :   
     178             :   /// TProfile reference histogram from LED run
     179             :   TProfile * fCalibRefHistoPro ; // ->
     180             :   
     181             :   /// TH2F reference histogram from LED run
     182             :   TH2F     * fCalibRefHistoH2F ; //-> 
     183             :   
     184             :   /// TProfile reference histogram from LED monitor
     185             :   TProfile * fLEDMonRefHistoPro; //-> 
     186             :   
     187             :   /// TH2F reference histogram from LED run
     188             :   TH2F     * fHighEmcHistoH2F  ; //-> 
     189             :   
     190             : //  TText **    fTextSM        ; //! Text info for each SM  
     191             : //  TLine *     fLineCol       ; //! line to distinguish the different SM side: A side and C side
     192             : //  TLine *     fLineRow       ; //! line to distinguish the different SM sector 0 and 1 
     193             : 
     194             :   /// \cond CLASSIMP
     195          46 :   ClassDef(AliEMCALQADataMakerRec,6) ;
     196             :   /// \endcond
     197             : };
     198             : 
     199             : #endif /// AliEMCALQADATAMAKERREC_H

Generated by: LCOV version 1.11