DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DCH_info.h
Go to the documentation of this file.
1 #ifndef DDREC_DCH_INFO_H
2 #define DDREC_DCH_INFO_H
3 
4 #include "TMath.h"
5 
6 #include "DDRec/DetectorData.h"
7 #include <map>
8 #include "TVector3.h"
9 
10 namespace dd4hep { namespace rec {
11 
12 
13 /* Data structure to store DCH geometry parameters
14  *
15  * Global parameters are members of this class
16  *
17  * Parameters of each layer are stored in the helper
18  * class DCH_info_layer.
19  *
20  * The member database is a container which stores one
21  * DCH_info_layer object per layer.
22  *
23  * To use this class, instantiate an object and define the global parameters.
24  * Then call the method BuildLayerDatabase, which calculates
25  * the parameters of each layer based on the global parameters.
26  *
27  * @author A. Tolosa Delgado, CERN
28  * @date April 2024
29  * @version Drift chamber v2
30  *
31  */
33 {
34 public:
35  // use alias of types to show more clearly what the variable is
36  // if everything is double, the code is not readable
38  using DCH_layer = int;
40  using DCH_length_t = double;
42  using DCH_angle_t = double;
49 
54 
56  int ncell0 = {0};
60  int ncell_increment = {0};
61 
63  int ncell_per_sector = {0};
64 
73 
77 
79  double first_width = {0};
82 
83  void Set_lhalf(DCH_length_t _dch_Lhalf){Lhalf=_dch_Lhalf;}
84  void Set_rin (DCH_length_t _dch_rin ){rin = _dch_rin; }
85  void Set_rout (DCH_length_t _dch_rout ){rout = _dch_rout;}
86 
87  void Set_guard_rin_at_z0 (DCH_length_t _dch_rin_z0_guard ){guard_inner_r_at_z0 = _dch_rin_z0_guard; }
88  void Set_guard_rout_at_zL2(DCH_length_t _dch_rout_zL2_guard){guard_outer_r_at_zL2 = _dch_rout_zL2_guard; }
89 
90  void Set_ncell0 (int _ncell0 ){ncell0 = _ncell0; }
91  void Set_ncell_increment (int _ncell_increment ){ncell_increment = _ncell_increment; }
92 
93  void Set_nlayersPerSuperlayer(int _nlayersPerSuperlayer){nlayersPerSuperlayer = _nlayersPerSuperlayer;}
94  void Set_nsuperlayers (int _nsuperlayers ){nsuperlayers = _nsuperlayers; }
95 
96  void Set_ncell_per_sector(int _ncell_per_sector){ncell_per_sector = _ncell_per_sector;}
97 
98  void Set_twist_angle (DCH_length_t _dch_twist_angle ){twist_angle = _dch_twist_angle;}
99 
100  void Set_first_width (double _first_width ){first_width = _first_width; }
101  void Set_first_sense_r(double _first_sense_r){first_sense_r = _first_sense_r; }
102 
103 
106  int Get_ncells(int ilayer){return database.at(ilayer).nwires/2;}
107 
109  DCH_angle_t Get_phi_width(int ilayer){return (TMath::TwoPi()/Get_ncells(ilayer))*dd4hep::rad;}
110 
113  DCH_angle_t Get_cell_phi_angle(int ilayer, int nphi){ return (Get_phi_width(ilayer) * (nphi + 0.25*(ilayer%2)));}
114 
117  int Get_nsuperlayer_minus_1(int ilayer){ return int((ilayer-1)/nlayersPerSuperlayer);}
118 
121  return r_z0/cos(twist_angle/2/dd4hep::rad);
122  }
123 
126  return atan( r_z0/Lhalf*tan(twist_angle/2/dd4hep::rad));
127  }
128 
131  return atan( r_zLhalf/Lhalf*sin(twist_angle/2/dd4hep::rad));
132  }
133 
135  DCH_length_t WireLength(int nlayer, DCH_length_t r_z0) const {
136  auto Pitch_z0 = database.at(nlayer).Pitch_z0(r_z0);
137  return 2*Lhalf/cos(atan(Pitch_z0/(2*Lhalf)))/cos(stereoangle_z0(r_z0)/dd4hep::rad) ;
138  };
139 
142  {
146  int nwires = {0};
148  double height_z0 = {0.};
150  double width_z0 = {0.};
151 
154 
157 
160 
163  bool IsStereoPositive() const {
164  return (1 == layer%2);
165  }
167  int StereoSign() const {
168  return (IsStereoPositive()*2 - 1);
169  }
170 
173  return TMath::TwoPi()*r_z0/nwires;
174  };
175 
176  };
178  std::map<DCH_layer, DCH_info_layer> database;
179  bool IsDatabaseEmpty() const { return database.empty(); }
180 
181  inline void BuildLayerDatabase();
182  inline void Show_DCH_info_database(std::ostream& io) const;
183 
185  inline bool IsValid() const {return ((0 < Lhalf*rout) && (not IsDatabaseEmpty() ) ); }
186  //--------
187  // The following functions are used in the digitization/reconstruction
188  // Notation: ILayer is the correlative number of the layer. Layer is reserved to number within a superlayer
189  inline DCH_layer CalculateILayerFromCellIDFields(int layer, int superlayer) const { DCH_layer ilayer = layer + (this->nlayersPerSuperlayer)*superlayer + 1; return ilayer;}
190  inline TVector3 Calculate_hitpos_to_wire_vector(int ilayer, int nphi, const TVector3& hit_position /*in cm*/) const;
191  inline TVector3 Calculate_wire_vector_ez (int ilayer, int nphi) const;
192  inline TVector3 Calculate_wire_z0_point (int ilayer, int nphi) const;
193  inline double Calculate_wire_phi_z0 (int ilayer, int nphi) const;
194 
195 };
197 inline std::ostream& operator<<( std::ostream& io , const DCH_info& d ){d.Show_DCH_info_database(io); return io;}
198 
200 {
201  // do not fill twice the database
202  if( not this->IsDatabaseEmpty() ) return;
203 
204  auto ff_check_positive_parameter = [](double p, std::string pname) -> void {
205  if(p<=0)throw std::runtime_error(Form("DCH: %s must be positive",pname.c_str()));
206  return;
207  };
208  ff_check_positive_parameter(this->rin ,"inner radius");
209  ff_check_positive_parameter(this->rout ,"outer radius");
210  ff_check_positive_parameter(this->Lhalf,"half length" );
211 
212  ff_check_positive_parameter(this->guard_inner_r_at_z0 ,"inner radius of guard wires" );
213  ff_check_positive_parameter(this->guard_outer_r_at_zL2,"outer radius of guard wires" );
214 
215 
216  ff_check_positive_parameter(this->ncell0,"ncells in the first layer" );
217  ff_check_positive_parameter(this->ncell_increment,"ncells increment per superlayer" );
218  ff_check_positive_parameter(this->ncell_per_sector,"ncells per sector" );
219 
220  // if dch_ncell_per_sector is not divisor of dch_ncell0 and dch_ncell_increment
221  // throw an error
222  if( 0 != (ncell0 % ncell_per_sector) || 0 != (ncell_increment % ncell_per_sector) )
223  throw std::runtime_error("dch_ncell_per_sector is not divisor of dch_ncell0 or dch_ncell_increment");
224 
225  ff_check_positive_parameter(this->nsuperlayers,"number of superlayers" );
226  ff_check_positive_parameter(this->nlayersPerSuperlayer,"number of layers per superlayer" );
227 
230  this->nlayers = this->nsuperlayers * this->nlayersPerSuperlayer;
231 
232  ff_check_positive_parameter(this->first_width,"width of first layer cells" );
233  ff_check_positive_parameter(this->first_sense_r,"radius of first layer cells" );
234 
235 
236  // intialize layer 1 from input parameters
237  {
238  DCH_info_layer layer1_info;
239  layer1_info.layer = 1;
240  layer1_info.nwires = 2*this->ncell0;
241  layer1_info.height_z0 = first_width;
242  layer1_info.radius_sw_z0 = first_sense_r;
243  layer1_info.radius_fdw_z0 = first_sense_r - 0.5*first_width;
244  layer1_info.radius_fuw_z0 = first_sense_r + 0.5*first_width;
245  layer1_info.width_z0 = TMath::TwoPi()*first_sense_r/this->ncell0;
246 
247  this->database.emplace(layer1_info.layer, layer1_info);
248  }
249 
250  // some parameters of the following layer are calculated based on the previous ones
251  // the rest are left as methods of DCH_info or DCH_info_layer class
252  // loop over all layers, skipping the first one
253  for(int ilayer = 2; ilayer<= this->nlayers; ++ilayer)
254  {
255  // initialize empty object, parameters are set later
256  DCH_info_layer layer_info;
257 
258  // the loop counter actually corresponds to the layer number
259  layer_info.layer = ilayer;
260  // nwires is twice the number of cells in this particular layer (ilayer)
261  layer_info.nwires = 2*(this->ncell0 + this->ncell_increment*Get_nsuperlayer_minus_1(ilayer) );
262 
263  // the previous layer info is needed to calculate parameters of current layer
264  const auto& previousLayer = this->database.at(ilayer-1);
265 
266  //calculate height_z0, radius_sw_z0
267  {
268  double h = previousLayer.height_z0;
269  double ru = previousLayer.radius_fuw_z0;
270  double rd = previousLayer.radius_fdw_z0;
271 
272  if(0 == Get_nsuperlayer_minus_1(ilayer))
273  layer_info.height_z0 = h*ru/rd;
274  else
275  layer_info.height_z0 = TMath::TwoPi()*ru/(0.5*layer_info.nwires - TMath::Pi());
276 
277  layer_info.radius_sw_z0 = 0.5*layer_info.height_z0 + ru;
278  }
279 
280  //calculate radius_fdw_z0, radius_fuw_z0, width_z0
281  layer_info.radius_fdw_z0 = previousLayer.radius_fuw_z0;
282  layer_info.radius_fuw_z0 = previousLayer.radius_fuw_z0 + layer_info.height_z0;
283  layer_info.width_z0 = TMath::TwoPi()*layer_info.radius_sw_z0/(0.5*layer_info.nwires);
284 
285  // according to expert prescription, width_z0 == height_z0
286  if(fabs(layer_info.width_z0 - layer_info.height_z0)>1e-4)
287  throw std::runtime_error("fabs(l.width_z0 - l.height_z0)>1e-4");
288 
289 
290 
291  this->database.emplace(ilayer, layer_info);
292  }
293 
294  std::cout << "\t+ Total size of DCH database = " << database.size() << std::endl;
295  return;
296 }
297 
298 inline void DCH_info_struct::Show_DCH_info_database(std::ostream & oss) const
299 {
300  oss << "\n";
301  oss << "Global parameters of DCH:\n";
302  oss << "\tGas, half length/mm = " << Lhalf/dd4hep::mm << '\n';
303  oss << "\tGas, radius in/mm = " << rin/dd4hep::mm << '\n';
304  oss << "\tGas, radius out/mm = " << rout/dd4hep::mm<< '\n';
305  oss << "\tGuard, radius in(z=0)/mm = " << guard_inner_r_at_z0/dd4hep::mm << '\n';
306  oss << "\tGuard, radius out(z=L/2)/mm = " << guard_outer_r_at_zL2/dd4hep::mm << '\n';
307  oss << "\n";
308  oss << "\tTwist angle (2*alpha) / deg = " << twist_angle/dd4hep::deg << '\n';
309  oss << "\n";
310  oss << "\tN superlayers = " << nsuperlayers << '\n';
311  oss << "\tN layers per superlayer = " << nlayersPerSuperlayer << '\n';
312  oss << "\tN layers = " << nlayers << '\n';
313  oss << "\n";
314  oss << "\tN cells layer1 = " << ncell0 << '\n';
315  oss << "\tN cells increment per superlayer = " << ncell_increment << '\n';
316  oss << "\tN cells per sector = " << ncell_per_sector << '\n';
317  oss << "\n";
318  oss << "Layer parameters of DCH:\n";
319  oss
320  << "\t" << "layer"
321  << "\t" << "nwires"
322  << "\t" << "height_z0/mm"
323  << "\t" << "width_z0/mm"
324  << "\t" << "radius_fdw_z0/mm"
325  << "\t" << "radius_sw_z0/mm"
326  << "\t" << "radius_fuw_z0/mm"
327  << "\t" << "stereoangle_z0/deg"
328  << "\t" << "Pitch_z0/mm"
329  << "\t" << "radius_sw_zLhalf/mm"
330  << "\t" << "WireLength/mm"
331  << "\n" << std::endl;
332 
333  if( this->IsDatabaseEmpty() )
334  {
335  oss << "\nDatabase empty\n";
336  return;
337  }
338 
339  for(const auto& [nlayer, l] : database )
340  {
341  oss
342  << "\t" << l.layer
343  << "\t" << l.nwires
344  << "\t" << l.height_z0/dd4hep::mm
345  << "\t" << l.width_z0/dd4hep::mm
346  << "\t" << l.radius_fdw_z0/dd4hep::mm
347  << "\t" << l.radius_sw_z0/dd4hep::mm
348  << "\t" << l.radius_fuw_z0/dd4hep::mm
349  << "\t" << l.StereoSign()*this->stereoangle_z0(l.radius_sw_z0)/dd4hep::deg
350  << "\t" << l.Pitch_z0(l.radius_sw_z0)/dd4hep::mm
351  << "\t" << this->Radius_zLhalf(l.radius_sw_z0)/dd4hep::mm
352  << "\t" << this->WireLength(l.layer,l.radius_sw_z0)/dd4hep::mm
353  << "\n" << std::endl;
354  }
355  return;
356 }
357 
358 
362 
363 inline TVector3 DCH_info_struct::Calculate_wire_vector_ez(int ilayer, int nphi) const {
364  auto& l = this->database.at(ilayer);
365 
366  // See original paper Hoshina et al, Computer Physics Communications 153 (2003) 3
367  // eq. 2.9, for the definition of ez, vector along the wire
368 
369  // initialize some variables
370  int stereosign = l.StereoSign();
371  double rz0 = l.radius_sw_z0;
372  double dphi = this->twist_angle;
373  // kappa is the same as in eq. 2.9
374  double kappa = (1. / this->Lhalf) * tan(dphi / 2);
375 
376  //--- calculating wire position
377  // the points p1 and p2 correspond to the ends of the wire
378 
379  // point 1
380  double x1 = rz0; // m
381  double y1 = -stereosign * rz0 * kappa * this->Lhalf; // m
382  double z1 = -this->Lhalf; // m
383 
384  TVector3 p1(x1, y1, z1);
385 
386  // point 2
387  double x2 = rz0; // m
388  double y2 = stereosign * rz0 * kappa * this->Lhalf; // m
389  double z2 = this->Lhalf; // m
390 
391  TVector3 p2(x2, y2, z2);
392 
393  // calculate phi rotation of whole twisted tube, ie, rotation at z=0
394  double phi_z0 = Calculate_wire_phi_z0(ilayer, nphi);
395  p1.RotateZ(phi_z0);
396  p2.RotateZ(phi_z0);
397 
398  //--- end calculating wire position
399 
400  return (p2 - p1).Unit();
401 }
402 
403 inline TVector3 DCH_info_struct::Calculate_wire_z0_point(int ilayer, int nphi) const {
404  auto& l = this->database.at(ilayer);
405  double rz0 = l.radius_sw_z0;
406  TVector3 p1(rz0, 0, 0);
407  double phi_z0 = Calculate_wire_phi_z0(ilayer, nphi);
408  p1.RotateZ(phi_z0);
409  return p1;
410 }
411 
412 // calculate phi rotation of whole twisted tube, ie, rotation at z=0
413 inline double DCH_info_struct::Calculate_wire_phi_z0(int ilayer, int nphi) const {
414  auto& l = this->database.at(ilayer);
415  int ncells = l.nwires / 2;
416  double phistep = TMath::TwoPi() / ncells;
417  double phi_z0 = (nphi + 0.25 * (l.layer % 2)) * phistep;
418  return phi_z0;
419 }
420 
424 inline TVector3 DCH_info_struct::Calculate_hitpos_to_wire_vector(int ilayer, int nphi, const TVector3& hit_position /*in cm*/) const {
425  // Solution distance from a point to a line given here:
426  // https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Vector_formulation
427  TVector3 n = this->Calculate_wire_vector_ez(ilayer, nphi);
428  TVector3 a = this->Calculate_wire_z0_point(ilayer, nphi);
429  // Remember using cm as natural units of DD4hep consistently!
430  // TVector3 p {hit_position.x()*MM_TO_CM,hit_position.y()*MM_TO_CM,hit_position.z()*MM_TO_CM};
431 
432  TVector3 a_minus_p = a - hit_position;
433  double a_minus_p_dot_n = a_minus_p.Dot(n);
434  TVector3 scaled_n = a_minus_p_dot_n * n;
435  //hit_to_wire_vector = a_minus_p - scaled_n;
436  return (a_minus_p - scaled_n);
437 }
438 
439 }} // end namespace dd4hep::rec::
440 
441 #endif // DDREC_DCH_INFO_H
dd4hep::rec::DCH_info_struct::Calculate_wire_z0_point
TVector3 Calculate_wire_z0_point(int ilayer, int nphi) const
Definition: DCH_info.h:403
dd4hep::rec::DCH_info_struct::CalculateILayerFromCellIDFields
DCH_layer CalculateILayerFromCellIDFields(int layer, int superlayer) const
Definition: DCH_info.h:189
dd4hep::rec::DCH_info_struct::twist_angle
DCH_angle_t twist_angle
Definition: DCH_info.h:76
dd4hep::rec::DCH_info_struct::Set_ncell_increment
void Set_ncell_increment(int _ncell_increment)
Definition: DCH_info.h:91
dd4hep::rec::DCH_info_struct::stereoangle_zLhalf
DCH_angle_t stereoangle_zLhalf(DCH_length_t r_zLhalf) const
tan(stereoangle) = R(z=L/2) / (L/2) * sin( twist_angle/2)
Definition: DCH_info.h:130
DetectorData.h
dd4hep::rec::DCH_info_struct::Get_nsuperlayer_minus_1
int Get_nsuperlayer_minus_1(int ilayer)
Definition: DCH_info.h:117
dd4hep::rec::DCH_info_struct::DCH_info_layer::Pitch_z0
DCH_length_t Pitch_z0(DCH_length_t r_z0) const
separation between wires (along the circle)
Definition: DCH_info.h:172
dd4hep::rec::DCH_info_struct::nsuperlayers
DCH_layer nsuperlayers
Definition: DCH_info.h:70
dd4hep::rec::DCH_info_struct::Calculate_hitpos_to_wire_vector
TVector3 Calculate_hitpos_to_wire_vector(int ilayer, int nphi, const TVector3 &hit_position) const
Definition: DCH_info.h:424
dd4hep::rec::DCH_info_struct::Get_ncells
int Get_ncells(int ilayer)
Definition: DCH_info.h:106
dd4hep::rec::DCH_info_struct::IsValid
bool IsValid() const
Check if outer volume is not zero (0 < Lhalf*rout), and if the database was filled.
Definition: DCH_info.h:185
dd4hep::rec::DCH_info_struct::Set_ncell0
void Set_ncell0(int _ncell0)
Definition: DCH_info.h:90
dd4hep::rec::DCH_info_struct::ncell_per_sector
int ncell_per_sector
cells within the same layer may be grouped into sectors, not in use atm
Definition: DCH_info.h:63
dd4hep::rec::DCH_info_struct::first_sense_r
DCH_length_t first_sense_r
Cell radius for the first layer.
Definition: DCH_info.h:81
dd4hep::rec::DCH_info_struct::Set_first_sense_r
void Set_first_sense_r(double _first_sense_r)
Definition: DCH_info.h:101
dd4hep::rec::DCH_info_struct::nlayersPerSuperlayer
DCH_layer nlayersPerSuperlayer
input number of layers in each superlayer
Definition: DCH_info.h:66
dd4hep::rec::DCH_info_struct::Set_lhalf
void Set_lhalf(DCH_length_t _dch_Lhalf)
Definition: DCH_info.h:83
dd4hep::rec::DCH_info_struct::DCH_length_t
double DCH_length_t
tpye for lengths
Definition: DCH_info.h:40
dd4hep::rec::DCH_info_struct::guard_outer_r_at_zL2
DCH_length_t guard_outer_r_at_zL2
Outer guard wires radius.
Definition: DCH_info.h:53
dd4hep::rec::DCH_info_struct::BuildLayerDatabase
void BuildLayerDatabase()
Definition: DCH_info.h:199
dd4hep::rec::DCH_info_struct::DCH_angle_t
double DCH_angle_t
tpye for angles
Definition: DCH_info.h:42
dd4hep::rec::DCH_info_struct::ncell0
int ncell0
number of cells of first layer
Definition: DCH_info.h:56
dd4hep::rec::DCH_info_struct::Lhalf
DCH_length_t Lhalf
Half length of the active volume.
Definition: DCH_info.h:44
dd4hep::rec::DCH_info_struct::Set_nlayersPerSuperlayer
void Set_nlayersPerSuperlayer(int _nlayersPerSuperlayer)
Definition: DCH_info.h:93
dd4hep::rec::DCH_info_struct::IsDatabaseEmpty
bool IsDatabaseEmpty() const
Definition: DCH_info.h:179
dd4hep::rec::DCH_info_struct::Set_ncell_per_sector
void Set_ncell_per_sector(int _ncell_per_sector)
Definition: DCH_info.h:96
dd4hep::rec::DCH_info_struct::DCH_info_layer::IsStereoPositive
bool IsStereoPositive() const
Definition: DCH_info.h:163
dd4hep::rec::DCH_info_struct::first_width
double first_width
Cell width for the first layer.
Definition: DCH_info.h:79
dd4hep::rec::DCH_info_struct::DCH_info_layer::StereoSign
int StereoSign() const
calculate sign based on IsStereoPositive
Definition: DCH_info.h:167
dd4hep::rec::DCH_info_struct::DCH_layer
int DCH_layer
type for layer number
Definition: DCH_info.h:38
dd4hep::rec::DCH_info_struct::WireLength
DCH_length_t WireLength(int nlayer, DCH_length_t r_z0) const
WireLength = 2*dch_Lhalf/cos(atan(Pitch_z0(r_z0)/(2*dch_Lhalf)))/cos(stereoangle_z0(r_z0))
Definition: DCH_info.h:135
dd4hep::rec::DCH_info_struct::DCH_info_layer::layer
DCH_layer layer
layer number
Definition: DCH_info.h:144
dd4hep::rec::DCH_info_struct::Set_nsuperlayers
void Set_nsuperlayers(int _nsuperlayers)
Definition: DCH_info.h:94
dd4hep::rec::DCH_info_struct::nlayers
DCH_layer nlayers
Calculated as dch_nlayersPerSuperlayer * dch_nsuperlayers.
Definition: DCH_info.h:72
dd4hep::rec::DCH_info_struct::Calculate_wire_phi_z0
double Calculate_wire_phi_z0(int ilayer, int nphi) const
Definition: DCH_info.h:413
dd4hep::rec::DCH_info_struct::DCH_info_layer::radius_sw_z0
DCH_length_t radius_sw_z0
radius (cylindral coord) of sensitive wire
Definition: DCH_info.h:153
dd4hep::rec::DCH_info_struct::rin
DCH_length_t rin
Inner radius of the active volume.
Definition: DCH_info.h:46
dd4hep::rec::DCH_info_struct::DCH_info_layer::radius_fdw_z0
DCH_length_t radius_fdw_z0
radius (cylindral coord) of 'down' field wires
Definition: DCH_info.h:156
dd4hep::rec::DCH_info_struct::Set_first_width
void Set_first_width(double _first_width)
Definition: DCH_info.h:100
dd4hep::rec::DCH_info_struct::DCH_info_layer::width_z0
double width_z0
cell parameter
Definition: DCH_info.h:150
dd4hep::rec::DCH_info_struct::guard_inner_r_at_z0
DCH_length_t guard_inner_r_at_z0
Inner guard wires radius.
Definition: DCH_info.h:51
dd4hep::rec::DCH_info_struct::Set_twist_angle
void Set_twist_angle(DCH_length_t _dch_twist_angle)
Definition: DCH_info.h:98
dd4hep::rec::DCH_info_struct::Set_guard_rin_at_z0
void Set_guard_rin_at_z0(DCH_length_t _dch_rin_z0_guard)
Definition: DCH_info.h:87
dd4hep::rec::DCH_info_struct::ncell_increment
int ncell_increment
Definition: DCH_info.h:60
dd4hep::rec::DCH_info_struct::Set_rin
void Set_rin(DCH_length_t _dch_rin)
Definition: DCH_info.h:84
dd4hep::rec::DCH_info_struct::database
std::map< DCH_layer, DCH_info_layer > database
map to store parameters for each layer
Definition: DCH_info.h:178
dd4hep::rec::DCH_info_struct::DCH_info_layer::radius_fuw_z0
DCH_length_t radius_fuw_z0
radius (cylindral coord) of 'up' field wires
Definition: DCH_info.h:159
dd4hep::rec::DCH_info_struct::DCH_info_layer::nwires
int nwires
2x number of cells in that layer
Definition: DCH_info.h:146
dd4hep::rec::StructExtension
Definition: DetectorData.h:37
dd4hep::rec::DCH_info_struct::DCH_info_layer
Internal helper struct for defining the layer layout.
Definition: DCH_info.h:142
dd4hep::rec::DCH_info_struct::stereoangle_z0
DCH_angle_t stereoangle_z0(DCH_length_t r_z0) const
tan(stereoangle) = R(z=0) / (L/2) * tan( twist_angle/2)
Definition: DCH_info.h:125
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::rec::DCH_info
StructExtension< DCH_info_struct > DCH_info
Definition: DCH_info.h:196
dd4hep::rec::operator<<
std::ostream & operator<<(std::ostream &io, const DCH_info &d)
Definition: DCH_info.h:197
dd4hep::rec::DCH_info_struct::Calculate_wire_vector_ez
TVector3 Calculate_wire_vector_ez(int ilayer, int nphi) const
Definition: DCH_info.h:363
dd4hep::rec::DCH_info_struct::Show_DCH_info_database
void Show_DCH_info_database(std::ostream &io) const
Definition: DCH_info.h:298
dd4hep::rec::DCH_info_struct::DCH_info_layer::height_z0
double height_z0
cell parameter
Definition: DCH_info.h:148
dd4hep::rec::DCH_info_struct::Set_guard_rout_at_zL2
void Set_guard_rout_at_zL2(DCH_length_t _dch_rout_zL2_guard)
Definition: DCH_info.h:88
dd4hep::rec::DCH_info_struct::rout
DCH_length_t rout
Outer radius of the active volume.
Definition: DCH_info.h:48
dd4hep::rec::DCH_info_struct
Definition: DCH_info.h:33
dd4hep::rec::DCH_info_struct::Radius_zLhalf
DCH_length_t Radius_zLhalf(DCH_length_t r_z0) const
Calculate radius at z=L/2 given at z=0.
Definition: DCH_info.h:120
dd4hep::rec::DCH_info_struct::Get_cell_phi_angle
DCH_angle_t Get_cell_phi_angle(int ilayer, int nphi)
Definition: DCH_info.h:113
dd4hep::rec::DCH_info_struct::Get_phi_width
DCH_angle_t Get_phi_width(int ilayer)
Get phi width for the twisted tube and the step (phi distance between cells)
Definition: DCH_info.h:109
dd4hep::rec::DCH_info_struct::Set_rout
void Set_rout(DCH_length_t _dch_rout)
Definition: DCH_info.h:85