bug fixed
[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;
1cae9436 30
4069c48e 31class AliLoader;
32
33class TObjArray;
34
30178c30 35class AliMUON : public AliDetector
36{
37 public:
fe4da5cc 38 AliMUON();
9bf406e1 39 AliMUON(const char* name, const char* title);
d5609cfc 40 virtual ~AliMUON();
ce3f5e87 41
504d0837 42 // Geometry
d5609cfc 43 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
44 void ResetGeometryBuilder();
45
504d0837 46
16f2a7f8 47 /// Return geometry builder
504d0837 48 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
49 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
16f2a7f8 50 /// Return segmentation
3fa6cfdd 51
ce3f5e87 52 // MUONLoader definition
3fa6cfdd 53 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
16f2a7f8 54
16f2a7f8 55 virtual void SetTreeAddress();
7435e1f8 56
57 /// Set split level for making branches in outfiles
16f2a7f8 58 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 59
a9e2aefa 60 // Digitisation
c92eb8ad 61 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 62 virtual void SDigits2Digits();
d1775029 63 virtual void Hits2SDigits();
39e39255 64 virtual void Digits2Raw();
241560c2 65 virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
66
3b2353d8 67 // Trigger
16f2a7f8 68 /// Create trigger
3b2353d8 69 virtual AliTriggerDetector* CreateTriggerDetector() const
70 { return new AliMUONTrigger(); }
71
39e39255 72
ce3f5e87 73 // Configuration Methods (per station id)
74 //
ce3f5e87 75 // Set Signal Generation Parameters
a897a37a 76 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
77 virtual void SetChargeSlope(Int_t id, Float_t p1);
78 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 79 virtual void SetMaxAdc(Int_t id, Int_t p1);
504d0837 80 // Set Response Model
7435e1f8 81 virtual void SetResponseModel(Int_t id, const AliMUONResponse& response);
cac2eb58 82
ce3f5e87 83 // Set Stepping Parameters
a897a37a 84 virtual void SetMaxStepGas(Float_t p1);
85 virtual void SetMaxStepAlu(Float_t p1);
86 virtual void SetMaxDestepGas(Float_t p1);
87 virtual void SetMaxDestepAlu(Float_t p1);
ce3f5e87 88
d1cd2474 89 // Get Stepping Parameters
90 virtual Float_t GetMaxStepGas() const;
91 virtual Float_t GetMaxStepAlu() const;
92 virtual Float_t GetMaxDestepGas() const;
93 virtual Float_t GetMaxDestepAlu() const;
883746f3 94
95 // Set alignement option
82d1ac0a 96 virtual void SetAlign(Bool_t align = true);
97 virtual void SetAlign(const TString& fileName, Bool_t align = true);
d631bec8 98
99 /// Set flag to inactivate calls to gMC->SetMaxStep
100 virtual void SetIsMaxStep(Bool_t isMaxStep) { fIsMaxStep = isMaxStep; }
101
16f2a7f8 102 /// Set scaler event for trigger
ced309a5 103 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
104
a3249004 105 /// Set trigger response version
44b96781 106 virtual void SetTriggerResponseV1(Bool_t trigResV1 = false)
a3249004 107 { fTriggerResponseV1 = trigResV1; }
44b96781 108 virtual Bool_t GetTriggerResponseV1() const;
a3249004 109 /// Set trigger coinc44
e93b11d0 110 virtual void SetTriggerCoinc44(Int_t trigCoinc44 = 0)
a3249004 111 { fTriggerCoinc44 = trigCoinc44; }
e93b11d0 112 virtual Int_t GetTriggerCoinc44() const;
a3249004 113 /// Set trigger chamber efficiency by cells
88570609 114 virtual void SetTriggerEffCells(Bool_t trigEffCells = false)
a3249004 115 { fTriggerEffCells = trigEffCells; }
88570609 116 virtual Bool_t GetTriggerEffCells() const;
a3249004 117 /// Set off generation of noisy digits
5c083cba 118 virtual void SetDigitizerWithNoise(Int_t digitizerWithNoise, Double_t nsigmas=4.0)
119 { fDigitizerWithNoise = digitizerWithNoise; fDigitizerNSigmas = nsigmas; }
120
8c0b5e70 121 virtual Int_t GetDigitizerWithNoise() const;
5c083cba 122
123 virtual Double_t GetDigitizerNSigmas() const { return fDigitizerNSigmas; }
124
125 /// Parametrised tail effect in resolution histogram
126 virtual void SetTailEffect(Bool_t isTailEffect) { fIsTailEffect=isTailEffect; }
43d7561d 127
16f2a7f8 128 // Getters
129 /// Return reference to Chamber \a id
a9e2aefa 130 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 131 {return *((AliMUONChamber *) (*fChambers)[id]);}
16f2a7f8 132
7435e1f8 133 virtual void MakeBranch(Option_t* opt=" ");
134 virtual void ResetHits();
68585390 135
5ee595ac 136 /// Set digit store class name
137 void SetDigitStoreClassName(const char* classname) { fDigitStoreConcreteClassName = classname; }
138 /// Return digit store class name
139 const TString DigitStoreClassName() const { return fDigitStoreConcreteClassName; }
140
30178c30 141 protected:
c4ee792d 142 /// Not implemented
30178c30 143 AliMUON(const AliMUON& rMUON);
c4ee792d 144 /// Not implemented
a9e2aefa 145 AliMUON& operator = (const AliMUON& rhs);
aa43efee 146
504d0837 147 const AliMUONGeometry* GetGeometry() const;
48b32e42 148
18b6b8c7 149 Int_t fNCh; ///< Number of chambers
150 Int_t fNTrackingCh; ///< Number of tracking chambers*
18b6b8c7 151 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
152 TObjArray* fChambers; ///< List of Tracking Chambers
18b6b8c7 153 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
ce3f5e87 154
155 //
43d7561d 156 Bool_t fAccCut; ///< Transport acceptance cut
157 Float_t fAccMin; ///< Minimum acceptance cut used during transport
158 Float_t fAccMax; ///< Minimum acceptance cut used during transport
ce3f5e87 159 //
160 // Stepping Parameters
18b6b8c7 161 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
162 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
163 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
164 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
ce3f5e87 165
166 // Pad Iterator
18b6b8c7 167 Int_t fMaxIterPad; ///< Maximum pad index
168 Int_t fCurIterPad; ///< Current pad index
ced309a5 169
a3249004 170 // Options
d631bec8 171 Bool_t fIsMaxStep; ///< Flag to inactivate calls to gMC->SetMaxStep
18b6b8c7 172 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
44b96781 173 Bool_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1
e93b11d0 174 Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44
afb3ccf0 175 Bool_t fTriggerEffCells; ///< Flag to select TriggerEffCells
43d7561d 176 Int_t fDigitizerWithNoise; ///< Flag to switch on/off generation of noisy digits
5c083cba 177 Double_t fDigitizerNSigmas; ///< nsigma cut for noise generation
43d7561d 178 Bool_t fIsTailEffect; ///< Switch to turn on/off the tail effect
92c23b09 179
18b6b8c7 180 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 181
241560c2 182 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
183
7435e1f8 184 AliMUONVHitStore* fHitStore; //!< container of hits
185
5ee595ac 186 TString fDigitStoreConcreteClassName; ///< to be able to select what the sdigitizer uses
187
92c23b09 188 AliMUONCalibrationData* fCalibrationData; ///< pointer of calibration data
08e0c72f 189
d631bec8 190 ClassDef(AliMUON,22) // MUON Detector base class
a897a37a 191};
fe4da5cc 192#endif
193