4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //====================================================================================================================================================
9 // Geometry of the Muon Forward Tracker based on TGeo
11 // Contact author: antonio.uras@cern.ch
13 //====================================================================================================================================================
16 #include "TGeoManager.h"
17 #include "TGeoVolume.h"
18 #include "TGeoMatrix.h"
19 #include "TVirtualMC.h"
20 #include "TClonesArray.h"
21 #include "TGeoGlobalMagField.h"
23 #include "AliLoader.h"
24 #include "AliDetector.h"
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"
35 #include "TObjArray.h"
36 #include "AliMFTConstants.h"
38 //====================================================================================================================================================
40 class AliMFT : public AliDetector {
45 AliMFT(const Char_t *name, const Char_t *title);
46 AliMFT(const Char_t *name, const Char_t *title, Char_t *nameGeomFile);
50 Int_t IsVersion() const { return fVersion; }
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()
57 void Hits2SDigitsLocal(TClonesArray *hits, const TObjArray *pSDig, Int_t track);
58 void MakeBranch(Option_t *option="");
59 void SetTreeAddress();
61 // ------- create containers -----------------------------------------------------------------------------------
65 void CreateRecPoints();
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; }
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; }
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; }
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
80 AliDigitizer* CreateDigitizer(AliDigitizationInput *digInp) const { return new AliMFTDigitizer(digInp); }
82 AliMFTSegmentation* GetSegmentation() const { return fSegmentation; }
84 enum EMedia{kAir, kSi, kReadout, kSupport}; // media IDs used in CreateMaterials
86 // Geometry/segmentation creation part
87 TGeoVolumeAssembly* CreateVol();
88 void AddAlignableVolumes() const { /* not needed */ return; }
91 void SetNSlices(Int_t nSlices) { fNSlices = nSlices; }
92 Int_t GetNSlices() const { return fNSlices; }
94 Int_t GetNPlanes() const { return fNPlanes; }
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; }
102 void SetDensitySupportOverSi(Double_t density) { if (density>1e-6) fDensitySupportOverSi=density; else fDensitySupportOverSi=1e-6; }
106 static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
110 Int_t fNPlanes; // # of MFT planes
111 Int_t fNSlices; // # of slices per MFT plane
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
118 AliMFTSegmentation *fSegmentation;
120 TString fNameGeomFile;
122 Double_t fChargeDispersion;
123 Double_t fSingleStepForChargeDispersion;
124 Int_t fNStepForChargeDispersion;
126 Double_t fDensitySupportOverSi;
130 AliMFT (const AliMFT& mft); // dummy copy constructor
131 AliMFT &operator=(const AliMFT& mft); // dummy assignment operator
137 //====================================================================================================================================================