]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDSimulator.h
Now the full chain includes raw data.
[u/mrichter/AliRoot.git] / FMD / AliFMDSimulator.h
1 #ifndef ALIFMDSIMULATOR_H
2 #define ALIFMDSIMULATOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7  *
8  * See cxx source for full Copyright notice                               
9  */
10 #ifndef TTask
11 # include <TTask.h>
12 #endif
13 #ifndef TLorentzVector
14 # include <TLorentzVector.h>
15 #endif
16 #ifndef TArrayI
17 # include <TArrayI.h>
18 #endif
19 class TVector3;
20 class AliFMD;
21 class AliFMDRing;
22 class AliFMDDetector;
23 class AliFMD1;
24 class AliFMD2;
25 class AliFMD3;
26 class TObjArray;
27
28 /** Simulation of the FMD. 
29     This class builds the geometry, and processes hits in the FMD */ 
30 class AliFMDSimulator : public TTask  
31 {
32 public:
33   AliFMDSimulator();
34   /** CTOR */
35   AliFMDSimulator(AliFMD* fmd, Bool_t detailed=kTRUE);
36   virtual ~AliFMDSimulator() {}
37   /** Initialize */
38   virtual void DefineMaterials();
39   /** Register */
40   virtual void DefineGeometry() = 0;
41   /** Deal with a hit in the FMD */
42   virtual void Exec(Option_t* option="");
43   virtual void EndEvent();
44   /** @param use Wheher to use a divided geometry */
45   virtual void UseDivided(Bool_t use=kTRUE)  { fUseDivided = use; }
46   /** @param use Wheher to assemblies in the geometry definition */
47   virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
48   /** Whether to make a detailed geometry or not. 
49       @param use If true, make a detailed geometry */
50   virtual void SetDetailed(Bool_t use) { fDetailed = use; }
51 protected:  
52   AliFMD*        fFMD;           //! Pointer to module 
53   TLorentzVector fCurrentV;      //! Current hit postition 
54   TLorentzVector fCurrentP;      //! Current hit momentum
55   TArrayI        fActiveId;      //! Active volume ID's
56   Int_t          fCurrentPdg;    //! Current hit particle code 
57   Double_t       fCurrentDeltaE; //! Current hit energy loss
58   
59   Bool_t         IsActive(Int_t volId) const;
60   Bool_t         VMC2FMD(Int_t copy, TLorentzVector& v,
61                          UShort_t& detector, Char_t& ring,
62                          UShort_t& sector, UShort_t& stripe);
63   Bool_t         VMC2FMD(TLorentzVector& v, UShort_t& detector,
64                          Char_t& ring, UShort_t& sector, UShort_t& strip);
65
66   static const Char_t* fgkActiveName;   // Name of Active volumes
67   static const Char_t* fgkSectorName;   // Name of Sector volumes
68   static const Char_t* fgkStripName;    // Name of Strip volumes
69   static const Char_t* fgkModuleName;   // Name of Module volumes
70   static const Char_t* fgkPCBName;      // Name of PCB volumes
71   static const Char_t* fgkLongLegName;  // Name of LongLeg volumes
72   static const Char_t* fgkShortLegName; // Name of ShortLeg volumes
73   static const Char_t* fgkFrontVName;   // Name of Front volumes
74   static const Char_t* fgkBackVName;    // Name of Back volumes
75   static const Char_t* fgkRingName;     // Name of Ring volumes
76   static const Char_t* fgkTopHCName;    // Name of TopHC volumes
77   static const Char_t* fgkBotHCName;    // Name of BotHC volumes
78   static const Char_t* fgkTopIHCName;   // Name of TopIHC volumes
79   static const Char_t* fgkBotIHCName;   // Name of BotIHC volumes
80   static const Char_t* fgkNoseName;     // Name of Nose volumes
81   static const Char_t* fgkBackName;     // Name of Back volumes
82   static const Char_t* fgkBeamName;     // Name of Beam volumes
83   static const Char_t* fgkFlangeName;   // Name of Flange volumes
84   
85   enum {
86     kSiId,                 // ID index of Si medium
87     kAirId,                // ID index of Air medium
88     kPlasticId,            // ID index of Plastic medium
89     kPcbId,                // ID index of PCB medium
90     kSiChipId,             // ID index of Si Chip medium
91     kAlId,                 // ID index of Al medium
92     kCarbonId,             // ID index of Carbon medium
93     kCopperId,             // ID index of Copper Medium
94     kKaptonId              // ID index of Kapton Medium
95   };  
96
97   Bool_t      fDetailed;      // Whether to make a detailed simulation 
98   Bool_t      fUseDivided;    // Divided volumes
99   Bool_t      fUseAssembly;   // Assembly volumes
100   Int_t fSectorOff;        // Sector offset in volume tree 
101   Int_t fModuleOff;        // Module offset in volume tree
102   Int_t fRingOff;          // Ring offset in the volume tree 
103   Int_t fDetectorOff;      // Detector offfset in the volume tree 
104   TObjArray* fBad;         //! List of bad hits
105   
106   ClassDef(AliFMDSimulator,0) // Simulation class for the FMD
107 };
108
109
110
111 #endif
112 //____________________________________________________________________
113 //
114 // Local Variables:
115 //   mode: C++
116 // End:
117 //
118 // EOF
119 //