3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 // Revision of includes 07/05/2004
11 /// \brief AliDetector class for MUON subsystem providing
12 /// simulation data management
15 #include <TObjArray.h>
17 #include "AliDetector.h"
18 #include "AliMUONChamber.h"
19 #include "AliMUONTrigger.h"
21 #include <TVectorfwd.h>
28 class AliMUONResponse;
29 class AliMUONSegmentation;
31 class AliMUONGeometry;
32 class AliMUONGeometryTransformer;
33 class AliMUONGeometryBuilder;
34 class AliMUONRawWriter;
35 class AliMUONVGeometryBuilder;
37 class AliMUONDigitMaker;
38 class AliMUONVHitStore;
40 class AliMUON : public AliDetector
44 AliMUON(const char* name, const char* title);
48 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
49 void ResetGeometryBuilder();
51 virtual void BuildGeometry();
53 /// Return geometry builder
54 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
55 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
56 /// Return segmentation
58 // MUONLoader definition
59 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
61 virtual void SetTreeAddress();
63 /// Set split level for making branches in outfiles
64 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
67 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
68 virtual void SDigits2Digits();
69 virtual void Hits2SDigits();
70 virtual void Digits2Raw();
71 virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
75 virtual AliTriggerDetector* CreateTriggerDetector() const
76 { return new AliMUONTrigger(); }
79 // Configuration Methods (per station id)
81 // Set Signal Generation Parameters
82 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
83 virtual void SetChargeSlope(Int_t id, Float_t p1);
84 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
85 virtual void SetMaxAdc(Int_t id, Int_t p1);
87 virtual void SetResponseModel(Int_t id, const AliMUONResponse& response);
89 // Set Stepping Parameters
90 virtual void SetMaxStepGas(Float_t p1);
91 virtual void SetMaxStepAlu(Float_t p1);
92 virtual void SetMaxDestepGas(Float_t p1);
93 virtual void SetMaxDestepAlu(Float_t p1);
95 // Get Stepping Parameters
96 virtual Float_t GetMaxStepGas() const;
97 virtual Float_t GetMaxStepAlu() const;
98 virtual Float_t GetMaxDestepGas() const;
99 virtual Float_t GetMaxDestepAlu() const;
101 // Set alignement option
102 virtual void SetAlign(Bool_t align = true);
103 virtual void SetAlign(const TString& fileName, Bool_t align = true);
105 /// Set scaler event for trigger
106 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
108 /// Set trigger response version
109 virtual void SetTriggerResponseV1(Bool_t trigResV1 = false)
110 { fTriggerResponseV1 = trigResV1; }
111 virtual Bool_t GetTriggerResponseV1() const;
112 /// Set trigger coinc44
113 virtual void SetTriggerCoinc44(Int_t trigCoinc44 = 0)
114 { fTriggerCoinc44 = trigCoinc44; }
115 virtual Int_t GetTriggerCoinc44() const;
116 /// Set trigger chamber efficiency by cells
117 virtual void SetTriggerEffCells(Bool_t trigEffCells = false)
118 { fTriggerEffCells = trigEffCells; }
119 virtual Bool_t GetTriggerEffCells() const;
120 /// Set off generation of noisy digits
121 virtual void SetDigitizerWithNoise(Int_t digitizerWithNoise)
122 { fDigitizerWithNoise = digitizerWithNoise; }
123 virtual Int_t GetDigitizerWithNoise() const;
125 /// Parametrised tail effect in resolution histogram
126 virtual void SetTailEffect(Bool_t isTailEffect) { fIsTailEffect=isTailEffect; }
128 // Set fast raw data decoder
129 virtual void SetFastDecoder(Bool_t useFastDecoder);
133 /// Return reference to Chamber \a id
134 virtual AliMUONChamber& Chamber(Int_t id)
135 {return *((AliMUONChamber *) (*fChambers)[id]);}
137 virtual void MakeBranch(Option_t* opt=" ");
138 virtual void ResetHits();
140 /// Set digit store class name
141 void SetDigitStoreClassName(const char* classname) { fDigitStoreConcreteClassName = classname; }
142 /// Return digit store class name
143 const TString DigitStoreClassName() const { return fDigitStoreConcreteClassName; }
147 AliMUON(const AliMUON& rMUON);
149 AliMUON& operator = (const AliMUON& rhs);
151 const AliMUONGeometry* GetGeometry() const;
153 Int_t fNCh; ///< Number of chambers
154 Int_t fNTrackingCh; ///< Number of tracking chambers*
155 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
156 TObjArray* fChambers; ///< List of Tracking Chambers
157 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
160 Bool_t fAccCut; ///< Transport acceptance cut
161 Float_t fAccMin; ///< Minimum acceptance cut used during transport
162 Float_t fAccMax; ///< Minimum acceptance cut used during transport
164 // Stepping Parameters
165 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
166 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
167 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
168 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
171 Int_t fMaxIterPad; ///< Maximum pad index
172 Int_t fCurIterPad; ///< Current pad index
175 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
176 Bool_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1
177 Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44
178 Bool_t fTriggerEffCells; ///< Flag to select TriggerEffCells
179 Int_t fDigitizerWithNoise; ///< Flag to switch on/off generation of noisy digits
180 Bool_t fIsTailEffect; ///< Switch to turn on/off the tail effect
182 AliMUONRawWriter* fRawWriter; //!< Raw data writer
184 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
186 AliMUONVHitStore* fHitStore; //!< container of hits
188 TString fDigitStoreConcreteClassName; ///< to be able to select what the sdigitizer uses
190 ClassDef(AliMUON,16) // MUON Detector base class