MUON reconstruction with pluggins and cleaning-up AliMUON (Christian)
[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$ */
88cb7938 7/* $Id$ */
8
3da30618 9
fe4da5cc 10////////////////////////////////////////////////
5a35ac13 11// AliDetector Class for MUON subsystem //
fe4da5cc 12////////////////////////////////////////////////
13#include "AliDetector.h"
ce3f5e87 14#include "AliMUONData.h"
15#include "AliMUONChamber.h"
a9e2aefa 16
3fa6cfdd 17class AliLoader;
a9e2aefa 18class AliMUONTriggerCircuit;
19class AliMUONTriggerDecision;
a30a000f 20class AliSegmentation;
a9e2aefa 21class AliMUONResponse;
375da359 22class AliMUONMerger;
a9e2aefa 23class AliMUONHit;
24class AliMUONPadHit;
a897a37a 25class AliMUONRawCluster;
30aaba74 26class AliMUONClusterFinderVS;
a9e2aefa 27class AliMUONReconstHit;
1cae9436 28class AliMUONMerger;
d1cd2474 29class AliMUONVGeometryBuilder;
aa43efee 30class AliESD;
1cae9436 31
a9e2aefa 32class TVector;
94de3818 33#include "TObjArray.h"
a9e2aefa 34class TFile;
35class TTree;
fe4da5cc 36
37
fe4da5cc 38class AliMUON : public AliDetector {
39 public:
40 AliMUON();
41 AliMUON(const char *name, const char *title);
a9e2aefa 42 AliMUON(const AliMUON& rMUON);
fe4da5cc 43 virtual ~AliMUON();
ce3f5e87 44
d1cd2474 45 void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder);
fe4da5cc 46 virtual void BuildGeometry();
fe4da5cc 47 Int_t DistancetoPrimitive(Int_t px, Int_t py);
ce3f5e87 48 AliMUONData* GetMUONData() {return fMUONData;}
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();
ce3f5e87 66 // Configuration Methods (per station id)
67 //
68 // Set Chamber Segmentation Parameters
69 // id refers to the station and isec to the cathode plane
70 // Set Z values for all chambers
a9e2aefa 71 virtual void SetChambersZ(const Float_t *Z);
72 virtual void SetChambersZToDefault(void);
73 virtual void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2);
ce3f5e87 74 // Set Signal Generation Parameters
a897a37a 75 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
76 virtual void SetChargeSlope(Int_t id, Float_t p1);
77 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 78 virtual void SetMaxAdc(Int_t id, Int_t p1);
ce3f5e87 79 // Set Segmentation and Response Model
a9e2aefa 80 virtual void SetSegmentationModel(Int_t id, Int_t isec,
a30a000f 81 AliSegmentation *segmentation);
a9e2aefa 82 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
fe4da5cc 83 virtual void SetNsec(Int_t id, Int_t nsec);
cac2eb58 84
ce3f5e87 85 // Set Merger/Digitizer
1cae9436 86 virtual void SetMerger(AliMUONMerger* merger);
87 virtual AliMUONMerger* Merger();
88
ce3f5e87 89 // Set Stepping Parameters
a897a37a 90 virtual void SetMaxStepGas(Float_t p1);
91 virtual void SetMaxStepAlu(Float_t p1);
92 virtual void SetMaxDestepGas(Float_t p1);
93 virtual void SetMaxDestepAlu(Float_t p1);
5c1f55c5 94 virtual void SetAcceptance(Bool_t acc=0, Float_t angmin=2, Float_t angmax=9);
ce3f5e87 95
d1cd2474 96 // Get Stepping Parameters
97 virtual Float_t GetMaxStepGas() const;
98 virtual Float_t GetMaxStepAlu() const;
99 virtual Float_t GetMaxDestepGas() const;
100 virtual Float_t GetMaxDestepAlu() const;
101
ce3f5e87 102 // Return reference to Chamber #id
a9e2aefa 103 virtual AliMUONChamber& Chamber(Int_t id)
ce3f5e87 104 {return *((AliMUONChamber *) (*fChambers)[id]);}
105 // Return reference to Circuit #id
a9e2aefa 106 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
107 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
ce3f5e87 108 // Retrieve pad hits for a given Hit
a9e2aefa 109 virtual AliMUONPadHit* FirstPad(AliMUONHit *hit, TClonesArray *padHits);
110 virtual AliMUONPadHit* NextPad(TClonesArray *padHits);
ce3f5e87 111 // Return pointers to digits
a9e2aefa 112 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
113 Int_t icluster);
ce3f5e87 114 // Copy Operator
a9e2aefa 115 AliMUON& operator = (const AliMUON& rhs);
aa43efee 116
fe4da5cc 117 protected:
1bd26093 118 Int_t fNCh; // Number of chambers
ce3f5e87 119 Int_t fNTrackingCh; // Number of tracking chambers*
120 AliMUONData* fMUONData; // Data container for MUON subsystem
d652f85c 121 Int_t fSplitLevel; // Splitlevel when making branches in outfiles.
ce3f5e87 122 TObjArray* fChambers; // List of Tracking Chambers
d1cd2474 123 TObjArray *fGeometryBuilders; // List of Geometry Builders
ce3f5e87 124 TObjArray* fTriggerCircuits; // List of Trigger Circuits
125
126 //
fe4da5cc 127 Bool_t fAccCut; //Transport acceptance cut
128 Float_t fAccMin; //Minimum acceptance cut used during transport
129 Float_t fAccMax; //Minimum acceptance cut used during transport
ce3f5e87 130 //
131 // Stepping Parameters
132 Float_t fMaxStepGas; // Maximum step size inside the chamber gas
133 Float_t fMaxStepAlu; // Maximum step size inside the chamber aluminum
134 Float_t fMaxDestepGas; // Maximum relative energy loss in gas
135 Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
136
137 // Pad Iterator
138 Int_t fMaxIterPad; // Maximum pad index
139 Int_t fCurIterPad; // Current pad index
140 // Background eent for event mixing
ce3f5e87 141 AliMUONMerger *fMerger; // ! pointer to merger
142
feb1e780 143 ClassDef(AliMUON,4) // MUON Detector base class
a897a37a 144};
fe4da5cc 145#endif
146