]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUON.h
fMerger field and SetMerger method,
[u/mrichter/AliRoot.git] / MUON / AliMUON.h
1 #ifndef ALIMUON_H
2 #define ALIMUON_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////
9 //  Manager and hits classes for set:MUON     //
10 ////////////////////////////////////////////////
11 #include "AliDetector.h"
12 // #include "AliMUONTriggerCircuit.h" // cp
13
14 class AliMUONChamber;
15 class AliMUONLocalTrigger;
16 class AliMUONGlobalTrigger;
17 class AliMUONTriggerCircuit;
18 class AliMUONTriggerDecision;
19 class AliSegmentation;
20 class AliMUONResponse;
21 class AliMUONMerger;
22 class AliMUONHit;
23 class AliMUONPadHit;
24 class AliMUONRawCluster;
25 class AliMUONClusterFinderVS;
26 class AliMUONReconstHit;
27 class TVector;
28 #include "TObjArray.h"
29 class TFile;
30 class TTree;
31
32
33 class AliMUON : public  AliDetector {
34  public:
35     AliMUON();
36     AliMUON(const char *name, const char *title);
37     AliMUON(const AliMUON& rMUON);
38     virtual       ~AliMUON();
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);
44     virtual void   BuildGeometry();
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);
49     Int_t          DistancetoPrimitive(Int_t px, Int_t py);
50     virtual Int_t  IsVersion() const {return 0;}
51     TClonesArray  *PadHits() {return fPadHits;}
52     TClonesArray  *LocalTrigger() {return fLocalTrigger;}
53     TClonesArray  *GlobalTrigger() {return fGlobalTrigger;}
54     virtual void   MakeBranch(Option_t *opt=" ", char *file=0);
55     void           SetTreeAddress();
56     virtual void   ResetHits();
57     virtual void   ResetDigits();
58     virtual void   ResetTrigger();
59     virtual void   ResetRawClusters();
60     // Cluster Finding
61     virtual void   FindClusters(Int_t event ,Int_t lastEntry);
62     // Digitisation 
63     virtual void   SDigits2Digits();      
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);
67 // Configuration Methods (per station id)
68 //
69 // Set Chamber Segmentation Parameters
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);
75 // Set Signal Generation Parameters
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);
79     virtual void   SetMaxAdc(Int_t id, Int_t p1);
80 // Set Segmentation and Response Model
81     virtual void   SetSegmentationModel(Int_t id, Int_t isec,
82                                         AliSegmentation *segmentation);
83     virtual void   SetResponseModel(Int_t id, AliMUONResponse *response);
84     virtual void   SetNsec(Int_t id, Int_t nsec);
85 // Set Reconstruction Model
86     virtual void   SetReconstructionModel(Int_t id, AliMUONClusterFinderVS *reconstruction);
87 // Set Stepping Parameters
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);
92     virtual void   SetAcceptance(Bool_t acc=0, Float_t angmin=2, Float_t angmax=9);
93 // Set Merger
94     virtual void   SetMerger(AliMUONMerger* thisMerger) {fMerger=thisMerger;}
95 // Response Simulation
96     virtual void   MakePadHits(Float_t xhit,Float_t yhit, Float_t zhit,
97                                Float_t eloss, Float_t tof, Int_t id);
98 // get Trigger answer
99     void   Trigger(Int_t nev);
100 // Return reference to Chamber #id
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]);}
106 // Retrieve pad hits for a given Hit
107     virtual AliMUONPadHit* FirstPad(AliMUONHit *hit, TClonesArray *padHits);
108     virtual AliMUONPadHit* NextPad(TClonesArray *padHits);
109 // Return pointers to digits
110     TObjArray            *Dchambers() {return fDchambers;}
111     Int_t                *Ndch() {return fNdch;}
112     virtual TClonesArray *DigitsAddress(Int_t id)
113         {return ((TClonesArray *) (*fDchambers)[id]);}
114 // Return pointers to reconstructed clusters
115     TObjArray            *RawClusters() {return fRawClusters;}
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);
124     
125             
126  protected:
127     Int_t                 fNCh;                // Number of chambers   
128     Int_t                 fNTrackingCh;        // Number of tracking chambers
129     TObjArray            *fChambers;           // List of Tracking Chambers
130     TObjArray            *fTriggerCircuits;    // List of Trigger Circuits
131     Int_t                 fNPadHits;           // Number of pad hits
132     TClonesArray         *fPadHits;            // List of pad hits
133     TObjArray            *fDchambers;          // List of digits
134     Int_t                *fNdch;               // [fNCh] Number of digits per chamber
135     TObjArray            *fRawClusters;        // List of raw clusters
136     Int_t                *fNrawch;             // [fNTrackingCh] Number of raw clusters  per chamber
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  
141
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
153
154
155
156 // Pad Iterator
157    Int_t fMaxIterPad;        // Maximum pad index
158    Int_t fCurIterPad;        // Current pad index
159 // Background eent for event mixing
160    Text_t *fFileName;           // ! File with background hits
161    TTree *fTrH1;                // Hits Tree for background event
162    TClonesArray *fHits2;        // List of hits for one track only
163    TClonesArray *fPadHits2;     // List of clusters for one track only
164    AliMUONMerger *fMerger;   // ! pointer to merger
165
166    ClassDef(AliMUON,1)  // MUON Detector base class
167 };
168 #endif
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183