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