LCOV - code coverage report
Current view: top level - PHOS/PHOSbase - AliPHOSCpvGainCalibDA.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 1 12 8.3 %

          Line data    Source code
       1             : #ifndef AliPHOSCpvGainCalibDA_h
       2             : #define AliPHOSCpvGainCalibDA_h
       3             : 
       4             : // Author: Sergey Evdokimov <sevdokim@cern.ch>
       5             : // The AliPHOSCpvGainCalibDA class creates 1D amplitude histos for every channel using AliPHOSDigit array
       6             : // produced by AliPHOSCPVRawDigiProducer (with pedestal subtraction!!!)
       7             : // Also writes these histos to file  
       8             : // And creates a ROOT file with some histograms
       9             : 
      10             : #include <TH1.h>
      11             : #include <TH2.h>
      12             : #include <TMath.h>
      13             : #include <TFile.h>
      14             : #include <TString.h>
      15             : #include <THnSparse.h>
      16             : #include "AliPHOSCpvParam.h"
      17             : #include "AliPHOSCpvRawDigiProducer.h"
      18             : #include <TClonesArray.h>
      19             : #include "AliPHOSGeometry.h"
      20             : 
      21             : class TFile;
      22           0 : class AliPHOSCpvGainCalibDA: public TObject { 
      23             : 
      24             : 
      25             : public:
      26             :   AliPHOSCpvGainCalibDA();
      27             :   virtual ~AliPHOSCpvGainCalibDA();
      28             :   void InitCalibration(TFile *fCalibrSupplyRoot); //run it before analysing data to create calibration coeffs map. input is file where previously created histos are stored.
      29             :   void CreateA0Histos(Int_t iDDL);
      30             :   Bool_t SetDeadChannelMapFromFile(const char * filename = "CpvBadMap.root");
      31             :   void WriteA0HistosToFile(const char * filename=0x0) const;                  // create and write a new CpvCalibrSupply.root file with hists
      32             :   Bool_t IsBad(Int_t ddl, Int_t x, Int_t y) {  // returns true, if the cell is bad
      33           0 :     if(ddl<0||ddl>2*AliPHOSCpvParam::kNDDL) return kTRUE;
      34           0 :     if(!fDeadMap[ddl]) return kFALSE;
      35           0 :     if(fDeadMap[ddl] -> GetBinContent(x+1,y+1)) return kTRUE;
      36           0 :     return kFALSE;
      37           0 :   }
      38             :   Bool_t IsBad(Int_t abs) {  // returns true, if the cell is bad
      39           0 :     if(!AliPHOSCpvParam::IsValidAbs(abs)) return kFALSE;
      40           0 :     Int_t ddl = AliPHOSCpvParam::A2DDL(abs),
      41           0 :             x = AliPHOSCpvParam::A2X(abs),
      42           0 :             y = AliPHOSCpvParam::A2Y(abs);
      43           0 :     return IsBad(ddl,x,y);
      44           0 :   }
      45             :   Bool_t FillAmplA0Histos(TClonesArray *digits);
      46           0 :   TList * GetQAHistos(){return fHistosList;}
      47             :   void CreateQAHistos();
      48           0 :   void SetMinClustSize(Int_t a){fMinClustSize=a;}
      49             : 
      50             :  protected: 
      51             :   Int_t fMinClustSize;//minimum cluster size
      52             :   AliPHOSGeometry * fGeom ;         //! PHOS geometry
      53             :   TH2I *fDeadMap[2*AliPHOSCpvParam::kNDDL]; //Dead Channel Map  
      54             :   TH2I *fEntriesMap[2*AliPHOSCpvParam::kNDDL];//entries map
      55             :   TH1F       *fAmplA0Histo[2*AliPHOSCpvParam::kNDDL][AliPHOSCpvParam::kPadPcX][AliPHOSCpvParam::kPadPcY]; //raw amplitudes specrta for every channel   
      56             :   TList* fHistosList;
      57             :   TH1F* fhClusterMult;
      58             :   TH2F* fhClusterShape;
      59             :   TH1F* fhA0Value;
      60             :   TH2F* fhAmplInClust;
      61             :   TH1F* fhTotalClusterAmplitude;
      62             :   
      63          22 :   ClassDef(AliPHOSCpvGainCalibDA,1);                                                  //Cpv calibration class        
      64             : };
      65             : #endif
      66             : 

Generated by: LCOV version 1.11