|
ATLAS Offline Software
|
#include <ConversionPostSelector.h>
|
| ConversionPostSelector (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~ConversionPostSelector ()=default |
|
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 |
|
|
DoubleArrayProperty | m_maxChi2 {this, "MaxChi2Vtx", {35., 25., 20.}, "Chi2 cut"} |
| Properties for track selection: all cuts are ANDed. More...
|
|
DoubleArrayProperty | m_invMassCut {this, "MaxInvariantMass", {10000., 10000., 10000.}, "Invariant mass cut"} |
|
DoubleArrayProperty | m_fitMomentum |
|
DoubleArrayProperty | m_minRadius |
|
DoubleProperty | m_minPt |
|
DoubleProperty | m_maxdR |
|
DoubleProperty | m_maxPhiVtxTrk |
|
BooleanProperty | m_decorateVertices |
|
IntegerProperty | m_nsig {this, "NSigma", 5} |
|
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 |
|
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()
virtual 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);
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]
◆ 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 239 of file ConversionPostSelector.cxx.
246 double mp1 = 0.;
double mp2 = 0.;
269 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 49 of file ConversionPostSelector.cxx.
54 double maxChi2 = 1000.;
55 double invMassCut = 1000.;
56 double fitMomentum = 0.;
79 if (
vertex->nTrackParticles() != 2) {
80 ATH_MSG_DEBUG(
"Incorrect number of tracks used in conversion fit.");
84 float reducedChi2 =
vertex->chiSquared()/
vertex->numberDoF();
85 if (reducedChi2 > maxChi2) pass =
false;
86 if (reducedChi2 > maxChi2) pass =
false;
89 double vtxR =
vertex->position().perp();
90 if(vtxR <
radius) pass =
false;
93 std::vector< Trk::VxTrackAtVertex >& trkAtVx =
vertex->vxTrackAtVertex();
94 if (trkAtVx.size() != 2 ||
95 !trkAtVx[0].perigeeAtVertex() ||
96 !trkAtVx[1].perigeeAtVertex())
98 ATH_MSG_DEBUG(
"VxTrackAtVertex or perigeeAtVertex not available");
108 double ee = std::sqrt(
m2 + perigee1.
momentum().mag2()) + std::sqrt(
m2 + perigee2.
momentum().mag2());
112 double pt1 = perigee1.
pT();
double pt2 = perigee2.
pT();
115 if (std::fabs(inv_mass) > invMassCut) pass =
false;
116 if (photonP < fitMomentum) pass =
false;
119 std::vector<Amg::Vector3D>::const_iterator ipb=trkL.begin();
120 std::vector<Amg::Vector3D>::const_iterator ipbe=trkL.end();
121 for(; ipb!=ipbe;++ipb){
122 double tmpfR = (*ipb).perp();
123 if(tmpfR<fR) fR = tmpfR;
127 double PhiVtxTrk =
vertex->position().phi() - perigee1.parameters()[
Trk::phi0];
128 if (PhiVtxTrk < -
M_PI) PhiVtxTrk +=
twopi;
129 if (PhiVtxTrk >
M_PI) PhiVtxTrk -=
twopi;
134 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 143 of file ConversionPostSelector.cxx.
151 bool isLambda =
false;
152 bool isLambdaBar =
false;
156 double maxChi2 = 1000.;
157 double fitMomentum = 0.;
178 if (
vertex->nTrackParticles() != 2) {
179 ATH_MSG_DEBUG(
"Incorrect number of tracks used in conversion fit.");
182 float reducedChi2 =
vertex->chiSquared()/
vertex->numberDoF();
183 if (reducedChi2 > maxChi2) pass =
false;
186 double vtxR =
vertex->position().perp();
187 if(vtxR <
radius) pass =
false;
190 std::vector< Trk::VxTrackAtVertex >& trkAtVx =
vertex->vxTrackAtVertex();
191 if (trkAtVx.size() != 2 ||
192 !trkAtVx[0].perigeeAtVertex() ||
193 !trkAtVx[1].perigeeAtVertex())
195 ATH_MSG_DEBUG(
"VxTrackAtVertex or perigeeAtVertex not available");
201 double pt1 = perigee1.
pT();
double pt2 = perigee2.
pT();
205 std::vector<Amg::Vector3D>::const_iterator ipb=trkL.begin();
206 std::vector<Amg::Vector3D>::const_iterator ipbe=trkL.end();
207 for(; ipb!=ipbe;++ipb){
208 double tmpfR = (*ipb).perp();
209 if(tmpfR<fR) fR = tmpfR;
214 CLHEP::HepLorentzVector momentumK0 =
fourP(perigee1,perigee2,
m_massK0,
false);
215 double inv_massK0 = momentumK0.m();
218 double inv_massL = momentumL.m();
221 double inv_massLb = momentumLb.m();
223 if (!isLambdaBar && !isLambda && !isK0) pass =
false;
225 if(isK0 && isLambda && !isLambdaBar) {
momentum = momentumK0; kind = 110;}
226 if(isK0 && isLambdaBar && !isLambda) {
momentum = momentumK0; kind = 101;}
227 if(isK0 && !isLambda && !isLambdaBar) {
momentum = momentumK0; kind = 100;}
228 if(!isK0 && isLambda && !isLambdaBar) {
momentum = momentumL; kind = 10;}
229 if(!isK0 && isLambdaBar && !isLambda) {
momentum = momentumLb; kind = 1;}
230 if(!isK0 && isLambda && isLambdaBar) {
momentum = momentumL; kind = 11;}
232 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
BooleanProperty InDet::ConversionPostSelector::m_decorateVertices |
|
private |
Initial value:{this, "DecorateVertices", true,
"Decorate vertices with values used for vertex selection"}
Definition at line 75 of file ConversionPostSelector.h.
◆ m_detStore
◆ m_evtStore
◆ m_fitMomentum
DoubleArrayProperty InDet::ConversionPostSelector::m_fitMomentum |
|
private |
Initial value:{this, "MinFitMomentum", {0., 0., 0.},
"Converted photon reconstructed momentum at vertex cut"}
Definition at line 63 of file ConversionPostSelector.h.
◆ m_invMassCut
DoubleArrayProperty InDet::ConversionPostSelector::m_invMassCut {this, "MaxInvariantMass", {10000., 10000., 10000.}, "Invariant mass cut"} |
|
private |
◆ m_massK0
constexpr double InDet::ConversionPostSelector::m_massK0 = 497.672 |
|
staticconstexprprivate |
◆ m_massLambda
constexpr double InDet::ConversionPostSelector::m_massLambda = 1115.683 |
|
staticconstexprprivate |
◆ m_maxChi2
DoubleArrayProperty InDet::ConversionPostSelector::m_maxChi2 {this, "MaxChi2Vtx", {35., 25., 20.}, "Chi2 cut"} |
|
private |
◆ m_maxdR
DoubleProperty InDet::ConversionPostSelector::m_maxdR |
|
private |
Initial value:{this, "MaxdR", -10000.,
"Distance of first track hit- reconstructed vertex radial position"}
Definition at line 71 of file ConversionPostSelector.h.
◆ m_maxPhiVtxTrk
DoubleProperty InDet::ConversionPostSelector::m_maxPhiVtxTrk |
|
private |
Initial value:{this, "MaxPhiVtxTrk", 0.2,
"Maximum difference in phi between reconstructed vertex and track at vertex"}
Definition at line 73 of file ConversionPostSelector.h.
◆ m_minPt
DoubleProperty InDet::ConversionPostSelector::m_minPt |
|
private |
Initial value:{this, "MinPt", 0.,
"Pt of the two participating tracks at the vertex"}
Definition at line 69 of file ConversionPostSelector.h.
◆ m_minRadius
DoubleArrayProperty InDet::ConversionPostSelector::m_minRadius |
|
private |
Initial value:{this, "MinRadius", {-10000., -10000., -10000.},
"Converted photon reconstructed vertex radial position cut"}
Definition at line 66 of file ConversionPostSelector.h.
◆ m_nsig
IntegerProperty InDet::ConversionPostSelector::m_nsig {this, "NSigma", 5} |
|
private |
◆ m_sigmaK0
constexpr double InDet::ConversionPostSelector::m_sigmaK0 = 8.5 |
|
staticconstexprprivate |
◆ m_sigmaLambda
constexpr double InDet::ConversionPostSelector::m_sigmaLambda = 3.5 |
|
staticconstexprprivate |
◆ 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.
DoubleProperty m_maxPhiVtxTrk
double charge() const
Returns the charge.
static constexpr double m_massK0
Masses and mass ranges for different V0 hypotheses.
Helper class to provide type-safe access to aux data.
BooleanProperty m_decorateVertices
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
virtual void setOwner(IDataHandleHolder *o)=0
static constexpr double m_sigmaLambda
static constexpr double m_sigmaK0
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.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
DoubleArrayProperty m_maxChi2
Properties for track selection: all cuts are ANDed.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DoubleArrayProperty m_minRadius
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
double pT() const
Access method for transverse momentum.
static constexpr double m_massLambda
Eigen::Matrix< double, 3, 1 > Vector3D
DoubleArrayProperty m_fitMomentum
DoubleArrayProperty m_invMassCut
const Amg::Vector3D & momentum() const
Access method for the momentum.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
constexpr int pow(int base, int exp) noexcept
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>