LCOV - code coverage report
Current view: top level - TPC/TPCcalib - AliTPCcalibGainMult.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 29 3.4 %
Date: 2016-06-14 17:26:59 Functions: 1 33 3.0 %

          Line data    Source code
       1             : #ifndef ALITPCCALIBGAINMULT_H
       2             : #define ALITPCCALIBGAINMULT_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : #include "AliTPCcalibBase.h"
       8             : #include "AliTPCCalPad.h"
       9             : #include "TH3F.h"
      10             : #include "TF1.h"
      11             : #include "THnSparse.h"
      12             : #include "THn.h"
      13             : #include "TMatrixD.h"
      14             : #include "TVectorD.h"
      15             : class TH1F;
      16             : class TList;
      17             : class AliESDEvent;
      18             : class AliESDtrack;
      19             : class AliTPCseed;
      20             : 
      21             : #include "TTreeStream.h"
      22             : 
      23             : 
      24             : class AliTPCcalibGainMult:public AliTPCcalibBase {
      25             : public:
      26             :   AliTPCcalibGainMult(); 
      27             :   AliTPCcalibGainMult(const Text_t *name, const Text_t *title);
      28             :   virtual ~AliTPCcalibGainMult();
      29           0 :   void SetBBParam(TVectorD * param) {fBBParam=param;}
      30             :   //  virtual void Terminate();  
      31             :   //
      32             :   virtual void           Process(AliESDEvent *event);
      33             :   virtual void           ProcessV0s(AliESDEvent *event);
      34             :   virtual void           ProcessCosmic(const AliESDEvent *event);
      35             :   virtual void           ProcessKinks(const AliESDEvent *event);
      36             :   virtual void           ProcessTOF(const AliESDEvent *event);  
      37             :   virtual void           DumpHPT(const AliESDEvent *event);
      38             :   virtual Long64_t       Merge(TCollection *li);
      39             :   virtual void           Analyze();
      40             :   void                   DumpTrack(AliESDtrack * track, AliESDfriendTrack *ftrack, AliTPCseed * seed, Int_t index);
      41             :   static Double_t GetTruncatedMeanPosition(Double_t q0, Double_t q1, Double_t q2, Int_t ntracks, Int_t tuneIndex=0, TTreeSRedirector *pcstream=0);
      42             :   //
      43           0 :   TH1F   *          GetHistNTracks() const {return fHistNTracks;};
      44           0 :   TH1F   *          GetHistClusterShape() const {return fHistClusterShape;};
      45           0 :   TH3F   *          GetHistQA() const {return fHistQA;};
      46             :   //
      47           0 :   THnSparseF *      GetHistGainSector() const {return fHistGainSector;};
      48           0 :   THnSparseF *      GetHistPadEqual() const {return fHistPadEqual;};
      49           0 :   THnSparseF *      GetHistGainMult() const {return fHistGainMult;};  
      50           0 :   THnF       *      GetHistTopology() const {return fHistTopology;};
      51             :   //
      52           0 :   THnSparseF * GetHistdEdxMap() const { return fHistdEdxMap;}      // 4D dedx histogram
      53           0 :   THnSparseF * GetHistdEdxMax() const { return fHistdEdxMax;}      // 4D dedx histogram
      54           0 :   THnSparseF * GetHistdEdxTot() const { return fHistdEdxTot;}      // 4D dedx histogram
      55           0 :   TTree *      GetdEdxTree() const {return fdEdxTree;}         // tree for the later minimization
      56             : 
      57             :   TGraphErrors* GetGainPerChamber(Int_t padRegion=1, Bool_t plotQA=kFALSE);
      58             :   TGraphErrors* GetGainPerChamberRobust(Int_t padRegion=1, Bool_t plotQA=kFALSE, TObjArray *arrQA=0x0, Bool_t normQA=kTRUE);
      59             :   //
      60           0 :   void SetMIPvalue(Float_t mip){fMIP = mip;};
      61           0 :   void SetLowerTrunc(Float_t lowerTrunc){fLowerTrunc = lowerTrunc;};
      62           0 :   void SetUpperTrunc(Float_t upperTrunc){fUpperTrunc = upperTrunc;};
      63           0 :   void SetUseMax(Bool_t useMax){fUseMax = useMax;};
      64             :   //
      65           0 :   void SetCutMinCrossRows(Int_t crossRows){fCutCrossRows = crossRows;};
      66           0 :   void SetCutMaxEta(Float_t maxEta){fCutEtaWindow = maxEta;};
      67           0 :   void SetCutRequireITSrefit(Bool_t requireItsRefit = kFALSE){fCutRequireITSrefit = requireItsRefit;};
      68           0 :   void SetCutMaxDcaXY(Float_t maxXY){fCutMaxDcaXY = maxXY;}; 
      69           0 :   void SetCutMaxDcaZ(Float_t maxZ){fCutMaxDcaZ = maxZ;}; 
      70             :   //
      71           0 :   void SetMinMomentumMIP(Float_t minMom = 0.4){fMinMomentumMIP = minMom;};
      72           0 :   void SetMaxMomentumMIP(Float_t maxMom = 0.6){fMaxMomentumMIP = maxMom;};
      73           0 :   void SetAlephParameters(Float_t * parameters){for(Int_t j=0;j<5;j++) fAlephParameters[j] = parameters[j];};
      74             :   //
      75             :   //
      76           0 :   void     Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
      77           0 :   void     Process(AliTPCseed *track){return AliTPCcalibBase::Process(track);}
      78             :   //
      79             :   void     MakeLookup(THnSparse * hist, Char_t * outputFile);
      80             :   //
      81             :   void     UpdateGainMap();
      82             :   void     UpdateClusterParam();
      83             : 
      84           0 :   Double_t GetEntries() const {return fHistGainSector->GetEntries();}
      85             : 
      86           0 :   static void SetMergeEntriesCut(Double_t c) {fgMergeEntriesCut=c;}
      87             : 
      88             : private:
      89             :   static Double_t fgMergeEntriesCut;  //maximal number of entries for merging  -can be modified via setter
      90             : 
      91             :   //
      92             :   // parameter specifications
      93             :   //
      94             :   Float_t fMIP;                  // MIP position to be in fMIP
      95             :   Float_t fLowerTrunc;           // lower truncation for dEdx
      96             :   Float_t fUpperTrunc;           // upper truncation for dEdx
      97             :   //
      98             :   Bool_t fUseMax;                 // flag if Qmax or Qtot should be used
      99             :   //
     100             :   // track cuts
     101             :   //
     102             :   Int_t   fCutCrossRows;                // minimum number of crossed rows 
     103             :   Float_t fCutEtaWindow;                // maximum eta of tracks
     104             :   Bool_t  fCutRequireITSrefit;          // if ITSrefit should be required (dangerous in cpass0)
     105             :   Float_t fCutMaxDcaXY;                 // max dca_xy (only TPConly resolution is guaranteed!)
     106             :   Float_t fCutMaxDcaZ;                  // max dca_z  (dangerous if vDrift is not calibrated)
     107             :   //
     108             :   // definition of MIP window
     109             :   //
     110             :   Float_t fMinMomentumMIP;              // minimum momentum of MIP region, e.g. 400 MeV
     111             :   Float_t fMaxMomentumMIP;              // maximum momentum of MIP region, e.g. 600 MeV
     112             :   Float_t fAlephParameters[5];          // parameters for equalization in MIP window, parameter set should be =1 at MIP
     113             :   //
     114             :   // histograms
     115             :   //
     116             :   TH1F  *fHistNTracks;            //  histogram showing number of ESD tracks per event
     117             :   TH1F  *fHistClusterShape;       //  histogram to check the cluster shape
     118             :   TH3F  *fHistQA;                 //  dE/dx histogram showing the final spectrum
     119             :   //
     120             :   //
     121             :   THnSparseF * fHistGainSector;   //  histogram which shows MIP peak for each of the 3x36 sectors (pad region)
     122             :   THnSparseF * fHistPadEqual;     //  histogram for the equalization of the gain in the different pad regions -> pass0
     123             :   THnSparseF * fHistGainMult;     //  histogram which shows decrease of MIP signal as a function
     124             :   THnF       * fHistTopology;     //  histogram for topological corrections of signal - dip angle theta and curvature (1/pT)
     125             :   TMatrixD *fPIDMatrix;           //! custom PID matrix
     126             :   //
     127             :   THnSparseF * fHistdEdxMap;      // 4D dedx histogram - per sector/phi
     128             :   THnSparseF * fHistdEdxMax;      // 5D dedx histogram - per 1/dedx, tan(theta), tan(phi), mult, pad-type
     129             :   THnSparseF * fHistdEdxTot;      // 5D dedx histogram - per 1/dedx, tan(theta), tan(phi), mult, pad-type
     130             :   TTree *      fdEdxTree;         // tree for the later minimization
     131             :   TVectorD    *fBBParam;          // BetheBloch parameterization used for the dedx expected calculation
     132             :   //
     133             :   AliTPCcalibGainMult(const AliTPCcalibGainMult&); 
     134             :   AliTPCcalibGainMult& operator=(const AliTPCcalibGainMult&); 
     135             : 
     136           6 :   ClassDef(AliTPCcalibGainMult, 4); 
     137             : };
     138             : 
     139             : #endif
     140             : 
     141             : 

Generated by: LCOV version 1.11