|
ATLAS Offline Software
|
#include <MuidCaloTrackStateOnSurface.h>
|
| MuidCaloTrackStateOnSurface (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~MuidCaloTrackStateOnSurface ()=default |
|
StatusCode | initialize () override |
|
StatusCode | finalize () override |
|
std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > | caloTSOS (const EventContext &ctx, const Trk::TrackParameters ¶meters) const override |
| IMuidCaloTrackStateOnSurface interface: to get the 3 scattering and energy deposit TSOS'es representing the calorimeter. More...
|
|
std::unique_ptr< Trk::TrackStateOnSurface > | innerTSOS (const EventContext &ctx, const Trk::TrackParameters ¶meters) const override |
| IMuidCaloTrackStateOnSurface interface: to get individually the scattering TSOS'es representing the calorimeter. More...
|
|
std::unique_ptr< Trk::TrackStateOnSurface > | outerTSOS (const EventContext &ctx, const Trk::TrackParameters ¶meters) const override |
|
std::unique_ptr< Trk::TrackStateOnSurface > | middleTSOS (const EventContext &ctx, const Trk::TrackParameters &middleParameters, const Trk::TrackParameters *innerParameters, const Trk::TrackParameters *outerParameters) const override |
| IMuidCaloTrackStateOnSurface interface: to get the energy deposit TSOS representing the calorimeter. 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 |
|
◆ StoreGateSvc_t
◆ SurfaceLayer
◆ MuidCaloTrackStateOnSurface()
MuidCaloTrackStateOnSurface::MuidCaloTrackStateOnSurface |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuidCaloTrackStateOnSurface()
virtual Rec::MuidCaloTrackStateOnSurface::~MuidCaloTrackStateOnSurface |
( |
| ) |
|
|
virtualdefault |
◆ caloTSOS()
IMuidCaloTrackStateOnSurface interface: to get the 3 scattering and energy deposit TSOS'es representing the calorimeter.
The input TrackParameters may be anywhere along the track.
Implements Rec::IMuidCaloTrackStateOnSurface.
Definition at line 85 of file MuidCaloTrackStateOnSurface.cxx.
87 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>>
caloTSOS;
90 std::unique_ptr<Trk::TrackStateOnSurface> innerTS, middleTS, outerTS;
91 std::unique_ptr<const Trk::TrackParameters> inParams, midParams;
105 fieldCondObj->getInitializedCache(fieldCache);
108 bool trackOutwards =
true;
113 trackOutwards =
false;
123 middleParams = midParams.get();
129 middleTS =
m_caloEnergyParam->trackStateOnSurface(ctx, *midParams, innerParams, outerParams);
130 if (!middleTS) { middleParams =
nullptr; }
136 std::unique_ptr<const Trk::TrackParameters>
params;
138 if (!middleTS)
break;
152 <<
" correctedEnergy "
167 std::make_unique<Trk::AtaCylinder>(middleParams->
position(),
momentum, middleParams->
charge(), *cylinder);
189 if (!middleTS) {
ATH_MSG_VERBOSE(
" fail tracking outwards: no intersect at middle surface"); }
192 ATH_MSG_VERBOSE(
" fail tracking ouwards: no intersect at inner surface");
200 middleParams = midParams.get();
203 innerParams = inParams.get();
207 middleTS =
m_caloEnergyDeposit->trackStateOnSurface(ctx, *middleParams, inParams.get(), outerParams);
209 middleTS =
m_caloEnergyParam->trackStateOnSurface(ctx, *middleParams, inParams.get(), outerParams);
223 <<
" correctedEnergy "
227 std::unique_ptr<const Trk::TrackParameters>
params;
231 middleParams->covariance() ? std::optional<AmgSymMatrix(5)>(*middleParams->covariance()) : std::nullopt;
247 ATH_MSG_VERBOSE(
" fail tracking inwards: no intersect at inner surface");
250 ATH_MSG_VERBOSE(
" fail tracking inwards: no intersect at middle surface");
256 caloTSOS.push_back(std::move(innerTS));
259 if (middleTS)
caloTSOS.push_back(std::move(middleTS));
261 caloTSOS.push_back(std::move(outerTS));
◆ 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]
◆ 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 MuidCaloTrackStateOnSurface::finalize |
( |
| ) |
|
|
override |
◆ getCaloSurface()
◆ getExtrapolatedParameters()
The TrackParameters own their dedicated instance of the track surface... In cases, where the loop below resets the extrapolation we need to clone the surface as well this pointer is just the surface garbage collection
Definition at line 317 of file MuidCaloTrackStateOnSurface.cxx.
323 const std::string surf_layer_str =
layer == SurfaceLayer::Inner ?
"Inner" : (
layer == SurfaceLayer::Middle ?
"Middle" :
"Outer");
326 double startingPhi = 0.;
339 if (!surface)
return nullptr;
342 unsigned extrapolations = 0;
345 propDirection = momentumDirection;
347 propDirection = oppositeDirection;
351 std::unique_ptr<const Trk::TrackParameters> extrapolation{
353 if (!extrapolation)
return nullptr;
357 if (std::abs(
deltaPhi) > M_PI_2) {
return nullptr; }
361 double signRZ = (extrapolation->position().perp() -
parameters.position().perp()) *
362 (extrapolation->position().z() -
parameters.position().z());
363 if (signRZ * extrapolation->position().z() < 0.) {
370 bool restart =
false;
376 std::unique_ptr<const Trk::Surface> reset_surface;
377 while (++extrapolations < 5 && extrapolatedSurface != oldSurface) {
381 propDirection = momentumDirection;
383 propDirection = oppositeDirection;
388 std::unique_ptr<const Trk::TrackParameters> oldParameters = std::move(extrapolation);
391 if (!extrapolation) {
399 ATH_MSG_DEBUG(surf_layer_str <<
" Parameters: oscillating => arbitrary solution chosen");
401 extrapolation = std::move(oldParameters);
402 reset_surface.reset(extrapolation->associatedSurface().clone());
403 extrapolatedSurface = reset_surface.get();
404 surface = extrapolatedSurface;
407 ATH_MSG_VERBOSE(surf_layer_str <<
" Parameters: restart extrap after " << extrapolations <<
" extrapolations");
411 surface = oldSurface;
415 ATH_MSG_DEBUG(surf_layer_str <<
" Parameters: Extrapolation succeeded go to next iteration");
416 oldSurface = surface;
417 surface = extrapolatedSurface;
424 if (std::abs(
deltaPhi) > M_PI_2) {
return nullptr; }
426 ATH_MSG_VERBOSE(surf_layer_str <<
" Parameters: success after " << extrapolations <<
" extrapolation step(s). "
427 << std::setiosflags(std::ios::fixed) <<
" Intersection at: r,phi,z " << std::setw(7)
428 << std::setprecision(1) << extrapolation->position().perp() << std::setw(7) << std::setprecision(3)
429 << extrapolation->position().phi() << std::setw(8) << std::setprecision(1)
430 << extrapolation->position().z() <<
" Direction: eta,phi " << std::setw(7) << std::setprecision(3)
431 << extrapolation->momentum().eta() << std::setw(7) << std::setprecision(3)
432 << extrapolation->momentum().phi());
434 return extrapolation;
◆ initialize()
StatusCode MuidCaloTrackStateOnSurface::initialize |
( |
| ) |
|
|
override |
◆ innerTSOS()
◆ 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()
static const InterfaceID& Rec::IMuidCaloTrackStateOnSurface::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ middleTSOS()
IMuidCaloTrackStateOnSurface interface: to get the energy deposit TSOS representing the calorimeter.
The input TrackParameters may be anywhere along the track, but when the inner or outer parameters are provided they must be expressed at the appropriate surface. The return TSOS surface is at the material midpoint.
Implements Rec::IMuidCaloTrackStateOnSurface.
Definition at line 289 of file MuidCaloTrackStateOnSurface.cxx.
293 std::unique_ptr<const Trk::TrackParameters> extrapolation =
getExtrapolatedParameters(ctx, middleParams, SurfaceLayer::Middle);
299 std::unique_ptr<Trk::TrackStateOnSurface> TSOS;
301 TSOS =
m_caloEnergyDeposit->trackStateOnSurface(ctx, *extrapolation, innerParams, outerParams);
303 TSOS =
m_caloEnergyParam->trackStateOnSurface(ctx, *extrapolation, innerParams, outerParams);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outerTSOS()
◆ 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()
◆ 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()
◆ useEtaPhiFromDirection()
◆ m_caloEnergyDeposit
◆ m_caloEnergyParam
◆ m_caloMaterialParam
Initial value:{
this,
"CaloMaterialParam",
"Rec::MuidCaloMaterialParam/MuidCaloMaterialParam",
}
Definition at line 95 of file MuidCaloTrackStateOnSurface.h.
◆ m_count
std::atomic_int Rec::MuidCaloTrackStateOnSurface::m_count {0} |
|
mutableprivate |
◆ m_countArbitrarySolution
std::atomic_int Rec::MuidCaloTrackStateOnSurface::m_countArbitrarySolution {0} |
|
mutableprivate |
◆ m_countCompleteFailure
std::atomic_int Rec::MuidCaloTrackStateOnSurface::m_countCompleteFailure {0} |
|
mutableprivate |
◆ m_countInnerFailure
std::atomic_int Rec::MuidCaloTrackStateOnSurface::m_countInnerFailure {0} |
|
mutableprivate |
◆ m_countOuterFailure
std::atomic_int Rec::MuidCaloTrackStateOnSurface::m_countOuterFailure {0} |
|
mutableprivate |
◆ m_detStore
◆ m_evtStore
◆ m_fieldCacheCondObjInputKey
Initial value:{this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}
Definition at line 109 of file MuidCaloTrackStateOnSurface.h.
◆ m_magFieldProperties
◆ m_minCaloRadius
double Rec::MuidCaloTrackStateOnSurface::m_minCaloRadius |
|
private |
◆ m_minRemainingEnergy
double Rec::MuidCaloTrackStateOnSurface::m_minRemainingEnergy |
|
private |
◆ m_paramPtCut
double Rec::MuidCaloTrackStateOnSurface::m_paramPtCut |
|
private |
◆ m_propagator
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
ToolHandle< Rec::IMuidCaloEnergy > m_caloEnergyDeposit
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
std::atomic_int m_countInnerFailure
double charge() const
Returns the charge.
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)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
std::atomic_int m_countOuterFailure
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
const Trk::Surface * getCaloSurface(const double eta, const short layer) const
std::unique_ptr< Trk::TrackStateOnSurface > outerTSOS(const EventContext &ctx, const Trk::TrackParameters ¶meters) const override
virtual const Amg::Vector3D & globalReferencePoint() const
Returns a global reference point on the surface, for PlaneSurface, StraightLineSurface,...
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::atomic_int m_countArbitrarySolution
#define AmgSymMatrix(dim)
virtual void setOwner(IDataHandleHolder *o)=0
represents the full description of deflection and e-loss of a track in material.
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
double deltaE() const
returns the
std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > caloTSOS(const EventContext &ctx, const Trk::TrackParameters ¶meters) const override
IMuidCaloTrackStateOnSurface interface: to get the 3 scattering and energy deposit TSOS'es representi...
ToolHandle< Rec::IMuidCaloEnergy > m_caloEnergyParam
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static bool useEtaPhiFromDirection(const Trk::TrackParameters ¶meters)
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
ToolHandle< Rec::IMuidCaloMaterialParam > m_caloMaterialParam
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
const EnergyLoss * energyLoss() const
returns the energy loss object.
ToolHandle< Trk::IPropagator > m_propagator
#define ATH_MSG_WARNING(x)
std::unique_ptr< Trk::TrackStateOnSurface > innerTSOS(const EventContext &ctx, const Trk::TrackParameters ¶meters) const override
IMuidCaloTrackStateOnSurface interface: to get individually the scattering TSOS'es representing the c...
std::unique_ptr< const Trk::TrackParameters > getExtrapolatedParameters(const EventContext &ctx, const Trk::TrackParameters ¶meters, const short layer) const
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double m_minRemainingEnergy
def iterate(ROOT.TDirectory thisdir, ROOT.TDirectory targetdir, str prefix, typing.Pattern regex, bool excludeTrees)
Trk::MagneticFieldProperties m_magFieldProperties
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
std::atomic_int m_countCompleteFailure