Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <InDetV0FinderTool.h>
|
| InDetV0FinderTool (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~InDetV0FinderTool () |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
StatusCode | performSearch (xAOD::VertexContainer *v0Container, xAOD::VertexContainer *ksContainer, xAOD::VertexContainer *laContainer, xAOD::VertexContainer *lbContainer, const xAOD::Vertex *vertex, const xAOD::VertexContainer *vertColl, const EventContext &ctx) 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 |
|
|
void | SGError (const std::string &errService) const |
|
bool | doFit (const xAOD::TrackParticle *track1, const xAOD::TrackParticle *track2, Amg::Vector3D &startingPoint, const EventContext &ctx) const |
|
bool | d0Pass (const xAOD::TrackParticle *track1, const xAOD::TrackParticle *track2, const xAOD::VertexContainer *vertColl, const EventContext &ctx) const |
|
bool | d0Pass (const xAOD::TrackParticle *track1, const xAOD::VertexContainer *vertColl, const EventContext &ctx) const |
|
bool | d0Pass (const xAOD::TrackParticle *track1, const xAOD::Vertex *vertex, const EventContext &ctx) const |
|
bool | d0Pass (const xAOD::TrackParticle *track1, const Amg::Vector3D &vertex, const EventContext &ctx) const |
|
bool | pointAtVertex (const xAOD::Vertex *v0, const xAOD::Vertex *PV, float &score) const |
|
bool | pointAtVertexColl (xAOD::Vertex *v0, const xAOD::VertexContainer *vertColl, float &score) const |
|
bool | doMassFit (xAOD::Vertex *vxCandidate, int pdgID) const |
|
xAOD::Vertex * | massFit (int pdgID, const std::vector< const xAOD::TrackParticle * > &pairV0, const Amg::Vector3D &vertex) const |
|
ElementLink< xAOD::TrackParticleContainer > | makeLink (const xAOD::TrackParticle *, const std::vector< const xAOD::TrackParticleContainer * > &) 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...
|
|
|
SG::ReadHandleKey< xAOD::TrackParticleContainer > | m_trackParticleKey |
|
PublicToolHandle< Trk::IVertexFitter > | m_iVertexFitter |
|
PublicToolHandle< Trk::IVertexFitter > | m_iVKVertexFitter |
|
PublicToolHandle< Trk::IVertexFitter > | m_iKshortFitter |
|
PublicToolHandle< Trk::IVertexFitter > | m_iLambdaFitter |
|
PublicToolHandle< Trk::IVertexFitter > | m_iLambdabarFitter |
|
PublicToolHandle< Trk::IVertexFitter > | m_iGammaFitter |
|
PublicToolHandle< Trk::V0Tools > | m_V0Tools |
|
PublicToolHandle< Reco::ITrackToVertex > | m_trackToVertexTool |
|
PublicToolHandle< Trk::ITrackSelectorTool > | m_trkSelector |
|
PublicToolHandle< InDet::VertexPointEstimator > | m_vertexEstimator |
|
PublicToolHandle< Trk::IExtrapolator > | m_extrapolator |
|
const HepPDT::ParticleDataTable * | m_particleDataTable = nullptr |
|
BooleanProperty | m_doSimpleV0 {this, "doSimpleV0", false} |
| = true equivalent to the old InDetSimpleV0Finder (false) More...
|
|
BooleanProperty | m_useorigin {this, "useorigin", true} |
| = true only using tracks that have no vertex association (true) More...
|
|
BooleanProperty | m_samesign {this, "AddSameSign", false} |
| = true select tracks with same sign (false) More...
|
|
BooleanProperty | m_pv {this, "trkSelPV", false} |
| = true select tracks wrt primary vertex (false) More...
|
|
BooleanProperty | m_use_vertColl {this, "useVertexCollection", false} |
| = true select tracks wrt a vertex collection (false) More...
|
|
BooleanProperty | m_useTRTplusTRT {this, "useTRTplusTRT", false} |
| = use TRT+TRT pairs (true) More...
|
|
BooleanProperty | m_useTRTplusSi {this, "useTRTplusSi", false} |
| = use TRT+Si pairs (true) More...
|
|
BooleanProperty | m_useV0Fitter {this, "useV0Fitter", false} |
| = true if using TrkV0Fitter, = false if using VKalVert (true) More...
|
|
BooleanProperty | m_use_innerPixHits {this, "use_innerPixHits", false} |
| = true select allows tracks with no innermost pixel layer hits to always pass d0 significance cut (false) More...
|
|
BooleanProperty | m_useBDT {this, "useBDT", false} |
| = true uses BDT selections in place of rectangular pointAtVertex + minVertProb More...
|
|
BooleanProperty | m_useTrkSel {this, "use_TrackSelector", true} |
| = true uses TrackSelectorTool More...
|
|
IntegerProperty | m_masses {this, "masses", 1} |
| = 1 if using PDG values, = 2 if user set (1) More...
|
|
DoubleProperty | m_masspi {this, "masspi", 139.57} |
| pion mass (139.57 MeV) More...
|
|
DoubleProperty | m_massp {this, "massp", 938.272} |
| proton mass (938.272 MeV) More...
|
|
DoubleProperty | m_masse {this, "masse", 0.510999} |
| electron mass (0.510999 MeV) More...
|
|
DoubleProperty | m_massK0S {this, "massK0S", 497.672} |
| Kshort mass (497.672 MeV) More...
|
|
DoubleProperty | m_massLambda {this, "massLambda", 1115.68} |
| Lambda mass (1115.68 MeV) More...
|
|
DoubleProperty | m_ptTRT {this, "ptTRT", 700.} |
| Minimum pT for TRT tracks (700. More...
|
|
DoubleProperty | m_maxsxy {this, "maxsxy", 1000.} |
| Maximum Rxy of starting point (1000. More...
|
|
DoubleProperty | m_uksmin {this, "uksmin", 400.} |
| min Kshort mass, unconstrained fit (400. More...
|
|
DoubleProperty | m_uksmax {this, "uksmax", 600.} |
| max Kshort mass, unconstrained fit (600. More...
|
|
DoubleProperty | m_ulamin {this, "ulamin", 1000.} |
| min Lambda mass, unconstrained fit (1000. More...
|
|
DoubleProperty | m_ulamax {this, "ulamax", 1200.} |
| max Lambda mass, unconstrained fit (1200. More...
|
|
DoubleProperty | m_ksmin {this, "ksmin", 400.} |
| min Kshort mass (400. More...
|
|
DoubleProperty | m_ksmax {this, "ksmax", 600.} |
| max Kshort mass (600. More...
|
|
DoubleProperty | m_lamin {this, "lamin", 1000.} |
| min Lambda mass (1000. More...
|
|
DoubleProperty | m_lamax {this, "lamax", 1200.} |
| max Lambda mass (1200. More...
|
|
DoubleProperty | m_errmass {this, "errmass", 100.} |
| Maximum mass error (100. More...
|
|
DoubleProperty | m_minVertProb {this, "minVertProb", 0.0001} |
| Minimum vertex probability (0.0001) More...
|
|
DoubleProperty | m_minConstrVertProb {this, "minConstrVertProb", 0.0001} |
| Minimum vertex probability for constrained fit (0.0001) More...
|
|
DoubleProperty | m_d0_cut {this, "d0_cut", 2.} |
| track d0 significance wrt a vertex (>2.) More...
|
|
DoubleProperty | m_max_d0_cut {this, "max_d0_cut", 999999.} |
| track |d0| wrt a vertex (<999999.) More...
|
|
DoubleProperty | m_max_z0_cut {this, "max_z0_cut", 999999.} |
| track |z0| wrt a vertex (<999999.)
More...
|
|
DoubleProperty | m_vert_lxy_sig {this, "vert_lxy_sig", 2.} |
| V0 lxy significance wrt a vertex (>2.) More...
|
|
DoubleProperty | m_vert_lxy_cut {this, "vert_lxy_cut", 500.} |
| V0 lxy V0 lxy (<500.) More...
|
|
DoubleProperty | m_vert_a0xy_cut {this, "vert_a0xy_cut", 3.} |
| V0 |a0xy| wrt a vertex (<3.) More...
|
|
DoubleProperty | m_vert_a0z_cut {this, "vert_a0z_cut", 15.} |
| V0 |a0z| wrt a vertex (<15.) More...
|
|
DoubleProperty | m_vert_cos_cut {this, "vert_cos_cut", 0.} |
| V0 cos(theta) angle between displacement and momentum (>0.) More...
|
|
DoubleProperty | m_BDTCut {this, "BDTCut", -1} |
| BDT Score threshold. More...
|
|
StringProperty | m_BDTFile {this, "BDTFile", "XGBModelBetterVertex.root"} |
| Filename of mvaUtils model file, located in /InDetV0FinderTool/BDT/v1/. More...
|
|
std::atomic< unsigned int > | m_events_processed {} |
|
std::atomic< unsigned int > | m_V0s_stored {} |
|
std::atomic< unsigned int > | m_Kshort_stored {} |
|
std::atomic< unsigned int > | m_Lambda_stored {} |
|
std::atomic< unsigned int > | m_Lambdabar_stored {} |
|
std::atomic< unsigned int > | m_Gamma_stored {} |
|
const Trk::TrkV0VertexFitter * | m_concreteVertexFitter = nullptr |
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_vertexKey |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0LinksDecorkeyks |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0LinksDecorkeylb |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0LinksDecorkeylbb |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0_ksLinksDecorkey |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0_laLinksDecorkey |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0_lbLinksDecorkey |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_mDecor_gfit |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_mDecor_gmass |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_mDecor_gmasserr |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_mDecor_gprob |
|
SG::WriteDecorHandleKey< xAOD::VertexContainer > | m_v0_BDTScore |
|
std::unique_ptr< MVAUtils::BDT > | m_BDT |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfo_key {this, "EventInfo", "EventInfo", "Input event information"} |
|
SG::ReadCondHandleKey< InDet::BeamSpotData > | m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" } |
|
SG::ReadDecorHandleKeyArray< xAOD::EventInfo > | m_beamSpotDecoKey {this, "BeamSpotDecoKeys" ,{}, "Add the scheduler dependencies on the beamspot information"} |
|
Gaudi::Property< bool > | m_useBeamSpotCond { this, "UseBeamSpotCond", false } |
|
Gaudi::Property< std::string > | m_v0Key { this, "V0ContainerName", "V0Candidates", "V0 container name (same calling alg)" } |
|
Gaudi::Property< std::string > | m_ksKey { this, "KshortContainerName", "KshortCandidates", "Ks container name (same calling alg)" } |
|
Gaudi::Property< std::string > | m_laKey |
|
Gaudi::Property< std::string > | m_lbKey |
|
Gaudi::Property< int > | m_maxPV { this, "MaxPV", 999999 } |
|
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > | m_RelinkContainers {this, "RelinkTracks", {}, "Track Containers if they need to be relinked through indirect use" } |
|
ServiceHandle< IPartPropSvc > | m_partPropSvc {this, "PartPropSvc", "PartPropSvc"} |
|
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 102 of file InDetV0FinderTool.h.
◆ StoreGateSvc_t
◆ InDetV0FinderTool()
InDet::InDetV0FinderTool::InDetV0FinderTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~InDetV0FinderTool()
InDet::InDetV0FinderTool::~InDetV0FinderTool |
( |
| ) |
|
|
default |
◆ d0Pass() [1/4]
◆ d0Pass() [2/4]
Definition at line 644 of file InDetV0FinderTool.cxx.
650 if (per1 ==
nullptr)
continue;
652 if (per2 ==
nullptr)
continue;
653 double d0_1 = per1->parameters()[
Trk::d0];
654 double sig_d0_1 = sqrt((*per1->covariance())(0,0));
656 double d0_2 = per2->parameters()[
Trk::d0];
657 double sig_d0_2 = sqrt((*per2->covariance())(0,0));
659 bool IP_check1 = (std::abs(d0_1/sig_d0_1) >
m_d0_cut) || !hasInnerPixHit1;
662 bool IP_check2 = (std::abs(d0_2/sig_d0_2) >
m_d0_cut) || !hasInnerPixHit2;
665 if (IP_check1 && IP_check2)
return true;
675 bool hasInnerPixHit1 =
true;
679 if (nInnerHits1 == 0) hasInnerPixHit1 =
false;
◆ d0Pass() [3/4]
Definition at line 709 of file InDetV0FinderTool.cxx.
722 bool hasInnerPixHit1 =
true;
726 if (nInnerHits1 == 0) hasInnerPixHit1 =
false;
◆ d0Pass() [4/4]
Definition at line 682 of file InDetV0FinderTool.cxx.
685 if (per1 ==
nullptr)
continue;
686 double d0_1 = per1->parameters()[
Trk::d0];
687 double sig_d0_1 = sqrt((*per1->covariance())(0,0));
689 if (((std::abs(d0_1/sig_d0_1) >
m_d0_cut) ||
690 (!hasInnerPixHit1)) &&
701 bool hasInnerPixHit1 =
true;
705 if (nInnerHits1 == 0) hasInnerPixHit1 =
false;
◆ 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()
◆ doFit()
Definition at line 610 of file InDetV0FinderTool.cxx.
626 (massLambdabar_i >=
m_ulamin && massLambdabar_i <=
m_ulamax)) ) pass =
true;
637 bool hasInnerPixHit1 =
true;
638 bool hasInnerPixHit2 =
true;
642 if (nInnerHits1 == 0) hasInnerPixHit1 =
false;
◆ doMassFit()
bool InDet::InDetV0FinderTool::doMassFit |
( |
xAOD::Vertex * |
vxCandidate, |
|
|
int |
pdgID |
|
) |
| const |
|
private |
Definition at line 804 of file InDetV0FinderTool.cxx.
813 }
else if (pdgID == -3122) {
819 if (in_mass_window) pass =
true;
827 std::vector<double>
masses;
831 }
else if (pdgID == 3122) {
◆ 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::InDetV0FinderTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode InDet::InDetV0FinderTool::initialize |
( |
| ) |
|
Definition at line 54 of file InDetV0FinderTool.cxx.
122 std::string BDTPathName =
"InDetV0FinderTool/BDT/v1/" +
m_BDTFile;
125 std::unique_ptr<TFile>
rootFile(TFile::Open(fullPathToFile.c_str(),
"READ"));
126 std::string strBDTName =
"xgboost";
127 std::unique_ptr<TTree> training( (TTree*)
rootFile->Get(strBDTName.c_str()) );
128 m_BDT = std::make_unique<MVAUtils::BDT>(training.get());
134 for (
const std::string
beam : {
"beamPosX",
"beamPosY",
"beamPosZ"}) {
173 ATH_MSG_FATAL(
"The vertex fitter passed is not a V0 Vertex Fitter");
174 return StatusCode::FAILURE;
182 return StatusCode::SUCCESS;
191 const EventContext& ctx
◆ 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& InDet::InDetV0FinderTool::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ invariantMass()
Definition at line 792 of file InDetV0FinderTool.cxx.
796 double mass = 1000000000.;
797 double error = 1000000001.;
798 bool in_mass_window =
false;
799 double winmass_min = 0., winmass_max = 0.;
◆ makeLink()
◆ massFit()
Definition at line 835 of file InDetV0FinderTool.cxx.
859 if (pdgID == -3122) {
871 const std::vector<const xAOD::TrackParticleContainer*>& trackcols)
const
875 bool elementSet =
false;
876 if(trackcols.empty()){
◆ 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.
◆ performSearch()
Definition at line 196 of file InDetV0FinderTool.cxx.
199 trackCols.push_back(handle.cptr());
206 if (!vertices.isValid())
209 return StatusCode::SUCCESS;
214 if ( !TPC.isValid() )
217 return StatusCode::SUCCESS;
219 ATH_MSG_DEBUG(
"Track particle container size " << TPC->size());
227 beamspot = beamSpotHandle->beamPos();
232 beamspot =
Amg::Vector3D(beamPosX(0), beamPosY(0), beamPosZ(0));
235 std::vector<const xAOD::TrackParticle*> posTracks; posTracks.clear();
236 std::vector<const xAOD::TrackParticle*> negTracks; negTracks.clear();
238 if (
m_pv && primaryVertex) vx = primaryVertex;
240 if (TPC->size() > 1) {
242 for ( tpIt=TPC->begin(); tpIt!=TPC->end(); ++tpIt )
253 for (
const auto *
const vx : *vertices)
263 if (foundVertex)
break;
266 bool useTrack =
false;
268 if (
m_useorigin && foundVertex ==
nullptr) useTrack =
true;
269 if (!useTrack)
continue;
273 bool d0wrtVertex =
true;
275 if ( !
d0Pass(TP,vertColl, ctx) ) d0wrtVertex =
false;
279 if ( !
d0Pass(TP,primaryVertex, ctx) ) d0wrtVertex =
false;
281 if ( !
d0Pass(TP,beamspot, ctx) ) d0wrtVertex =
false;
284 if (!d0wrtVertex)
continue;
287 posTracks.push_back(TP);
288 negTracks.push_back(TP);
291 posTracks.push_back(*tpIt);
293 negTracks.push_back(*tpIt);
299 ATH_MSG_DEBUG(
"number of tracks passing preselection, positive " << posTracks.size() <<
" negative " << negTracks.size());
301 if (!posTracks.empty() && !negTracks.empty())
318 std::vector<const xAOD::TrackParticle*>::const_iterator tpIt1;
319 std::vector<const xAOD::TrackParticle*>::const_iterator tpIt2;
321 for (tpIt1 = posTracks.begin(); tpIt1 != posTracks.end(); ++tpIt1)
328 double pt1 = TP1->
pt();
331 for (tpIt2 = negTracks.begin(); tpIt2 != negTracks.end(); ++tpIt2)
333 if (*tpIt1 == *tpIt2)
continue;
341 ATH_MSG_DEBUG(
"nclus1 " << (
int)nclus1 <<
" nclus2 " << (
int)nclus2);
346 double pt2 = TP2->
pt();
348 bool trk_cut1 =
false;
349 bool trk_cut2 =
false;
350 if (nclus1 != 0) trk_cut1 =
true;
351 if (nclus1 == 0 && pt1 >=
m_ptTRT) trk_cut1 =
true;
352 if (!trk_cut1)
continue;
353 if (nclus2 != 0) trk_cut2 =
true;
354 if (nclus2 == 0 && pt2 >=
m_ptTRT) trk_cut2 =
true;
355 if (!trk_cut2)
continue;
363 if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;}
364 bool errorCode =
false;
365 if (errorcode == 0 || errorcode == 5 || errorcode == 6 || errorcode == 8) errorCode =
true;
366 if (!errorCode)
continue;
369 bool d0wrtVertex =
true;
371 if ( !
d0Pass(TP1,TP2,vertColl, ctx) ) d0wrtVertex =
false;
373 if (!d0wrtVertex)
continue;
377 if (
doFit(TP1,TP2,startingPoint, ctx) )
379 std::vector<const xAOD::TrackParticle*> pairV0;
381 pairV0.push_back(TP1);
382 pairV0.push_back(TP2);
387 std::unique_ptr<xAOD::Vertex> myVxCandidate;
391 myVxCandidate = std::unique_ptr<xAOD::Vertex>(
m_iVKVertexFitter->fit(pairV0, startingPoint) );
399 bool doKshortFit =
false;
400 doKshortFit =
doMassFit(myVxCandidate.get(),310);
401 bool doLambdaFit =
false;
402 doLambdaFit =
doMassFit(myVxCandidate.get(),3122);
403 bool doLambdabarFit =
false;
404 doLambdabarFit =
doMassFit(myVxCandidate.get(),-3122);
406 if (doKshortFit || doLambdaFit || doLambdabarFit)
408 bool pointAtVert =
true;
420 std::unique_ptr<xAOD::Vertex> myKshort;
421 std::unique_ptr<xAOD::Vertex> myLambda;
422 std::unique_ptr<xAOD::Vertex> myLambdabar;
423 std::unique_ptr<xAOD::Vertex> myGamma;
424 bool foundKshort =
false;
425 bool foundLambda =
false;
426 bool foundLambdabar =
false;
429 myKshort = std::unique_ptr<xAOD::Vertex>(
massFit(310, pairV0,
vertex) );
439 myLambda = std::unique_ptr<xAOD::Vertex>(
massFit(3122, pairV0,
vertex) );
449 myLambdabar = std::unique_ptr<xAOD::Vertex>(
massFit(-3122, pairV0,
vertex));
453 foundLambdabar =
true;
458 bool doGamma =
false;
460 double gamma_prob = -1., gamma_mass = -1., gamma_massErr = -1.;
461 if (foundKshort || foundLambda || foundLambdabar) doGamma =
true;
475 v0Container->
push_back(myVxCandidate.release());
477 v0_BDTScore( *(v0Container->
back()) ) =
score;
486 ksContainer->
push_back(myKshort.release());
490 v0LinksDecorks(*(ksContainer->
back())) = v0Link;
494 v0_ksLinksDecor(*(v0Container->
back())) = ksLink;
496 v0_ksLinksDecor(*(v0Container->
back())) = ksLink;
505 laContainer->
push_back(myLambda.release());
509 v0LinksDecorlb(*(laContainer->
back())) = v0Link;
513 v0_laLinksDecor(*(v0Container->
back())) = laLink;
515 v0_laLinksDecor(*(v0Container->
back())) = laLink;
524 lbContainer->
push_back(myLambdabar.release());
528 v0LinksDecorlbb(*(lbContainer->
back())) = v0Link;
532 v0_lbLinksDecor(*(v0Container->
back())) = lbLink;
534 v0_lbLinksDecor(*(v0Container->
back())) = lbLink;
537 myGamma = std::unique_ptr<xAOD::Vertex>(
massFit(22, pairV0,
vertex) );
540 gamma_prob =
m_V0Tools->vertexProbability(myGamma.get());
545 mDecor_gfit( *(v0Container->
back()) ) = gamma_fit;
546 mDecor_gmass( *(v0Container->
back()) ) = gamma_mass;
547 mDecor_gmasserr( *(v0Container->
back()) ) = gamma_massErr;
548 mDecor_gprob( *(v0Container->
back()) ) = gamma_prob;
570 if (v0Container->
empty())
ATH_MSG_DEBUG(
"No Candidates found. Empty container returned");
571 if (ksContainer->
empty())
ATH_MSG_DEBUG(
"No Kshort Candidates found. Empty container returned");
572 if (laContainer->
empty())
ATH_MSG_DEBUG(
"No Lambda Candidates found. Empty container returned");
573 if (lbContainer->
empty())
ATH_MSG_DEBUG(
"No Lambdabar Candidates found. Empty container returned");
575 return StatusCode::SUCCESS;
581 <<
"----------------------------------------------------------------------------------------------------------------------------------------------" <<
endmsg
◆ pointAtVertex()
◆ pointAtVertexColl()
Definition at line 784 of file InDetV0FinderTool.cxx.
785 double e2sq = per2->momentum().mag2() +
m2*
m2;
786 double e2 = (e2sq>0.) ? sqrt(e2sq) : 0.;
787 double p = (per1->momentum()+per2->momentum()).
mag();
789 double mass = (msq>0.) ? sqrt(msq) : 0.;
◆ renounce()
◆ renounceArray()
◆ SGError()
void InDet::InDetV0FinderTool::SGError |
( |
const std::string & |
errService | ) |
const |
|
private |
Definition at line 604 of file InDetV0FinderTool.cxx.
606 double massKshort_i=2000001., massLambda_i=2000001., massLambdabar_i=2000001.;
◆ 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_BDT
◆ m_BDTCut
DoubleProperty InDet::InDetV0FinderTool::m_BDTCut {this, "BDTCut", -1} |
|
private |
◆ m_BDTFile
StringProperty InDet::InDetV0FinderTool::m_BDTFile {this, "BDTFile", "XGBModelBetterVertex.root"} |
|
private |
Filename of mvaUtils model file, located in /InDetV0FinderTool/BDT/v1/.
Definition at line 191 of file InDetV0FinderTool.h.
◆ m_beamSpotDecoKey
◆ m_beamSpotKey
◆ m_concreteVertexFitter
◆ m_d0_cut
DoubleProperty InDet::InDetV0FinderTool::m_d0_cut {this, "d0_cut", 2.} |
|
private |
◆ m_detStore
◆ m_doSimpleV0
BooleanProperty InDet::InDetV0FinderTool::m_doSimpleV0 {this, "doSimpleV0", false} |
|
private |
◆ m_errmass
DoubleProperty InDet::InDetV0FinderTool::m_errmass {this, "errmass", 100.} |
|
private |
◆ m_eventInfo_key
◆ m_events_processed
std::atomic<unsigned int> InDet::InDetV0FinderTool::m_events_processed {} |
|
mutableprivate |
◆ m_evtStore
◆ m_extrapolator
Initial value:{
this, "Extrapolator", "Trk::Extrapolator"}
Definition at line 145 of file InDetV0FinderTool.h.
◆ m_Gamma_stored
std::atomic<unsigned int> InDet::InDetV0FinderTool::m_Gamma_stored {} |
|
mutableprivate |
◆ m_iGammaFitter
Initial value:{
this, "GammaFitterTool", "Trk::TrkVKalVrtFitter"}
Definition at line 135 of file InDetV0FinderTool.h.
◆ m_iKshortFitter
Initial value:{
this, "KshortFitterTool", "Trk::TrkVKalVrtFitter"}
Definition at line 129 of file InDetV0FinderTool.h.
◆ m_iLambdabarFitter
Initial value:{
this, "LambdabarFitterTool", "Trk::TrkVKalVrtFitter"}
Definition at line 133 of file InDetV0FinderTool.h.
◆ m_iLambdaFitter
Initial value:{
this, "LambdaFitterTool", "Trk::TrkVKalVrtFitter"}
Definition at line 131 of file InDetV0FinderTool.h.
◆ m_iVertexFitter
Initial value:{
this, "VertexFitterTool", "Trk::V0VertexFitter"}
Definition at line 125 of file InDetV0FinderTool.h.
◆ m_iVKVertexFitter
Initial value:{
this, "VKVertexFitterTool", "Trk::TrkVKalVrtFitter"}
Definition at line 127 of file InDetV0FinderTool.h.
◆ m_Kshort_stored
std::atomic<unsigned int> InDet::InDetV0FinderTool::m_Kshort_stored {} |
|
mutableprivate |
◆ m_ksKey
Gaudi::Property<std::string> InDet::InDetV0FinderTool::m_ksKey { this, "KshortContainerName", "KshortCandidates", "Ks container name (same calling alg)" } |
|
private |
◆ m_ksmax
DoubleProperty InDet::InDetV0FinderTool::m_ksmax {this, "ksmax", 600.} |
|
private |
◆ m_ksmin
DoubleProperty InDet::InDetV0FinderTool::m_ksmin {this, "ksmin", 400.} |
|
private |
◆ m_laKey
Gaudi::Property<std::string> InDet::InDetV0FinderTool::m_laKey |
|
private |
Initial value:{ this, "LambdaContainerName", "LambdaCandidates",
"Lambda container name (same calling alg)" }
Definition at line 247 of file InDetV0FinderTool.h.
◆ m_lamax
DoubleProperty InDet::InDetV0FinderTool::m_lamax {this, "lamax", 1200.} |
|
private |
◆ m_Lambda_stored
std::atomic<unsigned int> InDet::InDetV0FinderTool::m_Lambda_stored {} |
|
mutableprivate |
◆ m_Lambdabar_stored
std::atomic<unsigned int> InDet::InDetV0FinderTool::m_Lambdabar_stored {} |
|
mutableprivate |
◆ m_lamin
DoubleProperty InDet::InDetV0FinderTool::m_lamin {this, "lamin", 1000.} |
|
private |
◆ m_lbKey
Gaudi::Property<std::string> InDet::InDetV0FinderTool::m_lbKey |
|
private |
Initial value:{ this, "LambdabarContainerName", "LambdabarCandidates",
"Lambdabar container name (same calling alg)" }
Definition at line 249 of file InDetV0FinderTool.h.
◆ m_masse
DoubleProperty InDet::InDetV0FinderTool::m_masse {this, "masse", 0.510999} |
|
private |
◆ m_masses
IntegerProperty InDet::InDetV0FinderTool::m_masses {this, "masses", 1} |
|
private |
◆ m_massK0S
DoubleProperty InDet::InDetV0FinderTool::m_massK0S {this, "massK0S", 497.672} |
|
private |
◆ m_massLambda
DoubleProperty InDet::InDetV0FinderTool::m_massLambda {this, "massLambda", 1115.68} |
|
private |
◆ m_massp
DoubleProperty InDet::InDetV0FinderTool::m_massp {this, "massp", 938.272} |
|
private |
◆ m_masspi
DoubleProperty InDet::InDetV0FinderTool::m_masspi {this, "masspi", 139.57} |
|
private |
◆ m_max_d0_cut
DoubleProperty InDet::InDetV0FinderTool::m_max_d0_cut {this, "max_d0_cut", 999999.} |
|
private |
◆ m_max_z0_cut
DoubleProperty InDet::InDetV0FinderTool::m_max_z0_cut {this, "max_z0_cut", 999999.} |
|
private |
◆ m_maxPV
Gaudi::Property<int> InDet::InDetV0FinderTool::m_maxPV { this, "MaxPV", 999999 } |
|
private |
◆ m_maxsxy
DoubleProperty InDet::InDetV0FinderTool::m_maxsxy {this, "maxsxy", 1000.} |
|
private |
◆ m_mDecor_gfit
◆ m_mDecor_gmass
◆ m_mDecor_gmasserr
◆ m_mDecor_gprob
◆ m_minConstrVertProb
DoubleProperty InDet::InDetV0FinderTool::m_minConstrVertProb {this, "minConstrVertProb", 0.0001} |
|
private |
◆ m_minVertProb
DoubleProperty InDet::InDetV0FinderTool::m_minVertProb {this, "minVertProb", 0.0001} |
|
private |
◆ m_particleDataTable
const HepPDT::ParticleDataTable* InDet::InDetV0FinderTool::m_particleDataTable = nullptr |
|
private |
◆ m_partPropSvc
ServiceHandle<IPartPropSvc> InDet::InDetV0FinderTool::m_partPropSvc {this, "PartPropSvc", "PartPropSvc"} |
|
private |
◆ m_ptTRT
DoubleProperty InDet::InDetV0FinderTool::m_ptTRT {this, "ptTRT", 700.} |
|
private |
◆ m_pv
BooleanProperty InDet::InDetV0FinderTool::m_pv {this, "trkSelPV", false} |
|
private |
◆ m_RelinkContainers
◆ m_samesign
BooleanProperty InDet::InDetV0FinderTool::m_samesign {this, "AddSameSign", false} |
|
private |
◆ m_trackParticleKey
Initial value:{ this, "TrackParticleCollection", "InDetTrackParticles",
"key for retrieval of TrackParticles" }
Definition at line 122 of file InDetV0FinderTool.h.
◆ m_trackToVertexTool
Initial value:{
this, "TrackToVertexTool", "Reco::TrackToVertex"}
Definition at line 139 of file InDetV0FinderTool.h.
◆ m_trkSelector
Initial value:{
this, "TrackSelectorTool", "InDet::TrackSelectorTool"}
Definition at line 141 of file InDetV0FinderTool.h.
◆ m_uksmax
DoubleProperty InDet::InDetV0FinderTool::m_uksmax {this, "uksmax", 600.} |
|
private |
◆ m_uksmin
DoubleProperty InDet::InDetV0FinderTool::m_uksmin {this, "uksmin", 400.} |
|
private |
◆ m_ulamax
DoubleProperty InDet::InDetV0FinderTool::m_ulamax {this, "ulamax", 1200.} |
|
private |
◆ m_ulamin
DoubleProperty InDet::InDetV0FinderTool::m_ulamin {this, "ulamin", 1000.} |
|
private |
◆ m_use_innerPixHits
BooleanProperty InDet::InDetV0FinderTool::m_use_innerPixHits {this, "use_innerPixHits", false} |
|
private |
= true select allows tracks with no innermost pixel layer hits to always pass d0 significance cut (false)
Definition at line 158 of file InDetV0FinderTool.h.
◆ m_use_vertColl
BooleanProperty InDet::InDetV0FinderTool::m_use_vertColl {this, "useVertexCollection", false} |
|
private |
◆ m_useBDT
BooleanProperty InDet::InDetV0FinderTool::m_useBDT {this, "useBDT", false} |
|
private |
= true uses BDT selections in place of rectangular pointAtVertex + minVertProb
Definition at line 159 of file InDetV0FinderTool.h.
◆ m_useBeamSpotCond
Gaudi::Property<bool> InDet::InDetV0FinderTool::m_useBeamSpotCond { this, "UseBeamSpotCond", false } |
|
private |
◆ m_useorigin
BooleanProperty InDet::InDetV0FinderTool::m_useorigin {this, "useorigin", true} |
|
private |
= true only using tracks that have no vertex association (true)
Definition at line 151 of file InDetV0FinderTool.h.
◆ m_useTrkSel
BooleanProperty InDet::InDetV0FinderTool::m_useTrkSel {this, "use_TrackSelector", true} |
|
private |
◆ m_useTRTplusSi
BooleanProperty InDet::InDetV0FinderTool::m_useTRTplusSi {this, "useTRTplusSi", false} |
|
private |
◆ m_useTRTplusTRT
BooleanProperty InDet::InDetV0FinderTool::m_useTRTplusTRT {this, "useTRTplusTRT", false} |
|
private |
◆ m_useV0Fitter
BooleanProperty InDet::InDetV0FinderTool::m_useV0Fitter {this, "useV0Fitter", false} |
|
private |
= true if using TrkV0Fitter, = false if using VKalVert (true)
Definition at line 157 of file InDetV0FinderTool.h.
◆ m_v0_BDTScore
◆ m_v0_ksLinksDecorkey
◆ m_v0_laLinksDecorkey
◆ m_v0_lbLinksDecorkey
◆ m_v0Key
Gaudi::Property<std::string> InDet::InDetV0FinderTool::m_v0Key { this, "V0ContainerName", "V0Candidates", "V0 container name (same calling alg)" } |
|
private |
◆ m_v0LinksDecorkeyks
◆ m_v0LinksDecorkeylb
◆ m_v0LinksDecorkeylbb
◆ m_V0s_stored
std::atomic<unsigned int> InDet::InDetV0FinderTool::m_V0s_stored {} |
|
mutableprivate |
◆ m_V0Tools
PublicToolHandle<Trk::V0Tools> InDet::InDetV0FinderTool::m_V0Tools |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vert_a0xy_cut
DoubleProperty InDet::InDetV0FinderTool::m_vert_a0xy_cut {this, "vert_a0xy_cut", 3.} |
|
private |
◆ m_vert_a0z_cut
DoubleProperty InDet::InDetV0FinderTool::m_vert_a0z_cut {this, "vert_a0z_cut", 15.} |
|
private |
◆ m_vert_cos_cut
DoubleProperty InDet::InDetV0FinderTool::m_vert_cos_cut {this, "vert_cos_cut", 0.} |
|
private |
V0 cos(theta) angle between displacement and momentum (>0.)
Definition at line 188 of file InDetV0FinderTool.h.
◆ m_vert_lxy_cut
DoubleProperty InDet::InDetV0FinderTool::m_vert_lxy_cut {this, "vert_lxy_cut", 500.} |
|
private |
◆ m_vert_lxy_sig
DoubleProperty InDet::InDetV0FinderTool::m_vert_lxy_sig {this, "vert_lxy_sig", 2.} |
|
private |
◆ m_vertexEstimator
Initial value:{
this, "VertexPointEstimator", "InDet::VertexPointEstimator"}
Definition at line 143 of file InDetV0FinderTool.h.
◆ m_vertexKey
Initial value:{ this, "VertexContainer", "PrimaryVertices",
"primary vertex container" }
Definition at line 222 of file InDetV0FinderTool.h.
◆ m_vhka
The documentation for this class was generated from the following files:
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Const iterator class for DataVector/DataList.
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
float charge() const
Returns the charge.
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.
@ V0Vtx
Vertex from V0 decay.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
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].
const Amg::Vector3D & position() const
Returns the 3-pos.
Helper class to provide constant type-safe access to aux data.
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual void setOwner(IDataHandleHolder *o)=0
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Handle class for reading a decoration on an object.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void clearTracks()
Remove all tracks from the vertex.
float z() const
Returns the z position.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const T * back() const
Access the last element in the collection as an rvalue.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool setElement(ElementType element)
Set to point to an element.
bool setStorableObject(BaseConstReference data, bool replace=false, IProxyDict *sg=0)
Set link to point to a new container (storable).
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Eigen::Matrix< double, 3, 1 > Vector3D
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const Amg::Vector3D &startingPoint) const override
Interface for xAOD::TrackParticle with Amg::Vector3D starting point.
Class describing a Vertex.
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ numberOfSCTHits
number of hits in SCT [unit8_t].
This class implements a vertex fitting algorithm optimised for V0 finding.
Class describing a TrackParticle.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Scalar mag() const
mag method
bool empty() const noexcept
Returns true if the collection is empty.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer