ATLAS Offline Software
Loading...
Searching...
No Matches
CaloDepthTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ***************************************************************************
6// Liquid Argon detector description package
7// -----------------------------------------
8//
9//****************************************************************************
10
12
13#include "GaudiKernel/IMessageSvc.h"
14#include "GaudiKernel/IToolSvc.h"
15#include "GaudiKernel/ServiceHandle.h"
16#include <vector>
17
18#include "GaudiKernel/SystemOfUnits.h"
19
20// Calo specific stuff :
21#include "CaloDetDescr/CaloDetDescrElement.h"
24
25#include <cmath>
26#include <iomanip>
27#include <iostream>
28
29
30namespace {
31constexpr double s_default = 0;
32const std::unordered_map<std::string, CaloDepthTool::DepthChoice>
33 s_stringToEnum = { { "egparam", CaloDepthTool::DepthChoice::egparam },
40}
41
42static const InterfaceID IID_CaloDepthTool("CaloDepthTool", 1, 0);
43const InterfaceID&
48
50 const std::string& name,
51 const IInterface* parent)
52 : AthAlgTool(type, name, parent)
53 , m_calo_id(nullptr)
54{
55 declareInterface<CaloDepthTool>(this);
56}
57
59
60StatusCode
62{
63
64 ATH_CHECK(detStore()->retrieve(m_calo_id, "CaloCell_ID"));
65
66 if (!m_depth_choice.empty()) {
67
68 auto it = s_stringToEnum.find(m_depth_choice);
69 if (it != s_stringToEnum.end()) {
70 m_depthChoice = it->second;
71 } else {
72 ATH_MSG_FATAL(" invalid depth choice " << m_depth_choice);
73 return StatusCode::FAILURE;
74 }
75
76 }
77 return StatusCode::SUCCESS;
78}
79
80StatusCode
82{
83 return StatusCode::SUCCESS;
84}
85
86// the generic methods to be used by clients :
87
88double
90 const int sampling_or_module,
91 const bool barrel,
92 const double eta,
93 const double phi,
94 const CaloDetDescrManager* caloDD) const
95{
98 subcalo, barrel, sampling_or_module, sample);
99 return radius(sample, eta, phi, caloDD);
100}
101
102double
104 const double eta,
105 const double phi,
106 const CaloDetDescrManager* caloDD) const
107{
108 double radius = s_default;
109
111 radius = egparametrized(sample, eta, phi, caloDD);
112 } else if (m_depthChoice == DepthChoice::cscopt) {
113 radius = cscopt_parametrized(sample, eta, phi, caloDD);
114 } else if (m_depthChoice == DepthChoice::cscopt2) {
115 radius = cscopt2_parametrized(sample, eta, phi, caloDD);
116 } else if (m_depthChoice == DepthChoice::TBparam) {
117 radius = TBparametrized(sample, eta, phi, caloDD);
118 } else if (m_depthChoice == DepthChoice::entrance) {
119 radius = entrance(sample, eta, phi, caloDD);
120 } else if (m_depthChoice == DepthChoice::middle) {
121 radius = middle(sample, eta, phi, caloDD);
122 } else if (m_depthChoice == DepthChoice::flat) {
123 if (eta >= 0) {
124 radius = flat(sample, 1, caloDD);
125 } else {
126 radius = flat(sample, -1, caloDD);
127 }
128 } else {
129 radius = entrance(sample, eta, phi, caloDD);
130 }
131
132 // outside DD, use parametrised radius as default
133 // it is OK, but choice should be left to the user
134 if (std::abs(radius) < 10.) {
135 radius = egparametrized(sample, eta, phi, caloDD);
136 }
137
138 return radius;
139}
140
141double
143 const int sampling_or_module,
144 const bool barrel,
145 const double eta,
146 const CaloDetDescrManager* caloDD)
147{
150 subcalo, barrel, sampling_or_module, sample);
151 return deta(sample, eta, caloDD);
152}
153
154double
156 const double eta,
157 const CaloDetDescrManager* caloDD)
158{
159 double deta = 99999.;
160 /*bool result =*/caloDD->is_in(eta, 0., sample, deta);
161 return deta;
162}
163
164// -----------------------
165// the really dirty ones :
166// -----------------------
167
168double
170 const int sampling_or_module,
171 const bool barrel,
172 const double eta,
173 const double phi,
174 const CaloDetDescrManager* caloDD)
175{
178 subcalo, barrel, sampling_or_module, sample);
179 return egparametrized(sample, eta, phi, caloDD);
180}
181
182double
184 const double eta,
185 const double /*phi*/,
186 const CaloDetDescrManager* caloDD)
187{
188 double radius = s_default;
189
190 // note that only LAREM was foreseen in egammaqdepth
191 // here we go ... cut and paste the code as is, including hardcoded
192 // parametrisation :-(
193
194 float aeta = static_cast<float>(std::abs(eta));
195
196 if (sample == CaloCell_ID::PreSamplerB) {
197 radius = 1422.3 * Gaudi::Units::millimeter;
198 } else if (sample == CaloCell_ID::EMB1) {
199 if (aeta < 0.8)
200 radius = (1567.8 - 18.975 * aeta - 17.668 * aeta * aeta) *
201 Gaudi::Units::millimeter;
202 else
203 radius = (1503.2 + 71.716 * aeta - 41.008 * aeta * aeta) *
204 Gaudi::Units::millimeter;
205 } else if (sample == CaloCell_ID::EMB2) {
206 if (aeta < 0.8)
207 radius = (1697.1 - 15.311 * aeta - 64.153 * aeta * aeta) *
208 Gaudi::Units::millimeter;
209 else
210 radius = (1739.1 - 75.648 * aeta - 18.501 * aeta * aeta) *
211 Gaudi::Units::millimeter;
212 } else if (sample == CaloCell_ID::EMB3) {
213 if (aeta < 0.8)
214 radius = (1833.88 - 106.25 * aeta) * Gaudi::Units::millimeter;
215 else
216 radius = (2038.40 - 286. * aeta) * Gaudi::Units::millimeter;
217 }
218
219 else if (sample == CaloCell_ID::PreSamplerE) {
220 radius = 3600. * Gaudi::Units::millimeter;
221 if (eta < 0.)
222 radius = -radius;
223 } else if (sample == CaloCell_ID::EME1) {
224 radius = 3760. * Gaudi::Units::millimeter;
225 if (eta < 0.)
226 radius = -radius;
227 } else if (sample == CaloCell_ID::EME2) {
228 radius = 3880. * Gaudi::Units::millimeter;
229 if (eta < 0.)
230 radius = -radius;
231 } else if (sample == CaloCell_ID::EME3) {
232 radius = 4150. * Gaudi::Units::millimeter;
233 if (eta < 0.)
234 radius = -radius;
235 }
236
237 // This was not in the egamma parametrization, but it does not cost much to
238 // add it :
239 else {
240 if (eta > 0.)
241 radius = flat(sample, 1, caloDD);
242 else
243 radius = flat(sample, -1, caloDD);
244 }
245
246 return radius;
247}
248
249// Depths of samplings 1 and 2 found by finding the depth where the
250// eta resolution is optimal. Done for CSC data. These coefficents
251// are from the E=100 GeV single-photon sample.
252double
254 const double eta,
255 const double /*phi*/,
256 const CaloDetDescrManager* caloDD)
257{
258 double radius = s_default;
259
260 float aeta = static_cast<float>(std::abs(eta));
261
262 if (sample == CaloCell_ID::PreSamplerB) {
263 radius = 1422.3 * Gaudi::Units::millimeter;
264 } else if (sample == CaloCell_ID::EMB1) {
265 if (aeta < 0.8)
266 radius = (1558.859292 - 4.990838 * aeta - 21.144279 * aeta * aeta) *
267 Gaudi::Units::millimeter;
268 else
269 radius = (1522.775373 + 27.970192 * aeta - 21.104108 * aeta * aeta) *
270 Gaudi::Units::millimeter;
271 } else if (sample == CaloCell_ID::EMB2) {
272 radius = (1689.621619 + 2.682993 * aeta - 70.165741 * aeta * aeta) *
273 Gaudi::Units::millimeter;
274 } else if (sample == CaloCell_ID::EMB3) {
275 if (aeta < 0.8)
276 radius = (1833.88 - 106.25 * aeta) * Gaudi::Units::millimeter;
277 else
278 radius = (2038.40 - 286. * aeta) * Gaudi::Units::millimeter;
279 }
280
281 else if (sample == CaloCell_ID::PreSamplerE) {
282 radius = 3600. * Gaudi::Units::millimeter;
283 if (eta < 0.)
284 radius = -radius;
285 } else if (sample == CaloCell_ID::EME1) {
286 if (aeta < 1.5)
287 radius = (12453.297448 - 5735.787116 * aeta) * Gaudi::Units::millimeter;
288 else
289 radius = 3790.671754 * Gaudi::Units::millimeter;
290 if (eta < 0.)
291 radius = -radius;
292 } else if (sample == CaloCell_ID::EME2) {
293 if (aeta < 1.5)
294 radius = (8027.574119 - 2717.653528 * aeta) * Gaudi::Units::millimeter;
295 else
296 radius = (3473.473909 + 453.941515 * aeta - 119.101945 * aeta * aeta) *
297 Gaudi::Units::millimeter;
298 if (eta < 0.)
299 radius = -radius;
300 } else if (sample == CaloCell_ID::EME3) {
301 radius = 4150. * Gaudi::Units::millimeter;
302 if (eta < 0.)
303 radius = -radius;
304 }
305
306 // This was not in the egamma parametrization,
307 // but it does not cost much to add it :
308 else {
309 if (eta > 0.)
310 radius = flat(sample, 1, caloDD);
311 else
312 radius = flat(sample, -1, caloDD);
313 }
314
315 return radius;
316}
317
318// The same as cscopt, except that the outermost point in EMB2 was
319// excluded. That point was influenced by edge effects and was distorting
320// the fit, pulling it down too much at the end. Excluding it is shown
321// to somewhat improve the measured resolution.
322double
324 const double eta,
325 const double /*phi*/,
326 const CaloDetDescrManager* caloDD)
327{
328 double radius = s_default;
329
330 float aeta = static_cast<float>(std::abs(eta));
331
332 if (sample == CaloCell_ID::PreSamplerB) {
333 radius = 1422.3 * Gaudi::Units::millimeter;
334 } else if (sample == CaloCell_ID::EMB1) {
335 if (aeta < 0.8)
336 radius = (1558.859292 - 4.990838 * aeta - 21.144279 * aeta * aeta) *
337 Gaudi::Units::millimeter;
338 else
339 radius = (1522.775373 + 27.970192 * aeta - 21.104108 * aeta * aeta) *
340 Gaudi::Units::millimeter;
341 } else if (sample == CaloCell_ID::EMB2) {
342 radius = (1698.990944 - 49.431767 * aeta - 24.504976 * aeta * aeta) *
343 Gaudi::Units::millimeter;
344 } else if (sample == CaloCell_ID::EMB3) {
345 if (aeta < 0.8)
346 radius = (1833.88 - 106.25 * aeta) * Gaudi::Units::millimeter;
347 else
348 radius = (2038.40 - 286. * aeta) * Gaudi::Units::millimeter;
349 }
350
351 else if (sample == CaloCell_ID::PreSamplerE) {
352 radius = 3600. * Gaudi::Units::millimeter;
353 if (eta < 0.)
354 radius = -radius;
355 } else if (sample == CaloCell_ID::EME1) {
356 if (aeta < 1.5)
357 radius = (12453.297448 - 5735.787116 * aeta) * Gaudi::Units::millimeter;
358 else
359 radius = 3790.671754 * Gaudi::Units::millimeter;
360 if (eta < 0.)
361 radius = -radius;
362 } else if (sample == CaloCell_ID::EME2) {
363 if (aeta < 1.5)
364 radius = (8027.574119 - 2717.653528 * aeta) * Gaudi::Units::millimeter;
365 else
366 radius = (3473.473909 + 453.941515 * aeta - 119.101945 * aeta * aeta) *
367 Gaudi::Units::millimeter;
368 if (eta < 0.)
369 radius = -radius;
370 } else if (sample == CaloCell_ID::EME3) {
371 radius = 4150. * Gaudi::Units::millimeter;
372 if (eta < 0.)
373 radius = -radius;
374 }
375
376 // This was not in the egamma parametrization,
377 // but it does not cost much to add it :
378 else {
379 if (eta > 0.)
380 radius = flat(sample, 1, caloDD);
381 else
382 radius = flat(sample, -1, caloDD);
383 }
384
385 return radius;
386}
387
388double
390 const int sampling_or_module,
391 const bool barrel,
392 const double eta,
393 const double phi,
394 const CaloDetDescrManager* caloDD)
395{
398 subcalo, barrel, sampling_or_module, sample);
399 return TBparametrized(sample, eta, phi, caloDD);
400}
401
402double
404 const double eta,
405 const double phi,
406 const CaloDetDescrManager* caloDD)
407{
408 double radius = s_default;
409
410 // release 10.0.1 : the analysis is not advanced enough to know what is
411 // needed. right now, use the eg parametrisation everywhere possible, entrance
412 // elsewere.
413 if (sample == CaloCell_ID::PreSamplerB) {
414 return egparametrized(sample, eta, phi, caloDD);
415 } else if (sample == CaloCell_ID::EMB1) {
416 return egparametrized(sample, eta, phi, caloDD);
417 } else if (sample == CaloCell_ID::EMB2) {
418 return egparametrized(sample, eta, phi, caloDD);
419 } else if (sample == CaloCell_ID::EMB3) {
420 return egparametrized(sample, eta, phi, caloDD);
421 } else {
422 return entrance(sample, eta, phi, caloDD);
423 }
424
425 return radius;
426}
427
428// ------------------
429// the cleaner ones :
430// ------------------
431
432double
434 const int sampling_or_module,
435 const bool barrel,
436 const double eta,
437 const double phi,
438 const CaloDetDescrManager* caloDD)
439{
442 subcalo, barrel, sampling_or_module, sample);
443 return entrance(sample, eta, phi, caloDD);
444}
445
446double
448 const double eta,
449 const double phi,
450 const CaloDetDescrManager* caloDD)
451{
452 double radius = s_default;
453
454 // FIXME : the calodetdescr manager misses 1 generic get_entrance method
455 if (sample == CaloCell_ID::PreSamplerE || sample == CaloCell_ID::EME1 ||
456 sample == CaloCell_ID::EME2 || sample == CaloCell_ID::EME3 ||
457 sample == CaloCell_ID::HEC0 || sample == CaloCell_ID::HEC1 ||
458 sample == CaloCell_ID::HEC2 || sample == CaloCell_ID::HEC3 ||
459 sample == CaloCell_ID::FCAL0 || sample == CaloCell_ID::FCAL1 ||
460 sample == CaloCell_ID::FCAL2)
461 radius = get_entrance_z(sample, eta, phi, caloDD);
462 else
463 radius = get_entrance_radius(sample, eta, phi, caloDD);
464
465 return radius;
466}
467
468double
470 const int sampling_or_module,
471 const bool barrel,
472 const double eta,
473 const double phi,
474 const CaloDetDescrManager* caloDD)
475{
478 subcalo, barrel, sampling_or_module, sample);
479 return middle(sample, eta, phi, caloDD);
480}
481
482double
484 const double eta,
485 const double phi,
486 const CaloDetDescrManager* caloDD)
487{
488 double radius = s_default;
489
490 if (sample == CaloCell_ID::PreSamplerE || sample == CaloCell_ID::EME1 ||
491 sample == CaloCell_ID::EME2 || sample == CaloCell_ID::EME3 ||
492 sample == CaloCell_ID::HEC0 || sample == CaloCell_ID::HEC1 ||
493 sample == CaloCell_ID::HEC2 || sample == CaloCell_ID::HEC3 ||
494 sample == CaloCell_ID::FCAL0 || sample == CaloCell_ID::FCAL1 ||
495 sample == CaloCell_ID::FCAL2)
496 radius = get_middle_z(sample, eta, phi, caloDD);
497 else
498 radius = get_middle_radius(sample, eta, phi, caloDD);
499
500 return radius;
501}
502
503double
505 const int sampling_or_module,
506 const bool barrel,
507 const double eta,
508 const double phi,
509 const CaloDetDescrManager* caloDD)
510{
513 subcalo, barrel, sampling_or_module, sample);
514 return exit(sample, eta, phi, caloDD);
515}
516
517double
519 const double eta,
520 const double phi,
521 const CaloDetDescrManager* caloDD)
522{
523 double radius = s_default;
524
525 if (sample == CaloCell_ID::PreSamplerE || sample == CaloCell_ID::EME1 ||
526 sample == CaloCell_ID::EME2 || sample == CaloCell_ID::EME3 ||
527 sample == CaloCell_ID::HEC0 || sample == CaloCell_ID::HEC1 ||
528 sample == CaloCell_ID::HEC2 || sample == CaloCell_ID::HEC3 ||
529 sample == CaloCell_ID::FCAL0 || sample == CaloCell_ID::FCAL1 ||
530 sample == CaloCell_ID::FCAL2)
531 radius = get_exit_z(sample, eta, phi, caloDD);
532 else
533 radius = get_exit_radius(sample, eta, phi, caloDD);
534
535 return radius;
536}
537
538double
540 const int sampling_or_module,
541 const bool barrel,
542 const int side,
543 const CaloDetDescrManager* caloDD)
544{
547 subcalo, barrel, sampling_or_module, sample);
548 return flat(sample, side, caloDD);
549}
550
551double
553 const int side,
554 const CaloDetDescrManager* caloDD)
555{
556 // FIXME : tiles is hardcoded !!!
557 double radius = 2280.;
558
559 if (sample == CaloCell_ID::TileBar0)
560 return false;
561 if (sample == CaloCell_ID::TileBar1)
562 return false;
563 if (sample == CaloCell_ID::TileBar2)
564 return false;
565 if (sample == CaloCell_ID::TileGap1)
566 return false;
567 if (sample == CaloCell_ID::TileGap2)
568 return false;
569 if (sample == CaloCell_ID::TileExt0)
570 return false;
571 if (sample == CaloCell_ID::TileExt1)
572 return false;
573 if (sample == CaloCell_ID::TileExt2)
574 return false;
575
576 radius = s_default;
577 for (const CaloDetDescriptor* reg : caloDD->calo_descriptors_range()) {
578 if (reg) {
579 if (reg->getSampling(0) == sample && reg->calo_sign() * side > 0) {
580 std::vector<double> depth;
581 reg->get_depth_in(depth);
582 for (unsigned int j = 0; j < depth.size(); j++)
583 if (radius < depth[j])
584 radius = depth[j];
585 }
586 }
587 }
588
589 // depth in are positive values, so should multiply by -1 for the HEC and FCAL
590 // at eta<0. to get the corresponding z
591
592 if (side < 0) {
593 if (sample == CaloCell_ID::PreSamplerE || sample == CaloCell_ID::EME1 ||
594 sample == CaloCell_ID::EME2 || sample == CaloCell_ID::EME3 ||
595 sample == CaloCell_ID::HEC0 || sample == CaloCell_ID::HEC1 ||
596 sample == CaloCell_ID::HEC2 || sample == CaloCell_ID::HEC3 ||
597 sample == CaloCell_ID::FCAL0 || sample == CaloCell_ID::FCAL1 ||
598 sample == CaloCell_ID::FCAL2)
599 radius = -1. * radius;
600 }
601 return radius;
602}
603
604double
606 const int sampling_or_module,
607 const bool barrel,
608 const int side,
609 const CaloDetDescrManager* caloDD)
610{
613 subcalo, barrel, sampling_or_module, sample);
614 return depth(sample, side, caloDD);
615}
616
617double
619 const int side,
620 const CaloDetDescrManager* caloDD)
621{
622 // FIXME : tiles is hardcoded !!!
623 double radius = 1970.;
624
625 if (sample == CaloCell_ID::TileBar0)
626 return false;
627 if (sample == CaloCell_ID::TileBar1)
628 return false;
629 if (sample == CaloCell_ID::TileBar2)
630 return false;
631 if (sample == CaloCell_ID::TileGap1)
632 return false;
633 if (sample == CaloCell_ID::TileGap2)
634 return false;
635 if (sample == CaloCell_ID::TileExt0)
636 return false;
637 if (sample == CaloCell_ID::TileExt1)
638 return false;
639 if (sample == CaloCell_ID::TileExt2)
640 return false;
641
642 radius = s_default;
643
644 for (const CaloDetDescriptor* reg : caloDD->calo_descriptors_range()) {
645 if (reg) {
646 if (reg->getSampling(0) == sample && reg->calo_sign() * side > 0) {
647 std::vector<double> depth;
648 reg->get_depth_out(depth);
649 for (unsigned int j = 0; j < depth.size(); j++)
650 if (radius > depth[j])
651 radius = depth[j];
652 }
653 }
654 }
655
656 return radius;
657}
658
659double
661 double eta,
662 double phi,
663 const CaloDetDescrManager* caloDD)
664{
665 const CaloDetDescrElement* elt = caloDD->get_element(sample, eta, phi);
666 if (!elt) {
667 return s_default;
668 }
669
670 //Only for tile is dR the full radius of the layer - for
671 //other calorimeters it is half the radius
672 if (elt->is_tile()) return (elt->r() - elt->dr()/2);
673 else return (elt->r() - elt->dr());
674}
675
676double
678 double eta,
679 double phi,
680 const CaloDetDescrManager* caloDD)
681{
682 const CaloDetDescrElement* elt = caloDD->get_element(sample, eta, phi);
683 if (!elt) {
684 return s_default;
685 }
686
687 //Only for tile is dZ the full Z length of the layer - for
688 //other calorimeters it is half of this
689 if (elt->is_tile()) return (elt->z() - (elt->z() < 0 ? -elt->dz()/2 : elt->dz()/2));
690 else return (elt->z() - (elt->z() < 0 ? -elt->dz() : elt->dz()));
691}
692
693double
695 double eta,
696 double phi,
697 const CaloDetDescrManager* caloDD)
698{
699
700 const CaloDetDescrElement* elt = caloDD->get_element(sample, eta, phi);
701 if (!elt) {
702 return s_default;
703 }
704 return elt->r();
705}
706
707double
709 double eta,
710 double phi,
711 const CaloDetDescrManager* caloDD)
712{
713
714 const CaloDetDescrElement* elt = caloDD->get_element(sample, eta, phi);
715 if (!elt) {
716 return s_default;
717 }
718 return elt->z();
719}
720
721double
723 double eta,
724 double phi,
725 const CaloDetDescrManager* caloDD)
726{
727
728 const CaloDetDescrElement* elt = caloDD->get_element(sample, eta, phi);
729 if (!elt) {
730 return s_default;
731 }
732
733 //Only for tile is dR the full radius of the layer - for
734 //other calorimeters it is half the radius
735 if (elt->is_tile()) return (elt->r() + elt->dr()/2);
736 else return (elt->r() + elt->dr());
737}
738
739double
741 double eta,
742 double phi,
743 const CaloDetDescrManager* caloDD)
744{
745
746 const CaloDetDescrElement* elt = caloDD->get_element(sample, eta, phi);
747 if (!elt) {
748 return s_default;
749 }
750
751 //Only for tile is dZ the full Z length of the layer - for
752 //other calorimeters it is half of this
753 if (elt->is_tile()) return (elt->z() + (elt->z() < 0 ? -elt->dz()/2 : elt->dz()/2));
754 else return (elt->z() + (elt->z() < 0 ? -elt->dz() : elt->dz()));
755}
756
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
static const InterfaceID IID_CaloDepthTool("CaloDepthTool", 1, 0)
Declaration of CaloDepthTool.
Definition of CaloDetDescrManager.
Definition of CaloDetDescriptor.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
static double depth(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const int side, const CaloDetDescrManager *caloDD)
If the direction is not specified, returns a "flat" aproximation (truely valid for strips only).
virtual StatusCode finalize() override
Tool Finalize.
static double get_entrance_radius(CaloCell_ID::CaloSample sample, double eta, double phi, const CaloDetDescrManager *caloDD)
will look for the corresponding CaloDetDescrElement and return its entrance radius
static double get_middle_z(CaloCell_ID::CaloSample sample, double eta, double phi, const CaloDetDescrManager *caloDD)
will look for the corresponding CaloDetDescrElement and return its middle z
static double get_middle_radius(CaloCell_ID::CaloSample sample, double eta, double phi, const CaloDetDescrManager *caloDD)
will look for the corresponding CaloDetDescrElement and return its middle radius
static double get_exit_z(CaloCell_ID::CaloSample sample, double eta, double phi, const CaloDetDescrManager *caloDD)
will look for the corresponding CaloDetDescrElement and return its middle z
static double deta(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const double eta, const CaloDetDescrManager *caloDD)
How far are you (in eta) from a given sample or - if you are in - how far are you from the edge ?
static double get_exit_radius(CaloCell_ID::CaloSample sample, double eta, double phi, const CaloDetDescrManager *caloDD)
will look for the corresponding CaloDetDescrElement and return its middle radius
static double TBparametrized(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const double eta, const double phi, const CaloDetDescrManager *caloDD)
Parametrisation taken from the old egammaqdepth class, but adapted for TestBeam.
virtual StatusCode initialize() override
Tool Initialize.
DepthChoice m_depthChoice
const CaloCell_ID * m_calo_id
ID Helper.
double radius(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const double eta, const double phi, const CaloDetDescrManager *caloDD) const
get radius
static double get_entrance_z(CaloCell_ID::CaloSample sample, double eta, double phi, const CaloDetDescrManager *caloDD)
will look for the corresponding CaloDetDescrElement and return its entrance z
static double exit(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const double eta, const double phi, const CaloDetDescrManager *caloDD)
For a given direction, return the exit of the given CaloCell_ID::CaloSample.
static double egparametrized(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const double eta, const double phi, const CaloDetDescrManager *caloDD)
Methods taken from the old egammaqdepth class : return the parametrised depth used in DC1 and DC2.
Gaudi::Property< std::string > m_depth_choice
Depth choice related code User passes a string but we convert to an enum at init to avoid string comp...
static double cscopt_parametrized(const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD)
Layers 1 and 2 depths set to give the best eta resolution.
static const InterfaceID & interfaceID()
Query interface.
static double cscopt2_parametrized(const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD)
Same as cscopt with the outermost EMB2 point excluded.
virtual ~CaloDepthTool()
Destructor.
This class groups all DetDescr information related to a CaloCell.
static void build_sample(CaloCell_ID::SUBCALO subCalo, bool barrel, int sampling_or_module, CaloCell_ID::CaloSample &sample)
translate between the 2 ways to label a sub-detector:
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
calo_descr_range calo_descriptors_range() const
Range over descriptors.
bool is_in(double eta, double phi, CaloCell_ID::CaloSample sample, double &etadist) const
return true if direction eta,phi crosses ANY of the corresponding descriptors
This class provides the client interface for accessing the detector description information common to...
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
std::string depth
tag string for intendation
Definition fastadd.cxx:46