]>
Commit | Line | Data |
---|---|---|
451f5018 | 1 | #ifndef ALIITSUSIMULATION_H |
2 | #define ALIITSUSIMULATION_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 | #include <TObject.h> | |
19 | #include "AliITSUSensMap.h" | |
20 | #include "AliITSsegmentation.h" | |
21 | ||
22 | class AliITSCalibration; | |
23 | class AliITSUSimuParam; | |
24 | class AliITSUModule; | |
25 | class TRandom; | |
26 | class TSegCollection; | |
27 | ||
28 | // This is the base class for ITS detector signal simulations. Data members | |
29 | // include are a pointer to the detectors specific response and segmentation | |
30 | // classes. See the detector specific implementations for the propper code. | |
31 | // The detector-specific implementations are responsible for processing detector type, | |
32 | // which still may have different segmentations! | |
33 | // Note: the detector specific objects (segmentation, calib, etc.) are not owned | |
34 | // by the object but set externaly | |
35 | ||
36 | class AliITSUSimulation : public TObject | |
37 | { | |
38 | public: | |
39 | AliITSUSimulation(); | |
40 | AliITSUSimulation(AliITSUSimuParam* sim, AliITSUSensMap* map); | |
41 | virtual ~AliITSUSimulation() {} | |
42 | AliITSUSimulation(const AliITSUSimulation &source); | |
43 | AliITSUSimulation& operator=(const AliITSUSimulation &source); | |
44 | virtual void Init() = 0; | |
45 | // | |
46 | void UpdateMapSignal(UInt_t dim0,UInt_t dim1, Int_t trk,Int_t ht,Double_t signal); | |
47 | void UpdateMapNoise(UInt_t dim0,UInt_t dim1, Double_t noise); | |
48 | virtual void InitSimulationModule(Int_t, Int_t, AliITSsegmentation*); | |
49 | // | |
50 | // Hits -> SDigits | |
51 | virtual void SDigitiseModule(AliITSUModule* mod, Int_t mask, Int_t event, AliITSsegmentation* seg) = 0; | |
52 | virtual void FinishSDigitiseModule() = 0; | |
53 | virtual Bool_t AddSDigitsToModule( TSeqCollection *pItemArray, Int_t mask ); | |
54 | // | |
55 | // Hits -> Digits | |
56 | virtual void DigitiseModule(AliITSUModule* mod, Int_t mask, Int_t event, AliITSsegmentation* seg) = 0; | |
57 | virtual void CreateFastRecPoints(AliITSUModule *,Int_t,TRandom *,TClonesArray* /*recp*/) {} | |
58 | // | |
59 | AliITSCalibration* GetCalibDead() const {return fCalibDead;} | |
60 | AliITSCalibration* GetCalibNoisy() const {return fCalibNoisy;} | |
61 | AliITSsegmentation* GetSegmentation() const {return fSeg;} | |
62 | AliITSUSimuParam* GetSimuParam() const {return fSimuParam;} | |
63 | AliITSUSensMap* GetMap() const {return fSensMap;} | |
64 | Int_t GetModule() const {return fModule;} | |
65 | Int_t GetEvent() const {return fEvent;} | |
66 | Bool_t GetDebug(Int_t level=1) const {return fDebug>=level;} | |
67 | ||
68 | // | |
69 | void SetCalibDead(AliITSCalibration *calib) {fCalibDead = calib;} | |
70 | void SetCalibNoisy(AliITSCalibration *calib) {fCalibNoisy = calib;} | |
71 | void SetSegmentation(AliITSsegmentation *seg) {fSeg = seg; if (seg&&fSensMap) fSensMap->SetDimensions(seg->Npz(),seg->Npx());} | |
72 | void SetSimuParam(AliITSUSimuParam *sp) {fSimuParam = sp;} | |
73 | void SetMap(AliITSUSensMap *p) {fSensMap = p;} | |
74 | void SetModule(Int_t mod) {fModule=mod;} | |
75 | void SetEvent(Int_t evnt) {fEvent=evnt;} | |
76 | void SetDebug(Int_t level=5) {fDebug=level;} | |
77 | void SetNoDebug() {fDebug=0;} | |
78 | void ClearMap() {fSensMap->Clear();} | |
79 | // | |
80 | static Int_t GenOrderedSample(UInt_t nmax,UInt_t ngen,TArrayI &vals,TArrayI &ind); | |
81 | // | |
82 | protected: | |
83 | AliITSsegmentation *fSeg; //! segmentation | |
84 | AliITSCalibration *fCalibDead; //! dead channels | |
85 | AliITSCalibration *fCalibNoisy; //! noisy channels | |
86 | AliITSUSensMap *fSensMap; //! sensor map for hits manipulations | |
87 | AliITSUSimuParam *fSimuParam; //! simulation parameters | |
88 | Int_t fModule; //! module number being processed | |
89 | Int_t fEvent; //! event number being processed | |
90 | Int_t fDebug; //! debug flag | |
91 | ||
92 | ClassDef(AliITSUSimulation,1) // Simulation base class | |
93 | ||
94 | }; | |
95 | ||
96 | #endif |