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