LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDSimParam.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 18 37 48.6 %
Date: 2016-06-14 17:26:59 Functions: 18 41 43.9 %

          Line data    Source code
       1             : #ifndef ALITRDSIMPARAM_H
       2             : #define ALITRDSIMPARAM_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             : // Class containing constant simulation parameters                        //
      11             : //                                                                        //
      12             : ////////////////////////////////////////////////////////////////////////////
      13             : 
      14             : #include "TObject.h"
      15             : 
      16             : class AliTRDSimParam : public TObject {
      17             :   
      18             :  public:
      19             :   
      20             :           enum { kNplan =   6
      21             :                , kNcham =   5
      22             :                , kNsect =  18
      23             :                , kNdet  = 540 };
      24             : 
      25             :   static  AliTRDSimParam *Instance();
      26             :   static  void     Terminate();
      27             :   
      28             :   AliTRDSimParam(const AliTRDSimParam &p);   
      29             :   AliTRDSimParam &operator=(const AliTRDSimParam &p); 
      30             : 
      31             :   virtual void     Copy(TObject &p) const;
      32             :   
      33           0 :           void     SetGasGain(Float_t gasgain)               { fGasGain           = gasgain;          }
      34           0 :           void     SetNoise(Float_t noise)                   { fNoise             = noise;            }
      35           0 :           void     SetChipGain(Float_t chipgain)             { fChipGain          = chipgain;         }
      36           0 :           void     SetADCoutRange(Float_t range)             { fADCoutRange       = range;            }
      37           0 :           void     SetADCinRange(Float_t range)              { fADCinRange        = range;            }
      38           0 :           void     SetADCbaseline(Int_t basel)               { fADCbaseline       = basel;            }   
      39           0 :           void     SetDiffusion(Int_t diffOn = 1)            { fDiffusionOn       = diffOn;           }
      40           0 :           void     SetElAttach(Int_t elOn = 1)               { fElAttachOn        = elOn;             }
      41           0 :           void     SetElAttachProp(Float_t prop)             { fElAttachProp      = prop;             }
      42           0 :           void     SetTimeResponse(Int_t trfOn = 1)          { fTRFOn             = trfOn; ReInit();  }  
      43           0 :           void     SetCrossTalk(Int_t ctOn = 1)              { fCTOn              = ctOn; ReInit();   }
      44           0 :           void     SetPadCoupling(Float_t v)                 { fPadCoupling       = v;                }
      45           0 :           void     SetTimeCoupling(Float_t v)                { fTimeCoupling      = v;                }
      46           0 :           void     SetTimeStruct(Bool_t tsOn = 1)            { fTimeStructOn      = tsOn;             }
      47           0 :           void     SetPadResponse(Int_t prfOn = 1)           { fPRFOn             = prfOn;            }
      48           0 :           void     SetNTimeBins(Int_t ntb)                   { fNTimeBins         = ntb;              }
      49           0 :           void     SetNTBoverwriteOCDB(Bool_t over = kTRUE)  { fNTBoverwriteOCDB  = over;             }
      50             : 
      51     1149808 :           Float_t  GetGasGain() const                        { return fGasGain;                       }
      52    20217600 :           Float_t  GetNoise() const                          { return fNoise;                         }
      53         376 :           Float_t  GetChipGain() const                       { return fChipGain;                      }
      54         404 :           Float_t  GetADCoutRange() const                    { return fADCoutRange;                   }
      55    20217976 :           Float_t  GetADCinRange() const                     { return fADCinRange;                    }
      56         392 :           Int_t    GetADCbaseline() const                    { return fADCbaseline;                   }
      57           0 :           Float_t  GetTRFlo() const                          { return fTRFlo;                         }
      58         376 :           Float_t  GetTRFhi() const                          { return fTRFhi;                         }
      59         376 :           Float_t  GetPadCoupling() const                    { return fPadCoupling;                   }
      60         376 :           Float_t  GetTimeCoupling() const                   { return fTimeCoupling;                  }
      61           0 :           Int_t    GetNTimeBins() const                      { return fNTimeBins;                     }
      62          16 :           Bool_t   GetNTBoverwriteOCDB() const               { return fNTBoverwriteOCDB;              }
      63             : 
      64     1149824 :           Bool_t   DiffusionOn() const                       { return fDiffusionOn;                   }
      65     1149824 :           Bool_t   ElAttachOn() const                        { return fElAttachOn;                    } 
      66         376 :           Float_t  GetElAttachProp() const                   { return fElAttachProp;                  }
      67    20435564 :           Bool_t   TRFOn() const                             { return fTRFOn;                         }
      68    20435188 :           Bool_t   CTOn() const                              { return fCTOn;                          }
      69     1149808 :           Bool_t   TimeStructOn() const                      { return fTimeStructOn;                  }
      70     1149808 :           Bool_t   PRFOn() const                             { return fPRFOn;                         }
      71             : 
      72             :           Double_t TimeResponse(Double_t time) const;  
      73             :           Double_t CrossTalk(Double_t time) const; 
      74             : 
      75             :           void     ReInit();
      76             :   
      77             :  protected:
      78             : 
      79             :   static AliTRDSimParam* fgInstance;   //  Instance of this class (singleton implementation)
      80             :   static Bool_t          fgTerminated; //  Defines if this class has already been terminated and
      81             :                                        //  therefore does not return instances in GetInstance anymore
      82             :   
      83             :           // Digitization parameter
      84             :           Float_t  fGasGain;           //  Gas gain
      85             :           Float_t  fNoise;             //  Electronics noise
      86             :           Float_t  fChipGain;          //  Electronics gain
      87             :   
      88             :           Float_t  fADCoutRange;       //  ADC output range (number of channels)
      89             :           Float_t  fADCinRange;        //  ADC input range (input charge)
      90             :           Int_t    fADCbaseline;       //  ADC intrinsic baseline in ADC channel
      91             :   
      92             :           Int_t    fDiffusionOn;       //  Switch for the diffusion
      93             :   
      94             :           Int_t    fElAttachOn;        //  Switch for the electron attachment
      95             :           Float_t  fElAttachProp;      //  Propability for electron attachment (for 1m)
      96             :   
      97             :           Int_t    fTRFOn;             //  Switch for the time response
      98             :           Float_t *fTRFsmp;            //! Integrated time response
      99             :           Int_t    fTRFbin;            //  Number of bins for the TRF
     100             :           Float_t  fTRFlo;             //  Lower boundary of the TRF
     101             :           Float_t  fTRFhi;             //  Higher boundary of the TRF
     102             :           Float_t  fTRFwid;            //  Bin width of the integrated TRF
     103             :   
     104             :           Int_t    fCTOn;              //  Switch for cross talk
     105             :           Float_t *fCTsmp;             //! Integrated cross talk
     106             :   
     107             :           Float_t  fPadCoupling;       //  Pad coupling factor
     108             :           Float_t  fTimeCoupling;      //  Time coupling factor (image charge of moving ions)
     109             :           Int_t    fTimeStructOn;      //  Switch for cell time structure
     110             :   
     111             :           Int_t    fPRFOn;             //  Switch for the pad response
     112             : 
     113             :           Int_t    fNTimeBins;         //  Number of time bins (only used it fNTBoverwriteOCDB = true)
     114             :           Bool_t   fNTBoverwriteOCDB;  //  Switch to overwrite number of time bins from PCDB
     115             : 
     116             :  private:
     117             : 
     118             :   // This is a singleton, constructor is private!  
     119             :   AliTRDSimParam();
     120             :   virtual ~AliTRDSimParam();
     121             : 
     122             :           void Init();
     123             :           void SampleTRF();
     124             :   
     125          48 :   ClassDef(AliTRDSimParam,6)          // The TRD simulation parameters
     126             : 
     127             : };
     128             : 
     129             : #endif

Generated by: LCOV version 1.11