Line data Source code
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 "TTree.h"
21 : #include "TClonesArray.h"
22 : #include "TGeoGlobalMagField.h"
23 : #include "AliRun.h"
24 : #include "AliLoader.h"
25 : #include "AliDetector.h"
26 : #include "AliMC.h"
27 : #include "AliMagF.h"
28 : #include "AliMFTHit.h"
29 : #include "AliMFTDigit.h"
30 : #include "AliMFTCluster.h"
31 : #include "AliTrackReference.h"
32 : #include "AliMFTSegmentation.h"
33 : #include "AliMFTDigitizer.h"
34 : #include "AliMFTPlane.h"
35 : #include "TString.h"
36 : #include "TObjArray.h"
37 : #include "AliMFTConstants.h"
38 :
39 : //====================================================================================================================================================
40 :
41 : class AliMFT : public AliDetector {
42 :
43 : public:
44 :
45 : AliMFT();
46 : AliMFT(const Char_t *name, const Char_t *title);
47 : AliMFT(const Char_t *name, const Char_t *title, Char_t *nameGeomFile);
48 :
49 : virtual ~AliMFT();
50 :
51 0 : Int_t IsVersion() const { return fVersion; }
52 :
53 : // ------- framework part -----------------------------------------------------------------------------------
54 : void CreateMaterials(); // from AliModule invoked from AliMC
55 : void CreateGeometry(); // from AliModule invoked from AliMC
56 : void AddAlignableVolumes();
57 : void StepManager(); // from AliModule invoked from AliMC::Stepping()
58 : void Hits2SDigits();
59 : void Hits2SDigitsLocal(TClonesArray *hits, const TObjArray *pSDig, Int_t track);
60 : void MakeBranch(Option_t *option="");
61 : void SetTreeAddress();
62 :
63 : // ------- create containers -----------------------------------------------------------------------------------
64 : void CreateHits();
65 : void CreateSDigits();
66 : void CreateDigits();
67 : void CreateRecPoints();
68 :
69 0 : TObjArray* GetSDigitsList() const { return fSDigitsPerPlane; } // get sdigits list for all planes
70 0 : TClonesArray* GetSDigitsList(Int_t plane) const { return fSDigitsPerPlane ? (TClonesArray*) fSDigitsPerPlane->At(plane):0; }
71 :
72 0 : TObjArray* GetDigitsList() const{return fDigitsPerPlane;} // get digits list for all layers
73 0 : TClonesArray* GetDigitsList(Int_t plane) const{return fDigitsPerPlane ? (TClonesArray*) fDigitsPerPlane->At(plane):0; }
74 :
75 0 : TObjArray* GetRecPointsList() const{return fRecPointsPerPlane;} // get cluster list for all layers
76 0 : TClonesArray* GetRecPointsList(Int_t plane) const{return fRecPointsPerPlane ? (TClonesArray*) fRecPointsPerPlane->At(plane):0; }
77 :
78 0 : void ResetSDigits() { if(fSDigitsPerPlane) for(int iPlane=0; iPlane<AliMFTConstants::kNDisks; iPlane++) ((TClonesArray*) fSDigitsPerPlane ->At(iPlane))->Clear(); } // reset sdigits list
79 0 : void ResetDigits() { if(fDigitsPerPlane) for(int iPlane=0; iPlane<AliMFTConstants::kNDisks; iPlane++) ((TClonesArray*) fDigitsPerPlane ->At(iPlane))->Clear(); } // reset digits list
80 0 : void ResetRecPoints() { if(fRecPointsPerPlane) for(int iPlane=0; iPlane<AliMFTConstants::kNDisks; iPlane++) ((TClonesArray*) fRecPointsPerPlane->At(iPlane))->Clear(); } // reset recPoints list
81 :
82 0 : AliDigitizer* CreateDigitizer(AliDigitizationInput *digInp) const { return new AliMFTDigitizer(digInp); }
83 :
84 0 : AliMFTSegmentation* GetSegmentation() const { return fSegmentation; }
85 :
86 : enum EMedia{kZero,kAir, kVacuum, kSi, kReadout, kSupport, kCarbon, kBe, kAlu, kWater, kSiO2, kInox, kKapton, kEpoxy, kCarbonFiber, kCarbonEpoxy, kRohacell, kPolyimide, kPEEK, kFR4, kCu, kX7R, kX7Rw}; // media IDs used in CreateMaterials
87 :
88 : // Geometry/segmentation creation part
89 0 : void AddAlignableVolumes() const { /* not needed */ return; }
90 : void SetGeometry();
91 :
92 0 : Int_t GetNPlanes() const { return fNPlanes; }
93 :
94 0 : void SetChargeDispersion(Double_t chargeDispersion) { fChargeDispersion = chargeDispersion; }
95 0 : Double_t GetChargeDispersion() { return fChargeDispersion; }
96 0 : void SetNStepForChargeDispersion(Int_t nStepForChargeDispersion) { fNStepForChargeDispersion = nStepForChargeDispersion; }
97 0 : Int_t GetNStepForChargeDispersion() { return fNStepForChargeDispersion; }
98 0 : Double_t GetSingleStepForChargeDispersion() { return fSingleStepForChargeDispersion; }
99 :
100 0 : void SetDensitySupportOverSi(Double_t density) { if (density>1e-6) fDensitySupportOverSi=density; else fDensitySupportOverSi=1e-6; }
101 :
102 : //--------- for underlying and pile-up events --------------------
103 :
104 0 : void SetFileNameForUnderlyingEvent(TString fileName) { if (fileName.EndsWith("MFT.RecPoints.root")) fFileNameForUnderyingEvent += fileName; }
105 0 : void SetFileNameForPileUpEvents(TString fileName) { if (fileName.EndsWith("MFT.RecPoints.root")) fFileNameForPileUpEvents += fileName; }
106 :
107 0 : void SetUnderlyingEventID(Short_t eventID) { fUnderlyingEventID = eventID; }
108 0 : void SetPileUpEventID(Short_t i, Short_t eventID) { if (i>=0 && i<AliMFTConstants::fNMaxPileUpEvents) fPileUpEventsIDs[i] = eventID; }
109 :
110 0 : const Char_t* GetFileNameForUnderlyingEvent() { return fFileNameForUnderyingEvent; }
111 0 : const Char_t* GetFileNameForPileUpEvents() { return fFileNameForPileUpEvents; }
112 0 : Short_t GetUnderlyingEventID() { return fUnderlyingEventID; }
113 0 : Short_t GetPileUpEventID(Short_t i) { if (i>=0 && i<AliMFTConstants::fNMaxPileUpEvents) return fPileUpEventsIDs[i]; else return -1; }
114 :
115 : protected:
116 :
117 : static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
118 :
119 : Int_t fVersion;
120 :
121 : Int_t fNPlanes; // # of MFT planes
122 :
123 : TObjArray *fSDigitsPerPlane; // ![fNPlanes] list of sdigits [per plane]
124 : TObjArray *fDigitsPerPlane; // ![fNPlanes] list of digits [per plane]
125 : TObjArray *fRecPointsPerPlane; // ![fNPlanes] list of recPoints [per plane]
126 : TClonesArray *fSideDigits; // ! list of digits fired by the charge dispersion coming from the main hit
127 :
128 : AliMFTSegmentation *fSegmentation;
129 :
130 : TString fNameGeomFile;
131 :
132 : Double_t fChargeDispersion;
133 : Double_t fSingleStepForChargeDispersion;
134 : Int_t fNStepForChargeDispersion;
135 :
136 : Double_t fDensitySupportOverSi;
137 :
138 : TString fFileNameForUnderyingEvent, fFileNameForPileUpEvents;
139 : Short_t fNPileUpEvents, fUnderlyingEventID, fPileUpEventsIDs[AliMFTConstants::fNMaxPileUpEvents];
140 :
141 : private:
142 :
143 : AliMFT (const AliMFT& mft); // dummy copy constructor
144 : AliMFT &operator=(const AliMFT& mft); // dummy assignment operator
145 :
146 12 : ClassDef(AliMFT,2)
147 :
148 : };
149 :
150 : //====================================================================================================================================================
151 :
152 : #endif
153 :
|