1 #ifndef ALIITSUSIMULATIONPIX_H
2 #define ALIITSUSIMULATIONPIX_H
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////
8 // Simulation class for upgrade pixels //
9 ////////////////////////////////////////////////////////////
11 #include <TObjArray.h>
12 #include "AliITSUSimulation.h"
13 #include "AliITSUSegmentationPix.h"
17 class AliITSUSimuParam;
20 //-------------------------------------------------------------------
22 class AliITSUSimulationPix : public AliITSUSimulation {
24 enum {kCellX1,kCellX2,kCellZ1,kCellZ2,kCellYDepth,kNDtSpread}; // data used for ch. spread integral calc.
26 // charge spread functions defined
27 enum {kSpreadFunGauss2D, // single gaussian in 2D, SpreadFunGauss2D
28 kSpreadFunDoubleGauss2D, // double gaussian in 2D, SpreadFunDoubleGauss2D
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)
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};
41 AliITSUSimulationPix();
42 AliITSUSimulationPix(AliITSUSimuParam* sim,AliITSUSensMap* map);
43 virtual ~AliITSUSimulationPix();
44 AliITSUSimulationPix(const AliITSUSimulationPix &source);
45 AliITSUSimulationPix& operator=(const AliITSUSimulationPix &s);
48 void FinishSDigitiseModule();
49 void DigitiseModule();
51 void SDigitiseModule();
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;};
62 // For backwards compatibility
63 void SDigitsToDigits(){ FinishSDigitiseModule();}
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();
69 Double_t SpreadFunDoubleGauss2D(const Double_t *dtIn);
70 Double_t SpreadFunGauss2D(const Double_t *dtIn);
72 virtual void SetResponseParam(AliParamList* resp);
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);
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
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
87 Double_t (AliITSUSimulationPix::*fSpreadFun)(const Double_t *dtIn); //! pointer on current spread function
89 ClassDef(AliITSUSimulationPix,1) // Simulation of pixel clusters