LCOV - code coverage report
Current view: top level - PHOS/PHOSbase - AliPHOSSimParam.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 15 48 31.2 %
Date: 2016-06-14 17:26:59 Functions: 15 51 29.4 %

          Line data    Source code
       1             : #ifndef ALIPHOSSIMPARAM_H
       2             : #define ALIPHOSSIMPARAM_H
       3             : /* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                          */
       5             : 
       6             : /* $Id: AliPHOSSimParam.h 23530 2008-01-25 06:46:13Z prsnko $ */
       7             :                                               
       8             : // Base class for the PHOS simulation parameters.
       9             : // Do not use in the reconstruction; use derivative classes instead.
      10             : 
      11             : #include "TNamed.h"
      12             : #include "TMath.h"
      13             : 
      14             : class AliPHOSSimParam : public TNamed {
      15             : 
      16             : public:
      17             : 
      18             :   AliPHOSSimParam();
      19             :   AliPHOSSimParam(const AliPHOSSimParam& recoParam);
      20             :   AliPHOSSimParam& operator = (const AliPHOSSimParam& recoParam);
      21           0 :   virtual ~AliPHOSSimParam() {}
      22             : 
      23             :   static AliPHOSSimParam * GetInstance() ;
      24             : 
      25             :   //Parameters used in conversion of deposited energy to APD response [see AliPHOSv1 for details]
      26           0 :   void SetMeanLightYield(Float_t ly=47000.){fLightYieldMean=ly; //recalculate now dependencies
      27           0 :                                             fLightFactor = fLightYieldMean * fIntrinsicAPDEfficiency ; 
      28           0 :                                             fAPDFactor   = (13.418/fLightYieldMean/100.) * 300. ; }
      29           0 :   void SetAPDEfficiency(Float_t eff=0.02655){fIntrinsicAPDEfficiency=eff;
      30           0 :                                              fLightFactor = fLightYieldMean * fIntrinsicAPDEfficiency ;}
      31      558606 :   Float_t GetLightFactor(void) const { return fLightFactor ;}
      32      558606 :   Float_t GetAPDFactor(void) const { return fAPDFactor ;}
      33             : 
      34             :   //Parameters use in EMC noise calculation [see AliPHOSDigitizer for details]
      35           8 :   Float_t GetAPDNoise() const { return fAPDNoise;  }          //RMS of APD noise
      36           0 :   void SetAPDNoise(Float_t noise=0.012){fAPDNoise = noise;  }
      37             : 
      38             :   //Parameters to apply non-lineary on cell level
      39           8 :   Bool_t IsCellNonlinearityOn() const {return fCellNonLineaityOn;}
      40           0 :   void SetCellNonLinearity(Bool_t on=kTRUE){fCellNonLineaityOn=on;} //default: on=kFALSE
      41           8 :   Double_t GetCellNonLineairyA(void) const {return fCellNonLineaityA; }
      42           8 :   Double_t GetCellNonLineairyB(void) const {return fCellNonLineaityB; }
      43           8 :   Double_t GetCellNonLineairyC(void) const {return fCellNonLineaityC; }
      44           0 :   void SetCellNonLineairyA(Double_t a=0.30) {fCellNonLineaityA = a; }
      45           0 :   void SetCellNonLineairyB(Double_t b=0.109){fCellNonLineaityB = b; }
      46           0 :   void SetCellNonLineairyC(Double_t c=0.955){fCellNonLineaityC = c; }
      47             : 
      48             : 
      49             : 
      50           8 :   Float_t GetEmcDigitsThreshold() const { return fEMCDigitThreshold ; }  //Minimal energy to keep digit
      51           0 :   void SetEMCDigitsThreshold(Float_t thresh=0.01){fEMCDigitThreshold=thresh;} 
      52             : 
      53             :   //Parameters for energy digitization [see AliPHOSDigitizer for details]
      54           0 :   void SetADCchannelW(Float_t width=0.005){fEMCADCchannel=width ;} //EMC channel width
      55           0 :   Float_t GetADCchannelW(void) const {return fEMCADCchannel; }
      56             : 
      57           0 :   void SetEDigitizationOn(Bool_t on=kTRUE){fDigitizeE=on ;}   //Use digitization in simulation or left it
      58          16 :   Bool_t IsEDigitizationOn(void)const {return fDigitizeE ;}   //for Digits2Raw->Digits procedure
      59             : 
      60             :   //Parameters for EMC TOF resolution [see AliPHOSDigitizer::TimeResolution()]
      61         248 :   Float_t GetTOFa()const{return fTOFa ;}  //constant term
      62         248 :   Float_t GetTOFb()const{return fTOFb ;}  //stohastic term
      63           0 :   void SetTOFparameters(Float_t a=0.5e-9, Float_t b=1.5e-9){fTOFa=a; fTOFb=b; }
      64             : 
      65             :   //Parameters for CPV noise and digitization  [see AliPHOSDigitizer for details] 
      66           8 :   Float_t GetCPVNoise() const {return fCPVNoise ;}           //RMS of CPV noise in
      67           0 :   void SetCPVNoise(Float_t noise=0.01){ fCPVNoise = noise ;} //CPV popugais
      68             : 
      69           8 :   Float_t GetCpvDigitsThreshold() const {return fCPVDigitThreshold ;}           //Minimal energy to keep digit in
      70           0 :   void SetCpvDigitsThreshold(Float_t thresh=0.09){fCPVDigitThreshold = thresh;} //CPV popugais
      71             : 
      72           0 :   Float_t GetADCpedestalCpv() const {return fADCpedestalCpv ;}      //CPV pedestal value 
      73           0 :   void SetADCpedestalCpv(Float_t ped=0.012){ fADCpedestalCpv=ped ;} //in CPV popugais
      74             : 
      75           0 :   Float_t GetADCchanelCpv() const {return fADCchanelCpv;}     //Price of one ADC channel 
      76           0 :   void SetADCchanelCpv(Float_t w=0.0012) {fADCchanelCpv=w; }  //for CPV
      77             : 
      78           0 :   Int_t GetNADCcpv() const {return fNADCcpv ;}                         //Max number of channels
      79           0 :   void SettNADCcpv(Int_t n=12) { fNADCcpv=(Int_t)TMath::Power(2,n) ; } //in CPV  ADC
      80             : 
      81             :   //Mark streams for mixing as streams contaning Digits (true) or SDigits (false)
      82             :   //Streamt numbering the same as in StreamManager
      83           0 :   void    SetStreamDigits(Int_t i){if(i<10)fDStream[i]=kTRUE;}
      84         730 :   Bool_t  IsStreamDigits(Int_t i){return fDStream[i]; }
      85             : 
      86             :   //Parameters for RAW embedding
      87           0 :   void SetEMCSubtractPedestals(Bool_t subtract) { fEMCSubtractPedestals = subtract;}
      88           0 :   Bool_t  EMCSubtractPedestals()      const { return fEMCSubtractPedestals;    }
      89             : 
      90           0 :   void SetGlobalAltroOffset(Int_t offset)  { fGlobalAltroOffset = offset ; }
      91           0 :   Int_t   GetGlobalAltroOffset()      const { return fGlobalAltroOffset ;  }
      92             : 
      93           0 :   void SetGlobalAltroThreshold(Int_t ZSth) { fGlobalAltroThreshold = ZSth; }
      94           0 :   Int_t   GetGlobalAltroThreshold()   const { return fGlobalAltroThreshold;}
      95             : 
      96           0 :   void SetSampleQualityCut(Float_t qcut) { fEMCSampleQualityCut=qcut; }
      97           0 :   Float_t GetEMCSampleQualityCut()    const { return fEMCSampleQualityCut; }
      98             : 
      99             : private:
     100             : 
     101             :   AliPHOSSimParam(Int_t i); //True constructor which should be called by GetInstance()
     102             : 
     103             : private:
     104             : 
     105             :   //Parameters used in conversion of deposited energy to APD response (AliPHOSv1)
     106             :   Float_t  fLightYieldMean ;        //Average number of photoelectrons per GeV
     107             :   Float_t  fIntrinsicAPDEfficiency; //APD efficiency including geometric coverage
     108             :   Float_t  fLightFactor ;           //Average number of photons collected by APD per GeV deposited energy
     109             :   Float_t  fAPDFactor ;             //factor relating light yield and APD response 
     110             :  
     111             :   //Parameters used in electronic noise calculation and thresholds for EMC (AliPHOSDigitizer)
     112             :   Float_t fAPDNoise;            //RMS of APD noise
     113             :   Float_t fEMCDigitThreshold ;  //minimal energy to keep digit 
     114             :   Float_t fEMCADCchannel ;      //width of ADC channel in GeV
     115             :   Float_t fTOFa  ;              //constant term of TOF resolution 
     116             :   Float_t fTOFb  ;              //stohastic term of TOF resolution 
     117             :   Float_t fCellNonLineaityA ;   //Amp of cel non-linearity
     118             :   Float_t fCellNonLineaityB ;   //Energy scale of cel non-linearity
     119             :   Float_t fCellNonLineaityC ;   //Overall calibration
     120             : 
     121             :   //Parameters used for RAW embedding
     122             :   Bool_t  fEMCSubtractPedestals;   // true if pedestal should be subtracted (in non-ZS)
     123             :   Int_t   fGlobalAltroOffset ;     // Offset used in ALTRO chips in SZ runs
     124             :   Int_t   fGlobalAltroThreshold ;  // Threshold used in ALTRO chips in SZ runs
     125             :   Float_t fEMCSampleQualityCut;    // Cut on pulse shape fit quality
     126             : 
     127             :   //CPV parameters
     128             :   Float_t fADCpedestalCpv ;    //Pedestal value
     129             :   Float_t fADCchanelCpv ;      //ADC channel width
     130             :   Float_t fCPVNoise ;          //RMS of CPV noise 
     131             :   Float_t fCPVDigitThreshold ; //Minimal energy to keep digit 
     132             :   Int_t   fNADCcpv ;           //Max number of channels in CPV ADC
     133             :  
     134             :   Bool_t fDStream[10] ;   //Mark mixing stream contains digits or SDigits
     135             :   Bool_t fDigitizeE ;     //Use energy digitization in simulation or left to Digits2Raw()
     136             :   Bool_t fCellNonLineaityOn ;  //Model scintillator non-linearity in AliPHOSDigitizer
     137             :   
     138             :   static AliPHOSSimParam * fgSimParam ; // pointer to the unique instance of the class
     139             : 
     140          22 :   ClassDef(AliPHOSSimParam,3)
     141             : };
     142             : 
     143             : #endif

Generated by: LCOV version 1.11