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