]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONv2.h
trigger with new coordinate system in MUONdisplay
[u/mrichter/AliRoot.git] / MUON / AliMUONv2.h
1 #ifndef ALI_MUON_V2_H
2 #define ALI_MUON_V2_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 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
9 //
10 // Class AliMUONv2
11 // ---------------
12 // Inherits from AliMUONv1 but with a more detailed
13 // geometrical description of station 1 
14
15 #include <TVector2.h>
16 #include <TVector3.h>
17
18 #include "AliMUONv1.h"
19 #include "AliMUONSt1Types.h"
20 #include "AliMUONSt1SpecialMotif.h"
21
22 //typedef Float_t GReal_t; // for AliGeant3
23 typedef Double_t GReal_t; // for VirtualMC
24
25 class TTree;
26 class TArrayI;
27 class AliMpSector;
28
29 class AliMUONv2 : public  AliMUONv1 
30 {
31   public:
32     AliMUONv2();
33     AliMUONv2(const char* name, const char* title);
34     AliMUONv2(const AliMUONv2& rMUON);
35     virtual ~AliMUONv2();
36
37     virtual Int_t IsVersion() const;
38     virtual void  CreateMaterials();
39     virtual void  CreateGeometry();
40     virtual void  Init();
41    
42   protected:
43     // Copy Operator
44     AliMUONv2& operator = (const AliMUONv2& rhs);    
45     virtual Int_t  GetChamberId(Int_t volId) const;
46
47   private:
48     // Methods
49     //
50     void CreateHole();
51     void CreateDaughterBoard();
52     void CreateInnerLayers();
53     void CreateQuadrant(Int_t chamber);
54     void CreateFoamBox(const char* name,const TVector2& dimensions);
55     void CreatePlaneSegment(const char* name,const TVector2& dimensions,
56                      Int_t nofHoles);
57     void CreateFrame(Int_t chamber);
58
59     void PlaceInnerLayers(Int_t chamber);
60     void PlaceSector(AliMpSector* sector, TSpecialMap specialMap,
61                      const TVector3& where, Bool_t reflectZ, Int_t chamber);
62                      
63     TString QuadrantMLayerName(Int_t chamber) const;
64     TString QuadrantNLayerName(Int_t chamber) const;
65     TString QuadrantFLayerName(Int_t chamber) const;
66     TString GasVolumeName(const TString& name, Int_t chamber) const;
67
68     void   AddChamberGid(Int_t id,Int_t volName,Int_t idx);
69     Bool_t IsInChamber(Int_t ich, Int_t volGid) const;   
70
71     GReal_t TotalHzPlane() const ;         // Total mechanical plane half Size
72     GReal_t TotalHzDaughter() const ;      // Total daughter plane half Size
73     GReal_t TotalHz() const ;              // Total plane half Size
74        
75     // Constants
76     //
77     static const GReal_t fgkHzPadPlane;    // Pad plane
78     static const GReal_t fgkHzFoam;        // Foam of mechanicalplane
79     static const GReal_t fgkHzFR4;         // FR4 of mechanical plane
80     static const GReal_t fgkHzSnPb;        // Pad/Kapton connection (66 pt)
81     static const GReal_t fgkHzKapton;      // Kapton
82     static const GReal_t fgkHzBergPlastic; // Berg connector 
83     static const GReal_t fgkHzBergCopper;  // Berg connector (80 pt)
84     static const GReal_t fgkHzDaughter;    // Daughter board
85     static const GReal_t fgkHzGas;         // ArCO2 Gas
86         
87     // Sensitive copper pads, foam layer, PCB and electronics model parameters
88     static const GReal_t fgkHxHole;
89     static const GReal_t fgkHyHole;
90     static const GReal_t fgkHxBergPlastic;
91     static const GReal_t fgkHyBergPlastic;
92     static const GReal_t fgkHxBergCopper;
93     static const GReal_t fgkHyBergCopper;
94     static const GReal_t fgkHxKapton;
95     static const GReal_t fgkHyKapton;
96     static const GReal_t fgkHxDaughter;
97     static const GReal_t fgkHyDaughter;
98     static const GReal_t fgkOffsetX;
99     static const GReal_t fgkOffsetY;
100     static const GReal_t fgkDeltaFilleEtamX;
101     static const GReal_t fgkDeltaFilleEtamY;
102
103     static const GReal_t fgkDeltaQuadLHC; //LHC Origin wrt Quadrant Origin
104     static const GReal_t fgkFrameOffset;  
105
106     // Quadrant Mother volume - TUBS1   
107     static const GReal_t fgkMotherIR1;
108     static const GReal_t fgkMotherOR1; 
109     static const GReal_t fgkMotherThick1;  
110     static const GReal_t fgkMotherPhiL1; 
111     static const GReal_t fgkMotherPhiU1;
112
113     // Quadrant Mother volume - TUBS2 (2 copies at different Z's)   
114     static const GReal_t fgkMotherIR2;
115     static const GReal_t fgkMotherOR2; 
116     static const GReal_t fgkMotherThick2;  
117     static const GReal_t fgkMotherPhiL2; 
118     static const GReal_t fgkMotherPhiU2;    
119
120     static const char* fgkHoleName;          // prefix for automatic volume naming
121     static const char* fgkQuadrantMLayerName;// prefix for automatic volume naming
122     static const char* fgkQuadrantNLayerName;// prefix for automatic volume naming
123     static const char* fgkQuadrantFLayerName;// prefix for automatic volume naming
124     static const char* fgkDaughterName;      // prefix for automatic volume naming
125     static const char  fgkFoamLayerSuffix;   // suffix for automatic volume naming
126
127     // Data members
128     //
129     Float_t  fRadlCopper;  //! copper computed radiation length
130     Float_t  fRadlFoam;    //! foam   computed radiation length
131     Float_t  fRadlFR4;     //! FR4    computed radiation length
132     TArrayI* fChamberV2[2];// Sensitive volumes IDs    
133     
134   ClassDef(AliMUONv2,1)  // MUON Detector base class
135 };
136
137 // inline functions
138
139 inline Int_t AliMUONv2::IsVersion () const 
140 { return 2; }
141
142 inline GReal_t AliMUONv2::TotalHzPlane() const 
143 //{ return fgkHzPadPlane + fgkHzFoam + fgkHzFR4; }
144 { return fgkHzFoam + fgkHzFR4; }
145
146 inline GReal_t AliMUONv2::TotalHzDaughter() const 
147 { return fgkHzBergPlastic + fgkHzDaughter; }
148
149 inline GReal_t AliMUONv2::TotalHz() const 
150 { return TotalHzPlane() + TotalHzDaughter(); }
151
152 inline TString AliMUONv2::QuadrantMLayerName(Int_t chamber) const
153 { return Form("%s%d",fgkQuadrantMLayerName,chamber); }
154
155 inline TString AliMUONv2::QuadrantNLayerName(Int_t chamber) const
156 { return Form("%s%d",fgkQuadrantNLayerName,chamber); }
157
158 inline TString AliMUONv2::QuadrantFLayerName(Int_t chamber) const
159 { return Form("%s%d",fgkQuadrantFLayerName,chamber); }
160
161 inline void AliMUONv2::AddChamberGid(Int_t id,Int_t volName,Int_t idx)
162 { fChamberV2[id]->AddAt(volName,idx); }
163
164
165 #endif //ALI_MUON_V2_H