AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHi...
[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$ */
7
fe4da5cc 8////////////////////////////////////////////////
9// Manager and hits classes for set:MUON //
10////////////////////////////////////////////////
11#include "AliDetector.h"
a9e2aefa 12#include "AliMUONTriggerCircuit.h" // cp
13
a9e2aefa 14class AliMUONChamber;
15class AliMUONLocalTrigger;
16class AliMUONGlobalTrigger;
17class AliMUONTriggerCircuit;
18class AliMUONTriggerDecision;
a30a000f 19class AliSegmentation;
a9e2aefa 20class AliMUONResponse;
21class AliMUONHit;
22class AliMUONPadHit;
a897a37a 23class AliMUONRawCluster;
30aaba74 24class AliMUONClusterFinderVS;
a9e2aefa 25class AliMUONReconstHit;
26class TVector;
27class TObjArray;
28class TFile;
29class TTree;
fe4da5cc 30
31
fe4da5cc 32class AliMUON : public AliDetector {
33 public:
34 AliMUON();
35 AliMUON(const char *name, const char *title);
a9e2aefa 36 AliMUON(const AliMUON& rMUON);
fe4da5cc 37 virtual ~AliMUON();
a9e2aefa 38 virtual void AddHit(Int_t track , Int_t *vol, Float_t *hits);
39 virtual void AddPadHit(Int_t* clhits);
40 virtual void AddDigits(Int_t id, Int_t* tracks, Int_t* charges,
41 Int_t* digits);
42 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
fe4da5cc 43 virtual void BuildGeometry();
a9e2aefa 44 void AddGlobalTrigger(Int_t *singlePlus, Int_t *singleMinus,
45 Int_t *singleUndef, Int_t *pairUnlike,
46 Int_t *pairLike);
47 void AddLocalTrigger(Int_t* ltrigger);
fe4da5cc 48 Int_t DistancetoPrimitive(Int_t px, Int_t py);
a9e2aefa 49 virtual Int_t IsVersion() const {return 0;}
50 TClonesArray *PadHits() {return fPadHits;}
51 TClonesArray *LocalTrigger() {return fLocalTrigger;}
52 TClonesArray *GlobalTrigger() {return fGlobalTrigger;}
fe4da5cc 53 virtual void MakeBranch(Option_t *opt=" ");
54 void SetTreeAddress();
55 virtual void ResetHits();
56 virtual void ResetDigits();
a9e2aefa 57 virtual void ResetTrigger();
a897a37a 58 virtual void ResetRawClusters();
a9e2aefa 59 // Cluster Finding
60 virtual void FindClusters(Int_t event ,Int_t lastEntry);
61 // Digitisation
62 virtual void Digitise(Int_t nev,Int_t bgrEvent, Option_t *opt1=" ",
63 Option_t *opt2=" ",Text_t *name=" ");
64 virtual void SortTracks(Int_t *tracks,Int_t *charges, Int_t ntr);
fe4da5cc 65// Configuration Methods (per station id)
66//
67// Set Chamber Segmentation Parameters
a9e2aefa 68// id refers to the station and isec to the cathode plane
69// Set Z values for all chambers
70 virtual void SetChambersZ(const Float_t *Z);
71 virtual void SetChambersZToDefault(void);
72 virtual void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2);
fe4da5cc 73// Set Signal Generation Parameters
a897a37a 74 virtual void SetSigmaIntegration(Int_t id, Float_t p1);
75 virtual void SetChargeSlope(Int_t id, Float_t p1);
76 virtual void SetChargeSpread(Int_t id, Float_t p1, Float_t p2);
3b3ee6f4 77 virtual void SetMaxAdc(Int_t id, Int_t p1);
fe4da5cc 78// Set Segmentation and Response Model
a9e2aefa 79 virtual void SetSegmentationModel(Int_t id, Int_t isec,
a30a000f 80 AliSegmentation *segmentation);
a9e2aefa 81 virtual void SetResponseModel(Int_t id, AliMUONResponse *response);
fe4da5cc 82 virtual void SetNsec(Int_t id, Int_t nsec);
a897a37a 83// Set Reconstruction Model
30aaba74 84 virtual void SetReconstructionModel(Int_t id, AliMUONClusterFinderVS *reconstruction);
fe4da5cc 85// Set Stepping Parameters
a897a37a 86 virtual void SetMaxStepGas(Float_t p1);
87 virtual void SetMaxStepAlu(Float_t p1);
88 virtual void SetMaxDestepGas(Float_t p1);
89 virtual void SetMaxDestepAlu(Float_t p1);
90 virtual void SetMuonAcc(Bool_t acc=0, Float_t angmin=2, Float_t angmax=9);
fe4da5cc 91// Response Simulation
802a864d 92 virtual void MakePadHits(Float_t xhit,Float_t yhit, Float_t zhit,
a9e2aefa 93 Float_t eloss, Float_t tof, Int_t id);
94// get Trigger answer
95 void Trigger(Int_t nev);
fe4da5cc 96// Return reference to Chamber #id
a9e2aefa 97 virtual AliMUONChamber& Chamber(Int_t id)
98 {return *((AliMUONChamber *) (*fChambers)[id]);}
99// Return reference to Circuit #id
100 virtual AliMUONTriggerCircuit& TriggerCircuit(Int_t id)
101 {return *((AliMUONTriggerCircuit *) (*fTriggerCircuits)[id]);}
fe4da5cc 102// Retrieve pad hits for a given Hit
a9e2aefa 103 virtual AliMUONPadHit* FirstPad(AliMUONHit *hit, TClonesArray *padHits);
104 virtual AliMUONPadHit* NextPad(TClonesArray *padHits);
105// Return pointers to digits
fe4da5cc 106 TObjArray *Dchambers() {return fDchambers;}
107 Int_t *Ndch() {return fNdch;}
a9e2aefa 108 virtual TClonesArray *DigitsAddress(Int_t id)
109 {return ((TClonesArray *) (*fDchambers)[id]);}
fe4da5cc 110// Return pointers to reconstructed clusters
a897a37a 111 TObjArray *RawClusters() {return fRawClusters;}
a9e2aefa 112 Int_t *Nrawch() {return fNrawch;}
113 virtual TClonesArray *RawClustAddress(Int_t id)
114 {return ((TClonesArray *) (*fRawClusters)[id]);}
115
116 AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod,
117 Int_t icluster);
118// Copy Operator
119 AliMUON& operator = (const AliMUON& rhs);
a897a37a 120
a9e2aefa 121
fe4da5cc 122 protected:
123 TObjArray *fChambers; // List of Tracking Chambers
a9e2aefa 124 TObjArray *fTriggerCircuits; // List of Trigger Circuits
125 Int_t fNPadHits; // Number of pad hits
126 TClonesArray *fPadHits; // List of pad hits
fe4da5cc 127 TObjArray *fDchambers; // List of digits
fe4da5cc 128 Int_t *fNdch; // Number of digits
a9e2aefa 129 TObjArray *fRawClusters; // List of raw clusters
130 Int_t *fNrawch; // Number of raw clusters
131 Int_t fNLocalTrigger; // Number of Local Trigger
132 TClonesArray *fLocalTrigger; // List of Local Trigger
133 Int_t fNGlobalTrigger; // Number of Global Trigger
134 TClonesArray *fGlobalTrigger; // List of Global Trigger
a897a37a 135
fe4da5cc 136//
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
140//
141
142// Stepping Parameters
143 Float_t fMaxStepGas; // Maximum step size inside the chamber gas
144 Float_t fMaxStepAlu; // Maximum step size inside the chamber aluminum
145 Float_t fMaxDestepGas; // Maximum relative energy loss in gas
146 Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
a897a37a 147
fe4da5cc 148
a897a37a 149
a9e2aefa 150// Pad Iterator
151 Int_t fMaxIterPad; // Maximum pad index
152 Int_t fCurIterPad; // Current pad index
153// Background eent for event mixing
30f212b7 154 Text_t *fFileName; // ! File with background hits
155 TTree *fTrH1; // Hits Tree for background event
a9e2aefa 156 TClonesArray *fHits2; // List of hits for one track only
157 TClonesArray *fPadHits2; // List of clusters for one track only
a897a37a 158
a1001283 159 ClassDef(AliMUON,1) // MUON Detector base class
a897a37a 160};
fe4da5cc 161#endif
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176