|
ATLAS Offline Software
|
#include <TrackPairsSelector.h>
|
| TrackPairsSelector (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~TrackPairsSelector ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
bool | selectTrackParticlePair (const xAOD::TrackParticle *trkPpos, const xAOD::TrackParticle *trkPneg, Cache &cache) const |
| Track pair selectors.Return true if the argument track fulfills the selection. More...
|
|
bool | selectTrackPair (const Trk::Track *trkpos, const Trk::Track *trkneg) const |
|
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 |
|
This class selects track pairs for conversion finder
- Author
- Tatjana Lenz, Thomas Koffas
Definition at line 26 of file TrackPairsSelector.h.
◆ StoreGateSvc_t
◆ TrackPairsSelector()
InDet::TrackPairsSelector::TrackPairsSelector |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TrackPairsSelector()
virtual InDet::TrackPairsSelector::~TrackPairsSelector |
( |
| ) |
|
|
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);
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 InDet::TrackPairsSelector::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getLastValues()
std::map< std::string, float > InDet::TrackPairsSelector::getLastValues |
( |
const Cache & |
cache | ) |
|
|
static |
Return a map with the values calculated for the last pair to decorate the vertex once it is created.
Definition at line 291 of file TrackPairsSelector.cxx.
294 return {{
"minimumDistanceTrk", cache.m_distance},
295 {
"deltaCotThetaTrk", cache.m_deltaCotTheta},
296 {
"deltaInitRadius", cache.m_deltaInit} };
◆ initialize()
StatusCode InDet::TrackPairsSelector::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 54 of file TrackPairsSelector.cxx.
59 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
71 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()
const InterfaceID & InDet::TrackPairsSelector::interfaceID |
( |
| ) |
|
|
static |
◆ 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()
◆ selectTrackPair()
Getting the track perigee parameters
Position of initial hit of the two tracks
Definition at line 211 of file TrackPairsSelector.cxx.
219 if (!(
m_helpertool->momFraction(perPos, perNeg))) pass =
false;
222 double init_pos = 0.;
double init_neg = 0.;
225 if(!mb_pos || !mb_neg) {pass =
false;
return pass;}
227 init_pos = (*itp_pos)->globalPosition().perp();
229 init_neg = (*itp_neg)->globalPosition().perp();
232 if ((init_neg<=m_maxR && init_pos>
m_maxR) || (init_neg>
m_maxR && init_pos<=
m_maxR)) sCase = 1;
236 double detaCut = 0.0;
239 }
else if(sCase == 1) {
241 }
else if(sCase == 2) {
250 double dinit = 1000.;
253 }
else if(sCase == 1) {
255 }
else if(sCase == 2) {
258 if(fabs(init_pos - init_neg) > dinit) pass =
false;
261 double maxDist = 1000.;
264 }
else if(sCase == 1) {
266 }
else if(sCase == 2) {
270 double newDistance = 1000000.;
271 std::optional<Trk::ITrkDistanceFinder::TwoPoints>
result
277 newDistance = dist (
result.value());
278 if (newDistance>maxDist) pass =
false;
282 double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
283 (perPos->momentum().mag() * perNeg->momentum().mag());
◆ selectTrackParticlePair()
Track pair selectors.Return true if the argument track fulfills the selection.
Definition at line 81 of file TrackPairsSelector.cxx.
91 if (!(
m_helpertool->momFraction(perPos, perNeg))) pass =
false;
115 if(nclusNeg>0 && nclusPos>0) sCase = 0;
116 if((nclusNeg>0 && nclusPos==0) || (nclusNeg==0 && nclusPos>0)) sCase = 1;
117 if(nclusNeg==0 && nclusPos==0) sCase = 2;
133 ATH_MSG_WARNING(
"Track Particle does not contain first Measurement track parameters");
147 ATH_MSG_WARNING(
"Track Particle does not contain first Measurement track parameters");
151 double firstRpos = parPos.
position().perp();
152 double firstRneg = parNeg.
position().perp();
155 double detaCut = 0.0;
158 }
else if(sCase == 1) {
160 }
else if(sCase == 2) {
161 if(fabs(perPos->
eta())<0.6 && fabs(perNeg->
eta())<0.6) detaCut = 10000.;
165 cache.m_deltaCotTheta = fabs(1. /
tan(perPos->parameters()[
Trk::theta]) -
167 if (cache.m_deltaCotTheta > detaCut)
171 double dinit = 1000.;
174 }
else if(sCase == 1) {
176 }
else if(sCase == 2) {
180 cache.m_deltaInit = fabs(firstRpos - firstRneg);
181 if (cache.m_deltaInit > dinit)
return false;
184 double maxDist = 1000.;
187 }
else if(sCase == 1) {
189 }
else if(sCase == 2) {
193 cache.m_distance = 1000000.;
194 std::optional<Trk::ITrkDistanceFinder::TwoPoints>
result
197 if (!
result)
return false;
198 cache.m_distance = dist (
result.value());
199 if (cache.m_distance>maxDist)
return false;
◆ 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()
◆ m_detStore
◆ m_distanceTool
Initial value:{
this,
"DistanceTool",
"Trk::SeedNewtonTrkDistanceFinder",
"Distance of minimum approach tool"
}
Distance of minimum approach tool
Definition at line 73 of file TrackPairsSelector.h.
◆ m_etaCut
DoubleArrayProperty InDet::TrackPairsSelector::m_etaCut |
|
private |
Initial value:{this, "MaxEta", {0.8, 1.2, 1.2},
"Maximum eta difference between tracks in pair"}
Definition at line 90 of file TrackPairsSelector.h.
◆ m_evtStore
◆ m_helpertool
Initial value:{
this,
"ConversionFinderHelperTool",
"InDet::ConversionFinderUtils",
"Conversion helper tool"
}
Conversion helper tool.
Definition at line 66 of file TrackPairsSelector.h.
◆ m_initCut
DoubleArrayProperty InDet::TrackPairsSelector::m_initCut |
|
private |
Initial value:{this, "MaxInitDistance", {10000., 10000., 10000.},
"Maximum distance difference between initial hits of tracks in pair"}
Definition at line 93 of file TrackPairsSelector.h.
◆ m_maxDist
DoubleArrayProperty InDet::TrackPairsSelector::m_maxDist |
|
private |
Initial value:{this, "MaxDistBetweenTracks", {8., 80., 45.},
"Maximum allowed distance of minimum approach"}
Definition at line 87 of file TrackPairsSelector.h.
◆ m_maxR
DoubleProperty InDet::TrackPairsSelector::m_maxR |
|
private |
Initial value:{this, "MaxFirstHitRadius", 500.,
"Maximum initial hit radius in order to apply the impact point cut"}
Properties for track selection: all cuts are ANDed.
Definition at line 81 of file TrackPairsSelector.h.
◆ m_MinTrkAngle
DoubleProperty InDet::TrackPairsSelector::m_MinTrkAngle |
|
private |
Initial value:{this, "MinTrackAngle", 0.,
"Minimum allowed angle between decay tracks. Used only in V0 reconstruction."}
Definition at line 84 of file TrackPairsSelector.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
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.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
virtual void setOwner(IDataHandleHolder *o)=0
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const Perigee * perigeeParameters() const
return Perigee.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
const Amg::Vector3D & momentum() const
Access method for the momentum.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ numberOfSCTHits
number of hits in SCT [unit8_t].
double eta() const
Access method for pseudorapidity - from momentum.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.