EffC++ warnings fixed
[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
16f2a7f8 125 // Getters
126 /// Return reference to Chamber \a id
a9e2aefa 127 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 128 {return *((AliMUONChamber *) (*fChambers)[id]);}
16f2a7f8 129 /// Return reference to Circuit \a id
a9e2aefa 130 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
131 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
16f2a7f8 132 /// Return reference to New Circuit \a id
0c527060 133 virtual AliMUONTriggerCircuitNew& TriggerCircuitNew(Int_t id)
134 {return *((AliMUONTriggerCircuitNew*) (*fTriggerCircuitsNew)[id]);}
16f2a7f8 135
136 // Return pointers to digit
a9e2aefa 137 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
138 Int_t icluster);
30178c30 139 // Inherited and overridden from AliModule:
ce01996f 140 //PH virtual void RemapTrackHitIDs(Int_t * map);
30178c30 141
68585390 142 TString SDigitizerType() const;
143 TString DigitizerType() const;
144
30178c30 145 protected:
146 AliMUON(const AliMUON& rMUON);
a9e2aefa 147 AliMUON& operator = (const AliMUON& rhs);
aa43efee 148
504d0837 149 const AliMUONGeometry* GetGeometry() const;
48b32e42 150
18b6b8c7 151 Int_t fNCh; ///< Number of chambers
152 Int_t fNTrackingCh; ///< Number of tracking chambers*
153 AliMUONData* fMUONData; ///< Data container for MUON subsystem
154 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
155 TObjArray* fChambers; ///< List of Tracking Chambers
156 TObjArray* fTriggerCircuits; ///< List of Trigger Circuits
157 TObjArray* fTriggerCircuitsNew; ///< List of Trigger Circuits
158 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
159 AliMUONSegmentation* fSegmentation; ///< New segmentation
ce3f5e87 160
161 //
18b6b8c7 162 Bool_t fAccCut; ///<Transport acceptance cut
163 Float_t fAccMin; ///<Minimum acceptance cut used during transport
164 Float_t fAccMax; ///<Minimum acceptance cut used during transport
ce3f5e87 165 //
166 // Stepping Parameters
18b6b8c7 167 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
168 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
169 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
170 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
ce3f5e87 171
172 // Pad Iterator
18b6b8c7 173 Int_t fMaxIterPad; ///< Maximum pad index
174 Int_t fCurIterPad; ///< Current pad index
ced309a5 175
176 // setting scaler for trigger
18b6b8c7 177 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
ce3f5e87 178
18b6b8c7 179 TString fSDigitizerType; ///< Class to use for SDigitizer
180 TString fDigitizerType; ///< Class to use for Digitizer
68585390 181
18b6b8c7 182 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 183
0c527060 184 ClassDef(AliMUON,13) // MUON Detector base class
a897a37a 185};
fe4da5cc 186#endif
187