]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsimulation.h
Allowing modularity of the MUON geometry during the generation (geant) phase with...
[u/mrichter/AliRoot.git] / ITS / AliITSsimulation.h
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 "AliITSpList.h"
22
23 class AliITSresponse;
24 class AliITSsegmentation;
25 class AliITSmodule;
26 class TRandom;
27 class TClonesArray;
28
29 // This is the base class for ITS detector signal simulations. Data members
30 // include are a pointer to the detectors specific response and segmentation
31 // classes. See the detector specific implementations for the propper code.
32
33 class AliITSsimulation : public TObject {
34
35   public:
36     AliITSsimulation(); // Default constructor
37     // Standard constructor
38     AliITSsimulation(AliITSsegmentation *seg,AliITSresponse *res);
39     virtual ~AliITSsimulation(); // destructor
40     // copy constructor. See detector specific implementation.
41     AliITSsimulation(const AliITSsimulation &source);
42     // Assignment opporator. See detector specific implementation.
43     virtual AliITSsimulation& operator=(const AliITSsimulation &source);
44     // Initialize simulation
45     virtual void Init() {};
46
47     // *****************  Hits -> SDigits ******************
48     // digitize module using the "slow" detector simulator creating
49     // summable digits.
50     virtual void SDigitiseModule(AliITSmodule *,Int_t,Int_t){;}
51
52     // ***************** sum of SDigits -> Digits **********
53     // Reset module arrays (maps), etc
54     virtual void InitSimulationModule(Int_t,Int_t){;}
55     // add (sum) a new list of summable digits to module, 
56     // add an offset (mask) to the track numbers. Returns kTRUE if there
57     // is a "good" signal in this module.
58     virtual Bool_t AddSDigitsToModule( TClonesArray *pItemArray, Int_t mask );
59     // digitize module using the "slow" detector simulator from
60     // the sum of summable digits.
61     virtual void FinishSDigitiseModule(){;}
62
63     // **************** Hits -> Digits *********************
64     // digitize module using the "slow" detector simulator creating digits.
65     virtual void DigitiseModule(AliITSmodule *,Int_t,Int_t) {;}
66     // digitizes module using the "fast" detector simulator.
67     virtual void CreateFastRecPoints(AliITSmodule *,Int_t,
68                                      TRandom *) {;}
69     // Return pointer to Response model
70     virtual AliITSresponse* GetResponseModel(){return fResponse;}
71     // set pointer to Response model
72     virtual void SetResponseModel(AliITSresponse *res){fResponse = res;}
73     // Return pointer to Response model
74     virtual AliITSsegmentation* GetSegmentationModel(){return fSegmentation;}
75     // set pointer to Response model
76     virtual void SetSegmentationModel(AliITSsegmentation *seg){
77                                                         fSegmentation = seg;}
78     virtual AliITSpList* GetMap(){return fpList;} // Returns fpList, the map.
79     virtual void SetMap(AliITSpList *p){fpList = p;} // Sets fpList, the map.
80     virtual void ClearMap(){fpList->ClearMap();} // Clear fpList, map.
81     virtual void SetModuleNumber(Int_t mod){fModule=mod;} // Set Module number
82     virtual Int_t GetModuleNumber()const {return fModule;}// Gets Module number
83     virtual void SetEventNumber(Int_t evnt){fEvent=evnt;} // Set Event number
84     virtual Int_t GetEventNumber()const {return fEvent;}// Gets Event number
85     // Sets the debug flag for debugging output
86     void SetDebug(Int_t level=5){fDebug=level;}
87     // Clears the debug flag so no debugging output will be generated
88     void SetNoDebug(){fDebug=0;}
89     // Returns the debug flag value
90     Bool_t GetDebug(Int_t level=1)const {return fDebug>=level;}
91
92  protected:
93     AliITSresponse      *fResponse;       //! response
94     AliITSsegmentation  *fSegmentation;   //! segmentation 
95     AliITSpList         *fpList;          //!
96     Int_t                fModule;         //!
97     Int_t                fEvent;          //!
98     Int_t                fDebug;          //  debug flag
99
100   ClassDef(AliITSsimulation,3)  // Simulation base class 
101     
102 };
103
104 #endif