|
ATLAS Offline Software
|
#include <ConversionPostSelector.h>
|
| ConversionPostSelector (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~ConversionPostSelector () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
bool | selectConversionCandidate (xAOD::Vertex *myCandidate, int flag, std::vector< Amg::Vector3D > &trkL) const |
| Conversion candidate post-fit selectors. More...
|
|
bool | selectSecVtxCandidate (xAOD::Vertex *myCandidate, int flag, std::vector< Amg::Vector3D > &trkL, int &) 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 tracks for conversion finder
- Author
- Tatjana Lenz , Thomas Koffas
Definition at line 28 of file ConversionPostSelector.h.
◆ StoreGateSvc_t
◆ ConversionPostSelector()
InDet::ConversionPostSelector::ConversionPostSelector |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~ConversionPostSelector()
InDet::ConversionPostSelector::~ConversionPostSelector |
( |
| ) |
|
|
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]
◆ decorateVertex()
void InDet::ConversionPostSelector::decorateVertex |
( |
xAOD::Vertex & |
vertex, |
|
|
float |
inv_mass, |
|
|
float |
pt1, |
|
|
float |
pt2, |
|
|
float |
fR, |
|
|
float |
deltaPhiVtxTrk |
|
) |
| |
|
static |
◆ 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::ConversionPostSelector::finalize |
( |
| ) |
|
|
overridevirtual |
◆ fourP()
Compute the four-momentum of a particle according to a mass hypothesis.
Definition at line 276 of file ConversionPostSelector.cxx.
283 double mp1 = 0.;
double mp2 = 0.;
306 double ee = std::sqrt(mp1 + per1.
momentum().mag2()) + std::sqrt(mp2 + per2.
momentum().mag2());
◆ initialize()
StatusCode InDet::ConversionPostSelector::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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::ConversionPostSelector::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()
◆ selectConversionCandidate()
bool InDet::ConversionPostSelector::selectConversionCandidate |
( |
xAOD::Vertex * |
myCandidate, |
|
|
int |
flag, |
|
|
std::vector< Amg::Vector3D > & |
trkL |
|
) |
| const |
Conversion candidate post-fit selectors.
Return true if the argument track fulfills the selection
Definition at line 86 of file ConversionPostSelector.cxx.
91 double maxChi2 = 1000.;
92 double invMassCut = 1000.;
93 double fitMomentum = 0.;
116 if (
vertex->nTrackParticles() != 2) {
117 ATH_MSG_DEBUG(
"Incorrect number of tracks used in conversion fit.");
121 float reducedChi2 =
vertex->chiSquared()/
vertex->numberDoF();
122 if (reducedChi2 > maxChi2) pass =
false;
123 if (reducedChi2 > maxChi2) pass =
false;
126 double vtxR =
vertex->position().perp();
127 if(vtxR <
radius) pass =
false;
130 std::vector< Trk::VxTrackAtVertex >& trkAtVx =
vertex->vxTrackAtVertex();
131 if (trkAtVx.size() != 2 ||
132 !trkAtVx[0].perigeeAtVertex() ||
133 !trkAtVx[1].perigeeAtVertex())
135 ATH_MSG_DEBUG(
"VxTrackAtVertex or perigeeAtVertex not available");
145 double ee = std::sqrt(
m2 + perigee1.
momentum().mag2()) + std::sqrt(
m2 + perigee2.
momentum().mag2());
149 double pt1 = perigee1.
pT();
double pt2 = perigee2.
pT();
152 if (std::fabs(inv_mass) > invMassCut) pass =
false;
153 if (photonP < fitMomentum) pass =
false;
156 std::vector<Amg::Vector3D>::const_iterator ipb=trkL.begin();
157 std::vector<Amg::Vector3D>::const_iterator ipbe=trkL.end();
158 for(; ipb!=ipbe;++ipb){
159 double tmpfR = (*ipb).perp();
160 if(tmpfR<fR) fR = tmpfR;
164 double PhiVtxTrk =
vertex->position().phi() - perigee1.parameters()[
Trk::phi0];
165 if (PhiVtxTrk < -
M_PI) PhiVtxTrk +=
twopi;
166 if (PhiVtxTrk >
M_PI) PhiVtxTrk -=
twopi;
171 ATH_MSG_DEBUG(
"Decorating vertex with values used in post selector");
◆ selectSecVtxCandidate()
bool InDet::ConversionPostSelector::selectSecVtxCandidate |
( |
xAOD::Vertex * |
myCandidate, |
|
|
int |
flag, |
|
|
std::vector< Amg::Vector3D > & |
trkL, |
|
|
int & |
type |
|
) |
| const |
Definition at line 180 of file ConversionPostSelector.cxx.
188 bool isLambda =
false;
189 bool isLambdaBar =
false;
193 double maxChi2 = 1000.;
194 double fitMomentum = 0.;
215 if (
vertex->nTrackParticles() != 2) {
216 ATH_MSG_DEBUG(
"Incorrect number of tracks used in conversion fit.");
219 float reducedChi2 =
vertex->chiSquared()/
vertex->numberDoF();
220 if (reducedChi2 > maxChi2) pass =
false;
223 double vtxR =
vertex->position().perp();
224 if(vtxR <
radius) pass =
false;
227 std::vector< Trk::VxTrackAtVertex >& trkAtVx =
vertex->vxTrackAtVertex();
228 if (trkAtVx.size() != 2 ||
229 !trkAtVx[0].perigeeAtVertex() ||
230 !trkAtVx[1].perigeeAtVertex())
232 ATH_MSG_DEBUG(
"VxTrackAtVertex or perigeeAtVertex not available");
238 double pt1 = perigee1.
pT();
double pt2 = perigee2.
pT();
242 std::vector<Amg::Vector3D>::const_iterator ipb=trkL.begin();
243 std::vector<Amg::Vector3D>::const_iterator ipbe=trkL.end();
244 for(; ipb!=ipbe;++ipb){
245 double tmpfR = (*ipb).perp();
246 if(tmpfR<fR) fR = tmpfR;
251 CLHEP::HepLorentzVector momentumK0 =
fourP(perigee1,perigee2,
m_massK0,
false);
252 double inv_massK0 = momentumK0.m();
255 double inv_massL = momentumL.m();
258 double inv_massLb = momentumLb.m();
260 if (!isLambdaBar && !isLambda && !isK0) pass =
false;
262 if(isK0 && isLambda && !isLambdaBar) {
momentum = momentumK0; kind = 110;}
263 if(isK0 && isLambdaBar && !isLambda) {
momentum = momentumK0; kind = 101;}
264 if(isK0 && !isLambda && !isLambdaBar) {
momentum = momentumK0; kind = 100;}
265 if(!isK0 && isLambda && !isLambdaBar) {
momentum = momentumL; kind = 10;}
266 if(!isK0 && isLambdaBar && !isLambda) {
momentum = momentumLb; kind = 1;}
267 if(!isK0 && isLambda && isLambdaBar) {
momentum = momentumL; kind = 11;}
269 if (particleP < fitMomentum) pass =
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_decorateVertices
bool InDet::ConversionPostSelector::m_decorateVertices |
|
private |
Maximum difference in phi between reconstructed vertex and track at vertex.
Definition at line 66 of file ConversionPostSelector.h.
◆ m_detStore
◆ m_evtStore
◆ m_fitMomentum
std::vector<double> InDet::ConversionPostSelector::m_fitMomentum |
|
private |
◆ m_invMassCut
std::vector<double> InDet::ConversionPostSelector::m_invMassCut |
|
private |
◆ m_massK0
double InDet::ConversionPostSelector::m_massK0 |
|
private |
Decorate vertices with values used for vertex selection.
Masses and mass ranges for different V0 hypotheses
Definition at line 70 of file ConversionPostSelector.h.
◆ m_massLambda
double InDet::ConversionPostSelector::m_massLambda |
|
private |
◆ m_maxChi2
std::vector<double> InDet::ConversionPostSelector::m_maxChi2 |
|
private |
◆ m_maxdR
double InDet::ConversionPostSelector::m_maxdR |
|
private |
◆ m_maxPhiVtxTrk
double InDet::ConversionPostSelector::m_maxPhiVtxTrk |
|
private |
◆ m_minPt
double InDet::ConversionPostSelector::m_minPt |
|
private |
◆ m_minRadius
std::vector<double> InDet::ConversionPostSelector::m_minRadius |
|
private |
◆ m_nsig
int InDet::ConversionPostSelector::m_nsig |
|
private |
◆ m_sigmaK0
double InDet::ConversionPostSelector::m_sigmaK0 |
|
private |
◆ m_sigmaLambda
double InDet::ConversionPostSelector::m_sigmaLambda |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
CLHEP::HepLorentzVector fourP(const Trk::TrackParameters &, const Trk::TrackParameters &, double, bool) const
Compute the four-momentum of a particle according to a mass hypothesis.
std::vector< double > m_invMassCut
Chi2 cut.
double charge() const
Returns the charge.
std::vector< double > m_minRadius
Converted photon reconstructed momentum at vertex cut.
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double m_minPt
Converted photon reconstructed vertex radial position cut.
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< double > m_maxChi2
Properties for track selection: all cuts are ANDed.
static void decorateVertex(xAOD::Vertex &vertex, float inv_mass, float pt1, float pt2, float fR, float deltaPhiVtxTrk)
Decorate vertices with values used in post selector.
bool m_decorateVertices
Maximum difference in phi between reconstructed vertex and track at vertex.
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
double pT() const
Access method for transverse momentum.
std::vector< double > m_fitMomentum
Invariant mass cut.
double m_maxdR
Pt of the two participating tracks at the vertex.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
double m_massK0
Decorate vertices with values used for vertex selection.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double m_maxPhiVtxTrk
Distance of first track hit- reconstructed vertex radial position.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>