|
ATLAS Offline Software
|
Implementation of the ICaloDepthTool interface.Given a Track direction, checks if it is in the Calorimeter acceptance and provides various radii to be compared/used in the extrapolation.
More...
#include <CaloDepthTool.h>
|
| CaloDepthTool (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard constructor. More...
|
|
virtual | ~CaloDepthTool () |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
| Tool Initialize. More...
|
|
virtual StatusCode | finalize () override |
| Tool Finalize. More...
|
|
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 More...
|
|
double | radius (const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD) const |
| get radius More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
static const InterfaceID & | interfaceID () |
| Query interface. More...
|
|
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 ? More...
|
|
static double | deta (const CaloCell_ID::CaloSample sample, 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 ? More...
|
|
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. More...
|
|
static double | entrance (const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD) |
| For a given direction, return the entrance of the given CaloCell_ID::CaloSample. More...
|
|
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. More...
|
|
static double | middle (const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD) |
| For a given direction, return the middle of the given CaloCell_ID::CaloSample. More...
|
|
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. More...
|
|
static double | exit (const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD) |
| For a given direction, return the exit of the given CaloCell_ID::CaloSample. More...
|
|
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). More...
|
|
static double | flat (const CaloCell_ID::CaloSample sample, const int side, const CaloDetDescrManager *caloDD) |
| If the direction is not specified, returns a "flat" aproximation (truely valid for strips only). More...
|
|
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). More...
|
|
static double | depth (const CaloCell_ID::CaloSample sample, const int side, const CaloDetDescrManager *caloDD) |
| If the direction is not specified, returns a "flat" aproximation (truely valid for strips only). More...
|
|
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 More...
|
|
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 More...
|
|
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. More...
|
|
|
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. More...
|
|
static double | egparametrized (const CaloCell_ID::CaloSample sample, 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. More...
|
|
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. More...
|
|
static double | TBparametrized (const CaloCell_ID::CaloSample sample, const double eta, const double phi, const CaloDetDescrManager *caloDD) |
| Parametrisation taken from the old egammaqdepth class, but adapted for TestBeam. More...
|
|
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. More...
|
|
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 More...
|
|
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 More...
|
|
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 More...
|
|
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 More...
|
|
Implementation of the ICaloDepthTool interface.Given a Track direction, checks if it is in the Calorimeter acceptance and provides various radii to be compared/used in the extrapolation.
This tool extends the functionality of the old egammaUtils/egammaqdepth class
In all the methods, radius stands for r in the (cylindric) barrel, for z in the (disk) endcap.
The generic method radius() uses the default choosen by joboption, and if the result is 0 because the eta/phi direction is outside the Sample acceptance, returns the egparametrised depth as backup solution.
Definition at line 45 of file CaloDepthTool.h.
◆ StoreGateSvc_t
◆ DepthChoice
Enumerator |
---|
egparam | |
cscopt | |
cscopt2 | |
TBparam | |
entrance | |
middle | |
flat | |
Definition at line 238 of file CaloDepthTool.h.
◆ CaloDepthTool() [1/3]
CaloDepthTool::CaloDepthTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard constructor.
Definition at line 49 of file CaloDepthTool.cxx.
55 declareInterface<CaloDepthTool>(
this);
◆ ~CaloDepthTool()
CaloDepthTool::~CaloDepthTool |
( |
| ) |
|
|
virtualdefault |
◆ CaloDepthTool() [2/3]
CaloDepthTool::CaloDepthTool |
( |
| ) |
|
|
protected |
◆ CaloDepthTool() [3/3]
◆ cscopt2_parametrized()
Same as cscopt with the outermost EMB2 point excluded.
This improves the fit. From CSC12 E=100 GeV photons.
Definition at line 323 of file CaloDepthTool.cxx.
328 double radius = s_default;
330 float aeta =
static_cast<float>(std::abs(
eta));
336 radius = (1558.859292 - 4.990838 * aeta - 21.144279 * aeta * aeta) *
339 radius = (1522.775373 + 27.970192 * aeta - 21.104108 * aeta * aeta) *
342 radius = (1698.990944 - 49.431767 * aeta - 24.504976 * aeta * aeta) *
366 radius = (3473.473909 + 453.941515 * aeta - 119.101945 * aeta * aeta) *
◆ cscopt_parametrized()
Layers 1 and 2 depths set to give the best eta resolution.
From CSC12 E=100 GeV photons.
Definition at line 253 of file CaloDepthTool.cxx.
258 double radius = s_default;
260 float aeta =
static_cast<float>(std::abs(
eta));
266 radius = (1558.859292 - 4.990838 * aeta - 21.144279 * aeta * aeta) *
269 radius = (1522.775373 + 27.970192 * aeta - 21.104108 * aeta * aeta) *
272 radius = (1689.621619 + 2.682993 * aeta - 70.165741 * aeta * aeta) *
296 radius = (3473.473909 + 453.941515 * aeta - 119.101945 * aeta * aeta) *
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ depth() [1/2]
If the direction is not specified, returns a "flat" aproximation (truely valid for strips only).
Definition at line 618 of file CaloDepthTool.cxx.
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++)
◆ depth() [2/2]
If the direction is not specified, returns a "flat" aproximation (truely valid for strips only).
Definition at line 605 of file CaloDepthTool.cxx.
◆ deta() [1/2]
How far are you (in eta) from a given sample or - if you are in - how far are you from the edge ?
This method will return the distance to the closest edge. If you are outside the sample volume, it will always be a positive number. If you are inside the sample volume, the distance will be multiplied by -1 : i.e.always a negative number.
Definition at line 155 of file CaloDepthTool.cxx.
159 double deta = 99999.;
◆ deta() [2/2]
How far are you (in eta) from a given sample or - if you are in - how far are you from the edge ?
This method will return the distance to the closest edge. If you are outside the sample volume, it will always be a positive number. If you are inside the sample volume, the distance will be multiplied by -1 : i.e.always a negative number.
Definition at line 142 of file CaloDepthTool.cxx.
◆ detStore()
◆ egparametrized() [1/2]
Methods taken from the old egammaqdepth class : return the parametrised depth used in DC1 and DC2.
Only LAREM is foreseen
Definition at line 183 of file CaloDepthTool.cxx.
188 double radius = s_default;
194 float aeta =
static_cast<float>(std::abs(
eta));
200 radius = (1567.8 - 18.975 * aeta - 17.668 * aeta * aeta) *
203 radius = (1503.2 + 71.716 * aeta - 41.008 * aeta * aeta) *
207 radius = (1697.1 - 15.311 * aeta - 64.153 * aeta * aeta) *
210 radius = (1739.1 - 75.648 * aeta - 18.501 * aeta * aeta) *
◆ egparametrized() [2/2]
Methods taken from the old egammaqdepth class : return the parametrised depth used in DC1 and DC2.
Only LAREM is foreseen
Definition at line 169 of file CaloDepthTool.cxx.
◆ entrance() [1/2]
◆ entrance() [2/2]
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ exit() [1/2]
◆ exit() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode CaloDepthTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ flat() [1/2]
If the direction is not specified, returns a "flat" aproximation (truely valid for strips only).
Definition at line 552 of file CaloDepthTool.cxx.
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++)
◆ flat() [2/2]
If the direction is not specified, returns a "flat" aproximation (truely valid for strips only).
Definition at line 539 of file CaloDepthTool.cxx.
◆ get_entrance_radius()
◆ get_entrance_z()
◆ get_exit_radius()
◆ get_exit_z()
◆ get_middle_radius()
◆ get_middle_z()
◆ initialize()
StatusCode CaloDepthTool::initialize |
( |
| ) |
|
|
overridevirtual |
Tool Initialize.
Definition at line 61 of file CaloDepthTool.cxx.
69 if (
it != s_stringToEnum.end()) {
73 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & CaloDepthTool::interfaceID |
( |
| ) |
|
|
static |
◆ middle() [1/2]
◆ middle() [2/2]
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ operator=()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ radius() [1/2]
get radius
Generic method to be used in client code : the default choosen by joboption, and if the result is 0 because the eta/phi direction is outside the Sample acceptance, returns the egparametrised depth as backup solution.
Definition at line 103 of file CaloDepthTool.cxx.
108 double radius = s_default;
134 if (std::abs(
radius) < 10.) {
◆ radius() [2/2]
get radius
Generic method to be used in client code : the default choosen by joboption, and if the result is 0 because the eta/phi direction is outside the Sample acceptance, returns the egparametrised depth as backup solution.
Definition at line 89 of file CaloDepthTool.cxx.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ TBparametrized() [1/2]
Parametrisation taken from the old egammaqdepth class, but adapted for TestBeam.
Only LAREM is foreseen
Definition at line 403 of file CaloDepthTool.cxx.
408 double radius = s_default;
◆ TBparametrized() [2/2]
Parametrisation taken from the old egammaqdepth class, but adapted for TestBeam.
Only LAREM is foreseen
Definition at line 389 of file CaloDepthTool.cxx.
◆ updateVHKA()
◆ m_calo_id
◆ m_depth_choice
Gaudi::Property<std::string> CaloDepthTool::m_depth_choice { this, "DepthChoice", "", "depth choice" } |
|
private |
Depth choice related code User passes a string but we convert to an enum at init to avoid string comparisons.
Definition at line 336 of file CaloDepthTool.h.
◆ m_depthChoice
◆ m_detStore
◆ m_evtStore
◆ m_range
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
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:
virtual void setOwner(IDataHandleHolder *o)=0
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool is_tile() const
cell belongs to Tile
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
calo_descr_range calo_descriptors_range() const
Range over descriptors.
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>