LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSCorrMapSDD.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 29 24.1 %
Date: 2016-06-14 17:26:59 Functions: 5 24 20.8 %

          Line data    Source code
       1             : #ifndef ALIITSCORRMAPSDD_H
       2             : #define ALIITSCORRMAPSDD_H
       3             : /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : ///////////////////////////////////////////////////////////////////
       9             : //                                                               //
      10             : // Mother class for SDD maps used to correct for                 //
      11             : // voltage divider shape and doping fluctuations                 //
      12             : // Origin: F.Prino, Torino, prino@to.infn.it                     //
      13             : //                                                               //
      14             : ///////////////////////////////////////////////////////////////////
      15             : 
      16             : #include<TNamed.h>
      17             : #include "AliLog.h"
      18             : class TH1F;
      19             : class TH2F;
      20             : class AliITSsegmentationSDD;
      21             : 
      22           0 : class AliITSCorrMapSDD : public TNamed {
      23             : 
      24             :  public:
      25             :   // maps produced from residuals stores Xtrue-Xmeasured in drift lenght.
      26             :   // Since the map computes xtrue-xmeas in drift coordinate
      27             :   // and the difference is added to measured local coordinate, we have
      28             :   // Left:  Xmeas_loc_corr = Xmeas_loc + (Xtrue-Xmeas)_loc = Xmeas_loc - (Xtrue-Xmeas)_drift
      29             :   // Right: Xmeas_loc_corr = Xmeas_loc + (Xtrue-Xmeas)_loc = Xmeas_loc + (Xtrue-Xmeas)_drift
      30             :   // hence, for the left side the sign of the correction need to inverted
      31             :   enum {kLeftInvBit = BIT(14)};   
      32             :   AliITSCorrMapSDD();
      33             :   AliITSCorrMapSDD(Char_t *mapname);
      34           0 :   virtual ~AliITSCorrMapSDD(){};
      35             :   //
      36           0 :   void   SetInversionBit(Bool_t v=kTRUE)           {SetBit(kLeftInvBit,v);}
      37        1036 :   Bool_t GetInversionBit()               const     {return TestBit(kLeftInvBit);}
      38             :   //
      39           0 :   Int_t GetNBinsAnode() const {return fNAnodePts;}
      40           0 :   Int_t GetNBinsDrift() const {return fNDriftPts;}
      41             :   void SetNBinsAnode(Int_t nbins) {
      42        4644 :     if(nbins<=kMaxNAnodePts) fNAnodePts=nbins;
      43           0 :     else AliError(Form("Max. number of anode bins = %d",kMaxNAnodePts));
      44        1548 :   }
      45             :   void SetNBinsDrift(Int_t nbins) {
      46           0 :     if(nbins<=kMaxNDriftPts) fNDriftPts=nbins;
      47           0 :     else AliError(Form("Max. number of drift bins = %d",kMaxNDriftPts));
      48           0 :   }
      49             : 
      50             :   Bool_t CheckAnodeBounds(Int_t iAn) const {
      51           0 :     if(iAn<0 || iAn>=fNAnodePts)return kFALSE;
      52           0 :     else return kTRUE;
      53           0 :   }
      54             :   Bool_t CheckDriftBounds(Int_t iTb) const {
      55        3162 :     if(iTb<0 || iTb >= fNDriftPts)return kFALSE;
      56        1054 :     else return kTRUE;
      57        1054 :   }
      58             : 
      59             :   virtual void Set1DMap(TH1F* /*hmap*/){
      60           0 :     AliError("Not implemented");
      61           0 :   }
      62             :   virtual void Set2DMap(TH2F* /*hmap*/){
      63           0 :     AliError("Not implemented");
      64           0 :   }
      65             : 
      66             :   virtual void ResetMap(){
      67           0 :     AliError("Not implemented");
      68           0 :   }
      69             :   virtual void SetCellContent(Int_t /*iAn*/, Int_t /*iTb*/, Float_t /*devMicron*/){
      70           0 :     AliError("Not implemented");
      71           0 :   }
      72             :   virtual Float_t GetCellContent(Int_t /*iAn*/, Int_t /*iTb*/) const {
      73           0 :     AliError("Not implemented");
      74           0 :     return -99999.;
      75             :   }
      76             : 
      77             :   void    ComputeGridPoints(Float_t z, Float_t x, AliITSsegmentationSDD *seg, Bool_t isReco=kTRUE);
      78             :   Float_t GetCorrection(Float_t z, Float_t x, AliITSsegmentationSDD *seg);
      79             :   Float_t GetShiftForSimulation(Float_t z, Float_t x, AliITSsegmentationSDD *seg);
      80             :   TH2F* GetMapHisto() const;
      81             :   TH1F* GetMapProfile() const;
      82             :   TH1F* GetResidualDistr(Float_t dmin=-300., Float_t dmax=300.) const;
      83             : 
      84             : 
      85             :  protected:
      86             : 
      87             :   enum {kMaxNAnodePts=256};// max number of map points along anodes
      88             :   enum {kMaxNDriftPts=291};// max number of map points along drift
      89             : 
      90             :   static const Int_t fgkNAnodePtsDefault; // default value for fNAnodePts
      91             :   static const Int_t fgkNDriftPtsDefault; // default value for fNDriftPts
      92             :   Int_t fNAnodePts; // number of map points along anodes
      93             :   Int_t fNDriftPts; // number of map points along anodes
      94             : 
      95             :   Float_t fXt1;   // true coordinate in lower grid point
      96             :   Float_t fXt2;   // true coordinate in upper grid point
      97             :   Float_t fXm1;   // measured coordinate in lower grid point
      98             :   Float_t fXm2;   // measured coordinate in upper grid point
      99             :   Float_t fDrLen; // drift length
     100             : 
     101         136 :   ClassDef(AliITSCorrMapSDD,2);
     102             : };
     103             : #endif
     104             : 

Generated by: LCOV version 1.11