LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDCalibraVector.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 1 19 5.3 %

          Line data    Source code
       1             : #ifndef ALITRDCALIBRAVECTOR_H
       2             : #define ALITRDCALIBRAVECTOR_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : ///////////////////////////////////////////////////////////////////////////////
       9             : //                                                                           //
      10             : //  TRD calibration class                                                    //
      11             : //                                                                           //
      12             : ///////////////////////////////////////////////////////////////////////////////
      13             : 
      14             : #ifndef ROOT_TObject
      15             : #  include <TObject.h>
      16             : #endif
      17             : 
      18             : class TGraphErrors;
      19             : class TH1F;
      20             : class TObjArray;
      21             : 
      22             : class AliTRDPhInfo;
      23             : class AliTRDEntriesInfo;
      24             : class AliTRDPrfInfo;
      25             : 
      26             : class AliTRDCalibraVector : public TObject {
      27             : 
      28             :  public: 
      29             : 
      30             :   AliTRDCalibraVector();
      31             :   AliTRDCalibraVector(const AliTRDCalibraVector &c);
      32             :   virtual ~AliTRDCalibraVector();
      33             :   virtual Long64_t Merge(const TCollection* list);
      34             : 
      35             :   AliTRDCalibraVector& operator = (const  AliTRDCalibraVector &source);
      36             : 
      37             :   // Init
      38             :   void           TestInit(Int_t i, Int_t detmax);
      39             : 
      40             :   // Fill
      41             :   Bool_t         UpdateVectorCH(Int_t det, Int_t group, Float_t value);
      42             :   Bool_t         UpdateVectorPRF(Int_t det, Int_t group, Float_t x, Float_t y);
      43             :   Bool_t         UpdateVectorPH(Int_t det, Int_t group, Int_t time, Float_t value);
      44             : 
      45             : 
      46             :   Bool_t         FillVectorCH(Int_t det, Int_t group, Int_t bin, Int_t entries);
      47             :   Bool_t         FillVectorPRF(Int_t det, Int_t group, Int_t bin, Int_t entries, Float_t mean, Float_t square);
      48             :   Bool_t         FillVectorPH(Int_t det, Int_t group, Int_t bin, Int_t entries, Float_t mean, Float_t square);
      49             : 
      50             : 
      51             :   // Add
      52             :   Bool_t         Add(AliTRDCalibraVector *calvector);
      53             : 
      54             :   AliTRDCalibraVector *AddStatsPerDetectorCH();
      55             :   AliTRDCalibraVector *AddStatsPerDetectorPH();
      56             :   AliTRDCalibraVector *AddStatsPerDetectorPRF();
      57             : 
      58             :   
      59             :   // Fit
      60             :   TGraphErrors  *ConvertVectorPHTGraphErrors(Int_t det, Int_t group, const Char_t *name);
      61             :   TGraphErrors  *ConvertVectorPRFTGraphErrors(Int_t det, Int_t group, const Char_t *name);
      62             :   TH1F          *CorrectTheError(const TGraphErrors *hist, Int_t &nbEntries);
      63             :   TH1F          *ConvertVectorCHHisto(Int_t det, Int_t group, const Char_t *name);
      64             : 
      65             :   // Find
      66             :   Int_t          SearchBin(Float_t value, Int_t i) const;  
      67             :   Bool_t         FindTheMaxEntries(Int_t i, Int_t &detectormax, Int_t &groupmax);
      68             : 
      69             :   //
      70             :   // Set and Get methods
      71             :   //
      72             : 
      73           0 :   void           SetNumberBinCharge(Short_t numberbincharge)   { fNumberBinCharge = numberbincharge;            } 
      74           0 :   void           SetNumberBinPRF(Short_t numberbinprf)         { fNumberBinPRF    = numberbinprf;               } 
      75           0 :   void           SetTimeMax(Int_t timemax)                     { fTimeMax         = timemax;                    } 
      76           0 :   void           SetPRFRange(Float_t prfrange)                 { fPRFRange        = prfrange;                   }  
      77           0 :   void           SetDetCha0(Int_t i, Short_t total)            { fDetCha0[i]      = total;                      } 
      78           0 :   void           SetDetCha2(Int_t i, Short_t total)            { fDetCha2[i]      = total;                      } 
      79             :   void           SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi);    
      80           0 :   void           SetNbGroupPRF(Int_t nbGroup)                  { fNbGroupPRF = (UChar_t) nbGroup;               } 
      81             : 
      82           0 :   Short_t        GetNumberBinCharge()const                     { return fNumberBinCharge;                       }
      83           0 :   Short_t        GetNumberBinPRF()const                        { return fNumberBinPRF;                          }
      84           0 :   Int_t          GetTimeMax()const                             { return fTimeMax;                               } 
      85           0 :   Float_t        GetPRFRange()const                            { return fPRFRange;                              } 
      86           0 :   Short_t        GetDetCha0(Int_t i) const                     { return fDetCha0[i];                            }
      87           0 :   Short_t        GetDetCha2(Int_t i) const                     { return fDetCha2[i];                            }
      88             :   TString        GetNamePH() const;    
      89             :   TString        GetNamePRF() const;   
      90             :   TString        GetNameCH() const;  
      91             :   Int_t          GetNz(Int_t i) const;
      92             :   Int_t          GetNrphi(Int_t i) const;
      93           0 :   Int_t          GetNbGroupPRF() const                         { return (Int_t)fNbGroupPRF;                     }
      94             : 
      95             :   Int_t          GetTotalNumberOfBinsInDetector(Int_t det, Int_t i, Int_t nbBin) const;
      96             : 
      97             :   TObject               *GetPHEntries(Int_t det,Bool_t force = kFALSE);
      98             :   TObject               *GetPHMean(Int_t det,Bool_t force = kFALSE);
      99             :   TObject               *GetPHSquares(Int_t det,Bool_t force = kFALSE);
     100             :   
     101             :   TObject               *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
     102             :   TObject               *GetPRFMean(Int_t det,Bool_t force = kFALSE);
     103             :   TObject               *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
     104             :   
     105             :   TObject               *GetCHEntries(Int_t det,Bool_t force = kFALSE);
     106             : 
     107             :    
     108             :   
     109             :  protected:
     110             :   
     111             :   // Current data
     112             :   
     113             :   AliTRDEntriesInfo     *fPHEntries[540];                //  PH entries
     114             :   AliTRDPhInfo          *fPHMean[540];                   //  PH Mean
     115             :   AliTRDPhInfo          *fPHSquares[540];                //  PH Squares
     116             :   
     117             :   AliTRDEntriesInfo     *fPRFEntries[540];               //  PRF entries
     118             :   AliTRDPrfInfo         *fPRFMean[540];                  //  PRF Mean
     119             :   AliTRDPrfInfo         *fPRFSquares[540];               //  PRF Squares
     120             :   
     121             :   AliTRDEntriesInfo     *fCHEntries[540];                //  CH entries
     122             :   
     123             :   UChar_t      fModeCH;                         //  Calibration mode
     124             :   UChar_t      fModePH;                         //  Calibration mode
     125             :   UChar_t      fModePRF;                        //  Calibration mode
     126             :   UChar_t      fNbGroupPRF;                     //  Nb of group PRD
     127             :   
     128             :   
     129             :   Int_t            fDetectorPH;                //!  Current detector
     130             :   Int_t            fDetectorCH;                //!  Current detector
     131             :   Int_t            fDetectorPRF;               //!  Current detector
     132             :   Bool_t           fStopFillCH;                //!  To know if we stop to fill
     133             :   TH1F            *fHisto;                     //!  Histo to be fitted
     134             :   TGraphErrors    *fGraph;                     //!  TGraphError
     135             :   AliTRDCalibraVector *fCalVector;             //!  AliTRDCalibraVector
     136             :   
     137             :   // Size of the infos
     138             :   
     139             :   Short_t          fNumberBinCharge;          // Number of bins for the gain factor
     140             :   Short_t          fNumberBinPRF;             // Number of bin for the PRF
     141             :   Int_t            fTimeMax;                  // Number of time bins
     142             :   Float_t          fPRFRange;                 // Range PRF
     143             :   Short_t          fDetCha0[3];               // Number of XBins for chamber != 2
     144             :   Short_t          fDetCha2[3];               // Number of Xbins for chamber 2
     145             :   
     146             :   // Some functions
     147             :   
     148             :   AliTRDEntriesInfo  *GetEntriesPH(Int_t det, AliTRDEntriesInfo** array, Bool_t force);
     149             :   AliTRDPhInfo       *GetMeanSquaresPH(Int_t det, AliTRDPhInfo** array, Bool_t force);
     150             :   
     151             :   AliTRDEntriesInfo  *GetEntriesPRF(Int_t det, AliTRDEntriesInfo** array, Bool_t force);
     152             :   AliTRDPrfInfo      *GetMeanSquaresPRF(Int_t det, AliTRDPrfInfo** array, Bool_t force);
     153             :   
     154             :   AliTRDEntriesInfo  *GetEntriesCH(Int_t det, AliTRDEntriesInfo** array, Bool_t force);
     155             : 
     156          48 :   ClassDef(AliTRDCalibraVector,1)                   // TRD Calibration class
     157             :     
     158             :     };
     159             :     
     160             : #endif
     161             : 

Generated by: LCOV version 1.11