Line data Source code
1 : #ifndef ALIITSSIMULATION_H
2 : #define ALIITSSIMULATION_H
3 : /**************************************************************************
4 : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * *
6 : * Author: The ALICE Off-line Project. *
7 : * Contributors are mentioned in the code where appropriate. *
8 : * *
9 : * Permission to use, copy, modify and distribute this software and its *
10 : * documentation strictly for non-commercial purposes is hereby granted *
11 : * without fee, provided that the above copyright notice appears in all *
12 : * copies and that both the copyright notice and this permission notice *
13 : * appear in the supporting documentation. The authors make no claims *
14 : * about the suitability of this software for any purpose. It is *
15 : * provided "as is" without express or implied warranty. *
16 : **************************************************************************/
17 :
18 : /* $Id$ */
19 :
20 : #include <TObject.h>
21 : #include "AliITSDetTypeSim.h"
22 : #include "AliITSpList.h"
23 :
24 : class AliITSCalibration;
25 : class AliITSsegmentation;
26 : class AliITSmodule;
27 : class TRandom;
28 : class TClonesArray;
29 :
30 : // This is the base class for ITS detector signal simulations. Data members
31 : // include are a pointer to the detectors specific response and segmentation
32 : // classes. See the detector specific implementations for the propper code.
33 :
34 : class AliITSsimulation : public TObject {
35 :
36 : public:
37 : AliITSsimulation(); // Default constructor
38 : // Standard constructor
39 : AliITSsimulation(AliITSDetTypeSim *dettyp);
40 : virtual ~AliITSsimulation(); // destructor
41 : // copy constructor. See detector specific implementation.
42 : AliITSsimulation(const AliITSsimulation &source);
43 : // Assignment opporator. See detector specific implementation.
44 : AliITSsimulation& operator=(const AliITSsimulation &source);
45 : // Initialize simulation
46 0 : virtual void Init() {};
47 :
48 : // ***************** Hits -> SDigits ******************
49 : // digitize module using the "slow" detector simulator creating
50 : // summable digits.
51 0 : virtual void SDigitiseModule(AliITSmodule *,Int_t,Int_t){;}
52 :
53 : // ***************** sum of SDigits -> Digits **********
54 : // Reset module arrays (maps), etc
55 0 : virtual void InitSimulationModule(Int_t,Int_t){;}
56 : // add (sum) a new list of summable digits to module,
57 : // add an offset (mask) to the track numbers. Returns kTRUE if there
58 : // is a "good" signal in this module.
59 : virtual Bool_t AddSDigitsToModule( TClonesArray *pItemArray, Int_t mask );
60 : // digitize module using the "slow" detector simulator from
61 : // the sum of summable digits.
62 0 : virtual void FinishSDigitiseModule(){;}
63 :
64 : // **************** Hits -> Digits *********************
65 : // digitize module using the "slow" detector simulator creating digits.
66 0 : virtual void DigitiseModule(AliITSmodule *,Int_t,Int_t) {;}
67 : // digitizes module using the "fast" detector simulator.
68 : virtual void CreateFastRecPoints(AliITSmodule *,Int_t,
69 0 : TRandom *,TClonesArray* /*recp*/) {;}
70 : // Return pointer to Response model
71 41536 : virtual AliITSCalibration* GetCalibrationModel(Int_t mod = 0){return fDetType->GetCalibrationModel(mod);}
72 : // set pointer to Response model
73 0 : virtual void SetCalibrationModel(Int_t mod, AliITSCalibration *res){fDetType->SetCalibrationModel(mod,res);}
74 : // Return pointer to Segmentation object
75 : virtual AliITSsegmentation* GetSegmentationModel(Int_t dt) = 0;
76 : // set pointer to Segmentation object
77 : virtual void SetSegmentationModel(Int_t dt,AliITSsegmentation *seg) = 0;
78 250205736 : virtual AliITSpList* GetMap(){return fpList;} // Returns fpList, the map.
79 2 : virtual void SetMap(AliITSpList *p){fpList = p;} // Sets fpList, the map.
80 3840 : virtual void ClearMap(){fpList->ClearMap();} // Clear fpList, map.
81 15506 : virtual void SetModuleNumber(Int_t mod){fModule=mod;} // Set Module number
82 157405202 : virtual Int_t GetModuleNumber()const {return fModule;}// Gets Module number
83 1922 : virtual void SetEventNumber(Int_t evnt){fEvent=evnt;} // Set Event number
84 1920 : virtual Int_t GetEventNumber()const {return fEvent;}// Gets Event number
85 : // Sets the debug flag for debugging output
86 0 : void SetDebug(Int_t level=5){fDebug=level;}
87 : // Clears the debug flag so no debugging output will be generated
88 0 : void SetNoDebug(){fDebug=0;}
89 : // Returns the debug flag value
90 78825448 : Bool_t GetDebug(Int_t level=1)const {return fDebug>=level;}
91 0 : void SetDetType(AliITSDetTypeSim* dettyp) {fDetType=dettyp;}
92 :
93 : protected:
94 : AliITSDetTypeSim *fDetType; //! Access resp and segm via this obj
95 : AliITSpList *fpList; //!
96 : Int_t fModule; //!
97 : Int_t fEvent; //!
98 : Int_t fDebug; // debug flag
99 :
100 116 : ClassDef(AliITSsimulation,4) // Simulation base class
101 :
102 : };
103 :
104 : #endif
|