ATLAS Offline Software
CaloDepthTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #ifndef CALODETDESCR_CALODEPTHTOOL_H
14 #define CALODETDESCR_CALODEPTHTOOL_H
15 
17 
20 #include "CxxUtils/CachedPointer.h"
21 
23 class IMessageSvc;
24 
26 
45 class CaloDepthTool : public AthAlgTool
46 
47 {
48 public:
51  CaloDepthTool(const std::string& type, const std::string& name, const IInterface* parent);
54  virtual ~CaloDepthTool();
55 
58  static const InterfaceID& interfaceID();
59 
62  virtual StatusCode initialize() override;
63 
66  virtual StatusCode finalize() override;
67 
68 public:
77  double radius(const CaloCell_ID::SUBCALO subcalo,
78  const int sampling_or_module,
79  const bool barrel,
80  const double eta,
81  const double phi,
82  const CaloDetDescrManager* caloDD) const;
92  const double eta,
93  const double phi,
94  const CaloDetDescrManager* caloDD) const;
95 
104  static double deta(const CaloCell_ID::SUBCALO subcalo,
105  const int sampling_or_module,
106  const bool barrel,
107  const double eta,
108  const CaloDetDescrManager* caloDD) ;
117  static double deta(const CaloCell_ID::CaloSample sample,
118  const double eta,
119  const CaloDetDescrManager* caloDD) ;
120 
125  static double entrance(const CaloCell_ID::SUBCALO subcalo,
126  const int sampling_or_module,
127  const bool barrel,
128  const double eta,
129  const double phi,
130  const CaloDetDescrManager* caloDD ) ;
135  static double entrance(const CaloCell_ID::CaloSample sample,
136  const double eta,
137  const double phi,
138  const CaloDetDescrManager* caloDD) ;
139 
144  static double middle(const CaloCell_ID::SUBCALO subcalo,
145  const int sampling_or_module,
146  const bool barrel,
147  const double eta,
148  const double phi,
149  const CaloDetDescrManager* caloDD) ;
154  static double middle(const CaloCell_ID::CaloSample sample,
155  const double eta,
156  const double phi,
157  const CaloDetDescrManager* caloDD ) ;
158 
163  static double exit(const CaloCell_ID::SUBCALO subcalo,
164  const int sampling_or_module,
165  const bool barrel,
166  const double eta,
167  const double phi,
168  const CaloDetDescrManager* caloDD) ;
173  static double exit(const CaloCell_ID::CaloSample sample,
174  const double eta,
175  const double phi,
176  const CaloDetDescrManager* caloDD) ;
177 
182  static double flat(const CaloCell_ID::SUBCALO subcalo,
183  const int sampling_or_module,
184  const bool barrel,
185  const int side,
186  const CaloDetDescrManager* caloDD) ;
191  static double flat(const CaloCell_ID::CaloSample sample,
192  const int side,
193  const CaloDetDescrManager* caloDD) ;
194 
199  static double depth(const CaloCell_ID::SUBCALO subcalo,
200  const int sampling_or_module,
201  const bool barrel,
202  const int side,
203  const CaloDetDescrManager* caloDD) ;
208  static double depth(const CaloCell_ID::CaloSample sample,
209  const int side,
210  const CaloDetDescrManager* caloDD ) ;
211 
217  double eta,
218  double phi,
219  const CaloDetDescrManager* caloDD) ;
220 
225  double eta,
226  double phi,
227  const CaloDetDescrManager* caloDD ) ;
228 
234  const double eta,
235  const double phi,
236  const CaloDetDescrManager* caloDD) ;
237 
238  enum class DepthChoice
239  {
240  egparam,
241  cscopt,
242  cscopt2,
243  TBparam,
244  entrance,
245  middle,
246  flat
247  };
248 
249 private:
253  static double egparametrized(const CaloCell_ID::SUBCALO subcalo,
254  const int sampling_or_module,
255  const bool barrel,
256  const double eta,
257  const double phi,
258  const CaloDetDescrManager* caloDD) ;
262  static double egparametrized(const CaloCell_ID::CaloSample sample,
263  const double eta,
264  const double phi,
265  const CaloDetDescrManager* caloDD) ;
266 
270  static double TBparametrized(const CaloCell_ID::SUBCALO subcalo,
271  const int sampling_or_module,
272  const bool barrel,
273  const double eta,
274  const double phi,
275  const CaloDetDescrManager* caloDD) ;
279  static double TBparametrized(const CaloCell_ID::CaloSample sample,
280  const double eta,
281  const double phi,
282  const CaloDetDescrManager* caloDD) ;
283 
288  const double eta,
289  const double phi,
290  const CaloDetDescrManager* caloDD) ;
291 
296  double eta,
297  double phi,
298  const CaloDetDescrManager* caloDD) ;
299 
304  double eta,
305  double phi,
306  const CaloDetDescrManager* caloDD) ;
307 
312  double eta,
313  double phi,
314  const CaloDetDescrManager* caloDD) ;
315 
320  double eta,
321  double phi,
322  const CaloDetDescrManager* caloDD) ;
323 
324 protected:
325  CaloDepthTool(); //> not implemented
326  CaloDepthTool(const CaloDepthTool&); //> not implemented
327  CaloDepthTool& operator=(const CaloDepthTool&); //> not implemented
328 
329 private:
336  Gaudi::Property<std::string> m_depth_choice{ this, "DepthChoice", "", "depth choice" };
337 
345 };
346 
347 #endif // CALODETDESCR_CALODEPTHTOOL_H
CaloDepthTool
Implementation of the ICaloDepthTool interface.Given a Track direction, checks if it is in the Calori...
Definition: CaloDepthTool.h:47
CaloDepthTool::interfaceID
static const InterfaceID & interfaceID()
Query interface.
Definition: CaloDepthTool.cxx:44
CaloPhiRange
This class defines the phi convention for Calorimeters.
Definition: CaloPhiRange.h:28
CaloDepthTool::m_depth_choice
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...
Definition: CaloDepthTool.h:336
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
CaloDepthTool::finalize
virtual StatusCode finalize() override
Tool Finalize.
Definition: CaloDepthTool.cxx:81
CaloDepthTool::get_entrance_z
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
Definition: CaloDepthTool.cxx:677
CaloDepthTool::get_middle_z
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
Definition: CaloDepthTool.cxx:708
CaloDepthTool::m_calo_id
const CaloCell_ID * m_calo_id
ID Helper.
Definition: CaloDepthTool.h:341
CaloDepthTool::m_range
CaloPhiRange m_range
Phi range helper object.
Definition: CaloDepthTool.h:344
CaloDepthTool::DepthChoice::flat
@ flat
CaloDepthTool::get_entrance_radius
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
Definition: CaloDepthTool.cxx:660
CaloDepthTool::initialize
virtual StatusCode initialize() override
Tool Initialize.
Definition: CaloDepthTool.cxx:61
CachedPointer.h
Cached pointer with atomic update.
CaloCell_ID.h
CaloDepthTool::DepthChoice::entrance
@ entrance
TRT::Hit::side
@ side
Definition: HitInfo.h:83
CaloDepthTool::exit
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.
Definition: CaloDepthTool.cxx:504
CaloDepthTool::operator=
CaloDepthTool & operator=(const CaloDepthTool &)
GeoPrimitives.h
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
CaloDepthTool::m_depthChoice
DepthChoice m_depthChoice
Definition: CaloDepthTool.h:338
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloPhiRange.h
CaloPhiRange class declaration.
CaloDepthTool::entrance
static double entrance(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 entrance of the given CaloCell_ID::CaloSample.
Definition: CaloDepthTool.cxx:433
CaloDepthTool::DepthChoice::cscopt
@ cscopt
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloDepthTool::deta
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 ?
Definition: CaloDepthTool.cxx:142
CaloDepthTool::egparametrized
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.
Definition: CaloDepthTool.cxx:169
CaloDepthTool::get_middle_radius
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
Definition: CaloDepthTool.cxx:694
CaloDepthTool::flat
static double flat(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).
Definition: CaloDepthTool.cxx:539
CaloDepthTool::TBparametrized
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.
Definition: CaloDepthTool.cxx:389
CaloDepthTool::cscopt2_parametrized
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.
Definition: CaloDepthTool.cxx:323
CaloDepthTool::cscopt_parametrized
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.
Definition: CaloDepthTool.cxx:253
CaloDepthTool::DepthChoice::egparam
@ egparam
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CaloDepthTool::radius
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
Definition: CaloDepthTool.cxx:89
CaloDepthTool::CaloDepthTool
CaloDepthTool()
CaloDepthTool::CaloDepthTool
CaloDepthTool(const CaloDepthTool &)
CaloDepthTool::DepthChoice::middle
@ middle
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloDepthTool::get_exit_radius
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
Definition: CaloDepthTool.cxx:722
CaloDepthTool::get_exit_z
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
Definition: CaloDepthTool.cxx:740
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DetectorZone::barrel
@ barrel
CaloDepthTool::~CaloDepthTool
virtual ~CaloDepthTool()
Destructor.
CaloDepthTool::depth
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).
Definition: CaloDepthTool.cxx:605
CaloDepthTool::middle
static double middle(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 middle of the given CaloCell_ID::CaloSample.
Definition: CaloDepthTool.cxx:469
CaloDepthTool::DepthChoice
DepthChoice
Definition: CaloDepthTool.h:239
AthAlgTool
Definition: AthAlgTool.h:26
CaloDepthTool::DepthChoice::TBparam
@ TBparam
CaloDepthTool::DepthChoice::cscopt2
@ cscopt2