Adding fIsTailEffect data member (an option to turn on/off
[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
43d7561d 125 /// Parametrised tail effect in resolution histogram
126 virtual void SetTailEffect(Bool_t isTailEffect) { fIsTailEffect=isTailEffect; }
127
b6c94614 128 // Set fast raw data decoder
129 virtual void SetFastDecoder(Bool_t useFastDecoder);
130
131
16f2a7f8 132 // Getters
133 /// Return reference to Chamber \a id
a9e2aefa 134 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 135 {return *((AliMUONChamber *) (*fChambers)[id]);}
16f2a7f8 136
7435e1f8 137 virtual void MakeBranch(Option_t* opt=" ");
138 virtual void ResetHits();
68585390 139
5ee595ac 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; }
144
30178c30 145 protected:
c4ee792d 146 /// Not implemented
30178c30 147 AliMUON(const AliMUON& rMUON);
c4ee792d 148 /// Not implemented
a9e2aefa 149 AliMUON& operator = (const AliMUON& rhs);
aa43efee 150
504d0837 151 const AliMUONGeometry* GetGeometry() const;
48b32e42 152
18b6b8c7 153 Int_t fNCh; ///< Number of chambers
154 Int_t fNTrackingCh; ///< Number of tracking chambers*
18b6b8c7 155 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
156 TObjArray* fChambers; ///< List of Tracking Chambers
18b6b8c7 157 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
ce3f5e87 158
159 //
43d7561d 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
ce3f5e87 163 //
164 // Stepping Parameters
18b6b8c7 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
ce3f5e87 169
170 // Pad Iterator
18b6b8c7 171 Int_t fMaxIterPad; ///< Maximum pad index
172 Int_t fCurIterPad; ///< Current pad index
ced309a5 173
a3249004 174 // Options
18b6b8c7 175 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
44b96781 176 Bool_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1
e93b11d0 177 Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44
afb3ccf0 178 Bool_t fTriggerEffCells; ///< Flag to select TriggerEffCells
43d7561d 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
68585390 181
18b6b8c7 182 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 183
241560c2 184 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
185
7435e1f8 186 AliMUONVHitStore* fHitStore; //!< container of hits
187
5ee595ac 188 TString fDigitStoreConcreteClassName; ///< to be able to select what the sdigitizer uses
189
190 ClassDef(AliMUON,16) // MUON Detector base class
a897a37a 191};
fe4da5cc 192#endif
193