AliRoot Core  edcc906 (edcc906)
AliMFT.h
Go to the documentation of this file.
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 #include "AliMFTGeomTGeo.h"
39 
40 //====================================================================================================================================================
41 
42 class AliMFT : public AliDetector {
43 
44 public:
45 
46  AliMFT();
47  AliMFT(const Char_t *name, const Char_t *title);
48  AliMFT(const Char_t *name, const Char_t *title, Char_t *nameGeomFile);
49 
50  virtual ~AliMFT();
51 
52  Int_t IsVersion() const { return fVersion; }
53 
54  // ------- framework part -----------------------------------------------------------------------------------
55  void CreateMaterials(); // from AliModule invoked from AliMC
56  void CreateGeometry(); // from AliModule invoked from AliMC
57  void AddAlignableVolumes();
58  void StepManager(); // from AliModule invoked from AliMC::Stepping()
59  void Hits2SDigits();
60  void Hits2SDigitsLocal(TClonesArray *hits, const TObjArray *pSDig, Int_t track);
61  void MakeBranch(Option_t *option="");
62  void SetTreeAddress();
63 
64  // ------- create containers -----------------------------------------------------------------------------------
65  void CreateHits();
66  void CreateSDigits();
67  void CreateDigits();
68  void CreateRecPoints();
69 
70  TObjArray* GetSDigitsList() const { return fSDigitsPerPlane; } // get sdigits list for all planes
71  TClonesArray* GetSDigitsList(Int_t plane) const { return fSDigitsPerPlane ? (TClonesArray*) fSDigitsPerPlane->At(plane):0; }
72 
73  TObjArray* GetDigitsList() const{return fDigitsPerPlane;} // get digits list for all layers
74  TClonesArray* GetDigitsList(Int_t plane) const{return fDigitsPerPlane ? (TClonesArray*) fDigitsPerPlane->At(plane):0; }
75 
76  TObjArray* GetRecPointsList() const{return fRecPointsPerPlane;} // get cluster list for all layers
77  TClonesArray* GetRecPointsList(Int_t plane) const{return fRecPointsPerPlane ? (TClonesArray*) fRecPointsPerPlane->At(plane):0; }
78 
79  void ResetSDigits() { if(fSDigitsPerPlane) for(int iPlane=0; iPlane<AliMFTConstants::kNDisks; iPlane++) ((TClonesArray*) fSDigitsPerPlane ->At(iPlane))->Clear(); } // reset sdigits list
80  void ResetDigits() { if(fDigitsPerPlane) for(int iPlane=0; iPlane<AliMFTConstants::kNDisks; iPlane++) ((TClonesArray*) fDigitsPerPlane ->At(iPlane))->Clear(); } // reset digits list
81  void ResetRecPoints() { if(fRecPointsPerPlane) for(int iPlane=0; iPlane<AliMFTConstants::kNDisks; iPlane++) ((TClonesArray*) fRecPointsPerPlane->At(iPlane))->Clear(); } // reset recPoints list
82 
83  AliDigitizer* CreateDigitizer(AliDigitizationInput *digInp) const { return new AliMFTDigitizer(digInp); }
84 
86 
88 
89  // Geometry/segmentation creation part
90  void AddAlignableVolumes() const { /* not needed */ return; }
91  void SetGeometry();
92 
93  Int_t GetNPlanes() const { return fNPlanes; }
94 
95  void SetChargeDispersion(Double_t chargeDispersion) { fChargeDispersion = chargeDispersion; }
96  Double_t GetChargeDispersion() { return fChargeDispersion; }
97  void SetNStepForChargeDispersion(Int_t nStepForChargeDispersion) { fNStepForChargeDispersion = nStepForChargeDispersion; }
100 
101  void SetDensitySupportOverSi(Double_t density) { if (density>1e-6) fDensitySupportOverSi=density; else fDensitySupportOverSi=1e-6; }
102 
103  //--------- for underlying and pile-up events --------------------
104 
105  void SetFileNameForUnderlyingEvent(TString fileName) { if (fileName.EndsWith("MFT.RecPoints.root")) fFileNameForUnderyingEvent += fileName; }
106  void SetFileNameForPileUpEvents(TString fileName) { if (fileName.EndsWith("MFT.RecPoints.root")) fFileNameForPileUpEvents += fileName; }
107 
108  void SetUnderlyingEventID(Short_t eventID) { fUnderlyingEventID = eventID; }
109  void SetPileUpEventID(Short_t i, Short_t eventID) { if (i>=0 && i<AliMFTConstants::fNMaxPileUpEvents) fPileUpEventsIDs[i] = eventID; }
110 
114  Short_t GetPileUpEventID(Short_t i) { if (i>=0 && i<AliMFTConstants::fNMaxPileUpEvents) return fPileUpEventsIDs[i]; else return -1; }
115 
117  virtual void Init();
118 
119 protected:
120 
121  static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
122 
123  Int_t fVersion;
124 
125  Int_t fNPlanes; // # of MFT planes
126 
127  TObjArray *fSDigitsPerPlane; // ![fNPlanes] list of sdigits [per plane]
128  TObjArray *fDigitsPerPlane; // ![fNPlanes] list of digits [per plane]
129  TObjArray *fRecPointsPerPlane; // ![fNPlanes] list of recPoints [per plane]
130  TClonesArray *fSideDigits; // ! list of digits fired by the charge dispersion coming from the main hit
131 
133 
134  TString fNameGeomFile;
135 
139 
141 
144 
145  AliMFTGeomTGeo* fGeomTGeo; // access to geometry details
146 
147 private:
148 
149  AliMFT (const AliMFT& mft); // dummy copy constructor
150  AliMFT &operator=(const AliMFT& mft); // dummy assignment operator
151 
152  ClassDef(AliMFT,3)
153 
154 };
155 
156 //====================================================================================================================================================
157 
158 #endif
159 
static const Int_t fNMaxPlanes
Definition: AliMFT.h:121
Int_t fVersion
Definition: AliMFT.h:123
Double_t fDensitySupportOverSi
Definition: AliMFT.h:140
Double_t fSingleStepForChargeDispersion
Definition: AliMFT.h:137
void CreateMaterials()
Definition: AliMFT.cxx:166
TObjArray * GetRecPointsList() const
Definition: AliMFT.h:76
TObjArray * GetSDigitsList() const
Definition: AliMFT.h:70
TString fFileNameForPileUpEvents
Definition: AliMFT.h:142
Int_t GetNPlanes() const
Definition: AliMFT.h:93
void SetUnderlyingEventID(Short_t eventID)
Definition: AliMFT.h:108
Int_t GetNStepForChargeDispersion()
Definition: AliMFT.h:98
#define TObjArray
Short_t fUnderlyingEventID
Definition: AliMFT.h:143
AliMFT & operator=(const AliMFT &mft)
Definition: AliMFT.h:42
void SetTreeAddress()
Definition: AliMFT.cxx:703
const Char_t * GetFileNameForUnderlyingEvent()
Definition: AliMFT.h:111
void AddAlignableVolumes()
Definition: AliMFT.cxx:414
void SetNStepForChargeDispersion(Int_t nStepForChargeDispersion)
Definition: AliMFT.h:97
TObjArray * GetDigitsList() const
Definition: AliMFT.h:73
Short_t GetUnderlyingEventID()
Definition: AliMFT.h:113
void StepManager()
Definition: AliMFT.cxx:431
void ResetSDigits()
Definition: AliMFT.h:79
static const Int_t fNMaxPlanes
AliMFTSegmentation * GetSegmentation() const
Definition: AliMFT.h:85
void Hits2SDigitsLocal(TClonesArray *hits, const TObjArray *pSDig, Int_t track)
Definition: AliMFT.cxx:560
AliTPCfastTrack * track
TClonesArray * GetSDigitsList(Int_t plane) const
Definition: AliMFT.h:71
Double_t fChargeDispersion
Definition: AliMFT.h:136
void SetPileUpEventID(Short_t i, Short_t eventID)
Definition: AliMFT.h:109
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
TString fNameGeomFile
Definition: AliMFT.h:134
void SetFileNameForUnderlyingEvent(TString fileName)
Definition: AliMFT.h:105
Short_t fPileUpEventsIDs[AliMFTConstants::fNMaxPileUpEvents]
Definition: AliMFT.h:143
void CreateDigits()
Definition: AliMFT.cxx:788
AliMFTGeomTGeo * GetGeomTGeo() const
Definition: AliMFT.h:116
EMedia
Definition: AliMFT.h:87
TClonesArray * GetDigitsList(Int_t plane) const
Definition: AliMFT.h:74
AliMFT()
Definition: AliMFT.cxx:55
virtual void Init()
Definition: AliMFT.cxx:158
void Clear()
Add comment.
AliMFTSegmentation * fSegmentation
Definition: AliMFT.h:132
Int_t fNStepForChargeDispersion
Definition: AliMFT.h:138
void CreateHits()
Definition: AliMFT.cxx:759
void CreateSDigits()
Definition: AliMFT.cxx:772
void AddAlignableVolumes() const
Definition: AliMFT.h:90
TClonesArray * fSideDigits
Definition: AliMFT.h:130
TObjArray * fDigitsPerPlane
Definition: AliMFT.h:128
AliDigitizer * CreateDigitizer(AliDigitizationInput *digInp) const
Definition: AliMFT.h:83
Int_t fNPlanes
Definition: AliMFT.h:125
TClonesArray * GetRecPointsList(Int_t plane) const
Definition: AliMFT.h:77
void ResetDigits()
Definition: AliMFT.h:80
void CreateRecPoints()
Definition: AliMFT.cxx:802
void SetFileNameForPileUpEvents(TString fileName)
Definition: AliMFT.h:106
TString fFileNameForUnderyingEvent
Definition: AliMFT.h:142
Class for the virtual segmentation of the ALICE Muon Forward Tracker.
Short_t fNPileUpEvents
Definition: AliMFT.h:143
static const Int_t fNMaxPileUpEvents
TObjArray * fSDigitsPerPlane
Definition: AliMFT.h:127
AliMFTGeomTGeo * fGeomTGeo
Definition: AliMFT.h:145
void Hits2SDigits()
Definition: AliMFT.cxx:515
void SetChargeDispersion(Double_t chargeDispersion)
Definition: AliMFT.h:95
void SetGeometry()
Definition: AliMFT.cxx:745
const Char_t * GetFileNameForPileUpEvents()
Definition: AliMFT.h:112
Double_t GetChargeDispersion()
Definition: AliMFT.h:96
static const Int_t kNDisks
Number of Disk.
virtual ~AliMFT()
Definition: AliMFT.cxx:146
void ResetRecPoints()
Definition: AliMFT.h:81
void MakeBranch(Option_t *option="")
Definition: AliMFT.cxx:665
void SetDensitySupportOverSi(Double_t density)
Definition: AliMFT.h:101
Int_t IsVersion() const
Definition: AliMFT.h:52
Short_t GetPileUpEventID(Short_t i)
Definition: AliMFT.h:114
void CreateGeometry()
Definition: AliMFT.cxx:396
Double_t GetSingleStepForChargeDispersion()
Definition: AliMFT.h:99
TObjArray * fRecPointsPerPlane
Definition: AliMFT.h:129