]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUON.h
Using TGeo as default transport package
[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;
8109731a 38class AliMUONFactory;
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
d1cd2474 48 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
fe4da5cc 49 virtual void BuildGeometry();
ce3f5e87 50 AliMUONData* GetMUONData() {return fMUONData;}
d4bb94a1 51 AliMUONGeometryBuilder* GetGeometryBuilder() {return fGeometryBuilder;}
ce3f5e87 52 virtual Int_t IsVersion() const {return 0;}
3fa6cfdd 53
ce3f5e87 54 // MUONLoader definition
3fa6cfdd 55 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
ce3f5e87 56 // Interface with AliMUONData
57 virtual void MakeBranch(Option_t *opt=" ") {GetMUONData()->MakeBranch(opt);}
d652f85c 58 virtual void SetTreeAddress();
ce3f5e87 59 virtual void ResetHits() {GetMUONData()->ResetHits();}
60 virtual void ResetDigits() {GetMUONData()->ResetDigits();}
d652f85c 61 virtual void ResetTrigger() {GetMUONData()->ResetTrigger();}
62 virtual void ResetRawClusters() {GetMUONData()->ResetRawClusters();}
63 virtual void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
cac2eb58 64
a9e2aefa 65 // Digitisation
c92eb8ad 66 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
2ab0c725 67 virtual void SDigits2Digits();
d1775029 68 virtual void Hits2SDigits();
39e39255 69 virtual void Digits2Raw();
70
71
ce3f5e87 72 // Configuration Methods (per station id)
73 //
74 // Set Chamber Segmentation Parameters
75 // id refers to the station and isec to the cathode plane
76 // Set Z values for all chambers
a9e2aefa 77 virtual void SetChambersZ(const Float_t *Z);
78 virtual void SetChambersZToDefault(void);
79 virtual void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2);
ce3f5e87 80 // Set Signal Generation Parameters
a897a37a 81 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
82 virtual void SetChargeSlope(Int_t id, Float_t p1);
83 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 84 virtual void SetMaxAdc(Int_t id, Int_t p1);
ce3f5e87 85 // Set Segmentation and Response Model
a9e2aefa 86 virtual void SetSegmentationModel(Int_t id, Int_t isec,
a30a000f 87 AliSegmentation *segmentation);
a713db22 88 virtual void SetSegmentationModel(Int_t id, Int_t isec,
89 AliMUONGeometrySegmentation* segmentation);
90
91 void SetSegmentationType(Int_t type) {fSegmentationType = type;}// 1 for old 2 for new, 0 undefined
92 Int_t WhichSegmentation() {return fSegmentationType; }
93
a9e2aefa 94 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
fe4da5cc 95 virtual void SetNsec(Int_t id, Int_t nsec);
cac2eb58 96
ce3f5e87 97 // Set Merger/Digitizer
1cae9436 98 virtual void SetMerger(AliMUONMerger* merger);
99 virtual AliMUONMerger* Merger();
100
ce3f5e87 101 // Set Stepping Parameters
a897a37a 102 virtual void SetMaxStepGas(Float_t p1);
103 virtual void SetMaxStepAlu(Float_t p1);
104 virtual void SetMaxDestepGas(Float_t p1);
105 virtual void SetMaxDestepAlu(Float_t p1);
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
8109731a 162 AliMUONFactory* fFactory; // ! MUON factory
ce3f5e87 163
a713db22 164 ClassDef(AliMUON,8) // MUON Detector base class
a897a37a 165};
fe4da5cc 166#endif
167