 |
ATLAS Offline Software
|
#include <TwoTrackVrtBDTSelector.h>
|
| TwoTrackVrtBDTSelector (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~TwoTrackVrtBDTSelector () |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
bool | isgood (const std::pair< const xAOD::TrackParticle *, const xAOD::TrackParticle * > tracks, const xAOD::Vertex &candV, std::pair< ROOT::Math::XYZTVector, ROOT::Math::XYZTVector > moms, const xAOD::Vertex &tPV) const final |
|
bool | isgood (const std::pair< const xAOD::TrackParticle *, const xAOD::TrackParticle * > tracks, const xAOD::Vertex &candV, std::pair< ROOT::Math::XYZTVector, ROOT::Math::XYZTVector > moms, const xAOD::Vertex &tPV, float &quality) const final |
|
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, V, H > &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 |
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
Gaudi::Property< float > | m_vrt2TrMassLimit {this,"Vrt2TrMassLimit",4000., "Maximal allowed mass for 2-track vertices" } |
|
Gaudi::Property< float > | m_vrt2TrPtMin {this, "Vrt2TrPtMin", 1000., "Minimal allowed Pt for 2-track vertices." } |
|
Gaudi::Property< float > | m_vrt2TrPtMax {this, "Vrt2TrPtMax", 5.e5, "Maximal allowed Pt for 2-track vertices. Calibration limit" } |
|
Gaudi::Property< float > | m_sel2VrtProbCut {this, "Sel2VrtProbCut", 0.02, "Cut on probability of 2-track vertex for initial selection" } |
|
Gaudi::Property< float > | m_maxSVRadiusCut {this, "MaxSVRadiusCut", 140., "Cut on maximal radius of SV (def = Pixel detector size)" } |
|
Gaudi::Property< float > | m_cosSVPVCut {this, "cosSVPVCut", 0., "Cut on cos of angle between SV-PV and full vertex momentum" } |
|
Gaudi::Property< bool > | m_do2TrkIBLChecks {this, "do2TrkIBLChecks", true, "IBL and B-layer hit requrirements based on the position of 2-track DV." } |
|
Gaudi::Property< bool > | m_useVertexCleaning {this, "useVertexCleaning", true, "Clean vertices by requiring pixel hit presence according to vertex position" } |
|
Gaudi::Property< float > | m_firstPixelLayerR {this, "FirstPixelLayerR", 32.0,"Radius of the first Pixel layer" } |
|
Gaudi::Property< float > | m_v2tBDTCut {this, "v2tBDTCut", -0.5, "BDT cut to select 2-track vertices" } |
|
Gaudi::Property< std::string > | m_calibFileName {this, "CalibFileName", "Fake2TrVertexReject.MVA.v02.root", " MVA calibration file for 2-track fake vertices removal" } |
|
std::unique_ptr< MVAUtils::BDT > | m_SV2T_BDT |
|
ToolHandle< Trk::TrkVKalVrtFitter > | m_fitSvc {this, "VertexFitterTool", "Trk::TrkVKalVrtFitter/VertexFitterTool", "Vertex Fitter tool for 2-track selector"} |
|
double | m_massPi {} |
|
double | m_massP {} |
|
double | m_massE {} |
|
std::string | m_instanceName {} |
|
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 36 of file TwoTrackVrtBDTSelector.h.
◆ StoreGateSvc_t
◆ TwoTrackVrtBDTSelector()
Rec::TwoTrackVrtBDTSelector::TwoTrackVrtBDTSelector |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TwoTrackVrtBDTSelector()
Rec::TwoTrackVrtBDTSelector::~TwoTrackVrtBDTSelector |
( |
| ) |
|
|
virtual |
◆ 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 Rec::TwoTrackVrtBDTSelector::finalize |
( |
| ) |
|
◆ getBLHit()
◆ getIBLHit()
◆ initialize()
StatusCode Rec::TwoTrackVrtBDTSelector::initialize |
( |
| ) |
|
Definition at line 49 of file TwoTrackVrtBDTSelector.cxx.
57 std::unique_ptr<TFile>
rootFile(TFile::Open(rootFilePath.c_str(),
"READ"));
60 return StatusCode::FAILURE;
62 std::unique_ptr<TTree> training((TTree*)
rootFile->Get(
"BDT"));
63 m_SV2T_BDT = std::make_unique<MVAUtils::BDT>(training.get());
65 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::ITwoTrackVertexSelector::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ isgood() [1/2]
◆ isgood() [2/2]
Implements Rec::ITwoTrackVertexSelector.
Definition at line 86 of file TwoTrackVrtBDTSelector.cxx.
93 double Prob2v=TMath::Prob(candV.
chiSquared(),1);
96 auto sumMom=moms.first+moms.second;
102 ROOT::Math::XYZVector vSVPV(candV.
x()-tPV.
x(),candV.
y()-tPV.
y(),candV.
z()-tPV.
z());
103 double cosSVPV=vSVPV.Unit().Dot(sumMom.Vect().Unit());
112 if(
m_do2TrkIBLChecks && ( (ihitIBL==0&&jhitIBL>0) || (ihitIBL>0&&jhitIBL==0) ) )
return false;
113 int ihitBL =
getBLHit (iTrks.first);
114 int jhitBL =
getBLHit (iTrks.second);
117 if( ihitIBL<1 && ihitBL<1)
return false;
118 if( jhitIBL<1 && jhitBL<1)
return false;
120 float ihitR = iTrks.first->radiusOfFirstHit();
121 float jhitR = iTrks.second->radiusOfFirstHit();
122 if(std::abs(ihitR-jhitR)>50.)
return false;
123 if( vrtR-
std::min(ihitR,jhitR) > 50.)
return false;
124 if(ihitR-vrtR > 180.+2.*vrtRErr)
return false;
125 if(jhitR-vrtR > 180.+2.*vrtRErr)
return false;
128 if(std::abs(ihitR-jhitR)>12.)
return false;
129 if( ihitR-vrtR > 36.)
return false;
130 if( jhitR-vrtR > 36.)
return false;
131 if( ihitR-vrtR <-2.*vrtRErr)
return false;
132 if( jhitR-vrtR <-2.*vrtRErr)
return false;
135 std::vector<double> impact,impactError;
136 m_fitSvc->VKalGetImpact( iTrks.first, tPV.
position(), 1, impact, impactError);
137 float trk1Signif = sqrt( impact[0]*impact[0]/impactError[0] + impact[1]*impact[1]/impactError[2]);
138 m_fitSvc->VKalGetImpact( iTrks.second, tPV.
position(), 1, impact, impactError);
139 float trk2Signif = sqrt( impact[0]*impact[0]/impactError[0] + impact[1]*impact[1]/impactError[2]);
140 float minPtT =
std::min(iTrks.first->pt(),iTrks.second->pt());
141 std::vector<float> VARS(10);
143 VARS[1]=
log(sumMom.Pt());
145 VARS[3]=
log(vrtR<20. ? vSVPV.Rho() : vrtR);
149 VARS[7]=sqrt(std::abs(1.-cosSVPV*cosSVPV));
◆ 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.
◆ updateVHKA()
◆ vrtRadiusError()
double Rec::TwoTrackVrtBDTSelector::vrtRadiusError |
( |
const Amg::Vector3D & |
secVrt, |
|
|
const std::vector< float > & |
vrtErr |
|
) |
| |
|
staticprivate |
Definition at line 161 of file TwoTrackVrtBDTSelector.cxx.
163 double DirX=SecVrt.x(), DirY=SecVrt.y();
164 double Covar = DirX*VrtErr[0]*DirX
165 +2.*DirX*VrtErr[1]*DirY
166 +DirY*VrtErr[2]*DirY;
167 Covar /= DirX*DirX + DirY*DirY;
168 Covar=std::sqrt(std::abs(Covar));
169 if(Covar != Covar) Covar = 0.;
◆ m_calibFileName
Gaudi::Property<std::string> Rec::TwoTrackVrtBDTSelector::m_calibFileName {this, "CalibFileName", "Fake2TrVertexReject.MVA.v02.root", " MVA calibration file for 2-track fake vertices removal" } |
|
private |
◆ m_cosSVPVCut
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_cosSVPVCut {this, "cosSVPVCut", 0., "Cut on cos of angle between SV-PV and full vertex momentum" } |
|
private |
◆ m_detStore
◆ m_do2TrkIBLChecks
Gaudi::Property<bool> Rec::TwoTrackVrtBDTSelector::m_do2TrkIBLChecks {this, "do2TrkIBLChecks", true, "IBL and B-layer hit requrirements based on the position of 2-track DV." } |
|
private |
◆ m_evtStore
◆ m_firstPixelLayerR
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_firstPixelLayerR {this, "FirstPixelLayerR", 32.0,"Radius of the first Pixel layer" } |
|
private |
◆ m_fitSvc
◆ m_instanceName
std::string Rec::TwoTrackVrtBDTSelector::m_instanceName {} |
|
private |
◆ m_massE
double Rec::TwoTrackVrtBDTSelector::m_massE {} |
|
private |
◆ m_massP
double Rec::TwoTrackVrtBDTSelector::m_massP {} |
|
private |
◆ m_massPi
double Rec::TwoTrackVrtBDTSelector::m_massPi {} |
|
private |
◆ m_maxSVRadiusCut
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_maxSVRadiusCut {this, "MaxSVRadiusCut", 140., "Cut on maximal radius of SV (def = Pixel detector size)" } |
|
private |
◆ m_sel2VrtProbCut
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_sel2VrtProbCut {this, "Sel2VrtProbCut", 0.02, "Cut on probability of 2-track vertex for initial selection" } |
|
private |
◆ m_SV2T_BDT
std::unique_ptr<MVAUtils::BDT> Rec::TwoTrackVrtBDTSelector::m_SV2T_BDT |
|
private |
◆ m_useVertexCleaning
Gaudi::Property<bool> Rec::TwoTrackVrtBDTSelector::m_useVertexCleaning {this, "useVertexCleaning", true, "Clean vertices by requiring pixel hit presence according to vertex position" } |
|
private |
◆ m_v2tBDTCut
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_v2tBDTCut {this, "v2tBDTCut", -0.5, "BDT cut to select 2-track vertices" } |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_vrt2TrMassLimit
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_vrt2TrMassLimit {this,"Vrt2TrMassLimit",4000., "Maximal allowed mass for 2-track vertices" } |
|
private |
◆ m_vrt2TrPtMax
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_vrt2TrPtMax {this, "Vrt2TrPtMax", 5.e5, "Maximal allowed Pt for 2-track vertices. Calibration limit" } |
|
private |
◆ m_vrt2TrPtMin
Gaudi::Property<float> Rec::TwoTrackVrtBDTSelector::m_vrt2TrPtMin {this, "Vrt2TrPtMin", 1000., "Minimal allowed Pt for 2-track vertices." } |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_useVertexCleaning
static std::string find_calib_file(const std::string &logical_file_name)
float x() const
Returns the x position.
bool isgood(const std::pair< const xAOD::TrackParticle *, const xAOD::TrackParticle * > tracks, const xAOD::Vertex &candV, std::pair< ROOT::Math::XYZTVector, ROOT::Math::XYZTVector > moms, const xAOD::Vertex &tPV) const final
Gaudi::Property< float > m_cosSVPVCut
Gaudi::Property< std::string > m_calibFileName
Gaudi::Property< float > m_vrt2TrPtMin
ToolHandle< Trk::TrkVKalVrtFitter > m_fitSvc
Gaudi::Property< float > m_sel2VrtProbCut
Gaudi::Property< float > m_maxSVRadiusCut
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
const Amg::Vector3D & position() const
Returns the 3-pos.
std::unique_ptr< MVAUtils::BDT > m_SV2T_BDT
virtual void setOwner(IDataHandleHolder *o)=0
std::string m_instanceName
Gaudi::Property< float > m_firstPixelLayerR
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float z() const
Returns the z position.
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
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Gaudi::Property< float > m_vrt2TrPtMax
Gaudi::Property< bool > m_do2TrkIBLChecks
static double vrtRadiusError(const Amg::Vector3D &secVrt, const std::vector< float > &vrtErr)
const std::vector< float > & covariance() const
Returns the covariance matrix as a simple vector of values.
float chiSquared() const
Returns the of the vertex fit as float.
float y() const
Returns the y position.
Gaudi::Property< float > m_v2tBDTCut
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Property< float > m_vrt2TrMassLimit
static int getBLHit(const xAOD::TrackParticle *Part)
static int getIBLHit(const xAOD::TrackParticle *Part)
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer