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