Added function SetFastDecoder()
[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$ */
30178c30 7// Revision of includes 07/05/2004
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
15#include <TObjArray.h>
16
fe4da5cc 17#include "AliDetector.h"
ce3f5e87 18#include "AliMUONChamber.h"
3b2353d8 19#include "AliMUONTrigger.h"
a9e2aefa 20
e8d02863 21#include <TVectorfwd.h>
5ee595ac 22#include <TString.h>
e8d02863 23
30178c30 24class TFile;
25class TTree;
26
3fa6cfdd 27class AliLoader;
a9e2aefa 28class AliMUONResponse;
504d0837 29class AliMUONSegmentation;
a9e2aefa 30class AliMUONHit;
504d0837 31class AliMUONGeometry;
32class AliMUONGeometryTransformer;
d4bb94a1 33class AliMUONGeometryBuilder;
d5609cfc 34class AliMUONRawWriter;
d1cd2474 35class AliMUONVGeometryBuilder;
aa43efee 36class AliESD;
241560c2 37class AliMUONDigitMaker;
7435e1f8 38class AliMUONVHitStore;
1cae9436 39
30178c30 40class AliMUON : public AliDetector
41{
42 public:
fe4da5cc 43 AliMUON();
9bf406e1 44 AliMUON(const char* name, const char* title);
d5609cfc 45 virtual ~AliMUON();
ce3f5e87 46
504d0837 47 // Geometry
d5609cfc 48 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
49 void ResetGeometryBuilder();
50
fe4da5cc 51 virtual void BuildGeometry();
504d0837 52
16f2a7f8 53 /// Return geometry builder
504d0837 54 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
55 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
16f2a7f8 56 /// Return segmentation
3fa6cfdd 57
ce3f5e87 58 // MUONLoader definition
3fa6cfdd 59 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
16f2a7f8 60
16f2a7f8 61 virtual void SetTreeAddress();
7435e1f8 62
63 /// Set split level for making branches in outfiles
16f2a7f8 64 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 65
a9e2aefa 66 // Digitisation
c92eb8ad 67 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 68 virtual void SDigits2Digits();
d1775029 69 virtual void Hits2SDigits();
39e39255 70 virtual void Digits2Raw();
241560c2 71 virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
72
3b2353d8 73 // Trigger
16f2a7f8 74 /// Create trigger
3b2353d8 75 virtual AliTriggerDetector* CreateTriggerDetector() const
76 { return new AliMUONTrigger(); }
77
39e39255 78
ce3f5e87 79 // Configuration Methods (per station id)
80 //
ce3f5e87 81 // Set Signal Generation Parameters
a897a37a 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);
3b3ee6f4 85 virtual void SetMaxAdc(Int_t id, Int_t p1);
504d0837 86 // Set Response Model
7435e1f8 87 virtual void SetResponseModel(Int_t id, const AliMUONResponse& response);
cac2eb58 88
ce3f5e87 89 // Set Stepping Parameters
a897a37a 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);
ce3f5e87 94
d1cd2474 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;
883746f3 100
101 // Set alignement option
82d1ac0a 102 virtual void SetAlign(Bool_t align = true);
103 virtual void SetAlign(const TString& fileName, Bool_t align = true);
ced309a5 104
16f2a7f8 105 /// Set scaler event for trigger
ced309a5 106 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
107
a3249004 108 /// Set trigger response version
44b96781 109 virtual void SetTriggerResponseV1(Bool_t trigResV1 = false)
a3249004 110 { fTriggerResponseV1 = trigResV1; }
44b96781 111 virtual Bool_t GetTriggerResponseV1() const;
a3249004 112 /// Set trigger coinc44
e93b11d0 113 virtual void SetTriggerCoinc44(Int_t trigCoinc44 = 0)
a3249004 114 { fTriggerCoinc44 = trigCoinc44; }
e93b11d0 115 virtual Int_t GetTriggerCoinc44() const;
a3249004 116 /// Set trigger chamber efficiency by cells
88570609 117 virtual void SetTriggerEffCells(Bool_t trigEffCells = false)
a3249004 118 { fTriggerEffCells = trigEffCells; }
88570609 119 virtual Bool_t GetTriggerEffCells() const;
a3249004 120 /// Set off generation of noisy digits
8c0b5e70 121 virtual void SetDigitizerWithNoise(Int_t digitizerWithNoise)
a3249004 122 { fDigitizerWithNoise = digitizerWithNoise; }
8c0b5e70 123 virtual Int_t GetDigitizerWithNoise() const;
44b96781 124
b6c94614 125 // Set fast raw data decoder
126 virtual void SetFastDecoder(Bool_t useFastDecoder);
127
128
16f2a7f8 129 // Getters
130 /// Return reference to Chamber \a id
a9e2aefa 131 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 132 {return *((AliMUONChamber *) (*fChambers)[id]);}
16f2a7f8 133
7435e1f8 134 virtual void MakeBranch(Option_t* opt=" ");
135 virtual void ResetHits();
68585390 136
5ee595ac 137 /// Set digit store class name
138 void SetDigitStoreClassName(const char* classname) { fDigitStoreConcreteClassName = classname; }
139 /// Return digit store class name
140 const TString DigitStoreClassName() const { return fDigitStoreConcreteClassName; }
141
30178c30 142 protected:
c4ee792d 143 /// Not implemented
30178c30 144 AliMUON(const AliMUON& rMUON);
c4ee792d 145 /// Not implemented
a9e2aefa 146 AliMUON& operator = (const AliMUON& rhs);
aa43efee 147
504d0837 148 const AliMUONGeometry* GetGeometry() const;
48b32e42 149
18b6b8c7 150 Int_t fNCh; ///< Number of chambers
151 Int_t fNTrackingCh; ///< Number of tracking chambers*
18b6b8c7 152 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
153 TObjArray* fChambers; ///< List of Tracking Chambers
18b6b8c7 154 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
ce3f5e87 155
156 //
18b6b8c7 157 Bool_t fAccCut; ///<Transport acceptance cut
158 Float_t fAccMin; ///<Minimum acceptance cut used during transport
159 Float_t fAccMax; ///<Minimum acceptance cut used during transport
ce3f5e87 160 //
161 // Stepping Parameters
18b6b8c7 162 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
163 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
164 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
165 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
ce3f5e87 166
167 // Pad Iterator
18b6b8c7 168 Int_t fMaxIterPad; ///< Maximum pad index
169 Int_t fCurIterPad; ///< Current pad index
ced309a5 170
a3249004 171 // Options
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
8c0b5e70 176 Int_t fDigitizerWithNoise; ///< Flag to switch on/off generation of noisy digits
68585390 177
18b6b8c7 178 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 179
241560c2 180 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
181
7435e1f8 182 AliMUONVHitStore* fHitStore; //!< container of hits
183
5ee595ac 184 TString fDigitStoreConcreteClassName; ///< to be able to select what the sdigitizer uses
185
186 ClassDef(AliMUON,16) // MUON Detector base class
a897a37a 187};
fe4da5cc 188#endif
189