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