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