]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUON.h
New segmentation with switch between old and new (Ch. Finck)
[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;
a713db22 25class AliMUONGeometrySegmentation;
fac3a970 26class AliMUONTriggerCircuit;
27class AliMUONData;
a9e2aefa 28class AliMUONResponse;
375da359 29class AliMUONMerger;
a9e2aefa 30class AliMUONHit;
31class AliMUONPadHit;
a897a37a 32class AliMUONRawCluster;
a9e2aefa 33class AliMUONReconstHit;
1cae9436 34class AliMUONMerger;
d4bb94a1 35class AliMUONGeometryBuilder;
d1cd2474 36class AliMUONVGeometryBuilder;
e118b27e 37class AliMUONGeometryDEIndexing;
aa43efee 38class AliESD;
1cae9436 39
30178c30 40class AliMUON : public AliDetector
41{
42 public:
fe4da5cc 43 AliMUON();
44 AliMUON(const char *name, const char *title);
45 virtual ~AliMUON();
ce3f5e87 46
d1cd2474 47 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
fe4da5cc 48 virtual void BuildGeometry();
ce3f5e87 49 AliMUONData* GetMUONData() {return fMUONData;}
d4bb94a1 50 AliMUONGeometryBuilder* GetGeometryBuilder() {return fGeometryBuilder;}
ce3f5e87 51 virtual Int_t IsVersion() const {return 0;}
3fa6cfdd 52
ce3f5e87 53 // MUONLoader definition
3fa6cfdd 54 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
ce3f5e87 55 // Interface with AliMUONData
56 virtual void MakeBranch(Option_t *opt=" ") {GetMUONData()->MakeBranch(opt);}
d652f85c 57 virtual void SetTreeAddress();
ce3f5e87 58 virtual void ResetHits() {GetMUONData()->ResetHits();}
59 virtual void ResetDigits() {GetMUONData()->ResetDigits();}
d652f85c 60 virtual void ResetTrigger() {GetMUONData()->ResetTrigger();}
61 virtual void ResetRawClusters() {GetMUONData()->ResetRawClusters();}
62 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 63
a9e2aefa 64 // Digitisation
c92eb8ad 65 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 66 virtual void SDigits2Digits();
d1775029 67 virtual void Hits2SDigits();
39e39255 68 virtual void Digits2Raw();
69
70
ce3f5e87 71 // Configuration Methods (per station id)
72 //
73 // Set Chamber Segmentation Parameters
74 // id refers to the station and isec to the cathode plane
75 // Set Z values for all chambers
a9e2aefa 76 virtual void SetChambersZ(const Float_t *Z);
77 virtual void SetChambersZToDefault(void);
78 virtual void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2);
ce3f5e87 79 // Set Signal Generation Parameters
a897a37a 80 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
81 virtual void SetChargeSlope(Int_t id, Float_t p1);
82 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 83 virtual void SetMaxAdc(Int_t id, Int_t p1);
ce3f5e87 84 // Set Segmentation and Response Model
a9e2aefa 85 virtual void SetSegmentationModel(Int_t id, Int_t isec,
a30a000f 86 AliSegmentation *segmentation);
a713db22 87 virtual void SetSegmentationModel(Int_t id, Int_t isec,
88 AliMUONGeometrySegmentation* segmentation);
89
90 void SetSegmentationType(Int_t type) {fSegmentationType = type;}// 1 for old 2 for new, 0 undefined
91 Int_t WhichSegmentation() {return fSegmentationType; }
92
a9e2aefa 93 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
fe4da5cc 94 virtual void SetNsec(Int_t id, Int_t nsec);
cac2eb58 95
ce3f5e87 96 // Set Merger/Digitizer
1cae9436 97 virtual void SetMerger(AliMUONMerger* merger);
98 virtual AliMUONMerger* Merger();
99
ce3f5e87 100 // Set Stepping Parameters
a897a37a 101 virtual void SetMaxStepGas(Float_t p1);
102 virtual void SetMaxStepAlu(Float_t p1);
103 virtual void SetMaxDestepGas(Float_t p1);
104 virtual void SetMaxDestepAlu(Float_t p1);
5c1f55c5 105 virtual void SetAcceptance(Bool_t acc=0, Float_t angmin=2, Float_t angmax=9);
ce3f5e87 106
d1cd2474 107 // Get Stepping Parameters
108 virtual Float_t GetMaxStepGas() const;
109 virtual Float_t GetMaxStepAlu() const;
110 virtual Float_t GetMaxDestepGas() const;
111 virtual Float_t GetMaxDestepAlu() const;
883746f3 112
113 // Set alignement option
114 virtual void SetAlign(Bool_t align);
d1cd2474 115
ce3f5e87 116 // Return reference to Chamber #id
a9e2aefa 117 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 118 {return *((AliMUONChamber *) (*fChambers)[id]);}
119 // Return reference to Circuit #id
a9e2aefa 120 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
121 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
ce3f5e87 122 // Retrieve pad hits for a given Hit
a9e2aefa 123 virtual AliMUONPadHit* FirstPad(AliMUONHit *hit, TClonesArray *padHits);
124 virtual AliMUONPadHit* NextPad(TClonesArray *padHits);
ce3f5e87 125 // Return pointers to digits
a9e2aefa 126 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
127 Int_t icluster);
30178c30 128 // Inherited and overridden from AliModule:
ce01996f 129 //PH virtual void RemapTrackHitIDs(Int_t * map);
30178c30 130
131 protected:
132 AliMUON(const AliMUON& rMUON);
a9e2aefa 133 AliMUON& operator = (const AliMUON& rhs);
aa43efee 134
48b32e42 135
1bd26093 136 Int_t fNCh; // Number of chambers
ce3f5e87 137 Int_t fNTrackingCh; // Number of tracking chambers*
138 AliMUONData* fMUONData; // Data container for MUON subsystem
d652f85c 139 Int_t fSplitLevel; // Splitlevel when making branches in outfiles.
ce3f5e87 140 TObjArray* fChambers; // List of Tracking Chambers
141 TObjArray* fTriggerCircuits; // List of Trigger Circuits
e118b27e 142 AliMUONGeometryBuilder* fGeometryBuilder; // Geometry builder
a713db22 143 Int_t fSegmentationType; // type for segmentation
e118b27e 144 AliMUONGeometryDEIndexing* fDEIndexing; // Geometry DE indexing
ce3f5e87 145
146 //
fe4da5cc 147 Bool_t fAccCut; //Transport acceptance cut
148 Float_t fAccMin; //Minimum acceptance cut used during transport
149 Float_t fAccMax; //Minimum acceptance cut used during transport
ce3f5e87 150 //
151 // Stepping Parameters
152 Float_t fMaxStepGas; // Maximum step size inside the chamber gas
153 Float_t fMaxStepAlu; // Maximum step size inside the chamber aluminum
154 Float_t fMaxDestepGas; // Maximum relative energy loss in gas
155 Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
156
157 // Pad Iterator
158 Int_t fMaxIterPad; // Maximum pad index
159 Int_t fCurIterPad; // Current pad index
160 // Background eent for event mixing
ce3f5e87 161 AliMUONMerger *fMerger; // ! pointer to merger
162
a713db22 163 ClassDef(AliMUON,8) // MUON Detector base class
a897a37a 164};
fe4da5cc 165#endif
166