Added SetAlign() function for switching on/off alignement (Working week effort)
[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
fe4da5cc 9////////////////////////////////////////////////
5a35ac13 10// AliDetector Class for MUON subsystem //
fe4da5cc 11////////////////////////////////////////////////
30178c30 12
13#include <TObjArray.h>
14
fe4da5cc 15#include "AliDetector.h"
ce3f5e87 16#include "AliMUONData.h"
17#include "AliMUONChamber.h"
a9e2aefa 18
30178c30 19class TVector;
20class TFile;
21class TTree;
22
3fa6cfdd 23class AliLoader;
a30a000f 24class AliSegmentation;
fac3a970 25class AliMUONTriggerCircuit;
26class AliMUONData;
a9e2aefa 27class AliMUONResponse;
375da359 28class AliMUONMerger;
a9e2aefa 29class AliMUONHit;
30class AliMUONPadHit;
a897a37a 31class AliMUONRawCluster;
a9e2aefa 32class AliMUONReconstHit;
1cae9436 33class AliMUONMerger;
d4bb94a1 34class AliMUONGeometryBuilder;
d1cd2474 35class AliMUONVGeometryBuilder;
aa43efee 36class AliESD;
1cae9436 37
30178c30 38class AliMUON : public AliDetector
39{
40 public:
fe4da5cc 41 AliMUON();
42 AliMUON(const char *name, const char *title);
43 virtual ~AliMUON();
ce3f5e87 44
d1cd2474 45 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
fe4da5cc 46 virtual void BuildGeometry();
ce3f5e87 47 AliMUONData* GetMUONData() {return fMUONData;}
d4bb94a1 48 AliMUONGeometryBuilder* GetGeometryBuilder() {return fGeometryBuilder;}
ce3f5e87 49 virtual Int_t IsVersion() const {return 0;}
3fa6cfdd 50
ce3f5e87 51 // MUONLoader definition
3fa6cfdd 52 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
ce3f5e87 53 // Interface with AliMUONData
54 virtual void MakeBranch(Option_t *opt=" ") {GetMUONData()->MakeBranch(opt);}
d652f85c 55 virtual void SetTreeAddress();
ce3f5e87 56 virtual void ResetHits() {GetMUONData()->ResetHits();}
57 virtual void ResetDigits() {GetMUONData()->ResetDigits();}
d652f85c 58 virtual void ResetTrigger() {GetMUONData()->ResetTrigger();}
59 virtual void ResetRawClusters() {GetMUONData()->ResetRawClusters();}
60 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 61
a9e2aefa 62 // Digitisation
c92eb8ad 63 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 64 virtual void SDigits2Digits();
d1775029 65 virtual void Hits2SDigits();
39e39255 66 virtual void Digits2Raw();
67
68
ce3f5e87 69 // Configuration Methods (per station id)
70 //
71 // Set Chamber Segmentation Parameters
72 // id refers to the station and isec to the cathode plane
73 // Set Z values for all chambers
a9e2aefa 74 virtual void SetChambersZ(const Float_t *Z);
75 virtual void SetChambersZToDefault(void);
76 virtual void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2);
ce3f5e87 77 // Set Signal Generation Parameters
a897a37a 78 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
79 virtual void SetChargeSlope(Int_t id, Float_t p1);
80 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 81 virtual void SetMaxAdc(Int_t id, Int_t p1);
ce3f5e87 82 // Set Segmentation and Response Model
a9e2aefa 83 virtual void SetSegmentationModel(Int_t id, Int_t isec,
a30a000f 84 AliSegmentation *segmentation);
a9e2aefa 85 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
fe4da5cc 86 virtual void SetNsec(Int_t id, Int_t nsec);
cac2eb58 87
ce3f5e87 88 // Set Merger/Digitizer
1cae9436 89 virtual void SetMerger(AliMUONMerger* merger);
90 virtual AliMUONMerger* Merger();
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);
5c1f55c5 97 virtual void SetAcceptance(Bool_t acc=0, Float_t angmin=2, Float_t angmax=9);
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
106 virtual void SetAlign(Bool_t align);
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 // Retrieve pad hits for a given Hit
a9e2aefa 115 virtual AliMUONPadHit* FirstPad(AliMUONHit *hit, TClonesArray *padHits);
116 virtual AliMUONPadHit* NextPad(TClonesArray *padHits);
ce3f5e87 117 // Return pointers to digits
a9e2aefa 118 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
119 Int_t icluster);
30178c30 120 // Inherited and overridden from AliModule:
ce01996f 121 //PH virtual void RemapTrackHitIDs(Int_t * map);
30178c30 122
123 protected:
124 AliMUON(const AliMUON& rMUON);
a9e2aefa 125 AliMUON& operator = (const AliMUON& rhs);
aa43efee 126
48b32e42 127
1bd26093 128 Int_t fNCh; // Number of chambers
ce3f5e87 129 Int_t fNTrackingCh; // Number of tracking chambers*
130 AliMUONData* fMUONData; // Data container for MUON subsystem
d652f85c 131 Int_t fSplitLevel; // Splitlevel when making branches in outfiles.
ce3f5e87 132 TObjArray* fChambers; // List of Tracking Chambers
133 TObjArray* fTriggerCircuits; // List of Trigger Circuits
d4bb94a1 134 AliMUONGeometryBuilder* fGeometryBuilder; // Geometry buiulder
ce3f5e87 135
136 //
fe4da5cc 137 Bool_t fAccCut; //Transport acceptance cut
138 Float_t fAccMin; //Minimum acceptance cut used during transport
139 Float_t fAccMax; //Minimum acceptance cut used during transport
ce3f5e87 140 //
141 // Stepping Parameters
142 Float_t fMaxStepGas; // Maximum step size inside the chamber gas
143 Float_t fMaxStepAlu; // Maximum step size inside the chamber aluminum
144 Float_t fMaxDestepGas; // Maximum relative energy loss in gas
145 Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
146
147 // Pad Iterator
148 Int_t fMaxIterPad; // Maximum pad index
149 Int_t fCurIterPad; // Current pad index
150 // Background eent for event mixing
ce3f5e87 151 AliMUONMerger *fMerger; // ! pointer to merger
152
feb1e780 153 ClassDef(AliMUON,4) // MUON Detector base class
a897a37a 154};
fe4da5cc 155#endif
156