|
ATLAS Offline Software
|
#include <EnergyLossExtrapolationValidation.h>
|
| EnergyLossExtrapolationValidation (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Athena-Algorithm Constructor. More...
|
|
| ~EnergyLossExtrapolationValidation () |
| Default Destructor. More...
|
|
StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
StatusCode | execute () |
| standard Athena-Algorithm method More...
|
|
StatusCode | finalize () |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
The EnergyLossExtrapolationValidation Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to specific reference surfaces within the ATLAS Detector (user defined cylinder tubes which can be placed e.g. around Beam Pipe, Pixel, SCT, TRT, Calorimeter, Muon System, or have completely arbitrary dimensions).
In the jobOptions one can toggle these surfaces for
- a) the Inner Detector via DetFlags.ID_setOn() / DetFlags.ID_setOff()
- b) the Calorimeter via DetFlags.Calo_setOn() / DetFlags.Calo_setOff()
- c) the Muon System via DetFlags.Muon_setOn() / DetFlags.Calo_setOff()
The code of ExtrapolationValidation (by Andreas Salzburger) has been reused and adjusted for this algorithm.
- Author
- Wolfgang Lukas <Wolfgang.Lukas -at- cern.ch>
Definition at line 61 of file EnergyLossExtrapolationValidation.h.
◆ StoreGateSvc_t
◆ EnergyLossExtrapolationValidation()
Trk::EnergyLossExtrapolationValidation::EnergyLossExtrapolationValidation |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~EnergyLossExtrapolationValidation()
Trk::EnergyLossExtrapolationValidation::~EnergyLossExtrapolationValidation |
( |
| ) |
|
◆ createTransform()
std::unique_ptr< Amg::Transform3D > Trk::EnergyLossExtrapolationValidation::createTransform |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
phi = 0. , |
|
|
double |
theta = 0. , |
|
|
double |
alphaZ = 0. |
|
) |
| |
|
staticprivate |
private helper method to create a Transform
Definition at line 460 of file EnergyLossExtrapolationValidation.cxx.
476 Amg::Vector3D surfaceXdirection(surfaceYdirection.cross(surfaceZdirection));
479 surfaceRotation.col(0) = surfaceXdirection;
480 surfaceRotation.col(1) = surfaceYdirection;
481 surfaceRotation.col(2) = surfaceZdirection;
484 return std::make_unique<Amg::Transform3D>(surfaceRotation, surfacePosition);
◆ 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]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode Trk::EnergyLossExtrapolationValidation::execute |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 189 of file EnergyLossExtrapolationValidation.cxx.
191 const EventContext& ctx = Gaudi::Hive::currentContext();
201 ATH_MSG_WARNING(
"execute() No highest TrackingVolume / no VolumeBounds ... pretty useless!" );
202 return StatusCode::SUCCESS;
254 ATH_MSG_DEBUG(
"execute() Start Parameters : [phi,eta] = [ " << startParameters.momentum().phi() <<
", " << startParameters.eta() <<
" ]" );
275 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
285 if (collectedMaterial && !collectedMaterial->empty()) {
291 for (
const auto* tsos : *collectedMaterial) {
292 newX0 += tsos->materialEffectsOnTrack() ? tsos->materialEffectsOnTrack()->thicknessInX0() : 0;
306 if (!lastParameters) {
307 ATH_MSG_WARNING(
"execute() Layer " << lay <<
": start parameters for cylinder NOT found - skip event !" );
310 ATH_MSG_VERBOSE(
"execute() Layer " << lay <<
": start parameters for cylinder found: " << *lastParameters );
314 newParameters =
nullptr;
319 m_onion ? *lastParameters : startParameters,
328 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
330 m_onion ? *lastParameters : startParameters,
337 if (collectedMaterial && !collectedMaterial->empty()){
346 for (
const auto* tsos : *collectedMaterial) {
347 newX0 += tsos->materialEffectsOnTrack() ? tsos->materialEffectsOnTrack()->thicknessInX0() : 0;
355 if (!newParameters) {
361 m_onion ? *lastParameters : startParameters,
371 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
373 m_onion ? *lastParameters : startParameters,
380 if (collectedMaterial && !collectedMaterial->empty()){
389 for (
const auto* tsos : *collectedMaterial) {
390 newX0 += tsos->materialEffectsOnTrack() ? tsos->materialEffectsOnTrack()->thicknessInX0() : 0;
399 if (!newParameters) {
400 ATH_MSG_WARNING(
"execute() Layer " << lay <<
" intersection did not work !" );
404 ATH_MSG_WARNING(
"execute() Layer " << lay <<
" intersection is outside the known world !" );
411 ATH_MSG_VERBOSE(
"execute() Track Parameters at layer " << lay <<
": " << *newParameters );
412 ATH_MSG_DEBUG(
"execute() Track Parameters at layer " << lay <<
": [r,z] = [ " << newPosition.perp() <<
", " << newPosition.z() );
439 lastParameters = newParameters;
454 ATH_MSG_DEBUG(
"execute() deleting DataVector parameters ... " );
456 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode Trk::EnergyLossExtrapolationValidation::finalize |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 162 of file EnergyLossExtrapolationValidation.cxx.
165 ATH_MSG_INFO(
"finalize() ================== Output Statistics =========================" );
176 ATH_MSG_INFO(
"finalize() ==============================================================" );
184 return StatusCode::SUCCESS;
◆ initialize()
StatusCode Trk::EnergyLossExtrapolationValidation::initialize |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 50 of file EnergyLossExtrapolationValidation.cxx.
59 return StatusCode::FAILURE;
93 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
95 ATH_MSG_ERROR(
"initialize() Could not find Hist Service -> Switching ValidationMode Off !" );
101 ATH_MSG_ERROR(
"initialize() Could not register the validation Trees -> Switching ValidationMode Off !" );
108 m_gaussDist =
new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
109 m_flatDist =
new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
116 ATH_MSG_INFO(
"initialize() cylinder dimensions vector from jobOptions :" );
121 ATH_MSG_INFO(
"initialize() cylinder dimensions array for algorithm and ROOT tree :" );
127 ATH_MSG_WARNING(
"initialize() layer " << lay <<
"dimensions are smaller than those of layer " << lay-1 <<
" - constraining m_cylinders to " << lay-1 );
157 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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_avgRecordedLayers
float Trk::EnergyLossExtrapolationValidation::m_avgRecordedLayers = 0 |
|
private |
◆ m_breaksBack
size_t Trk::EnergyLossExtrapolationValidation::m_breaksBack = 0 |
|
private |
◆ m_breaksForward
size_t Trk::EnergyLossExtrapolationValidation::m_breaksForward = 0 |
|
private |
◆ m_collectedLayerBack
size_t Trk::EnergyLossExtrapolationValidation::m_collectedLayerBack = 0 |
|
private |
◆ m_collectedLayerForward
size_t Trk::EnergyLossExtrapolationValidation::m_collectedLayerForward = 0 |
|
private |
◆ m_cylinderR
◆ m_cylinders
UnsignedIntegerProperty Trk::EnergyLossExtrapolationValidation::m_cylinders |
|
private |
◆ m_cylinderVR
FloatArrayProperty Trk::EnergyLossExtrapolationValidation::m_cylinderVR |
|
private |
◆ m_cylinderVZ
FloatArrayProperty Trk::EnergyLossExtrapolationValidation::m_cylinderVZ |
|
private |
◆ m_cylinderZ
◆ m_detStore
◆ m_energy
◆ m_energyLoss
◆ m_entries
size_t Trk::EnergyLossExtrapolationValidation::m_entries = 0 |
|
private |
◆ m_events
size_t Trk::EnergyLossExtrapolationValidation::m_events = 0 |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_extrapolator
◆ m_flatDist
Rndm::Numbers* Trk::EnergyLossExtrapolationValidation::m_flatDist = nullptr |
|
private |
◆ m_gaussDist
Rndm::Numbers* Trk::EnergyLossExtrapolationValidation::m_gaussDist = nullptr |
|
private |
◆ m_highestVolume
◆ m_layer
◆ m_materialCollectionValidation
BooleanProperty Trk::EnergyLossExtrapolationValidation::m_materialCollectionValidation |
|
private |
◆ m_maxEta
FloatProperty Trk::EnergyLossExtrapolationValidation::m_maxEta {this, "StartPerigeeMaxEta", 3.} |
|
private |
◆ m_minEta
FloatProperty Trk::EnergyLossExtrapolationValidation::m_minEta {this, "StartPerigeeMinEta", -3.} |
|
private |
◆ m_momentum
FloatProperty Trk::EnergyLossExtrapolationValidation::m_momentum |
|
private |
◆ m_onion
BooleanProperty Trk::EnergyLossExtrapolationValidation::m_onion |
|
private |
◆ m_parameterEta
◆ m_parameterP
◆ m_parameterPhi
◆ m_parameterQoverP
◆ m_parameterTheta
◆ m_parameterX0
◆ m_particleType
IntegerProperty Trk::EnergyLossExtrapolationValidation::m_particleType |
|
private |
◆ m_pdg
int Trk::EnergyLossExtrapolationValidation::m_pdg = 0 |
|
private |
◆ m_positionX
◆ m_positionY
◆ m_positionZ
◆ m_radius
◆ m_theCylinders
◆ m_theDiscs1
◆ m_theDiscs2
◆ m_totalRecordedLayers
int Trk::EnergyLossExtrapolationValidation::m_totalRecordedLayers = 0 |
|
private |
◆ m_triesBack
size_t Trk::EnergyLossExtrapolationValidation::m_triesBack = 0 |
|
private |
◆ m_triesForward
size_t Trk::EnergyLossExtrapolationValidation::m_triesForward = 0 |
|
private |
◆ m_usePt
BooleanProperty Trk::EnergyLossExtrapolationValidation::m_usePt |
|
private |
◆ m_validationRunTree
TTree* Trk::EnergyLossExtrapolationValidation::m_validationRunTree = nullptr |
|
private |
◆ m_validationRunTreeDescription
StringProperty Trk::EnergyLossExtrapolationValidation::m_validationRunTreeDescription |
|
private |
Initial value:{this, "ValidationRunTreeDescription",
"Run stats of the EnergyLossExtrapolationValidation Algorithm",
"run stats tree description - second argument in TTree"}
Definition at line 120 of file EnergyLossExtrapolationValidation.h.
◆ m_validationRunTreeFolder
StringProperty Trk::EnergyLossExtrapolationValidation::m_validationRunTreeFolder |
|
private |
Initial value:{this, "ValidationRunTreeFolder", "/val/RunTreeTG",
"stream/folder to for the second TTree to be written out"}
Definition at line 114 of file EnergyLossExtrapolationValidation.h.
◆ m_validationRunTreeName
StringProperty Trk::EnergyLossExtrapolationValidation::m_validationRunTreeName |
|
private |
◆ m_validationTree
TTree* Trk::EnergyLossExtrapolationValidation::m_validationTree = nullptr |
|
private |
◆ m_validationTreeDescription
StringProperty Trk::EnergyLossExtrapolationValidation::m_validationTreeDescription |
|
private |
Initial value:{this, "ValidationTreeDescription",
"Event output of the EnergyLossExtrapolationValidation Algorithm",
"validation tree description - second argument in TTree"}
Definition at line 110 of file EnergyLossExtrapolationValidation.h.
◆ m_validationTreeFolder
StringProperty Trk::EnergyLossExtrapolationValidation::m_validationTreeFolder |
|
private |
◆ m_validationTreeName
StringProperty Trk::EnergyLossExtrapolationValidation::m_validationTreeName |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
@ z
global position (cartesian)
bool inside(const Amg::Vector3D &gp, double tol=0.) const
Inside() method for checks.
const Amg::Vector3D & position() const
Access method for the position.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
const TrackingVolume * highestTrackingVolume() const
return the world
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
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
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
represents the track state (measurement, material, fit parameters and quality) at a surface.
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Translation< double, 3 > Translation3D
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Eigen::AngleAxisd AngleAxis3D
AthAlgorithm()
Default constructor:
const T * at(size_type n) const
Access an element, as an rvalue.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual ParametersBase< DIM, T > * clone() const override=0
clone method for polymorphic deep copy