]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MFT/AliMFT.h
Analysis code for the MFT updated
[u/mrichter/AliRoot.git] / MFT / AliMFT.h
CommitLineData
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
40class AliMFT : public AliDetector {
41
42public:
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
a2b7dc2a 54 void CreateGeometry(); // from AliModule invoked from AliMC
55 void AddAlignableVolumes();
820b4d9e 56 void StepManager(); // from AliModule invoked from AliMC::Stepping()
57 void Hits2SDigits();
58 void Hits2SDigitsLocal(TClonesArray *hits, const TObjArray *pSDig, Int_t track);
59 void MakeBranch(Option_t *option="");
60 void SetTreeAddress();
61
62 // ------- create containers -----------------------------------------------------------------------------------
63 void CreateHits();
64 void CreateSDigits();
65 void CreateDigits();
66 void CreateRecPoints();
67
d4643a10 68 TObjArray* GetSDigitsList() const { return fSDigitsPerPlane; } // get sdigits list for all planes
69 TClonesArray* GetSDigitsList(Int_t plane) const { return fSDigitsPerPlane ? (TClonesArray*) fSDigitsPerPlane->At(plane):0; }
820b4d9e 70
d4643a10 71 TObjArray* GetDigitsList() const{return fDigitsPerPlane;} // get digits list for all layers
72 TClonesArray* GetDigitsList(Int_t plane) const{return fDigitsPerPlane ? (TClonesArray*) fDigitsPerPlane->At(plane):0; }
820b4d9e 73
d4643a10 74 TObjArray* GetRecPointsList() const{return fRecPointsPerPlane;} // get cluster list for all layers
75 TClonesArray* GetRecPointsList(Int_t plane) const{return fRecPointsPerPlane ? (TClonesArray*) fRecPointsPerPlane->At(plane):0; }
820b4d9e 76
77 void ResetSDigits() { if(fSDigitsPerPlane) for(int iPlane=0; iPlane<fNPlanes; iPlane++) ((TClonesArray*) fSDigitsPerPlane ->At(iPlane))->Clear(); } // reset sdigits list
78 void ResetDigits() { if(fDigitsPerPlane) for(int iPlane=0; iPlane<fNPlanes; iPlane++) ((TClonesArray*) fDigitsPerPlane ->At(iPlane))->Clear(); } // reset digits list
79 void ResetRecPoints() { if(fRecPointsPerPlane) for(int iPlane=0; iPlane<fNPlanes; iPlane++) ((TClonesArray*) fRecPointsPerPlane->At(iPlane))->Clear(); } // reset recPoints list
80
d4643a10 81 AliDigitizer* CreateDigitizer(AliDigitizationInput *digInp) const { return new AliMFTDigitizer(digInp); }
820b4d9e 82
83 AliMFTSegmentation* GetSegmentation() const { return fSegmentation; }
84
026547c6 85 enum EMedia{kAir, kSi, kReadout, kSupport, kCarbon, kAlu, kWater, kSiO2, kInox}; // media IDs used in CreateMaterials
820b4d9e 86
87 // Geometry/segmentation creation part
88 TGeoVolumeAssembly* CreateVol();
89 void AddAlignableVolumes() const { /* not needed */ return; }
90 void SetGeometry();
91
92 void SetNSlices(Int_t nSlices) { fNSlices = nSlices; }
93 Int_t GetNSlices() const { return fNSlices; }
94
95 Int_t GetNPlanes() const { return fNPlanes; }
96
97 void SetChargeDispersion(Double_t chargeDispersion) { fChargeDispersion = chargeDispersion; }
98 Double_t GetChargeDispersion() { return fChargeDispersion; }
99 void SetNStepForChargeDispersion(Int_t nStepForChargeDispersion) { fNStepForChargeDispersion = nStepForChargeDispersion; }
100 Int_t GetNStepForChargeDispersion() { return fNStepForChargeDispersion; }
101 Double_t GetSingleStepForChargeDispersion() { return fSingleStepForChargeDispersion; }
102
d4643a10 103 void SetDensitySupportOverSi(Double_t density) { if (density>1e-6) fDensitySupportOverSi=density; else fDensitySupportOverSi=1e-6; }
820b4d9e 104
7bafb008 105 //--------- for underlying and pile-up events --------------------
106
ed68e08f 107 void SetFileNameForUnderlyingEvent(TString fileName) { if (fileName.EndsWith("MFT.RecPoints.root")) fFileNameForUnderyingEvent += fileName; }
108 void SetFileNameForPileUpEvents(TString fileName) { if (fileName.EndsWith("MFT.RecPoints.root")) fFileNameForPileUpEvents += fileName; }
7bafb008 109
110 void SetUnderlyingEventID(Short_t eventID) { fUnderlyingEventID = eventID; }
111 void SetPileUpEventID(Short_t i, Short_t eventID) { if (i>=0 && i<AliMFTConstants::fNMaxPileUpEvents) fPileUpEventsIDs[i] = eventID; }
112
113 const Char_t* GetFileNameForUnderlyingEvent() { return fFileNameForUnderyingEvent; }
114 const Char_t* GetFileNameForPileUpEvents() { return fFileNameForPileUpEvents; }
115 Short_t GetUnderlyingEventID() { return fUnderlyingEventID; }
116 Short_t GetPileUpEventID(Short_t i) { if (i>=0 && i<AliMFTConstants::fNMaxPileUpEvents) return fPileUpEventsIDs[i]; else return -1; }
117
820b4d9e 118protected:
119
d4643a10 120 static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
820b4d9e 121
122 Int_t fVersion;
123
124 Int_t fNPlanes; // # of MFT planes
125 Int_t fNSlices; // # of slices per MFT plane
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
132 AliMFTSegmentation *fSegmentation;
133
134 TString fNameGeomFile;
135
136 Double_t fChargeDispersion;
137 Double_t fSingleStepForChargeDispersion;
138 Int_t fNStepForChargeDispersion;
139
d4643a10 140 Double_t fDensitySupportOverSi;
7bafb008 141
142 TString fFileNameForUnderyingEvent, fFileNameForPileUpEvents;
143 Short_t fNPileUpEvents, fUnderlyingEventID, fPileUpEventsIDs[AliMFTConstants::fNMaxPileUpEvents];
820b4d9e 144
145private:
146
147 AliMFT (const AliMFT& mft); // dummy copy constructor
148 AliMFT &operator=(const AliMFT& mft); // dummy assignment operator
149
7bafb008 150 ClassDef(AliMFT,2)
820b4d9e 151
152};
153
154//====================================================================================================================================================
155
156#endif
157