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