LCOV - code coverage report
Current view: top level - ITS/ITSsim - AliITSsimulationSSD.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 16 68.8 %
Date: 2016-06-14 17:26:59 Functions: 11 20 55.0 %

          Line data    Source code
       1             : #ifndef ALIITSSIMULATIONSSD_H
       2             : #define ALIITSSIMULATIONSSD_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             : // Simulation class for SSD                                //
      10             : /////////////////////////////////////////////////////////////
      11             : 
      12             : #include "AliITSsimulation.h"
      13             : #include "AliITSsegmentationSSD.h" // function used in inline functions
      14             : 
      15             : class AliITSMapA2;
      16             : class AliITSpList;
      17             : class AliITSTableSSD;
      18             : //class AliITSdcsSSD;
      19             : class AliITSsegmentationSSD;
      20             : class AliITSCalibrationSSD;
      21             : class TF1;
      22             : 
      23             : class AliITSsimulationSSD: public AliITSsimulation {
      24             : 
      25             :  public:
      26             :     AliITSsimulationSSD(); // Default constructor
      27             :     AliITSsimulationSSD(const AliITSsimulationSSD &source); // copy constructor
      28             :     // operator =
      29             :     AliITSsimulationSSD& operator=(const AliITSsimulationSSD &source);
      30             :     //    virtual AliITSsimulation& operator=(const AliITSsimulation &source);
      31             :     //Standard Constructor
      32             :     AliITSsimulationSSD(AliITSDetTypeSim* dettyp);
      33             :     //Destructor
      34             :     virtual ~AliITSsimulationSSD();
      35             :     // Get a pointer to the segmentation object
      36   114943724 :     virtual AliITSsegmentation* GetSegmentationModel(Int_t /*dt*/){return fDetType->GetSegmentationModel(2);}
      37             :     // set pointer to segmentation objec
      38           0 :     virtual void SetSegmentationModel(Int_t /*dt*/, AliITSsegmentation *seg){fDetType->SetSegmentationModel(2,seg);}
      39             :     // Initilize variables for this simulation
      40             :     void Init();
      41             :     // Initilize variables for this simulation
      42             :     //void Init(AliITSsegmentationSSD *seg,AliITSCalibrationSSD *resp);
      43             :     // Create maps to build the lists of tracks for each summable digit
      44             :     void InitSimulationModule(Int_t module,Int_t events);
      45             :     // Digitize module from the sum of summable digits.
      46             :     void FinishSDigitiseModule();
      47             :     //Digitizes all of the hits in a module
      48             :     void DigitiseModule(AliITSmodule *mod,Int_t dummy0,Int_t dummy1);
      49             :     // Computes the Summable Digits
      50             :     void SDigitiseModule(AliITSmodule *mod,Int_t module,Int_t dummy);
      51             :     // Computes the Charge on each Strip/ Analog/summable digits
      52             :     void HitsToAnalogDigits(AliITSmodule *mod,AliITSpList *pList);
      53             :     //Computes the signal from one hit
      54             :     void HitToDigit(Int_t module,Double_t x0,Double_t y0,Double_t z0, 
      55             :                     Double_t x,Double_t y,Double_t z,Double_t de,
      56             :                     AliITSTableSSD *tav);
      57             :     //returns a pointer to the SSD segmentation.
      58             :     /*AliITSsegmentationSSD *GetSegmentation() {
      59             :         return (AliITSsegmentationSSD*) fSegmentation;}
      60             :     */
      61             :     //Returns the ionization energy for Si in GeV.
      62         946 :     Double_t GetIonizeE() const {return fIonE;}
      63             :     //Sets the ionization energy for Si in GeV.
      64           2 :     void SetIonizeE(Double_t e=3.62E-09){fIonE = e;}
      65             :     //Returns the Diffusion constant h in cm**2/sec
      66        8690 :     Double_t GetDiffConst(Int_t i) const {return fDifConst[i];}
      67             :     //Sets the Diffusion constant h in cm**2/sec
      68             :     void SetDiffConst(Double_t h=11.0,Double_t e=30.0)
      69           2 :         {fDifConst[0] = h;fDifConst[1]=e;}
      70             :     //Returns the Drift velocity for the side i
      71        8738 :     Double_t GetDriftVelocity(Int_t i) const {return fDriftVel[i];}
      72             :     //Sets the Drift velocity for the P and N sides
      73             :     void SetDriftVelocity(Double_t v0=0.86E+06,Double_t v1=2.28E+06)
      74           2 :         {fDriftVel[0] = v0;fDriftVel[1] = v1;}
      75             : 
      76             : 
      77             :     //  Decide whether to use or not the Lorentz drift 
      78             :     void SetLorentzDrift(Bool_t b=kFALSE)
      79           3 :       {fLorentz=b; if(fLorentz) SetTanLorAngle();};
      80             :     // Set the Lorentz angles
      81             :     Bool_t SetTanLorAngle();
      82             :     // Getter for the Lorentz angles
      83           0 :     Double_t GetTanLorAngleP() const {return fTanLorAngP;};
      84           0 :     Double_t GetTanLorAngleN() const {return fTanLorAngN;};
      85             :     //
      86             : 
      87             : 
      88             :     // Standard ascii class print function
      89             :     void Print(ostream *os);
      90             :     // Standard ascii class read function
      91             :     void Read(istream *is);
      92           0 :     virtual void Print(Option_t *option="") const {TObject::Print(option);}
      93           0 :     virtual Int_t Read(const char *name) {return TObject::Read(name);}
      94             :     // Data members
      95             :  protected:
      96             : 
      97             :     //    AliITSdcsSSD *fDCS;   // Class containing detector controle paramters
      98             : 
      99             :  private:
     100             :     // Return the Response class
     101             :     //    AliITSCalibrationSSD* GetResp(){return (AliITSCalibrationSSD*)fResponse;}
     102             :     // Return the Segmentation class
     103             :     //AliITSsegmentationSSD* GetSeg(){
     104             :     //  return (AliITSsegmentationSSD*)fSegmentation;}
     105             :     // returns the number of steps needed to proplerly distribute the charge
     106             :     // in a step
     107             :     Int_t NumOfSteps(Double_t x,Double_t y,Double_t z,
     108             :                      Double_t  &dex,Double_t &dey,Double_t &dez);
     109             :     // Keepts track and orders tracks for a give strip.
     110             :     void GetList(Int_t trk,Int_t ht,Int_t mod,AliITSpList *pLt,
     111             :                  AliITSTableSSD *tav);
     112             :     // sets thresholds and fills digits
     113             :     void ChargeToSignal(Int_t module,const AliITSpList *pList);
     114             :     // Writes Summable Digits to a root file for later use.
     115             :     void WriteSDigits(AliITSpList *pList);
     116             :     // ReadSDigits and create Digits
     117             :     void SDigitToDigit(Int_t module,AliITSpList *pList);
     118             :     // Fills fMapA2 from pList AliITSpList
     119             :     void FillMapFrompList(AliITSpList *pList);
     120             :     // Diffuses the charge onto neighboring strips.
     121             :     void    IntegrateGaussian(Int_t k,Double_t par,Double_t av,Double_t sigma, 
     122             :                               Double_t inf, Double_t sup,
     123             :                               AliITSTableSSD *tav);
     124             :      // Applies noise to strips randomly
     125             :     void    ApplyNoise(AliITSpList *pList,Int_t mod);
     126             :      // Applies posible signal coupling between strips
     127             :     void    ApplyCoupling(AliITSpList *pList,Int_t mod);
     128             :     // Kill dead channels
     129             :     void ApplyDeadChannels(Int_t mod);
     130             :     // Computes the integral of a gaussian using Error Function
     131             :     Float_t F(Float_t av, Float_t x, Float_t s);
     132             :     // returns, from the segmentation, the number of stips
     133   114920502 :     Int_t GetNStrips() {AliITSsegmentationSSD* seg = (AliITSsegmentationSSD*)GetSegmentationModel(2);return seg->Npx();}
     134             :     // returns, from the segmentation, the strip pitch
     135        8690 :     Float_t GetStripPitch() {AliITSsegmentationSSD* seg = (AliITSsegmentationSSD*)GetSegmentationModel(2);return seg->Dpx(0);}
     136             : 
     137             :     AliITSMapA2 *fMapA2;      //! Map of ionization, used localy only
     138             :     Double_t    fIonE;        // ionization energy of Si in GeV
     139             :     Double_t    fDifConst[2]; // Diffusion constants [h,e] in cm**2/sec
     140             :     Double_t    fDriftVel[2]; // Drift velocities [P,N sides] cm/sec
     141             : 
     142             :     TF1         *fTimeResponse; // signal time response function
     143             : 
     144             :    Bool_t        fLorentz;      // kTRUE if Lorentz drift has been allowed 
     145             :    Double_t      fTanLorAngP;    //! Tangent of the Lorentz Angle for holes 
     146             :    Double_t      fTanLorAngN;    //! Tangent of the Lorentz Angle for electrons
     147             : 
     148             : 
     149         116 :     ClassDef(AliITSsimulationSSD,3) // SSD signal simulation class
     150             : 
     151             : };
     152             : // Input and output functions for standard C++ input/output.
     153             : ostream &operator<<(ostream &os,AliITSsimulationSSD &source);
     154             : istream &operator>>(istream &is,AliITSsimulationSSD &source);
     155             : #endif

Generated by: LCOV version 1.11