Coding conventions
[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();
ce3f5e87 56 virtual Int_t IsVersion() const {return 0;}
504d0837 57
58 AliMUONGeometryBuilder* GetGeometryBuilder() const {return fGeometryBuilder;}
59 const AliMUONGeometryTransformer* GetGeometryTransformer() const;
60 AliMUONSegmentation* GetSegmentation() const { return fSegmentation; }
61
62 // MUONData
63 AliMUONData* GetMUONData() {return fMUONData;}
3fa6cfdd 64
ce3f5e87 65 // MUONLoader definition
3fa6cfdd 66 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
ce3f5e87 67 // Interface with AliMUONData
68 virtual void MakeBranch(Option_t *opt=" ") {GetMUONData()->MakeBranch(opt);}
d652f85c 69 virtual void SetTreeAddress();
ce3f5e87 70 virtual void ResetHits() {GetMUONData()->ResetHits();}
71 virtual void ResetDigits() {GetMUONData()->ResetDigits();}
d652f85c 72 virtual void ResetTrigger() {GetMUONData()->ResetTrigger();}
73 virtual void ResetRawClusters() {GetMUONData()->ResetRawClusters();}
74 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 75
a9e2aefa 76 // Digitisation
c92eb8ad 77 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 78 virtual void SDigits2Digits();
d1775029 79 virtual void Hits2SDigits();
39e39255 80 virtual void Digits2Raw();
3b2353d8 81
82 // Trigger
83 virtual AliTriggerDetector* CreateTriggerDetector() const
84 { return new AliMUONTrigger(); }
85
39e39255 86
ce3f5e87 87 // Configuration Methods (per station id)
88 //
ce3f5e87 89 // Set Signal Generation Parameters
a897a37a 90 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
91 virtual void SetChargeSlope(Int_t id, Float_t p1);
92 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 93 virtual void SetMaxAdc(Int_t id, Int_t p1);
504d0837 94 // Set Response Model
a9e2aefa 95 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
cac2eb58 96
ce3f5e87 97 // Set Stepping Parameters
a897a37a 98 virtual void SetMaxStepGas(Float_t p1);
99 virtual void SetMaxStepAlu(Float_t p1);
100 virtual void SetMaxDestepGas(Float_t p1);
101 virtual void SetMaxDestepAlu(Float_t p1);
ce3f5e87 102
d1cd2474 103 // Get Stepping Parameters
104 virtual Float_t GetMaxStepGas() const;
105 virtual Float_t GetMaxStepAlu() const;
106 virtual Float_t GetMaxDestepGas() const;
107 virtual Float_t GetMaxDestepAlu() const;
883746f3 108
109 // Set alignement option
82d1ac0a 110 virtual void SetAlign(Bool_t align = true);
111 virtual void SetAlign(const TString& fileName, Bool_t align = true);
ced309a5 112
113 // Set scaler event for trigger
114 virtual void SetTriggerScalerEvent(Bool_t scaler = true){fTriggerScalerEvent = scaler;}
115
ce3f5e87 116 // Return reference to Chamber #id
a9e2aefa 117 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 118 {return *((AliMUONChamber *) (*fChambers)[id]);}
119 // Return reference to Circuit #id
a9e2aefa 120 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
121 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
0c527060 122 virtual AliMUONTriggerCircuitNew& TriggerCircuitNew(Int_t id)
123 {return *((AliMUONTriggerCircuitNew*) (*fTriggerCircuitsNew)[id]);}
ce3f5e87 124 // Return pointers to digits
a9e2aefa 125 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
126 Int_t icluster);
30178c30 127 // Inherited and overridden from AliModule:
ce01996f 128 //PH virtual void RemapTrackHitIDs(Int_t * map);
30178c30 129
68585390 130 TString SDigitizerType() const;
131 TString DigitizerType() const;
132
30178c30 133 protected:
134 AliMUON(const AliMUON& rMUON);
a9e2aefa 135 AliMUON& operator = (const AliMUON& rhs);
aa43efee 136
504d0837 137 const AliMUONGeometry* GetGeometry() const;
48b32e42 138
18b6b8c7 139 Int_t fNCh; ///< Number of chambers
140 Int_t fNTrackingCh; ///< Number of tracking chambers*
141 AliMUONData* fMUONData; ///< Data container for MUON subsystem
142 Int_t fSplitLevel; ///< Splitlevel when making branches in outfiles.
143 TObjArray* fChambers; ///< List of Tracking Chambers
144 TObjArray* fTriggerCircuits; ///< List of Trigger Circuits
145 TObjArray* fTriggerCircuitsNew; ///< List of Trigger Circuits
146 AliMUONGeometryBuilder* fGeometryBuilder; ///< Geometry builder
147 AliMUONSegmentation* fSegmentation; ///< New segmentation
ce3f5e87 148
149 //
18b6b8c7 150 Bool_t fAccCut; ///<Transport acceptance cut
151 Float_t fAccMin; ///<Minimum acceptance cut used during transport
152 Float_t fAccMax; ///<Minimum acceptance cut used during transport
ce3f5e87 153 //
154 // Stepping Parameters
18b6b8c7 155 Float_t fMaxStepGas; ///< Maximum step size inside the chamber gas
156 Float_t fMaxStepAlu; ///< Maximum step size inside the chamber aluminum
157 Float_t fMaxDestepGas; ///< Maximum relative energy loss in gas
158 Float_t fMaxDestepAlu; ///< Maximum relative energy loss in aluminum
ce3f5e87 159
160 // Pad Iterator
18b6b8c7 161 Int_t fMaxIterPad; ///< Maximum pad index
162 Int_t fCurIterPad; ///< Current pad index
ced309a5 163
164 // setting scaler for trigger
18b6b8c7 165 Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event
ce3f5e87 166
18b6b8c7 167 TString fSDigitizerType; ///< Class to use for SDigitizer
168 TString fDigitizerType; ///< Class to use for Digitizer
68585390 169
18b6b8c7 170 AliMUONRawWriter* fRawWriter; //!< Raw data writer
d5609cfc 171
0c527060 172 ClassDef(AliMUON,13) // MUON Detector base class
a897a37a 173};
fe4da5cc 174#endif
175