|
ATLAS Offline Software
|
#include <CETmaterial.h>
|
| CETmaterial (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Athena-Algorithm Constructor. More...
|
|
| ~CETmaterial () |
| 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 |
|
|
void | printMat (double th, double ph, double mat, double dtheta=0., double dphi=0.) const |
|
void | printMatScan (double theta, double phi, double r, double z, double mat, const std::string &name) const |
|
void | printMatPrec (double theta, double phi, const Trk::TrackParameters *, const Trk::TrackParameters *, double mat, int id, const std::string &name) |
|
void | printMatComp (double theta, double phi, const Trk::TrackParameters *currPar, const std::string &name, double mat, double matApp, double dx, double dy) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
The ExtrapolatorTest Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to geometry outer boundary and back to perigee
- Author
- Sarka Todorova sarka.nosp@m..tod.nosp@m.orova.nosp@m.@cer.nosp@m.n.ch
Definition at line 38 of file CETmaterial.h.
◆ IChronoStatSvc_t
◆ StoreGateSvc_t
◆ CETmaterial()
Trk::CETmaterial::CETmaterial |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Standard Athena-Algorithm Constructor.
Definition at line 26 of file CETmaterial.cxx.
◆ ~CETmaterial()
Trk::CETmaterial::~CETmaterial |
( |
| ) |
|
◆ 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::CETmaterial::execute |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 150 of file CETmaterial.cxx.
153 const EventContext& ctx = Gaudi::Hive::currentContext();
160 return StatusCode::FAILURE;
179 std::vector<const TrackStateOnSurface*> material;
180 std::vector<const TrackStateOnSurface*> matPrec;
194 material.clear(); matPrec.clear();
217 const std::vector<const Trk::TrackStateOnSurface*>* mmsentry =
m_extrapolator->extrapolateM(ctx,
224 for (
unsigned int i=0;
i< mmsentry->size();
i++)
226 ATH_MSG_DEBUG(
"position:eloss:" <<
i <<
"," << (*mmsentry)[
i]->trackParameters()->position() <<
":"
228 currPar = (mmsentry->back()) ? mmsentry->back()->trackParameters() : msEntry;
230 const std::vector<const Trk::TrackStateOnSurface*>* peri =
m_extrapolator->extrapolateM(ctx,
240 ATH_MSG_ERROR (
"Perigee pointer is null in CETmaterial.cxx");
242 return StatusCode::FAILURE;
244 for (
unsigned int i=0;
i< peri->size();
i++)
245 if ((*peri)[
i] && (*peri)[
i]->trackParameters())
246 ATH_MSG_DEBUG(
"position:eloss:" <<
i <<
"," << (*peri)[
i]->trackParameters()->position() <<
":"
249 if (peri->back() && peri->back()->trackParameters()) {
251 << initialPerigee.parameters()[0] <<
","
252 << initialPerigee.parameters()[1] <<
","
253 << initialPerigee.parameters()[2] <<
","
254 << initialPerigee.parameters()[3] <<
","
255 << initialPerigee.momentum().mag() );
257 << peri->back()->trackParameters()->parameters()[0] <<
","
258 << peri->back()->trackParameters()->parameters()[1] <<
","
259 << peri->back()->trackParameters()->parameters()[2] <<
","
260 << peri->back()->trackParameters()->parameters()[3] <<
","
261 << peri->back()->trackParameters()->momentum().mag() );
263 ATH_MSG_ERROR(
"extrapolation to perigee failed for input parameters: " << msEntry->parameters() );
268 ATH_MSG_ERROR(
"extrapolation to MSentry failed for input parameters: " << currPar->parameters() );
294 const std::vector<const Trk::TrackStateOnSurface*>* nextPrec =
m_extraprec->extrapolateM(
303 for (
const auto *
i : *nextPrec) {
312 if (!lay || !nextPrec || nextPrec->empty() || !nextPrec->back() )
break;
313 precPar = nextPrec->back()->trackParameters();
315 if (!material.empty())
for (
auto &
i : material) {
316 if (
i->materialEffectsOnTrack())
mat +=
i->materialEffectsOnTrack()->thicknessInX0();
319 currPar->parameters()[1]-precPar->parameters()[1]);
329 if (!material.empty())
for (
auto &
i : material) {
330 if (
i->materialEffectsOnTrack()) matc +=
i->materialEffectsOnTrack()->thicknessInX0();
342 if (!material.empty())
for (
auto &
i : material) {
343 if (
i->materialEffectsOnTrack()) {
344 mat +=
i->materialEffectsOnTrack()->thicknessInX0();
350 const std::vector<const Trk::TrackStateOnSurface*>* destParameters =
m_extrapolator->extrapolateM(
360 if (destParameters)
for (
const auto *destParameter : *destParameters) {
371 std::vector<const Trk::DetachedTrackingVolume*> detVols =
m_extrapolator->trackingGeometry()->lowestDetachedTrackingVolumes(trPar->
position());
376 if (destParameters) {
384 if (!destParameters || destParameters->empty() ) {
385 ATH_MSG_ERROR(
"extrapolation to outer boundary failed for input parameters: " << initialPerigee.parameters() );
386 }
else if (destParameters->back()->trackParameters()) {
392 const std::vector<const Trk::TrackStateOnSurface*>* peri =
m_extrapolator->extrapolateM(
393 ctx, *(destParameters->back()->trackParameters()),
401 for (
unsigned int i=0;
i< peri->size();
i++)
402 ATH_MSG_INFO(
"position:" <<
i <<
"," << (*peri)[
i]->trackParameters()->position() );
403 ATH_MSG_INFO(
"extrapolation to perigee:input: " << initialPerigee.parameters() );
404 ATH_MSG_INFO(
"extrapolation to perigee:output: " << peri->back()->trackParameters()->parameters() );
406 ATH_MSG_ERROR(
"extrapolation to perigee failed for input parameters: " << destParameters->back()->trackParameters()->parameters() );
412 delete destParameters;
418 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::CETmaterial::finalize |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 139 of file CETmaterial.cxx.
145 return StatusCode::SUCCESS;
◆ initialize()
StatusCode Trk::CETmaterial::initialize |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 110 of file CETmaterial.cxx.
119 return StatusCode::FAILURE;
123 return StatusCode::FAILURE;
130 m_gaussDist =
new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
131 m_flatDist =
new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
134 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.
◆ printMat()
void Trk::CETmaterial::printMat |
( |
double |
th, |
|
|
double |
ph, |
|
|
double |
mat, |
|
|
double |
dtheta = 0. , |
|
|
double |
dphi = 0. |
|
) |
| const |
|
private |
Definition at line 423 of file CETmaterial.cxx.
425 std::ofstream myfilemat;
427 myfilemat<<
theta<<
" "<<
phi<<
" "<<
mat<<
" "<<dtheta<<
" "<<dphi<<std::endl;
◆ printMatComp()
void Trk::CETmaterial::printMatComp |
( |
double |
theta, |
|
|
double |
phi, |
|
|
const Trk::TrackParameters * |
currPar, |
|
|
const std::string & |
name, |
|
|
double |
mat, |
|
|
double |
matApp, |
|
|
double |
dx, |
|
|
double |
dy |
|
) |
| const |
|
private |
Definition at line 504 of file CETmaterial.cxx.
506 std::ofstream myfilemat;
509 <<
" " <<
mat <<
" " << matApp <<
" " <<
dx <<
" " <<
dy << std::endl;
◆ printMatPrec()
Definition at line 438 of file CETmaterial.cxx.
440 if (
name.empty()) {};
441 std::ofstream myfilemat;
454 *
m_err = mdest->covariance()->inverse().eval();
469 myfilemat <<
m_th <<
" " <<
m_ph <<
" " << 0 <<
" " <<
m_id << std::endl;
483 *
m_err = mdest->covariance()->inverse().eval();
499 *
m_err = mdest->covariance()->inverse().eval();
◆ printMatScan()
void Trk::CETmaterial::printMatScan |
( |
double |
theta, |
|
|
double |
phi, |
|
|
double |
r, |
|
|
double |
z, |
|
|
double |
mat, |
|
|
const std::string & |
name |
|
) |
| const |
|
private |
Definition at line 431 of file CETmaterial.cxx.
433 std::ofstream myfilemat;
435 myfilemat <<
theta <<
" " <<
phi <<
" " <<
r <<
" " <<
z <<
" " <<
mat <<
" " <<
name << std::endl;
◆ 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_backward
bool Trk::CETmaterial::m_backward |
|
private |
◆ m_charge
double Trk::CETmaterial::m_charge |
|
private |
◆ m_checkStepWise
bool Trk::CETmaterial::m_checkStepWise |
|
private |
◆ m_chronoStatSvc
◆ m_detStore
◆ m_domsentry
bool Trk::CETmaterial::m_domsentry |
|
private |
◆ m_doprecision
bool Trk::CETmaterial::m_doprecision |
|
private |
◆ m_err
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_extrapolator
The Extrapolator(s) to be retrieved.
Definition at line 62 of file CETmaterial.h.
◆ m_extraprec
◆ m_flatDist
Rndm::Numbers* Trk::CETmaterial::m_flatDist |
|
private |
◆ m_gaussDist
Rndm::Numbers* Trk::CETmaterial::m_gaussDist |
|
private |
◆ m_id
int Trk::CETmaterial::m_id |
|
private |
◆ m_matActiveFile
const char* Trk::CETmaterial::m_matActiveFile |
|
private |
◆ m_matCompFile
const char* Trk::CETmaterial::m_matCompFile |
|
private |
◆ m_matSaved
double Trk::CETmaterial::m_matSaved |
|
private |
◆ m_matScanFile
const char* Trk::CETmaterial::m_matScanFile |
|
private |
◆ m_matTotFile
const char* Trk::CETmaterial::m_matTotFile |
|
private |
◆ m_maxEta
double Trk::CETmaterial::m_maxEta |
|
private |
◆ m_maxP
double Trk::CETmaterial::m_maxP |
|
private |
◆ m_maxPhi
double Trk::CETmaterial::m_maxPhi |
|
private |
◆ m_maxTheta
double Trk::CETmaterial::m_maxTheta |
|
private |
◆ m_maxZ0
double Trk::CETmaterial::m_maxZ0 |
|
private |
◆ m_minEta
double Trk::CETmaterial::m_minEta |
|
private |
◆ m_minP
double Trk::CETmaterial::m_minP |
|
private |
◆ m_minPhi
double Trk::CETmaterial::m_minPhi |
|
private |
◆ m_minTheta
double Trk::CETmaterial::m_minTheta |
|
private |
◆ m_minZ0
double Trk::CETmaterial::m_minZ0 |
|
private |
◆ m_msentry
◆ m_next
◆ m_numScan
unsigned int Trk::CETmaterial::m_numScan |
|
private |
◆ m_outerBoundary
◆ m_particleType
int Trk::CETmaterial::m_particleType |
|
private |
the particle typre for the extrap.
Definition at line 103 of file CETmaterial.h.
◆ m_ph
double Trk::CETmaterial::m_ph |
|
private |
◆ m_printActive
bool Trk::CETmaterial::m_printActive |
|
private |
◆ m_printMaterial
bool Trk::CETmaterial::m_printMaterial |
|
private |
◆ m_sigmaD0
double Trk::CETmaterial::m_sigmaD0 |
|
private |
◆ m_th
double Trk::CETmaterial::m_th |
|
private |
◆ m_trackingGeometry
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
@ z
global position (cartesian)
Rndm::Numbers * m_flatDist
void printMatComp(double theta, double phi, const Trk::TrackParameters *currPar, const std::string &name, double mat, double matApp, double dx, double dy) const
const Amg::Vector3D & position() const
Access method for the position.
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
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.
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
Rndm::Numbers * m_gaussDist
Random Number setup.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Trk::TrackParameters * m_next
const char * m_matScanFile
double m_maxTheta
Maximal theta value.
const DetachedTrackingVolume * enclosingDetachedTrackingVolume() const
get the confining DetachedTrackingVolume
double thicknessInX0() const
returns the actually traversed material .
base class to integrate material effects on Trk::Track in a flexible way.
unsigned int m_numScan
number of scan tracks
void printMatPrec(double theta, double phi, const Trk::TrackParameters *, const Trk::TrackParameters *, double mat, int id, const std::string &name)
int layerType() const
get the Layer coding
virtual void setOwner(IDataHandleHolder *o)=0
void printMat(double th, double ph, double mat, double dtheta=0., double dphi=0.) const
const Trk::TrackingGeometry * m_trackingGeometry
const Trk::Surface * m_outerBoundary
const TrackingVolume * highestTrackingVolume() const
return the world
virtual StatusCode sysInitialize() override
Override sysInitialize.
double m_maxP
Maximal p value.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
const char * m_matCompFile
::StatusCode StatusCode
StatusCode definition for legacy code.
void printMatScan(double theta, double phi, double r, double z, double mat, const std::string &name) const
double m_minTheta
Minimal theta value.
double m_maxPhi
Maximal phi value.
IChronoStatSvc_t m_chronoStatSvc
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const Trk::TrackingVolume * m_msentry
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double m_maxEta
Maximal eta value.
double m_sigmaD0
Sigma of distribution for D0.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
double m_minEta
Minimal eta value.
const std::string & name() const
returns the Name
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
double m_minPhi
Minimal phi value.
ToolHandle< IExtrapolator > m_extrapolator
The Extrapolator(s) to be retrieved.
const TrackingVolume * trackingVolume(const std::string &name) const
return the tracking Volume by name, 0 if it doesn't exist
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const char * m_matActiveFile
AthAlgorithm()
Default constructor:
double m_minP
Minimal p value.
const char * m_matTotFile
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Scalar mag() const
mag method
int m_particleType
the particle typre for the extrap.
virtual ParametersBase< DIM, T > * clone() const override=0
clone method for polymorphic deep copy
ToolHandle< IExtrapolator > m_extraprec