]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationSSD.h
Fixing a little overlap. Adding flags to perform material budget studies (Mario)
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSSD.h
index 8253696a4e4d813ffe8bdaf0ca0ffc6add79f902..3f032cb3aa61682f509f51781d612b5d53e0f4d7 100644 (file)
@@ -5,15 +5,20 @@
 
 /* $Id$ */
 
+/////////////////////////////////////////////////////////////
+// Simulation class for SSD                                //
+/////////////////////////////////////////////////////////////
+
 #include "AliITSsimulation.h"
 #include "AliITSsegmentationSSD.h" // function used in inline functions
 
 class AliITSMapA2;
 class AliITSpList;
 class AliITSTableSSD;
-class AliITSdcsSSD;
+//class AliITSdcsSSD;
 class AliITSsegmentationSSD;
-class AliITSresponseSSD;
+class AliITSCalibrationSSD;
+class TF1;
 
 class AliITSsimulationSSD: public AliITSsimulation {
 
@@ -22,15 +27,19 @@ class AliITSsimulationSSD: public AliITSsimulation {
     AliITSsimulationSSD(const AliITSsimulationSSD &source); // copy constructor
     // operator =
     AliITSsimulationSSD& operator=(const AliITSsimulationSSD &source);
-    virtual AliITSsimulationSSD& operator=(const AliITSsimulation &source);
+    //    virtual AliITSsimulation& operator=(const AliITSsimulation &source);
     //Standard Constructor
-    AliITSsimulationSSD(AliITSsegmentation *seg,AliITSresponse *resp);
+    AliITSsimulationSSD(AliITSDetTypeSim* dettyp);
     //Destructor
     virtual ~AliITSsimulationSSD();
+    // Get a pointer to the segmentation object
+    virtual AliITSsegmentation* GetSegmentationModel(Int_t /*dt*/){return fDetType->GetSegmentationModel(2);}
+    // set pointer to segmentation objec
+    virtual void SetSegmentationModel(Int_t /*dt*/, AliITSsegmentation *seg){fDetType->SetSegmentationModel(2,seg);}
     // Initilize variables for this simulation
     void Init();
     // Initilize variables for this simulation
-    //void Init(AliITSsegmentationSSD *seg,AliITSresponseSSD *resp);
+    //void Init(AliITSsegmentationSSD *seg,AliITSCalibrationSSD *resp);
     // Create maps to build the lists of tracks for each summable digit
     void InitSimulationModule(Int_t module,Int_t events);
     // Digitize module from the sum of summable digits.
@@ -46,8 +55,9 @@ class AliITSsimulationSSD: public AliITSsimulation {
                    Double_t x,Double_t y,Double_t z,Double_t de,
                    AliITSTableSSD *tav);
     //returns a pointer to the SSD segmentation.
-    AliITSsegmentationSSD *GetSegmentation() {
+    /*AliITSsegmentationSSD *GetSegmentation() {
        return (AliITSsegmentationSSD*) fSegmentation;}
+    */
     //Returns the ionization energy for Si in GeV.
     Double_t GetIonizeE() const {return fIonE;}
     //Sets the ionization energy for Si in GeV.
@@ -62,19 +72,36 @@ class AliITSsimulationSSD: public AliITSsimulation {
     //Sets the Drift velocity for the P and N sides
     void SetDriftVelocity(Double_t v0=0.86E+06,Double_t v1=2.28E+06)
        {fDriftVel[0] = v0;fDriftVel[1] = v1;}
+
+
+    //  Decide whether to use or not the Lorentz drift 
+    void SetLorentzDrift(Bool_t b=kFALSE)
+      {fLorentz=b; if(fLorentz) SetTanLorAngle();};
+    // Set the Lorentz angles
+    Bool_t SetTanLorAngle();
+    // Getter for the Lorentz angles
+    Double_t GetTanLorAngleP() const {return fTanLorAngP;};
+    Double_t GetTanLorAngleN() const {return fTanLorAngN;};
+    //
+
+
     // Standard ascii class print function
     void Print(ostream *os);
     // Standard ascii class read function
     void Read(istream *is);
     virtual void Print(Option_t *option="") const {TObject::Print(option);}
     virtual Int_t Read(const char *name) {return TObject::Read(name);}
+    // Data members
+ protected:
+
+    //    AliITSdcsSSD *fDCS;   // Class containing detector controle paramters
 
  private:
     // Return the Response class
-    AliITSresponseSSD* GetResp(){return (AliITSresponseSSD*)fResponse;}
+    //    AliITSCalibrationSSD* GetResp(){return (AliITSCalibrationSSD*)fResponse;}
     // Return the Segmentation class
-    AliITSsegmentationSSD* GetSeg(){
-        return (AliITSsegmentationSSD*)fSegmentation;}
+    //AliITSsegmentationSSD* GetSeg(){
+    //  return (AliITSsegmentationSSD*)fSegmentation;}
     // returns the number of steps needed to proplerly distribute the charge
     // in a step
     Int_t NumOfSteps(Double_t x,Double_t y,Double_t z,
@@ -83,7 +110,7 @@ class AliITSsimulationSSD: public AliITSsimulation {
     void GetList(Int_t trk,Int_t ht,Int_t mod,AliITSpList *pLt,
                 AliITSTableSSD *tav);
     // sets thresholds and fills digits
-    void ChargeToSignal(AliITSpList *pList);
+    void ChargeToSignal(Int_t module,const AliITSpList *pList);
     // Writes Summable Digits to a root file for later use.
     void WriteSDigits(AliITSpList *pList);
     // ReadSDigits and create Digits
@@ -98,24 +125,28 @@ class AliITSsimulationSSD: public AliITSsimulation {
     void    ApplyNoise(AliITSpList *pList,Int_t mod);
      // Applies posible signal coupling between strips
     void    ApplyCoupling(AliITSpList *pList,Int_t mod);
+    // Kill dead channels
+    void ApplyDeadChannels(Int_t mod);
     // Computes the integral of a gaussian using Error Function
     Float_t F(Float_t av, Float_t x, Float_t s);
     // returns, from the segmentation, the number of stips
-    Int_t GetNStrips() {return GetSegmentation()->Npx();}
+    Int_t GetNStrips() {AliITSsegmentationSSD* seg = (AliITSsegmentationSSD*)GetSegmentationModel(2);return seg->Npx();}
     // returns, from the segmentation, the strip pitch
-    Float_t GetStripPitch() {return GetSegmentation()->Dpx(0);}
+    Float_t GetStripPitch() {AliITSsegmentationSSD* seg = (AliITSsegmentationSSD*)GetSegmentationModel(2);return seg->Dpx(0);}
 
-    // Data members
- protected:
-    AliITSdcsSSD *fDCS;   // Class containing detector controle paramters
-
- private:
     AliITSMapA2 *fMapA2;      //! Map of ionization, used localy only
     Double_t    fIonE;        // ionization energy of Si in GeV
     Double_t    fDifConst[2]; // Diffusion constants [h,e] in cm**2/sec
     Double_t    fDriftVel[2]; // Drift velocities [P,N sides] cm/sec
 
-    ClassDef(AliITSsimulationSSD,2) // SSD signal simulation class
+    TF1         *fTimeResponse; // signal time response function
+
+   Bool_t        fLorentz;      // kTRUE if Lorentz drift has been allowed 
+   Double_t      fTanLorAngP;    //! Tangent of the Lorentz Angle for holes 
+   Double_t      fTanLorAngN;    //! Tangent of the Lorentz Angle for electrons
+
+
+    ClassDef(AliITSsimulationSSD,3) // SSD signal simulation class
 
 };
 // Input and output functions for standard C++ input/output.