recover the detector tag int and not the string from the AOD particle
[u/mrichter/AliRoot.git] / MUON / AliMUON.h
CommitLineData
a9e2aefa 1#ifndef ALIMUON_H
2#define ALIMUON_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
4069c48e 7// Revision of includes 12/01/2009
3da30618 8
8f286c40 9/// \ingroup sim
692de412 10/// \class AliMUON
585d648a 11/// \brief AliDetector class for MUON subsystem providing
12/// simulation data management
13
30178c30 14
fe4da5cc 15#include "AliDetector.h"
ce3f5e87 16#include "AliMUONChamber.h"
3b2353d8 17#include "AliMUONTrigger.h"
a9e2aefa 18
5ee595ac 19#include <TString.h>
e8d02863 20
a9e2aefa 21class AliMUONResponse;
504d0837 22class AliMUONGeometry;
23class AliMUONGeometryTransformer;
d4bb94a1 24class AliMUONGeometryBuilder;
d5609cfc 25class AliMUONRawWriter;
d1cd2474 26class AliMUONVGeometryBuilder;
241560c2 27class AliMUONDigitMaker;
7435e1f8 28class AliMUONVHitStore;
92c23b09 29class AliMUONCalibrationData;
5d950f54 30class AliMUONDigitCalibrator;
05315e71 31class AliMUONRecoParam;
1cae9436 32
4069c48e 33class AliLoader;
34
35class TObjArray;
36
30178c30 37class AliMUON : public AliDetector
38{
39 public:
fe4da5cc 40 AliMUON();
9bf406e1 41 AliMUON(const char* name, const char* title);
d5609cfc 42 virtual ~AliMUON();
ce3f5e87 43
504d0837 44 // Geometry
d5609cfc 45 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
46 void ResetGeometryBuilder();
47
504d0837 48
16f2a7f8 49 /// Return geometry builder
504d0837 50 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
51 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
16f2a7f8 52 /// Return segmentation
3fa6cfdd 53
ce3f5e87 54 // MUONLoader definition
3fa6cfdd 55 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
16f2a7f8 56
16f2a7f8 57 virtual void SetTreeAddress();
7435e1f8 58
59 /// Set split level for making branches in outfiles
16f2a7f8 60 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 61
a9e2aefa 62 // Digitisation
f21fc003 63 virtual AliDigitizer* CreateDigitizer(AliDigitizationInput* digInput) const;
2ab0c725 64 virtual void SDigits2Digits();
d1775029 65 virtual void Hits2SDigits();
39e39255 66 virtual void Digits2Raw();
241560c2 67 virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
68
3b2353d8 69 // Trigger
16f2a7f8 70 /// Create trigger
3b2353d8 71 virtual AliTriggerDetector* CreateTriggerDetector() const
72 { return new AliMUONTrigger(); }
73
39e39255 74
ce3f5e87 75 // Configuration Methods (per station id)
76 //
ce3f5e87 77 // Set Signal Generation Parameters
a897a37a 78 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
79 virtual void SetChargeSlope(Int_t id, Float_t p1);
80 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 81 virtual void SetMaxAdc(Int_t id, Int_t p1);
504d0837 82 // Set Response Model
7435e1f8 83 virtual void SetResponseModel(Int_t id, const AliMUONResponse& response);
cac2eb58 84
ce3f5e87 85 // Set Stepping Parameters
a897a37a 86 virtual void SetMaxStepGas(Float_t p1);
87 virtual void SetMaxStepAlu(Float_t p1);
88 virtual void SetMaxDestepGas(Float_t p1);
89 virtual void SetMaxDestepAlu(Float_t p1);
ce3f5e87 90
d1cd2474 91 // Get Stepping Parameters
92 virtual Float_t GetMaxStepGas() const;
93 virtual Float_t GetMaxStepAlu() const;
94 virtual Float_t GetMaxDestepGas() const;
95 virtual Float_t GetMaxDestepAlu() const;
883746f3 96
97 // Set alignement option
82d1ac0a 98 virtual void SetAlign(Bool_t align = true);
99 virtual void SetAlign(const TString& fileName, Bool_t align = true);
d631bec8 100
2942f542 101 /// Set flag to inactivate calls to TVirtualMC::GetMC()->SetMaxStep
d631bec8 102 virtual void SetIsMaxStep(Bool_t isMaxStep) { fIsMaxStep = isMaxStep; }
103
16f2a7f8 104 /// Set scaler event for trigger
ced309a5 105 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
106
a3249004 107 /// Set trigger response version
5438eb54 108 virtual void SetTriggerResponseV1(Int_t trigResV1 = 0)
a3249004 109 { fTriggerResponseV1 = trigResV1; }
5438eb54 110 virtual Int_t GetTriggerResponseV1() const;
a3249004 111 /// Set trigger coinc44
e93b11d0 112 virtual void SetTriggerCoinc44(Int_t trigCoinc44 = 0)
a3249004 113 { fTriggerCoinc44 = trigCoinc44; }
e93b11d0 114 virtual Int_t GetTriggerCoinc44() const;
a3249004 115 /// Set trigger chamber efficiency by cells
46c6c631 116 virtual void SetTriggerEffCells(Bool_t trigEffCells = true)
a3249004 117 { fTriggerEffCells = trigEffCells; }
88570609 118 virtual Bool_t GetTriggerEffCells() const;
a3249004 119 /// Set off generation of noisy digits
5c083cba 120 virtual void SetDigitizerWithNoise(Int_t digitizerWithNoise, Double_t nsigmas=4.0)
121 { fDigitizerWithNoise = digitizerWithNoise; fDigitizerNSigmas = nsigmas; }
122
8c0b5e70 123 virtual Int_t GetDigitizerWithNoise() const;
5c083cba 124
125 virtual Double_t GetDigitizerNSigmas() const { return fDigitizerNSigmas; }
126
127 /// Parametrised tail effect in resolution histogram
128 virtual void SetTailEffect(Bool_t isTailEffect) { fIsTailEffect=isTailEffect; }
43d7561d 129
c3305598 130 /// Enable trigger raw2sdigits conversion
131 virtual void SetConvertTrigger(Bool_t convertTrigger = true) { fConvertTrigger = convertTrigger;}
132
133 // Getters
16f2a7f8 134 /// Return reference to Chamber \a id
a9e2aefa 135 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 136 {return *((AliMUONChamber *) (*fChambers)[id]);}
16f2a7f8 137
7435e1f8 138 virtual void MakeBranch(Option_t* opt=" ");
139 virtual void ResetHits();
68585390 140
5ee595ac 141 /// Set digit store class name
142 void SetDigitStoreClassName(const char* classname) { fDigitStoreConcreteClassName = classname; }
143 /// Return digit store class name
144 const TString DigitStoreClassName() const { return fDigitStoreConcreteClassName; }
145
30178c30 146 protected:
c4ee792d 147 /// Not implemented
30178c30 148 AliMUON(const AliMUON& rMUON);
c4ee792d 149 /// Not implemented
a9e2aefa 150 AliMUON& operator = (const AliMUON& rhs);
aa43efee 151
504d0837 152 const AliMUONGeometry* GetGeometry() const;
48b32e42 153
05315e71 154 AliMUONRecoParam* GetRecoParam() const;
155
18b6b8c7 156 Int_t fNCh; ///< Number of chambers
157 Int_t fNTrackingCh; ///< Number of tracking chambers*
18b6b8c7 158 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
159 TObjArray* fChambers; ///< List of Tracking Chambers
18b6b8c7 160 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
ce3f5e87 161
162 //
43d7561d 163 Bool_t fAccCut; ///< Transport acceptance cut
164 Float_t fAccMin; ///< Minimum acceptance cut used during transport
165 Float_t fAccMax; ///< Minimum acceptance cut used during transport
ce3f5e87 166 //
167 // Stepping Parameters
18b6b8c7 168 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
169 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
170 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
171 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
ce3f5e87 172
173 // Pad Iterator
18b6b8c7 174 Int_t fMaxIterPad; ///< Maximum pad index
175 Int_t fCurIterPad; ///< Current pad index
ced309a5 176
a3249004 177 // Options
2942f542 178 Bool_t fIsMaxStep; ///< Flag to inactivate calls to TVirtualMC::GetMC()->SetMaxStep
18b6b8c7 179 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
5438eb54 180 Int_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1 (for cluster size in MTR)
e93b11d0 181 Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44
afb3ccf0 182 Bool_t fTriggerEffCells; ///< Flag to select TriggerEffCells
43d7561d 183 Int_t fDigitizerWithNoise; ///< Flag to switch on/off generation of noisy digits
5c083cba 184 Double_t fDigitizerNSigmas; ///< nsigma cut for noise generation
43d7561d 185 Bool_t fIsTailEffect; ///< Switch to turn on/off the tail effect
c3305598 186 Bool_t fConvertTrigger; ///< Switch to enable trigger raw2sdigit conversion
92c23b09 187
18b6b8c7 188 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 189
241560c2 190 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
191
7435e1f8 192 AliMUONVHitStore* fHitStore; //!< container of hits
193
5ee595ac 194 TString fDigitStoreConcreteClassName; ///< to be able to select what the sdigitizer uses
195
92c23b09 196 AliMUONCalibrationData* fCalibrationData; ///< pointer of calibration data
08e0c72f 197
05315e71 198 AliMUONDigitCalibrator* fDigitCalibrator; //!< digit calibrator (for raw2sdigits)
5d950f54 199
05315e71 200 ClassDef(AliMUON,25) // MUON Detector base class
a897a37a 201};
fe4da5cc 202#endif
203