]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUSimulationPix.h
1) fix in the AliITSUTrackerGlo for track hypothesis w/o winner
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUSimulationPix.h
1 #ifndef ALIITSUSIMULATIONPIX_H
2 #define ALIITSUSIMULATIONPIX_H
3
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 ////////////////////////////////////////////////////////////
8 // Simulation class for upgrade pixels                    //
9 ////////////////////////////////////////////////////////////
10
11 #include <TObjArray.h>
12 #include "AliITSUSimulation.h"
13 #include "AliITSUSegmentationPix.h"
14
15 class TH1F;
16 class AliITSUModule;
17 class AliITSUSimuParam;
18 class AliParamList;
19
20 //-------------------------------------------------------------------
21
22 class AliITSUSimulationPix : public AliITSUSimulation {
23 public:
24   enum {kCellX1,kCellX2,kCellZ1,kCellZ2,kCellYDepth,kNDtSpread}; // data used for ch. spread integral calc.
25   //
26   // charge spread functions defined
27   enum {kSpreadFunGauss2D,                  // single gaussian in 2D, SpreadFunGauss2D
28         kSpreadFunDoubleGauss2D,            // double gaussian in 2D, SpreadFunDoubleGauss2D
29         kNSpreadFuns
30   };
31   // fist kParamStart entried of spread fun params are reserved for common parameters
32   enum {kSpreadFunParamNXoffs,               // number of pixels to consider +- from injection point (in X)
33         kSpreadFunParamNZoffs,               // number of pixels to consider +- from injection point (in Z)
34         kParamStart
35   };
36   // elements of the SpreadFunGauss2D parameterization (offsetted by kParamStart)
37   enum {kG1MeanX=kParamStart,kG1SigX,kG1MeanZ,kG1SigZ,kNG1Par};
38   // elements of the SpreadFunDoubleGauss2D parameterization (offsetted by kParamStart)
39   enum {kG2MeanX0=kParamStart,kG2SigX0,kG2MeanZ0,kG2SigZ0,kG2MeanX1,kG2SigX1,kG2MeanZ1,kG2SigZ1,kG2ScaleG2,kNG2Par};
40   //
41   AliITSUSimulationPix();
42   AliITSUSimulationPix(AliITSUSimuParam* sim,AliITSUSensMap* map);
43   virtual ~AliITSUSimulationPix();
44   AliITSUSimulationPix(const AliITSUSimulationPix &source); 
45   AliITSUSimulationPix& operator=(const AliITSUSimulationPix &s);
46   void Init();
47   //
48   void FinishSDigitiseModule();
49   void DigitiseModule();
50   //
51   void SDigitiseModule();
52   void WriteSDigits();
53   void Hits2SDigits();
54   void Hits2SDigitsFast();
55   void AddNoisyPixels();   
56   void RemoveDeadPixels();
57   void FrompListToDigits();
58   Int_t CreateNoisyDigits(Int_t minID,Int_t maxID,double probNoisy, double noise, double base);
59   Bool_t SetTanLorAngle(Double_t WeightHole=1.0);
60   Double_t GetTanLorAngle() const {return fTanLorAng;};
61   //
62   // For backwards compatibility
63   void SDigitsToDigits(){ FinishSDigitiseModule();}
64   
65   // This sets fStrobe flag and allows generating the strobe and applying it to select hits 
66   void SetStrobeGeneration(Bool_t b=kFALSE) {fStrobe=b;};
67   virtual void GenerateStrobePhase();
68   //
69   Double_t SpreadFunDoubleGauss2D(const Double_t *dtIn);
70   Double_t SpreadFunGauss2D(const Double_t *dtIn);
71   //
72   virtual void SetResponseParam(AliParamList* resp);
73   //
74  private:
75   void SpreadCharge2D(Double_t x0,Double_t z0, Double_t dy, Int_t ix0,Int_t iz0,
76                       Double_t el, Int_t tID, Int_t hID);
77   //
78   void SetCoupling(AliITSUSDigit* old,Int_t ntrack,Int_t idhit);     // "New" coupling routine  Tiziano Virgili
79   void SetCouplingOld(AliITSUSDigit* old,Int_t ntrack,Int_t idhit);  // "Old" coupling routine  Rocco Caliandro
80   //   
81  protected:
82    Double_t      fTanLorAng;    //! Tangent of the Lorentz Angle (weighted average for hole and electrons)
83    Bool_t        fStrobe;       // kTRUE if readout strobe with proper phase applied to select hits
84    Int_t         fStrobeLenght; // Strobe signal lenght in units of 25 ns
85    Double_t      fStrobePhase;  // The phase of the strobe signal with respect to the trigger
86    //   
87    Double_t (AliITSUSimulationPix::*fSpreadFun)(const Double_t *dtIn); //! pointer on current spread function
88
89    ClassDef(AliITSUSimulationPix,1)  // Simulation of pixel clusters
90  };
91 #endif