Attachment 'PDGB.h'
Download 1 #ifndef MYPHYS_GEOM_DATABASE_H
2 #define MYPHYS_GEOM_DATABASE_H 1
3
4 #include <iostream>
5 #include "marlin/Processor.h"
6 #include "lcio.h"
7 #include <B_Util.h>
8
9 /**
10 * <br>
11 * Phys_Geom_Database class make connection between detector geometry and <br>
12 * Particle-Flow reconstruction package. <br>
13 * <br>
14 * It might be forms as geometry driver in Mokka. <br>
15 * Even more - maybe better create it at the simulation <br>
16 * step and put it onto LCIO simulation output file. <br>
17 * <br>
18 * ************************************************************* <br>
19 * It strongly depends on the PARTICULAR detector geometry. <br>
20 * GEAR is used to get that particular detector geometry <br>
21 * "The Latest" and unique link to geometry before <br>
22 * the PFA reconstruction procedure <br>
23 * **************************************************************** <br>
24 * <br>
25 * It also may consist of all reconstruction tuning parameters. <br>
26 * Some of them depends on zone number, some does not. <br>
27 * <br>
28 * Usage: <br>
29 * <br>
30 * myPGdb::ZONE myPGdb::get_zone(Point3D &p); <br>
31 * Function return zone "number" (enum type) <br>
32 * for any arbitrary 3-d point <br>
33 * <br>
34 * if Hit h is a hit than h.cp is Caretsian coordinates of hit; <br>
35 * <br>
36 * ZONE i=myPGDB.get_zone(h.cp); <br>
37 * ... <br>
38 * int iel = pgdb[i].det_mat; <br>
39 * BooElemens[pgdb[i].det_mat]; <br>
40 * double ecal_inn_rad; <br>
41 * pgdb[myPGDB::ECAL1_BAR].r_inner; <br>
42 * <br>
43 * Created 3 Oct 2004 V.L. Morgunov <br>
44 * Last update 6 August 2006 <br>
45 * Last update 26 April 2006 <br>
46 * <br>
47 * Addons from Predrag Krsonos 26-April-2007 <br>
48 * <br>
49 * <br>
50 * @author V. L. Morgunov, A. Zhelezov (DESY/ITEP) <br>
51 * <br>
52 */
53
54 //============================================================================
55 class myPGdb {
56 //============================================================================
57 public:
58 // !! Change get_name() in cc file in case of changes here !!
59 typedef enum {
60 VTX=0,
61 TPC,
62 ENDPLATE1, // TPC
63 ENDPLATE2, // TPC
64 ECAL1_BAR,
65 ECAL2_BAR,
66 ECAL1_CAP,
67 ECAL2_CAP,
68 HCAL_BAR,
69 HCAL_CAP,
70 COIL,
71 DETECTOR,
72 WORLD,
73 ZONE_COUNT
74 } ZONE;
75 //============================================================================
76 class Volume {
77 //============================================================================
78 public:
79 typedef enum {
80 CYLINDER=0,
81 POLYGON
82 }SHAPE;
83 SHAPE shape;
84 unsigned symmetry;
85 double phi0;
86 double r_inner;
87 double r_outer;
88 double z_inner;
89 double z_outer;
90 };
91 //============================================================================
92 class Zone : public Volume {
93 //============================================================================
94 private:
95 double r_min;
96 double r_max;
97 double a0; // Polygone segment angle = 2Pi/symmetry for speed up
98 public:
99 unsigned no; // Zone ID
100 //---------------------------------
101 // Detector Parameters
102 //---------------------------------
103 unsigned n_sampl; // Number of layers in calorimeter or TPC rings
104 double sampling; // Sampling layer thickness
105 unsigned min_lay; // Minimal Layer number
106 unsigned max_lay; // Maximal Layer number
107 double absorber; // Absorber layer thickness
108 int abs_mat; // Absorber material
109 double detector; // Detector layer thickness
110 int det_mat; // Detector material
111 double cell_size; // Cell size in X and Y (square shape)
112 double Zeff; // effective Z
113 double Aeff; // effective A
114 double Rhoeff; // effective Ro g/cm^3
115 double Ieff; // effective exc. energy [GeV]
116 double Rmeff ;// Molere radius [mm]
117 double x0eff; // X0 [mm]
118 double Eceff; // Critical energy [MeV]
119 double eprime; // EM shower parameter
120 //---------------------------------
121 // Physical Parameters
122 //---------------------------------
123 // MIP most probable detector energy, does not include energy lost in absorber
124 double mip_vis;
125 // Coeff converts visible energy to physical energy
126 // i.e. converts energy lost in detector into energy lost in sampling layer
127 // including absorber
128 double e_coeff;
129
130 double r_neighbor; // Predicted distance to neighbor for particular zone
131
132 double cell_vol; // Volume including absorber
133 // RGB Predicted cutoffs for particular zone around MIP
134 double cut_noise;
135 double cut_mip;
136 double cut_hadr;
137 // MIP most probable physical energy, i.e. including energy lost in absorber
138 double mip_whole;
139
140 double mip_dens; // MIP energy density in whole cell volume
141
142 const char *get_name() const;
143
144 private:
145 friend class myPGdb;
146 void _init_final();
147 void _init_tpc();
148 void _init_endpl1();
149 void _init_endpl2();
150 void _init_ecal_bar_common();
151 void _init_ecal1_bar(int last_layer);
152 void _init_ecal2_bar(int last_ecal1_layer);
153 void _init_ecal_cap_common();
154 void _init_ecal1_cap(int last_layer);
155 void _init_ecal2_cap(int last_ecal1_layer);
156 void _init_hcal(myPGdb::ZONE zone);
157 void _init_all_common();
158 void _init_vtx();
159 void _init_coil();
160 void _init_detector();
161 void _init_world();
162 // Geometry
163 bool inside(Point3D &p);
164 bool in_polygon(double r,Point3D &p);
165 };
166
167 private:
168 Zone zone[ZONE_COUNT];
169
170 public:
171 double B_Field;
172 void init();
173 ZONE get_zone(Point3D &p);
174 // ZONE get_zone(Hit &h); // Hit is not separate class ????? will be less calculations
175 const Zone &operator[](ZONE z) const { return zone[z]; }
176
177 }; // +++++++++++ End myPGdb -- Phys_Geom_Database definition +++++++++++++++++++++++
178
179 extern myPGdb myPGDB;
180
181 std::ostream &operator<<(std::ostream &o,const myPGdb &d);
182
183 using namespace lcio ;
184 using namespace marlin ;
185
186 //============================================================================
187 class myPGDBP : public Processor {
188 //============================================================================
189 public:
190 virtual Processor* newProcessor() { return new myPGDBP ; }
191 myPGDBP();
192 virtual void init() ;
193 };
194
195 #endif
196
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.