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