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