![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <MuidTrackIsolation.h>
|
| MuidTrackIsolation (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~MuidTrackIsolation (void)=default |
|
StatusCode | initialize () override |
|
std::pair< int, double > | trackIsolation (const EventContext &ctx, double eta, double phi) const override |
| IMuidTrackIsolation interface: get the number of tracks and summed momentum in a cone at the production vertex or around the muon calo intersect. 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 |
|
|
std::pair< int, double > | trackVertex (const TrackCollection *indetTracks, double eta, double phi) const |
|
std::pair< int, double > | trackExtrapolated (const TrackCollection *indetTracks, double eta, double phi) 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...
|
|
|
double | m_barrelCotTheta {} |
|
std::unique_ptr< const Trk::Surface > | m_caloBackwardDisc |
|
std::unique_ptr< const Trk::Surface > | m_caloCylinder |
|
std::unique_ptr< const Trk::Surface > | m_caloForwardDisc |
|
double | m_etaSafetyFactor |
|
SG::ReadHandleKey< TrackCollection > | m_inDetTracksLocation {this, "InDetTracksLocation", "Tracks", "ID tracks"} |
|
ToolHandle< Trk::IIntersector > | m_intersector {this, "RungeKuttaIntersector", "Trk::RungeKuttaIntersector/RungeKuttaIntersector"} |
|
Gaudi::Property< double > | m_minPt {this, "MinPt", 1.0 * Gaudi::Units::GeV} |
|
Gaudi::Property< double > | m_trackCone {this, "TrackCone", 0.2} |
|
double | m_trackCone2 {0.} |
|
Gaudi::Property< bool > | m_trackExtrapolation {this, "TrackExtrapolation", false} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 30 of file MuidTrackIsolation.h.
◆ StoreGateSvc_t
◆ MuidTrackIsolation()
MuidTrackIsolation::MuidTrackIsolation |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuidTrackIsolation()
virtual Rec::MuidTrackIsolation::~MuidTrackIsolation |
( |
void |
| ) |
|
|
virtualdefault |
◆ 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);
◆ 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.
◆ 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.
◆ 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
◆ initialize()
StatusCode MuidTrackIsolation::initialize |
( |
| ) |
|
|
override |
Definition at line 35 of file MuidTrackIsolation.cxx.
53 discRotation.setIdentity();
55 auto transform1 = std::make_unique<Amg::Transform3D>(discRotation * forwardDiscPosition);
58 auto transform2 = std::make_unique<Amg::Transform3D>(discRotation * backwardDiscPosition);
63 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()
static const InterfaceID& Rec::IMuidTrackIsolation::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool and IAlgTool interface methods.
Interface ID for IMuidTrackIsolation
Definition at line 34 of file IMuidTrackIsolation.h.
35 static const InterfaceID IID_IMuidTrackIsolation(
"IMuidTrackIsolation", 1, 0);
36 return IID_IMuidTrackIsolation;
◆ 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()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ trackExtrapolated()
std::pair< int, double > MuidTrackIsolation::trackExtrapolated |
( |
const TrackCollection * |
indetTracks, |
|
|
double |
eta, |
|
|
double |
phi |
|
) |
| const |
|
private |
Use identiy of cot (x) = tan( pi/2 - x)
Definition at line 135 of file MuidTrackIsolation.cxx.
138 int numberTracks = 0;
145 double inDetEta = perigee.eta();
154 direction /= direction.mag();
163 std::optional<Trk::TrackSurfaceIntersection> caloIntersection(
167 if (!caloIntersection) {
169 << std::setiosflags(std::ios::fixed) <<
" Id track: momentum " << std::setw(8) << std::setprecision(1)
170 << perigee.momentum().mag() /
Gaudi::Units::GeV <<
" with initial eta " << std::setw(8)
171 << std::setprecision(3) << perigee.eta() <<
" and phi " << std::setw(8) << std::setprecision(3)
177 double diffEta =
eta - caloIntersection->position().eta();
180 << std::setiosflags(std::ios::fixed) <<
" Id track: momentum " << std::setw(8) << std::setprecision(1)
181 << perigee.momentum().mag() /
Gaudi::Units::GeV <<
" with initial,extrapolated and calo difference for eta "
182 << std::setw(8) << std::setprecision(3) << perigee.eta() << std::setw(8) << std::setprecision(3)
183 << caloIntersection->position().eta() << std::setw(8) << std::setprecision(3) << diffEta <<
" and phi "
184 << std::setw(8) << std::setprecision(3) << perigee.parameters()[
Trk::phi] << std::setw(8)
185 << std::setprecision(3) << caloIntersection->position().phi() << std::setw(8) << std::setprecision(3)
189 if ((diffPhi * diffPhi + diffEta * diffEta) <
m_trackCone2) {
191 const double p = perigee.momentum().mag();
194 ATH_MSG_VERBOSE(
" inside cone, track#" << std::setw(3) << numberTracks);
198 return std::make_pair(numberTracks, sumP);
◆ trackIsolation()
std::pair< int, double > MuidTrackIsolation::trackIsolation |
( |
const EventContext & |
ctx, |
|
|
double |
eta, |
|
|
double |
phi |
|
) |
| const |
|
overridevirtual |
IMuidTrackIsolation interface: get the number of tracks and summed momentum in a cone at the production vertex or around the muon calo intersect.
Implements Rec::IMuidTrackIsolation.
Definition at line 65 of file MuidTrackIsolation.cxx.
67 ATH_MSG_DEBUG(
" MuidTrackIsolation:: " << std::setiosflags(std::ios::fixed)
69 <<
" for muon at calo with eta,phi " << std::setw(8) << std::setprecision(3) <<
eta
70 << std::setw(8) << std::setprecision(3) <<
phi);
73 std::pair<int, double> isolation{0, 0.};
77 if (!inDetTracks.isPresent()) {
82 if (!inDetTracks.isValid()) {
95 ATH_MSG_DEBUG(
"Found " << isolation.first << std::setiosflags(std::ios::fixed) <<
" InDet tracks with total momentum "
96 << std::setw(8) << std::setprecision(1) << isolation.second /
Gaudi::Units::GeV <<
" GeV");
◆ trackVertex()
std::pair< int, double > MuidTrackIsolation::trackVertex |
( |
const TrackCollection * |
indetTracks, |
|
|
double |
eta, |
|
|
double |
phi |
|
) |
| const |
|
private |
Definition at line 101 of file MuidTrackIsolation.cxx.
104 int numberTracks = 0;
111 double inDetPhi = perigee.parameters()[
Trk::phi];
112 double inDetEta = perigee.eta();
114 double diffEta = std::abs(
eta - inDetEta);
118 << std::setiosflags(std::ios::fixed) <<
" Id track: momentum " << std::setw(8) << std::setprecision(1)
119 << perigee.momentum().mag() /
Gaudi::Units::GeV <<
" with perigee eta and difference " << std::setw(8)
120 << std::setprecision(3) << perigee.eta() << std::setw(8) << std::setprecision(3) << diffEta
121 <<
" and same for phi " << std::setw(8) << std::setprecision(3) << perigee.parameters()[
Trk::phi] << std::setw(8)
122 << std::setprecision(3) << diffPhi);
124 if ((diffPhi * diffPhi + diffEta * diffEta) >
m_trackCone2)
continue;
126 const double p = perigee.momentum().mag();
129 ATH_MSG_VERBOSE(
"inside cone, track#" << std::setw(3) << numberTracks);
132 return std::make_pair(numberTracks, sumP);
◆ updateVHKA()
◆ m_barrelCotTheta
double Rec::MuidTrackIsolation::m_barrelCotTheta {} |
|
private |
◆ m_caloBackwardDisc
◆ m_caloCylinder
◆ m_caloForwardDisc
◆ m_detStore
◆ m_etaSafetyFactor
double Rec::MuidTrackIsolation::m_etaSafetyFactor |
|
private |
◆ m_evtStore
◆ m_inDetTracksLocation
◆ m_intersector
◆ m_minPt
Gaudi::Property<double> Rec::MuidTrackIsolation::m_minPt {this, "MinPt", 1.0 * Gaudi::Units::GeV} |
|
private |
◆ m_trackCone
Gaudi::Property<double> Rec::MuidTrackIsolation::m_trackCone {this, "TrackCone", 0.2} |
|
private |
◆ m_trackCone2
double Rec::MuidTrackIsolation::m_trackCone2 {0.} |
|
private |
◆ m_trackExtrapolation
Gaudi::Property<bool> Rec::MuidTrackIsolation::m_trackExtrapolation {this, "TrackExtrapolation", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< double > m_minPt
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
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
std::unique_ptr< const Trk::Surface > m_caloForwardDisc
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
std::pair< int, double > trackExtrapolated(const TrackCollection *indetTracks, double eta, double phi) const
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< bool > m_trackExtrapolation
virtual void setOwner(IDataHandleHolder *o)=0
@ StraightTrack
A straight track.
std::pair< int, double > trackVertex(const TrackCollection *indetTracks, double eta, double phi) const
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Gaudi::Property< double > m_trackCone
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
ToolHandle< Trk::IIntersector > m_intersector
def transform2(oldbgs, bgsname, bgnames)
std::unique_ptr< const Trk::Surface > m_caloCylinder
Eigen::Matrix< double, 3, 1 > Vector3D
#define ATH_MSG_WARNING(x)
std::unique_ptr< const Trk::Surface > m_caloBackwardDisc
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::ReadHandleKey< TrackCollection > m_inDetTracksLocation
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>