]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONChamber.h
Bug in AliMUONHit constructor for fPz and fPx calculation (Arthur, Bruce and Ivana)
[u/mrichter/AliRoot.git] / MUON / AliMUONChamber.h
1 #ifndef ALIMUONCHAMBER_H
2 #define ALIMUONCHAMBER_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 // Revision of includes 07/05/2004
8
9 #include <TObject.h>
10 #include <TObjArray.h>
11
12 #include "AliSegmentation.h"
13 #include "AliMUONResponse.h"
14
15 class AliMUONClusterFinderVS;
16 class AliMUONChamberGeometry;
17
18 class AliMUONChamber : public TObject
19 {
20  public:
21     AliMUONChamber();
22     AliMUONChamber(Int_t id);
23     virtual ~AliMUONChamber();
24     
25 //
26 // Get chamber Id
27   virtual Int_t   GetId() const {return fId;}
28 //
29
30 // Get chamber Id
31   virtual Bool_t  IsSensId(Int_t volId) const;
32   
33 // Initialisation
34   virtual void    Init();
35 // Set z-position of chamber  
36   virtual void    SetZ(Float_t Z) {fZ = Z;}
37 // Get z-position of chamber  
38   virtual Float_t Z() const {return fZ;}
39 // Set inner radius of sensitive volume 
40   virtual void SetRInner(Float_t rmin) {frMin=rmin;}
41 // Set outer radius of sensitive volum  
42   virtual void SetROuter(Float_t rmax) {frMax=rmax;}  
43
44 // Return inner radius of sensitive volume 
45   virtual  Float_t RInner() const      {return frMin;}
46 // Return outer radius of sensitive volum  
47   virtual Float_t ROuter() const       {return frMax;}  
48 //  
49 // Set response model
50   virtual void    SetResponseModel(AliMUONResponse* thisResponse) {fResponse=thisResponse;}
51 //  
52 // Set segmentation model
53   virtual void    SetSegmentationModel(Int_t i, AliSegmentation* thisSegmentation) {
54       fSegmentation->AddAt(thisSegmentation,i-1);
55   }
56 // Set Cluster reconstruction model  
57   virtual void    SetReconstructionModel(AliMUONClusterFinderVS *thisReconstruction) {
58       fReconstruction = thisReconstruction;
59   }
60 //  
61 //  Get pointer to response model
62   virtual AliMUONResponse* &ResponseModel(){return fResponse;}
63 //  
64 //  Get reference to segmentation model
65   virtual AliSegmentation*  SegmentationModel(Int_t isec) {
66       return (AliSegmentation *) (*fSegmentation)[isec-1];
67   }
68   virtual TObjArray* ChamberSegmentation() {return fSegmentation;}
69 //  Get pointer to cluster reconstruction model
70   virtual AliMUONClusterFinderVS* &ReconstructionModel(){return fReconstruction;}
71 // Get number of segmentation sectors  
72   virtual Int_t Nsec() const        {return fnsec;}
73 // Set number of segmented cathodes (1 or 2)  
74   virtual void  SetNsec(Int_t nsec) {fnsec=nsec;}
75 //
76 // Member function forwarding to the segmentation and response models
77 //
78 // Calculate pulse height from energy loss  
79   virtual Float_t IntPH(Float_t eloss) {return fResponse->IntPH(eloss);}
80 //  
81 // Ask segmentation if signal should be generated  
82   virtual Int_t   SigGenCond(Float_t x, Float_t y, Float_t z);
83 //
84 // Initialisation of segmentation for hit  
85   virtual void    SigGenInit(Float_t x, Float_t y, Float_t z);
86 // Initialisation of charge fluctuation for given hit
87   virtual void    ChargeCorrelationInit();
88
89 // Configuration forwarding
90 //
91 // Define signal distribution region
92 // by number of sigmas of the distribution function
93   virtual void   SetSigmaIntegration(Float_t p1)
94       {fResponse->SetSigmaIntegration(p1);}
95 // Set the single electron pulse-height (ADCchan/e)  
96   virtual void   SetChargeSlope(Float_t p1)              {fResponse->SetChargeSlope(p1);}
97 // Set width of charge distribution function  
98   virtual void   SetChargeSpread(Float_t p1, Float_t p2) {fResponse->SetChargeSpread(p1,p2);}
99 // Set maximum ADC count value
100   virtual void   SetMaxAdc(Int_t p1)                   {fResponse->SetMaxAdc(p1);}
101 // Set Pad size
102   virtual void   SetPadSize(Int_t isec, Float_t p1, Float_t p2) {
103       ((AliSegmentation*) (*fSegmentation)[isec-1])->SetPadSize(p1,p2);
104   }
105 //  
106 // Cluster formation method (charge disintegration)
107   virtual void   DisIntegration(Float_t eloss, Float_t tof,
108                                 Float_t xhit, Float_t yhit, Float_t zhit,
109                                 Int_t& x, Float_t newclust[6][500]);
110 // Initialize geometry related parameters  
111   virtual void    InitGeo(Float_t z);
112 //
113   virtual Float_t DGas() const {return fdGas;}
114   virtual Float_t DAlu() const {return fdAlu;}  
115   virtual void SetDGas(Float_t DGas) {fdGas = DGas;}
116   virtual void SetDAlu(Float_t DAlu) {fdAlu = DAlu;}  
117   virtual void SetChargeCorrel(Float_t correl) {fResponse->SetChargeCorrel(correl);}
118
119 // geometry  
120   void SetGeometry(AliMUONChamberGeometry* geometry) {fGeometry = geometry;}
121   AliMUONChamberGeometry* GetGeometry() const {return fGeometry; }
122
123   
124  protected:
125   AliMUONChamber(const AliMUONChamber & rChamber);
126   // assignment operator  
127   AliMUONChamber& operator =(const AliMUONChamber& rhs);
128
129   Int_t   fId;   // chamber number
130   Float_t fdGas; // half gaz gap
131   Float_t fdAlu; // half Alu width  
132   Float_t fZ;    // Z position (cm)
133   Int_t   fnsec; // number of semented cathode planes
134   Float_t frMin; // innermost sensitive radius
135   Float_t frMax; // outermost sensitive radius
136   Float_t fCurrentCorrel; //! charge correlation for current hit.
137
138   TObjArray              *fSegmentation;    // pointer to segmentation
139   AliMUONClusterFinderVS *fReconstruction;  // pointer to reconstruction
140   AliMUONResponse        *fResponse;        // pointer to response
141   AliMUONChamberGeometry *fGeometry;        // pointer to geometry
142   ClassDef(AliMUONChamber,2) // Muon tracking chamber class
143 };
144
145 #endif