switch to activate trigger chamber efficiency from Config (Diego, Philippe)
[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
692de412 9/// \ingroup base
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 "AliMUONData.h"
19#include "AliMUONChamber.h"
3b2353d8 20#include "AliMUONTrigger.h"
a9e2aefa 21
e8d02863 22#include <TVectorfwd.h>
23
30178c30 24class TFile;
25class TTree;
26
3fa6cfdd 27class AliLoader;
fac3a970 28class AliMUONTriggerCircuit;
0c527060 29class AliMUONTriggerCircuitNew;
fac3a970 30class AliMUONData;
a9e2aefa 31class AliMUONResponse;
504d0837 32class AliMUONSegmentation;
a9e2aefa 33class AliMUONHit;
a897a37a 34class AliMUONRawCluster;
504d0837 35class AliMUONGeometry;
36class AliMUONGeometryTransformer;
d4bb94a1 37class AliMUONGeometryBuilder;
d5609cfc 38class AliMUONRawWriter;
d1cd2474 39class AliMUONVGeometryBuilder;
aa43efee 40class AliESD;
241560c2 41class AliMUONDigitMaker;
1cae9436 42
30178c30 43class AliMUON : public AliDetector
44{
45 public:
fe4da5cc 46 AliMUON();
d5609cfc 47 AliMUON(const char* name, const char *title="FactoryV4",
48 const char* sDigitizerType="sdigitizer:AliMUONSDigitizerV2",
4142b82d 49 const char* digitizerType="digitizer:NewDigitizerWithNoiseOldTrigger");
d5609cfc 50 virtual ~AliMUON();
ce3f5e87 51
504d0837 52 // Geometry
d5609cfc 53 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
54 void ResetGeometryBuilder();
55
fe4da5cc 56 virtual void BuildGeometry();
504d0837 57
16f2a7f8 58 /// Return geometry builder
504d0837 59 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
60 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
16f2a7f8 61 /// Return segmentation
504d0837 62 AliMUONSegmentation* GetSegmentation() const { return fSegmentation; }
63
16f2a7f8 64 /// Return MUONData
504d0837 65 AliMUONData* GetMUONData() {return fMUONData;}
3fa6cfdd 66
ce3f5e87 67 // MUONLoader definition
3fa6cfdd 68 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
16f2a7f8 69
ce3f5e87 70 // Interface with AliMUONData
16f2a7f8 71 /// Make branch
72 virtual void MakeBranch(Option_t *opt=" ") {GetMUONData()->MakeBranch(opt);}
73 virtual void SetTreeAddress();
74 /// Reset hits
75 virtual void ResetHits() {GetMUONData()->ResetHits();}
76 /// Reset digits
77 virtual void ResetDigits() {GetMUONData()->ResetDigits();}
78 /// Reset trigger
79 virtual void ResetTrigger() {GetMUONData()->ResetTrigger();}
80 /// Reset raw clusters
81 virtual void ResetRawClusters() {GetMUONData()->ResetRawClusters();}
82 /// Set split level
83 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 84
a9e2aefa 85 // Digitisation
c92eb8ad 86 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 87 virtual void SDigits2Digits();
d1775029 88 virtual void Hits2SDigits();
39e39255 89 virtual void Digits2Raw();
241560c2 90 virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
91
3b2353d8 92 // Trigger
16f2a7f8 93 /// Create trigger
3b2353d8 94 virtual AliTriggerDetector* CreateTriggerDetector() const
95 { return new AliMUONTrigger(); }
96
39e39255 97
ce3f5e87 98 // Configuration Methods (per station id)
99 //
ce3f5e87 100 // Set Signal Generation Parameters
a897a37a 101 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
102 virtual void SetChargeSlope(Int_t id, Float_t p1);
103 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 104 virtual void SetMaxAdc(Int_t id, Int_t p1);
504d0837 105 // Set Response Model
a9e2aefa 106 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
cac2eb58 107
ce3f5e87 108 // Set Stepping Parameters
a897a37a 109 virtual void SetMaxStepGas(Float_t p1);
110 virtual void SetMaxStepAlu(Float_t p1);
111 virtual void SetMaxDestepGas(Float_t p1);
112 virtual void SetMaxDestepAlu(Float_t p1);
ce3f5e87 113
d1cd2474 114 // Get Stepping Parameters
115 virtual Float_t GetMaxStepGas() const;
116 virtual Float_t GetMaxStepAlu() const;
117 virtual Float_t GetMaxDestepGas() const;
118 virtual Float_t GetMaxDestepAlu() const;
883746f3 119
120 // Set alignement option
82d1ac0a 121 virtual void SetAlign(Bool_t align = true);
122 virtual void SetAlign(const TString& fileName, Bool_t align = true);
ced309a5 123
16f2a7f8 124 /// Set scaler event for trigger
ced309a5 125 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
126
44b96781 127 // trigger response version
128 virtual void SetTriggerResponseV1(Bool_t trigResV1 = false)
129 {fTriggerResponseV1 = trigResV1;}
130 virtual Bool_t GetTriggerResponseV1() const;
e93b11d0 131 // trigger coinc44
132 virtual void SetTriggerCoinc44(Int_t trigCoinc44 = 0)
133 {fTriggerCoinc44 = trigCoinc44;}
134 virtual Int_t GetTriggerCoinc44() const;
afb3ccf0 135 // trigger chamber efficiency by cells
136 virtual Bool_t SetTriggerEffCells(Bool_t trigEffCells = false)
137 {fTriggerEffCells = trigEffCells;}
138 virtual Int_t GetTriggerEffCells() const;
44b96781 139
16f2a7f8 140 // Getters
141 /// Return reference to Chamber \a id
a9e2aefa 142 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 143 {return *((AliMUONChamber *) (*fChambers)[id]);}
16f2a7f8 144 /// Return reference to Circuit \a id
a9e2aefa 145 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
146 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
16f2a7f8 147 /// Return reference to New Circuit \a id
0c527060 148 virtual AliMUONTriggerCircuitNew& TriggerCircuitNew(Int_t id)
149 {return *((AliMUONTriggerCircuitNew*) (*fTriggerCircuitsNew)[id]);}
16f2a7f8 150
151 // Return pointers to digit
a9e2aefa 152 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
153 Int_t icluster);
30178c30 154 // Inherited and overridden from AliModule:
ce01996f 155 //PH virtual void RemapTrackHitIDs(Int_t * map);
30178c30 156
68585390 157 TString SDigitizerType() const;
158 TString DigitizerType() const;
159
30178c30 160 protected:
161 AliMUON(const AliMUON& rMUON);
a9e2aefa 162 AliMUON& operator = (const AliMUON& rhs);
aa43efee 163
504d0837 164 const AliMUONGeometry* GetGeometry() const;
48b32e42 165
18b6b8c7 166 Int_t fNCh; ///< Number of chambers
167 Int_t fNTrackingCh; ///< Number of tracking chambers*
168 AliMUONData* fMUONData; ///< Data container for MUON subsystem
169 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
170 TObjArray* fChambers; ///< List of Tracking Chambers
171 TObjArray* fTriggerCircuits; ///< List of Trigger Circuits
172 TObjArray* fTriggerCircuitsNew; ///< List of Trigger Circuits
173 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
174 AliMUONSegmentation* fSegmentation; ///< New segmentation
ce3f5e87 175
176 //
18b6b8c7 177 Bool_t fAccCut; ///<Transport acceptance cut
178 Float_t fAccMin; ///<Minimum acceptance cut used during transport
179 Float_t fAccMax; ///<Minimum acceptance cut used during transport
ce3f5e87 180 //
181 // Stepping Parameters
18b6b8c7 182 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
183 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
184 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
185 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
ce3f5e87 186
187 // Pad Iterator
18b6b8c7 188 Int_t fMaxIterPad; ///< Maximum pad index
189 Int_t fCurIterPad; ///< Current pad index
ced309a5 190
18b6b8c7 191 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
44b96781 192 Bool_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1
e93b11d0 193 Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44
afb3ccf0 194 Bool_t fTriggerEffCells; ///< Flag to select TriggerEffCells
ce3f5e87 195
18b6b8c7 196 TString fSDigitizerType; ///< Class to use for SDigitizer
197 TString fDigitizerType; ///< Class to use for Digitizer
68585390 198
18b6b8c7 199 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 200
241560c2 201 AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
202
0c527060 203 ClassDef(AliMUON,13) // MUON Detector base class
a897a37a 204};
fe4da5cc 205#endif
206