]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/UPGRADE/AliITSUSimuParam.h
Implemented possibility of synchronized, layer-staggered or fully randomized pixel...
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUSimuParam.h
index 673644840a5091ff72e5ec406e2381ef75198bf5..ccd72a0857b5a4812c6d1dbe1c123bc5ee3723d4 100644 (file)
@@ -23,15 +23,21 @@ class AliITSUSimuParam : public TObject {
   enum {kNoCouplingPix,kOldCouplingPix,kNewCouplingPix,kMaxCouplingOptPix};
   //
   AliITSUSimuParam();
-  AliITSUSimuParam(UInt_t nPix);
+  AliITSUSimuParam(UInt_t nLayers,UInt_t nPix);
   AliITSUSimuParam(const AliITSUSimuParam& simpar);
   // assignment operator 
   AliITSUSimuParam& operator=(const AliITSUSimuParam& source);
   ~AliITSUSimuParam();
-
+  //
+  void     SetNPix(Int_t np);
+  void     SetNLayers(Int_t nl);
+  //
   Double_t ApplyPixBaselineAndNoise(UInt_t mod) const;
   Double_t CalcProbNoiseOverThreshold(UInt_t mod) const;
   //
+  void     SetLrROCycleShift(Double_t v=0, Int_t lr=-1);
+  Double_t GetLrROCycleShift(Int_t lr)                                    const  {return fLrROCycleShift ? fLrROCycleShift[lr]:0;}
+  //
   void     SetPixThreshold(Double_t thresh, Double_t sigma, int mod=-1);
   void     SetPixMinElToAdd(Double_t nel)                                        {fPixMinElToAddDef = nel;}
   void     GetPixThreshold(UInt_t mod, Double_t& thresh, Double_t& sigma) const;
@@ -49,9 +55,8 @@ class AliITSUSimuParam : public TObject {
   //
   void     SetPixBiasVoltage(Double_t bias=18.182,Int_t mod=-1);
   Double_t GetPixBiasVoltage(UInt_t mod)                                  const;
-
-  void     SetGeVToCharge(Double_t gc=fgkNcompsDefault)                             {fGeVcharge = gc;}
+  // 
+  void     SetGeVToCharge(Double_t gc=fgkNcompsDefault)                          {fGeVcharge = gc;}
   Double_t GetGeVToCharge()                                               const  {return fGeVcharge;}
   Double_t GeVToCharge(Double_t gev)                                      const  {return gev/fGeVcharge;}
   //
@@ -74,9 +79,9 @@ class AliITSUSimuParam : public TObject {
   Double_t LorentzAngleElectron(Double_t bz)                              const;
   Double_t LorentzAngleHole(Double_t bz)                                  const;
   //
-  Int_t    GetNRespFunParams()                                            const {return fRespFunParam.GetEntriesFast();}
-  const AliITSUParamList* GetRespFunParams(Int_t i)                       const {return (const AliITSUParamList*)fRespFunParam[i];}
-  const AliITSUParamList* FindRespFunParams(Int_t detId)                  const;
+  Int_t    GetNRespFunParams()                                            const  {return fRespFunParam.GetEntriesFast();}
+  const    AliITSUParamList* GetRespFunParams(Int_t i)                    const  {return (const AliITSUParamList*)fRespFunParam[i];}
+  const    AliITSUParamList* FindRespFunParams(Int_t detId)               const;
   void     AddRespFunParam(AliITSUParamList* pr);
   //
   virtual void Print(Option_t *opt = "")                                  const; 
@@ -86,59 +91,62 @@ class AliITSUSimuParam : public TObject {
   //
  protected:
 
-  static const Double_t fgkPixBiasVoltageDefault;//default for fPixBiasVoltage
-  static const Double_t fgkPixThreshDefault; //default for fThresh
-  static const Double_t fgkPixMinElToAddDefault; // default min number of electrons to add to sdigit
-  static const Double_t fgkPixThrSigmaDefault; //default for fSigma
-  static const Double_t fgkPixCouplColDefault; //default for fPixCouplCol
-  static const Double_t fgkPixCouplRowDefault; //default for fPixCouplRow
-  static const Double_t fgkPixEccDiffDefault;//default for fPixEccDiff
-  static const Double_t fgkPixLorentzHoleWeightDefault;//default for fPixLorentzHoleWeight
-  static const UInt_t   fgkPixCouplingOptDefault;  // type of pixel Coupling (old or new)
-  static const Double_t fgkDOverVDefault;             // default distance over voltage 
-  static const Double_t fgkGeVtoChargeDefault;        // default energy to ionize (free an electron) in GeV
-  static const Double_t fgkTDefault;                  // default temperature
-  static const Double_t fgkPixFakeRateDefault;        // default monopix fake rate
-  static const Bool_t   fgkPixNoiseInAllMod;          // default switch to add digital noise to every module
+  static const Float_t fgkPixBiasVoltageDefault;//default for fPixBiasVoltage
+  static const Float_t fgkPixThreshDefault; //default for fThresh
+  static const Float_t fgkPixMinElToAddDefault; // default min number of electrons to add to sdigit
+  static const Float_t fgkPixThrSigmaDefault; //default for fSigma
+  static const Float_t fgkPixCouplColDefault; //default for fPixCouplCol
+  static const Float_t fgkPixCouplRowDefault; //default for fPixCouplRow
+  static const Float_t fgkPixEccDiffDefault;//default for fPixEccDiff
+  static const Float_t fgkPixLorentzHoleWeightDefault;//default for fPixLorentzHoleWeight
+  static const UInt_t  fgkPixCouplingOptDefault;  // type of pixel Coupling (old or new)
+  static const Float_t fgkDOverVDefault;             // default distance over voltage 
+  static const Float_t fgkGeVtoChargeDefault;        // default energy to ionize (free an electron) in GeV
+  static const Float_t fgkTDefault;                  // default temperature
+  static const Float_t fgkPixFakeRateDefault;        // default monopix fake rate
+  static const Bool_t  fgkPixNoiseInAllMod;          // default switch to add digital noise to every module
   
-  static const Double_t fgkNsigmasDefault; //default for fNsigmas
-  static const Int_t fgkNcompsDefault; //default for fNcomps
+  static const Float_t fgkNsigmasDefault; //default for fNsigmas
+  static const Int_t   fgkNcompsDefault; //default for fNcomps
 
  private:
   //
-  Double_t   fGeVcharge;          // Energy to ionize (free an electron) in GeV
-  Double_t   fDOverV;             // The parameter d/v where d is the disance over which the the potential v is applied d/v [cm/volts]
-  Double_t   fT;                  // The temperature of the Si in Degree K.
+  Float_t    fGeVcharge;          // Energy to ionize (free an electron) in GeV
+  Float_t    fDOverV;             // The parameter d/v where d is the disance over which the the potential v is applied d/v [cm/volts]
+  Float_t    fT;                  // The temperature of the Si in Degree K.
   //
-  UInt_t     fNPix;            // number of Pix type detectors
-  UInt_t     fPixCouplOpt;     // Pix Coupling Option
-  Double_t   fPixCouplCol;     // Pix Coupling parameter along the cols
-  Double_t   fPixCouplRow;     // Pix Coupling parameter along the rows
+  UInt_t     fNLayers;             // number of layers  
+  UInt_t     fNPix;                // number of Pix type detectors
+  UInt_t     fPixCouplOpt;         // Pix Coupling Option
+  Float_t    fPixCouplCol;         // Pix Coupling parameter along the cols
+  Float_t    fPixCouplRow;         // Pix Coupling parameter along the rows
   Bool_t     fPixLorentzDrift;     // Flag to decide whether to simulate the Lorentz Drift or not in Pix
-  Double_t   fPixLorentzHoleWeight;// Lorentz Angle is computed for Pix as average of Hole and Electron
+  Float_t    fPixLorentzHoleWeight;// Lorentz Angle is computed for Pix as average of Hole and Electron
   //                                    this parameter gives the relative weights between the two
   Bool_t     fPixAddNoisyFlag;     // Flag saying whether noisy pixels should be added to digits
   Bool_t     fPixRemoveDeadFlag;   // Flag saying whether dead pixels should be removed from digits
   //
-  Double_t   fPixThreshDef;        // Pix Threshold value
-  Double_t   fPixThrSigmaDef;      // Pix Threshold fluctuation
-  Double_t   fPixBiasVoltageDef;   // Bias Voltage for the Pix
-  Double_t   fPixNoiseDef;         // Pix electronic noise: sigma
-  Double_t   fPixBaselineDef;      // Pix electronic noise: baseline
-  Double_t   fPixMinElToAddDef;    // min number of electrons to add
-  Double_t   fPixFakeRateDef;      // Fake rate for the monopix
+  Float_t    fPixThreshDef;        // Pix Threshold value
+  Float_t    fPixThrSigmaDef;      // Pix Threshold fluctuation
+  Float_t    fPixBiasVoltageDef;   // Bias Voltage for the Pix
+  Float_t    fPixNoiseDef;         // Pix electronic noise: sigma
+  Float_t    fPixBaselineDef;      // Pix electronic noise: baseline
+  Float_t    fPixMinElToAddDef;    // min number of electrons to add
+  Float_t    fPixFakeRateDef;      // Fake rate for the monopix
   Bool_t     fPixNoiseInAllMod;    // Add digital noise to every module
   //
-  Double_t*  fPixThresh;      //[fNPix] Pix Threshold value
-  Double_t*  fPixThrSigma;    //[fNPix] Pix Threshold fluctuation
-  Double_t*  fPixBiasVoltage; //[fNPix] Bias Voltage for the Pix
-  Double_t*  fPixSigma;       //[fNPix] Pix threshold fluctuations spread
-  Double_t*  fPixNoise;       //[fNPix] Pix electronic noise: sigma
-  Double_t*  fPixBaseline;    //[fNPix] Pix electronic noise: baseline
+  Float_t*   fLrROCycleShift; //[fNLayers] optional RO cycle shift for each layer (in fraction of RO cycle length if abs<1)
+                              // if abs>1, then each module will have random phase
+  Float_t*   fPixThresh;      //[fNPix] Pix Threshold value
+  Float_t*   fPixThrSigma;    //[fNPix] Pix Threshold fluctuation
+  Float_t*   fPixBiasVoltage; //[fNPix] Bias Voltage for the Pix
+  Float_t*   fPixSigma;       //[fNPix] Pix threshold fluctuations spread
+  Float_t*   fPixNoise;       //[fNPix] Pix electronic noise: sigma
+  Float_t*   fPixBaseline;    //[fNPix] Pix electronic noise: baseline
   //
   TObjArray  fRespFunParam;   // set of parameterizations for response function (AliITSUParamList)
 
-  ClassDef(AliITSUSimuParam,1);  // ITSU simulataion params
+  ClassDef(AliITSUSimuParam,2);  // ITSU simulataion params
 };