- Disentangle masks effect from trigger chamber efficiency estimation.
[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;
1cae9436 31
4069c48e 32class AliLoader;
33
34class TObjArray;
35
30178c30 36class AliMUON : public AliDetector
37{
38 public:
fe4da5cc 39 AliMUON();
9bf406e1 40 AliMUON(const char* name, const char* title);
d5609cfc 41 virtual ~AliMUON();
ce3f5e87 42
504d0837 43 // Geometry
d5609cfc 44 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
45 void ResetGeometryBuilder();
46
504d0837 47
16f2a7f8 48 /// Return geometry builder
504d0837 49 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
50 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
16f2a7f8 51 /// Return segmentation
3fa6cfdd 52
ce3f5e87 53 // MUONLoader definition
3fa6cfdd 54 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
16f2a7f8 55
16f2a7f8 56 virtual void SetTreeAddress();
7435e1f8 57
58 /// Set split level for making branches in outfiles
16f2a7f8 59 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 60
a9e2aefa 61 // Digitisation
c92eb8ad 62 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 63 virtual void SDigits2Digits();
d1775029 64 virtual void Hits2SDigits();
39e39255 65 virtual void Digits2Raw();
241560c2 66 virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
67
3b2353d8 68 // Trigger
16f2a7f8 69 /// Create trigger
3b2353d8 70 virtual AliTriggerDetector* CreateTriggerDetector() const
71 { return new AliMUONTrigger(); }
72
39e39255 73
ce3f5e87 74 // Configuration Methods (per station id)
75 //
ce3f5e87 76 // Set Signal Generation Parameters
a897a37a 77 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
78 virtual void SetChargeSlope(Int_t id, Float_t p1);
79 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 80 virtual void SetMaxAdc(Int_t id, Int_t p1);
504d0837 81 // Set Response Model
7435e1f8 82 virtual void SetResponseModel(Int_t id, const AliMUONResponse& response);
cac2eb58 83
ce3f5e87 84 // Set Stepping Parameters
a897a37a 85 virtual void SetMaxStepGas(Float_t p1);
86 virtual void SetMaxStepAlu(Float_t p1);
87 virtual void SetMaxDestepGas(Float_t p1);
88 virtual void SetMaxDestepAlu(Float_t p1);
ce3f5e87 89
d1cd2474 90 // Get Stepping Parameters
91 virtual Float_t GetMaxStepGas() const;
92 virtual Float_t GetMaxStepAlu() const;
93 virtual Float_t GetMaxDestepGas() const;
94 virtual Float_t GetMaxDestepAlu() const;
883746f3 95
96 // Set alignement option
82d1ac0a 97 virtual void SetAlign(Bool_t align = true);
98 virtual void SetAlign(const TString& fileName, Bool_t align = true);
d631bec8 99
100 /// Set flag to inactivate calls to gMC->SetMaxStep
101 virtual void SetIsMaxStep(Bool_t isMaxStep) { fIsMaxStep = isMaxStep; }
102
16f2a7f8 103 /// Set scaler event for trigger
ced309a5 104 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
105
a3249004 106 /// Set trigger response version
44b96781 107 virtual void SetTriggerResponseV1(Bool_t trigResV1 = false)
a3249004 108 { fTriggerResponseV1 = trigResV1; }
44b96781 109 virtual Bool_t GetTriggerResponseV1() const;
a3249004 110 /// Set trigger coinc44
e93b11d0 111 virtual void SetTriggerCoinc44(Int_t trigCoinc44 = 0)
a3249004 112 { fTriggerCoinc44 = trigCoinc44; }
e93b11d0 113 virtual Int_t GetTriggerCoinc44() const;
a3249004 114 /// Set trigger chamber efficiency by cells
88570609 115 virtual void SetTriggerEffCells(Bool_t trigEffCells = false)
a3249004 116 { fTriggerEffCells = trigEffCells; }
88570609 117 virtual Bool_t GetTriggerEffCells() const;
a3249004 118 /// Set off generation of noisy digits
5c083cba 119 virtual void SetDigitizerWithNoise(Int_t digitizerWithNoise, Double_t nsigmas=4.0)
120 { fDigitizerWithNoise = digitizerWithNoise; fDigitizerNSigmas = nsigmas; }
121
8c0b5e70 122 virtual Int_t GetDigitizerWithNoise() const;
5c083cba 123
124 virtual Double_t GetDigitizerNSigmas() const { return fDigitizerNSigmas; }
125
126 /// Parametrised tail effect in resolution histogram
127 virtual void SetTailEffect(Bool_t isTailEffect) { fIsTailEffect=isTailEffect; }
43d7561d 128
c3305598 129 /// Enable trigger raw2sdigits conversion
130 virtual void SetConvertTrigger(Bool_t convertTrigger = true) { fConvertTrigger = convertTrigger;}
131
132 // Getters
16f2a7f8 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
d631bec8 175 Bool_t fIsMaxStep; ///< Flag to inactivate calls to gMC->SetMaxStep
18b6b8c7 176 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
44b96781 177 Bool_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1
e93b11d0 178 Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44
afb3ccf0 179 Bool_t fTriggerEffCells; ///< Flag to select TriggerEffCells
43d7561d 180 Int_t fDigitizerWithNoise; ///< Flag to switch on/off generation of noisy digits
5c083cba 181 Double_t fDigitizerNSigmas; ///< nsigma cut for noise generation
43d7561d 182 Bool_t fIsTailEffect; ///< Switch to turn on/off the tail effect
c3305598 183 Bool_t fConvertTrigger; ///< Switch to enable trigger raw2sdigit conversion
92c23b09 184
18b6b8c7 185 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 186
241560c2 187 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
188
7435e1f8 189 AliMUONVHitStore* fHitStore; //!< container of hits
190
5ee595ac 191 TString fDigitStoreConcreteClassName; ///< to be able to select what the sdigitizer uses
192
92c23b09 193 AliMUONCalibrationData* fCalibrationData; ///< pointer of calibration data
08e0c72f 194
5d950f54 195 AliMUONDigitCalibrator* fDigitCalibrator; ///< digit calibrator (for raw2sdigits)
196
c3305598 197 ClassDef(AliMUON,24) // MUON Detector base class
a897a37a 198};
fe4da5cc 199#endif
200