]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALQADataMakerRec.h
o mods
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALQADataMakerRec.h
index d52dc3e2d2d57011de3228f651bca89c3e082dae..517805ccd2cad30b8cfaeb865349886342d0187e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIEMCALQADataMakerRec_H
-#define ALIEMCALQADataMakerRec_H
+#ifndef ALIEMCALQADATAMAKERREC_H
+#define ALIEMCALQADATAMAKERREC_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -9,12 +9,26 @@
 
   Based on PHOS code written by
   Y. Schutz CERN July 2007
+ Created one histogram for QA shifter;-- Yaxian Mao: 11/2009
+ The idea:average counts for all the towers should be flat 
+ Change all existing histograms as experts
+ Change histograms for DQM shifter: --  Yaxian Mao 04/2010
+ Calcuate the amplitude ratio from current run and the LED reference, for QAChecker use
+ Also calculate the ratio of amplitude from LED Monitor system (current/Reference), to check LED system  
 */
 
 
 // --- ROOT system ---
 class TH1F ; 
-class TH1I ; 
+class TH1I ;
+class TH2F ;
+class TH2 ; 
+class TLine ;
+class TText ;
+class TProfile ;
 class TObjArray ; 
 
 // --- Standard library ---
@@ -22,7 +36,9 @@ class TObjArray ;
 // --- AliRoot header files ---
 #include "AliQADataMakerRec.h"
 class AliCaloRawAnalyzer;
-class AliCaloRawAnalyzerLMS;
+class AliCaloRawAnalyzerKStandard;
+//class AliEMCALGeoParams;
+class AliEMCALGeometry;
 
 class AliEMCALQADataMakerRec: public AliQADataMakerRec {
 
@@ -31,17 +47,21 @@ public:
   enum HRawType_t { 
     // first normal Low Gain and High Gain info
     kNsmodLG,kNsmodHG,kTimeLG,kTimeHG,
-    kSigLG,kSigHG,kNtotLG,kNtotHG,kTowerHG,kTowerLG,
+    kNtotLG,kNtotHG,kSigHG,kSigLG,
     kPedLG,kPedHG,
+    k2DRatioAmp,kRatioDist, kLEDMonRatio, kLEDMonRatioDist,
     // then TRU info
-    kNsmodTRU,kTimeTRU,
+    kNsmodTRU,
     kSigTRU,kNtotTRU,
-    kPedTRU,
     kNL0TRU, kTimeL0TRU,
+               kNL0FirstTRU, kTimeL0FirstTRU,
     // and also LED Mon info
     kNsmodLGLEDMon,kNsmodHGLEDMon,kTimeLGLEDMon,kTimeHGLEDMon,
     kSigLGLEDMon,kSigHGLEDMon,kNtotLGLEDMon,kNtotHGLEDMon,
-    kPedLGLEDMon,kPedHGLEDMon
+    kPedLGLEDMon,kPedHGLEDMon,
+               //and STU info
+               kAmpL1, kGL1, kJL1,
+               kGL1V0, kJL1V0, kSTUTRU  
   } ;
 
   //Histograms for RecPoints  control
@@ -62,7 +82,7 @@ public:
   Int_t GetFittingAlgorithm() const {return fFittingAlgorithm; }
   void SetFittingAlgorithm(Int_t val);
   AliCaloRawAnalyzer *GetRawAnalyzer() const { return fRawAnalyzer;}
-  AliCaloRawAnalyzerLMS *GetRawAnalyzerTRU() const { return fRawAnalyzerTRU;}
+  AliCaloRawAnalyzerKStandard *GetRawAnalyzerTRU() const { return fRawAnalyzerTRU;}
 
   void SetSuperModules(int i) {fSuperModules = i;}; //The number of SuperModules
   int GetSuperModules() const {return fSuperModules;}; //The number of SuperModules
@@ -104,6 +124,8 @@ public:
   int GetMaxSignalHGLEDMon() const {return fMaxSignalHGLEDMon;}; 
 
   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
+  void           GetCalibRefFromOCDB() ;
+  void          GetTruChannelPosition( Int_t &globRow, Int_t &globColumn, Int_t module, Int_t ddl, Int_t branch, Int_t column ) const;
   virtual void   InitESDs() ; 
   virtual void   InitDigits() ; 
   virtual void   InitRecPoints() ; 
@@ -112,14 +134,18 @@ public:
   virtual void   MakeDigits() ;
   virtual void   MakeDigits(TTree * digTree) ; 
   virtual void   MakeRecPoints(TTree * recpoTree) ; 
-  virtual void   MakeRaws(AliRawReader* rawReader) ; 
+  virtual void   MakeRaws(AliRawReader* rawReader) ;
+  virtual void  MakeRawsSTU(AliRawReader* rawReader);
   virtual void   StartOfDetectorCycle() ; 
 
 private:
+ void ConvertProfile2H(TProfile * p, TH2 * histo) ; //change the profile plot to a 2D histogram
+  
+ Int_t fFittingAlgorithm;             // select the fitting algorithm
 
-  Int_t fFittingAlgorithm;             // select the fitting algorithm
-  AliCaloRawAnalyzer *fRawAnalyzer;    // for signal fitting
-  AliCaloRawAnalyzerLMS *fRawAnalyzerTRU;    // for signal fitting, for TRU
+ AliCaloRawAnalyzer *fRawAnalyzer;    // for signal fitting
+ AliCaloRawAnalyzerKStandard *fRawAnalyzerTRU;    // for signal fitting, for TRU
+ AliEMCALGeometry *fGeom; //EMCAL geometry, needed for STU decoding
 
   int fSuperModules; //The number of SuperModules activated
   int fFirstPedestalSample; // first sample for pedestal calculation, in bunch
@@ -137,9 +163,16 @@ private:
   int fMinSignalHGLEDMon; // minimum signal, for LEDMon channels, high gain
   int fMaxSignalHGLEDMon; // maximum signal, for LEDMon channels, high gain
 
+  TProfile * fCalibRefHistoPro ; // Profile reference histogram from LED run
+  TH2F     * fCalibRefHistoH2F ; // H2F reference histogram from LED run
+  TProfile * fLEDMonRefHistoPro ; // Profile reference histogram from LED monitor
+  TH2F     * fHighEmcHistoH2F ; // H2F reference histogram from LED run
+//  TText **    fTextSM        ; //! Text info for each SM  
+//  TLine *     fLineCol       ; //! line to distinguish the different SM side: A side and C side
+//  TLine *     fLineRow       ; //! line to distinguish the different SM sector 0 and 1 
 
   ClassDef(AliEMCALQADataMakerRec,5)  // description 
 
 };
 
-#endif // AliEMCALQADataMakerRec_H
+#endif // AliEMCALQADATAMAKERREC_H