]>
Commit | Line | Data |
---|---|---|
820b4d9e | 1 | #ifndef AliMFT_H |
2 | #define AliMFT_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //==================================================================================================================================================== | |
8 | // | |
9 | // Geometry of the Muon Forward Tracker based on TGeo | |
10 | // | |
11 | // Contact author: antonio.uras@cern.ch | |
12 | // | |
13 | //==================================================================================================================================================== | |
14 | ||
15 | #include "TFile.h" | |
16 | #include "TGeoManager.h" | |
17 | #include "TGeoVolume.h" | |
18 | #include "TGeoMatrix.h" | |
19 | #include "TVirtualMC.h" | |
20 | #include "TClonesArray.h" | |
21 | #include "TGeoGlobalMagField.h" | |
22 | #include "AliRun.h" | |
23 | #include "AliLoader.h" | |
24 | #include "AliDetector.h" | |
25 | #include "AliMC.h" | |
26 | #include "AliMagF.h" | |
820b4d9e | 27 | #include "AliMFTHit.h" |
28 | #include "AliMFTDigit.h" | |
29 | #include "AliMFTCluster.h" | |
30 | #include "AliTrackReference.h" | |
31 | #include "AliMFTSegmentation.h" | |
32 | #include "AliMFTDigitizer.h" | |
33 | #include "AliMFTPlane.h" | |
34 | #include "TString.h" | |
35 | #include "TObjArray.h" | |
d4643a10 | 36 | #include "AliMFTConstants.h" |
820b4d9e | 37 | |
38 | //==================================================================================================================================================== | |
39 | ||
40 | class AliMFT : public AliDetector { | |
41 | ||
42 | public: | |
43 | ||
44 | AliMFT(); | |
45 | AliMFT(const Char_t *name, const Char_t *title); | |
46 | AliMFT(const Char_t *name, const Char_t *title, Char_t *nameGeomFile); | |
47 | ||
48 | virtual ~AliMFT(); | |
49 | ||
50 | Int_t IsVersion() const { return fVersion; } | |
51 | ||
52 | // ------- framework part ----------------------------------------------------------------------------------- | |
53 | void CreateMaterials(); // from AliModule invoked from AliMC | |
54 | void CreateGeometry(); // from AliModule invoked from AliMC | |
55 | void StepManager(); // from AliModule invoked from AliMC::Stepping() | |
56 | void Hits2SDigits(); | |
57 | void Hits2SDigitsLocal(TClonesArray *hits, const TObjArray *pSDig, Int_t track); | |
58 | void MakeBranch(Option_t *option=""); | |
59 | void SetTreeAddress(); | |
60 | ||
61 | // ------- create containers ----------------------------------------------------------------------------------- | |
62 | void CreateHits(); | |
63 | void CreateSDigits(); | |
64 | void CreateDigits(); | |
65 | void CreateRecPoints(); | |
66 | ||
d4643a10 | 67 | TObjArray* GetSDigitsList() const { return fSDigitsPerPlane; } // get sdigits list for all planes |
68 | TClonesArray* GetSDigitsList(Int_t plane) const { return fSDigitsPerPlane ? (TClonesArray*) fSDigitsPerPlane->At(plane):0; } | |
820b4d9e | 69 | |
d4643a10 | 70 | TObjArray* GetDigitsList() const{return fDigitsPerPlane;} // get digits list for all layers |
71 | TClonesArray* GetDigitsList(Int_t plane) const{return fDigitsPerPlane ? (TClonesArray*) fDigitsPerPlane->At(plane):0; } | |
820b4d9e | 72 | |
d4643a10 | 73 | TObjArray* GetRecPointsList() const{return fRecPointsPerPlane;} // get cluster list for all layers |
74 | TClonesArray* GetRecPointsList(Int_t plane) const{return fRecPointsPerPlane ? (TClonesArray*) fRecPointsPerPlane->At(plane):0; } | |
820b4d9e | 75 | |
76 | void ResetSDigits() { if(fSDigitsPerPlane) for(int iPlane=0; iPlane<fNPlanes; iPlane++) ((TClonesArray*) fSDigitsPerPlane ->At(iPlane))->Clear(); } // reset sdigits list | |
77 | void ResetDigits() { if(fDigitsPerPlane) for(int iPlane=0; iPlane<fNPlanes; iPlane++) ((TClonesArray*) fDigitsPerPlane ->At(iPlane))->Clear(); } // reset digits list | |
78 | void ResetRecPoints() { if(fRecPointsPerPlane) for(int iPlane=0; iPlane<fNPlanes; iPlane++) ((TClonesArray*) fRecPointsPerPlane->At(iPlane))->Clear(); } // reset recPoints list | |
79 | ||
d4643a10 | 80 | AliDigitizer* CreateDigitizer(AliDigitizationInput *digInp) const { return new AliMFTDigitizer(digInp); } |
820b4d9e | 81 | |
82 | AliMFTSegmentation* GetSegmentation() const { return fSegmentation; } | |
83 | ||
84 | enum EMedia{kAir, kSi, kReadout, kSupport}; // media IDs used in CreateMaterials | |
85 | ||
86 | // Geometry/segmentation creation part | |
87 | TGeoVolumeAssembly* CreateVol(); | |
88 | void AddAlignableVolumes() const { /* not needed */ return; } | |
89 | void SetGeometry(); | |
90 | ||
91 | void SetNSlices(Int_t nSlices) { fNSlices = nSlices; } | |
92 | Int_t GetNSlices() const { return fNSlices; } | |
93 | ||
94 | Int_t GetNPlanes() const { return fNPlanes; } | |
95 | ||
96 | void SetChargeDispersion(Double_t chargeDispersion) { fChargeDispersion = chargeDispersion; } | |
97 | Double_t GetChargeDispersion() { return fChargeDispersion; } | |
98 | void SetNStepForChargeDispersion(Int_t nStepForChargeDispersion) { fNStepForChargeDispersion = nStepForChargeDispersion; } | |
99 | Int_t GetNStepForChargeDispersion() { return fNStepForChargeDispersion; } | |
100 | Double_t GetSingleStepForChargeDispersion() { return fSingleStepForChargeDispersion; } | |
101 | ||
d4643a10 | 102 | void SetDensitySupportOverSi(Double_t density) { if (density>1e-6) fDensitySupportOverSi=density; else fDensitySupportOverSi=1e-6; } |
820b4d9e | 103 | |
104 | protected: | |
105 | ||
d4643a10 | 106 | static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes |
820b4d9e | 107 | |
108 | Int_t fVersion; | |
109 | ||
110 | Int_t fNPlanes; // # of MFT planes | |
111 | Int_t fNSlices; // # of slices per MFT plane | |
112 | ||
113 | TObjArray *fSDigitsPerPlane; // ![fNPlanes] list of sdigits [per plane] | |
114 | TObjArray *fDigitsPerPlane; // ![fNPlanes] list of digits [per plane] | |
115 | TObjArray *fRecPointsPerPlane; // ![fNPlanes] list of recPoints [per plane] | |
116 | TClonesArray *fSideDigits; // ! list of digits fired by the charge dispersion coming from the main hit | |
117 | ||
118 | AliMFTSegmentation *fSegmentation; | |
119 | ||
120 | TString fNameGeomFile; | |
121 | ||
122 | Double_t fChargeDispersion; | |
123 | Double_t fSingleStepForChargeDispersion; | |
124 | Int_t fNStepForChargeDispersion; | |
125 | ||
d4643a10 | 126 | Double_t fDensitySupportOverSi; |
820b4d9e | 127 | |
128 | private: | |
129 | ||
130 | AliMFT (const AliMFT& mft); // dummy copy constructor | |
131 | AliMFT &operator=(const AliMFT& mft); // dummy assignment operator | |
132 | ||
133 | ClassDef(AliMFT,1) | |
134 | ||
135 | }; | |
136 | ||
137 | //==================================================================================================================================================== | |
138 | ||
139 | #endif | |
140 |