|
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 60 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 551 of file EnergyLossExtrapolationValidation.cxx.
567 Amg::Vector3D surfaceXdirection(surfaceYdirection.cross(surfaceZdirection));
570 surfaceRotation.col(0) = surfaceXdirection;
571 surfaceRotation.col(1) = surfaceYdirection;
572 surfaceRotation.col(2) = surfaceZdirection;
575 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 270 of file EnergyLossExtrapolationValidation.cxx.
272 const EventContext& ctx = Gaudi::Hive::currentContext();
282 ATH_MSG_WARNING(
"execute() No highest TrackingVolume / no VolumeBounds ... pretty useless!" );
283 return StatusCode::SUCCESS;
339 ATH_MSG_DEBUG(
"execute() Start Parameters : [phi,eta] = [ " << startParameters.momentum().phi() <<
", " << startParameters.eta() <<
" ]" );
360 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
370 if (collectedMaterial && !collectedMaterial->empty()) {
376 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsosIter = collectedMaterial->begin();
377 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsosIterEnd = collectedMaterial->end();
378 for ( ; tsosIter != tsosIterEnd; ++tsosIter) {
379 newX0 += (*tsosIter)->materialEffectsOnTrack() ? (*tsosIter)->materialEffectsOnTrack()->thicknessInX0() : 0;
393 if (!lastParameters) {
394 ATH_MSG_WARNING(
"execute() Layer " << lay <<
": start parameters for cylinder NOT found - skip event !" );
397 ATH_MSG_VERBOSE(
"execute() Layer " << lay <<
": start parameters for cylinder found: " << *lastParameters );
401 newParameters =
nullptr;
406 m_onion ? *lastParameters : startParameters,
415 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
417 m_onion ? *lastParameters : startParameters,
424 if (collectedMaterial && !collectedMaterial->empty()){
433 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsosIter = collectedMaterial->begin();
434 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsosIterEnd = collectedMaterial->end();
435 for ( ; tsosIter != tsosIterEnd; ++tsosIter) {
436 newX0 += (*tsosIter)->materialEffectsOnTrack() ? (*tsosIter)->materialEffectsOnTrack()->thicknessInX0() : 0;
444 if (!newParameters) {
450 m_onion ? *lastParameters : startParameters,
460 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
462 m_onion ? *lastParameters : startParameters,
469 if (collectedMaterial && !collectedMaterial->empty()){
478 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsosIter = collectedMaterial->begin();
479 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tsosIterEnd = collectedMaterial->end();
480 for ( ; tsosIter != tsosIterEnd; ++tsosIter) {
481 newX0 += (*tsosIter)->materialEffectsOnTrack() ? (*tsosIter)->materialEffectsOnTrack()->thicknessInX0() : 0;
490 if (!newParameters) {
491 ATH_MSG_WARNING(
"execute() Layer " << lay <<
" intersection did not work !" );
495 ATH_MSG_WARNING(
"execute() Layer " << lay <<
" intersection is outside the known world !" );
502 ATH_MSG_VERBOSE(
"execute() Track Parameters at layer " << lay <<
": " << *newParameters );
503 ATH_MSG_DEBUG(
"execute() Track Parameters at layer " << lay <<
": [r,z] = [ " << newPosition.perp() <<
", " << newPosition.z() );
530 lastParameters = newParameters;
545 ATH_MSG_DEBUG(
"execute() deleting DataVector parameters ... " );
547 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 243 of file EnergyLossExtrapolationValidation.cxx.
246 ATH_MSG_INFO(
"finalize() ================== Output Statistics =========================" );
257 ATH_MSG_INFO(
"finalize() ==============================================================" );
265 return StatusCode::SUCCESS;
◆ initialize()
StatusCode Trk::EnergyLossExtrapolationValidation::initialize |
( |
| ) |
|
standard Athena-Algorithm method
sroe; original line was: if (m_onion && lay>0 && (m_cylinderR[lay] < m_cylinderR[lay-1] || m_cylinderR[lay] < m_cylinderR[lay-1])) { but the two sides of the 'or' are equal
Definition at line 129 of file EnergyLossExtrapolationValidation.cxx.
138 return StatusCode::FAILURE;
170 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
172 ATH_MSG_ERROR(
"initialize() Could not find Hist Service -> Switching ValidationMode Off !" );
178 ATH_MSG_ERROR(
"initialize() Could not register the validation Trees -> Switching ValidationMode Off !" );
185 m_gaussDist =
new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
186 m_flatDist =
new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
193 ATH_MSG_INFO(
"initialize() cylinder dimensions vector from jobOptions :" );
198 ATH_MSG_INFO(
"initialize() cylinder dimensions array for algorithm and ROOT tree :" );
208 ATH_MSG_WARNING(
"initialize() layer " << lay <<
"dimensions are smaller than those of layer " << lay-1 <<
" - constraining m_cylinders to " << lay-1 );
238 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 |
|
private |
◆ m_breaksBack
size_t Trk::EnergyLossExtrapolationValidation::m_breaksBack |
|
private |
◆ m_breaksForward
size_t Trk::EnergyLossExtrapolationValidation::m_breaksForward |
|
private |
◆ m_collectedLayerBack
size_t Trk::EnergyLossExtrapolationValidation::m_collectedLayerBack |
|
private |
◆ m_collectedLayerForward
size_t Trk::EnergyLossExtrapolationValidation::m_collectedLayerForward |
|
private |
◆ m_cylinderR
◆ m_cylinders
size_t Trk::EnergyLossExtrapolationValidation::m_cylinders |
|
private |
◆ m_cylinderVR
std::vector<float> Trk::EnergyLossExtrapolationValidation::m_cylinderVR |
|
private |
◆ m_cylinderVZ
std::vector<float> Trk::EnergyLossExtrapolationValidation::m_cylinderVZ |
|
private |
◆ m_cylinderZ
◆ m_detStore
◆ m_energy
◆ m_energyLoss
◆ m_entries
size_t Trk::EnergyLossExtrapolationValidation::m_entries |
|
private |
◆ m_events
size_t Trk::EnergyLossExtrapolationValidation::m_events |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_extrapolator
ToolHandle<IExtrapolator> Trk::EnergyLossExtrapolationValidation::m_extrapolator |
|
private |
◆ m_flatDist
Rndm::Numbers* Trk::EnergyLossExtrapolationValidation::m_flatDist |
|
private |
◆ m_gaussDist
Rndm::Numbers* Trk::EnergyLossExtrapolationValidation::m_gaussDist |
|
private |
◆ m_highestVolume
◆ m_layer
◆ m_materialCollectionValidation
bool Trk::EnergyLossExtrapolationValidation::m_materialCollectionValidation |
|
private |
◆ m_maxEta
float Trk::EnergyLossExtrapolationValidation::m_maxEta |
|
private |
◆ m_maximumR
double Trk::EnergyLossExtrapolationValidation::m_maximumR |
|
private |
◆ m_maximumZ
double Trk::EnergyLossExtrapolationValidation::m_maximumZ |
|
private |
◆ m_minEta
float Trk::EnergyLossExtrapolationValidation::m_minEta |
|
private |
◆ m_momentum
float Trk::EnergyLossExtrapolationValidation::m_momentum |
|
private |
◆ m_onion
bool Trk::EnergyLossExtrapolationValidation::m_onion |
|
private |
◆ m_parameterEta
◆ m_parameterP
◆ m_parameterPhi
◆ m_parameterQoverP
◆ m_parameterTheta
◆ m_parameterX0
◆ m_particleType
int Trk::EnergyLossExtrapolationValidation::m_particleType |
|
private |
◆ m_pdg
int Trk::EnergyLossExtrapolationValidation::m_pdg |
|
private |
◆ m_positionX
◆ m_positionY
◆ m_positionZ
◆ m_radius
◆ m_theCylinders
◆ m_theDiscs1
◆ m_theDiscs2
◆ m_totalRecordedLayers
int Trk::EnergyLossExtrapolationValidation::m_totalRecordedLayers |
|
private |
◆ m_triesBack
size_t Trk::EnergyLossExtrapolationValidation::m_triesBack |
|
private |
◆ m_triesForward
size_t Trk::EnergyLossExtrapolationValidation::m_triesForward |
|
private |
◆ m_usePt
bool Trk::EnergyLossExtrapolationValidation::m_usePt |
|
private |
◆ m_validationRunTree
TTree* Trk::EnergyLossExtrapolationValidation::m_validationRunTree |
|
private |
◆ m_validationRunTreeDescription
std::string Trk::EnergyLossExtrapolationValidation::m_validationRunTreeDescription |
|
private |
◆ m_validationRunTreeFolder
std::string Trk::EnergyLossExtrapolationValidation::m_validationRunTreeFolder |
|
private |
◆ m_validationRunTreeName
std::string Trk::EnergyLossExtrapolationValidation::m_validationRunTreeName |
|
private |
◆ m_validationTree
TTree* Trk::EnergyLossExtrapolationValidation::m_validationTree |
|
private |
◆ m_validationTreeDescription
std::string Trk::EnergyLossExtrapolationValidation::m_validationTreeDescription |
|
private |
◆ m_validationTreeFolder
std::string Trk::EnergyLossExtrapolationValidation::m_validationTreeFolder |
|
private |
◆ m_validationTreeName
std::string 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
double halflengthZ() const
This method returns the halflengthZ.
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 outerRadius() const
This method returns the outer radius.
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