|
ATLAS Offline Software
|
#include <BPhysVertexTrackBase.h>
|
enum | track_type {
ASSOCPV,
PVTYPE0,
PVTYPE1,
PVTYPE2,
PVTYPE3,
NONE,
NULLVP,
CAPVRFN3U0,
CAPVNRN3U0,
CAPVRF3DU0,
CAPVNR3DU0,
CAPVRFN3U1,
CAPVNRN3U1,
CAPVRF3DU1,
CAPVNR3DU1,
CAPVRFN3U2,
CAPVNRN3U2,
CAPVRF3DU2,
CAPVNR3DU2,
CAPVRFNNU3,
CAPVNRNNU3,
CAPVRFNNU4,
CAPVNRNNU4,
CAPVRFNNU5,
CAPVNRNNU5,
CAPVRFNNU6,
CAPVNRNNU6,
CAPVRFNNU7,
CAPVNRNNU7,
CAPVRFNNU8,
CAPVNRNNU8,
CAPVRFNNU9,
CAPVNRNNU9
} |
|
|
| BPhysVertexTrackBase (const std::string &t, const std::string &n, const IInterface *p) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | addBranches () const override |
| Pass the thinning service
More...
|
|
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 |
|
|
virtual StatusCode | initializeHook () |
|
virtual StatusCode | finalizeHook () |
|
virtual StatusCode | addBranchesHook () const |
|
virtual StatusCode | addBranchesVCSetupHook (size_t ivc) const |
|
virtual StatusCode | addBranchesSVLoopHook (const xAOD::Vertex *vtx) const |
|
virtual StatusCode | calcValuesHook (const xAOD::Vertex *vtx, const unsigned int ipv, const unsigned int its, const unsigned int itt) const |
|
virtual bool | fastFillHook (const xAOD::Vertex *vtx, const int ipv) const |
|
StatusCode | calculateValues (const xAOD::Vertex *vtx) const |
|
virtual std::string | buildPvAssocCacheName (const xAOD::Vertex *vtx, const int ipv) const |
|
virtual void | initPvAssocTypeVec () |
|
TrackBag | findAllTracksInDecay (xAOD::BPhysHelper &vtx) const |
|
void | findAllTracksInDecay (xAOD::BPhysHelper &vtx, TrackBag &tracks) const |
|
MuonBag | findAllMuonsInDecay (xAOD::BPhysHelper &vtx) const |
|
void | findAllMuonsInDecay (xAOD::BPhysHelper &vtx, MuonBag &muons) const |
|
TrackBag | findAllMuonIdTracksInDecay (xAOD::BPhysHelper &vtx, MuonBag &muons) const |
|
std::vector< TVector3 > | findMuonRefTrackMomenta (xAOD::BPhysHelper &vtx, MuonBag &muons) const |
|
TrackBag | selectTracks (const xAOD::TrackParticleContainer *inpTracks, xAOD::BPhysHelper &cand, const unsigned int ipv, const unsigned int its, const unsigned int itt) const |
|
TrackBag | selectTracks (const xAOD::TrackParticleContainer *inpTracks, const TrackBag &exclTracks, xAOD::BPhysHelper &cand, const unsigned int ipv, const unsigned int its, const unsigned int itt) const |
|
uint64_t | detTrackTypes (const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV) const |
|
double | getTrackCandPVLogChi2 (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doDCAin3D=false, int chi2DefToUse=0) const |
|
std::vector< double > | getTrackLogChi2DCA (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doDCAin3D=false, int chi2DefToUse=0) const |
|
std::string | buildBranchBaseName (unsigned int its, unsigned int ipv, unsigned int itt, const std::string &preSuffix="") const |
|
std::pair< const xAOD::Vertex *, double > | findMinChi2PV (const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV, const std::vector< uint64_t > &pvtypes, const int minNTracksInPV, const bool useRefittedPvs, const bool doDCAin3D, const int chi2DefToUse) const |
|
const xAOD::Vertex * | findAssocPV (const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV, const std::vector< uint64_t > &pvtypes, const int minNTracksInPV, const bool useRefittedPvs) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
|
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. More...
|
|
Definition at line 56 of file BPhysVertexTrackBase.h.
◆ StoreGateSvc_t
◆ StringIntMap_t
◆ track_type
Enumerator |
---|
ASSOCPV | |
PVTYPE0 | |
PVTYPE1 | |
PVTYPE2 | |
PVTYPE3 | |
NONE | |
NULLVP | |
CAPVRFN3U0 | |
CAPVNRN3U0 | |
CAPVRF3DU0 | |
CAPVNR3DU0 | |
CAPVRFN3U1 | |
CAPVNRN3U1 | |
CAPVRF3DU1 | |
CAPVNR3DU1 | |
CAPVRFN3U2 | |
CAPVNRN3U2 | |
CAPVRF3DU2 | |
CAPVNR3DU2 | |
CAPVRFNNU3 | |
CAPVNRNNU3 | |
CAPVRFNNU4 | |
CAPVNRNNU4 | |
CAPVRFNNU5 | |
CAPVNRNNU5 | |
CAPVRFNNU6 | |
CAPVNRNNU6 | |
CAPVRFNNU7 | |
CAPVNRNNU7 | |
CAPVRFNNU8 | |
CAPVNRNNU8 | |
CAPVRFNNU9 | |
CAPVNRNNU9 | |
Definition at line 114 of file BPhysVertexTrackBase.h.
◆ BPhysVertexTrackBase()
DerivationFramework::BPhysVertexTrackBase::BPhysVertexTrackBase |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ addBranches()
StatusCode DerivationFramework::BPhysVertexTrackBase::addBranches |
( |
| ) |
const |
|
overridevirtual |
◆ addBranchesHook()
StatusCode DerivationFramework::BPhysVertexTrackBase::addBranchesHook |
( |
| ) |
const |
|
protectedvirtual |
◆ addBranchesSVLoopHook()
StatusCode DerivationFramework::BPhysVertexTrackBase::addBranchesSVLoopHook |
( |
const xAOD::Vertex * |
vtx | ) |
const |
|
protectedvirtual |
◆ addBranchesVCSetupHook()
StatusCode DerivationFramework::BPhysVertexTrackBase::addBranchesVCSetupHook |
( |
size_t |
ivc | ) |
const |
|
protectedvirtual |
◆ buildBranchBaseName()
std::string DerivationFramework::BPhysVertexTrackBase::buildBranchBaseName |
( |
unsigned int |
its, |
|
|
unsigned int |
ipv, |
|
|
unsigned int |
itt, |
|
|
const std::string & |
preSuffix = "" |
|
) |
| const |
|
protected |
Definition at line 1311 of file BPhysVertexTrackBase.cxx.
1317 ATH_MSG_DEBUG(
"BPhysVertexTrackBase::buildBranchBaseName -- begin");
1323 std::size_t ipos = tsName.find_last_of(
"_");
1324 if ( ipos != std::string::npos ) tsName = tsName.substr(ipos+1);
1329 (preSuffix.length() > 0 ?
"_" + preSuffix :
""),
1332 ATH_MSG_DEBUG(
"BPhysVertexBaseTrackBase::buildBranchBaseName: " <<
f);
◆ buildPvAssocCacheName()
std::string DerivationFramework::BPhysVertexTrackBase::buildPvAssocCacheName |
( |
const xAOD::Vertex * |
vtx, |
|
|
const int |
ipv |
|
) |
| const |
|
protectedvirtual |
◆ calculateValues()
StatusCode DerivationFramework::BPhysVertexTrackBase::calculateValues |
( |
const xAOD::Vertex * |
vtx | ) |
const |
|
protected |
Definition at line 638 of file BPhysVertexTrackBase.cxx.
640 ATH_MSG_DEBUG(
"BPhysVertexTrackBase::calculateValues -- begin");
649 for (
unsigned int ipv = 0; ipv < nPvAssocs; ++ipv) {
651 for (
unsigned int its = 0; its < nTrackSels; ++its) {
652 for (
unsigned int itt = 0; itt < nTrackTypes; ++itt) {
654 <<
", its: " << its <<
", itt: " << itt);
662 <<
" -- cached ipv: " << ipv);
666 return StatusCode::SUCCESS;
◆ calcValuesHook()
StatusCode DerivationFramework::BPhysVertexTrackBase::calcValuesHook |
( |
const xAOD::Vertex * |
vtx, |
|
|
const unsigned int |
ipv, |
|
|
const unsigned int |
its, |
|
|
const unsigned int |
itt |
|
) |
| const |
|
protectedvirtual |
◆ 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()
◆ detTrackTypes()
Definition at line 1001 of file BPhysVertexTrackBase.cxx.
1007 ATH_MSG_ERROR(
"BPhysVertexTrackBase::detTrackTypes must be adjusted due to changes in TrackParticle");
1010 if ( candPV != NULL ) {
1023 bool useRefittedPvs = (
i%2 == 1 );
1024 bool doDCAin3D = ( (
i-7)%4 > 1 );
1025 int chi2DefToUse = (
i-7)/4;
1029 chi2DefToUse = (
i-13)/2;
1032 if ( chi2DefToUse == 5 ) {
1040 doDCAin3D, chi2DefToUse).first;
1042 if ( candPV == minChi2PV
1043 || (candRefPV !=
nullptr && candRefPV == minChi2PV) ) {
◆ 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
◆ fastFillHook()
bool DerivationFramework::BPhysVertexTrackBase::fastFillHook |
( |
const xAOD::Vertex * |
vtx, |
|
|
const int |
ipv |
|
) |
| const |
|
protectedvirtual |
◆ finalize()
StatusCode DerivationFramework::BPhysVertexTrackBase::finalize |
( |
| ) |
|
|
overridevirtual |
◆ finalizeHook()
StatusCode DerivationFramework::BPhysVertexTrackBase::finalizeHook |
( |
| ) |
|
|
protectedvirtual |
◆ findAllMuonIdTracksInDecay()
Definition at line 1131 of file BPhysVertexTrackBase.cxx.
1137 for (MuonBag::const_iterator muItr = muons.begin(); muItr != muons.end();
1140 (*muItr)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
1141 tracks.push_back(
track);
◆ findAllMuonsInDecay() [1/2]
◆ findAllMuonsInDecay() [2/2]
◆ findAllTracksInDecay() [1/2]
◆ findAllTracksInDecay() [2/2]
◆ findAssocPV()
Definition at line 1411 of file BPhysVertexTrackBase.cxx.
1419 std::vector<const xAOD::Vertex*> vpvtx;
1421 if ( pvtx !=
nullptr ) {
1422 if (
std::find(pvtypes.begin(),pvtypes.end(),pvtx->vertexType())
1423 != pvtypes.end() ) {
1426 if ( useRefittedPvs && pvtx == candPV ) {
1427 if ( candRefPV !=
nullptr ) {
1431 <<
" candRefPV == NULL!");
1436 vpvtx.push_back(cvtx);
1451 assocPV = candRefPV;
1456 if ( assocPV ==
nullptr ) {
1462 if ( assocPV ==
nullptr ) {
1464 <<
" assocPV == NULL for track!"
1465 <<
" len(vpvtx) = " << vpvtx.size()
1466 <<
" useRefittedPvs = " << useRefittedPvs
1467 <<
" minNTracksInPV = " << minNTracksInPV);
◆ findMinChi2PV()
Definition at line 1359 of file BPhysVertexTrackBase.cxx.
1372 if ( pvtx !=
nullptr ) {
1373 if (
std::find(pvtypes.begin(),pvtypes.end(),pvtx->vertexType())
1374 != pvtypes.end() ) {
1377 if ( useRefittedPvs && pvtx == candPV ) {
1378 if ( candRefPV !=
nullptr ) {
1382 <<
" candRefPV == NULL!");
1389 if (
chi2 < minChi2 ) {
1398 return std::make_pair(minChi2PV, minChi2);
◆ findMuonRefTrackMomenta()
std::vector< TVector3 > DerivationFramework::BPhysVertexTrackBase::findMuonRefTrackMomenta |
( |
xAOD::BPhysHelper & |
vtx, |
|
|
MuonBag & |
muons |
|
) |
| const |
|
protected |
Definition at line 1152 of file BPhysVertexTrackBase.cxx.
1155 std::vector<TVector3> refMuTracks;
1159 muons = vtx.
muons();
1160 for (
auto refMuTrack : vtx.
refTrks() ) {
1161 refMuTracks.push_back(refMuTrack);
1169 if ( otp != NULL ) {
1170 if (
std::find(muonIdTracks.begin(), muonIdTracks.end(), otp)
1171 != muonIdTracks.end() ) {
1172 refMuTracks.push_back(vtx.
refTrk(
i));
1176 " refTrkOrigin == NULL for refTrk # "
1182 " size mismatch #refTrks = " << vtx.
nRefTrks()
1190 std::vector<TVector3> precRefMuTracks =
1193 for (
auto precRefMuTrack : precRefMuTracks ) {
1194 if (
std::find(refMuTracks.begin(), refMuTracks.end(),
1195 precRefMuTrack) == refMuTracks.end() ) {
1196 refMuTracks.push_back(precRefMuTrack);
1205 ATH_MSG_DEBUG(
"BPhysVertexTrackBase::findMuonRefTrackMomenta():"
1206 <<
" #muons: " << muons.size()
1207 <<
" #refMuTrks: " << refMuTracks.size());
1208 TString
str = Form(
">> refMuTracks(%d):\n", (
int)refMuTracks.size());
1209 for (
unsigned int i=0;
i < refMuTracks.size(); ++
i) {
1210 str += Form(
"(%10.4f,%10.4f,%10.4f) ",
1211 refMuTracks[
i].
x(), refMuTracks[
i].
y(),
1212 refMuTracks[
i].
z());
◆ getTrackCandPVLogChi2()
◆ getTrackLogChi2DCA()
Definition at line 722 of file BPhysVertexTrackBase.cxx.
727 std::vector<double>
res = {-999., -99., -999., -99., -100., -100., -1.,
731 const AmgSymMatrix(3) poscov = vtx->covariancePosition();
732 auto ctx =
Gaudi::Hive::currentContext();
734 if ( chi2DefToUse < 2 || (chi2DefToUse > 5 && chi2DefToUse < 8) ) {
736 std::unique_ptr<const Trk::Perigee>
738 if ( trkPerigee != NULL ) {
741 const AmgSymMatrix(5)* locError = trkPerigee->covariance();
742 if ( locError != NULL ) {
746 if ( chi2DefToUse == 1 ) {
748 Amg::Vector3D perppt(trkPerigee->momentum().y()/trkPerigee->pT(),
749 -trkPerigee->momentum().x()/trkPerigee->pT(),
751 double vtxD0Err2 = perppt.transpose()*poscov*perppt;
752 res[1] = sqrt(
pow(
res[1], 2.) + vtxD0Err2 );
753 res[3] = sqrt(
pow(
res[3], 2.) + poscov(2,2) );
755 if ( chi2DefToUse < 2 ) {
756 if ( fabs(
res[1]) > 0. && fabs(
res[3]) > 0. ) {
762 <<
" d0 = " <<
res[0] <<
", d0Err = "
763 <<
res[1] <<
", z0 = " <<
res[2]
764 <<
", z0Err = " <<
res[3]);
768 if ( chi2DefToUse > 5 && chi2DefToUse < 8 ) {
773 if ( chi2DefToUse == 6 ) {
780 AmgSymMatrix(3) mCovTrk3D = dmat.transpose()*(*locError)*dmat;
785 res[4] =
log( dvec.transpose() * (poscov+mCovTrk3D).
inverse()
787 res[7] = duvec.transpose()*poscov*duvec;
788 res[8] = duvec.transpose()*mCovTrk3D*duvec;
791 if ( chi2DefToUse == 7 ) {
799 AmgSymMatrix(2) mCovVtx2D = dmat.transpose()*poscov*dmat;
801 mCovTrk2D(0,0) = (*locError)(
Trk::
d0,
Trk::
d0);
802 mCovTrk2D(0,1) = (*locError)(
Trk::
d0,
Trk::
z0);
803 mCovTrk2D(1,0) = (*locError)(
Trk::
d0,
Trk::
z0);
804 mCovTrk2D(1,1) = (*locError)(
Trk::
z0,
Trk::
z0);
808 res[4] =
log( dvec.transpose()*(mCovVtx2D+mCovTrk2D).
inverse()
810 res[7] = duvec.transpose()*mCovVtx2D*duvec;
811 res[8] = duvec.transpose()*mCovTrk2D*duvec;
824 " locError pointer is NULL!");
828 " trkPerigee pointer is NULL!");
831 }
else if ( chi2DefToUse == 2
832 || (chi2DefToUse > 7 && chi2DefToUse < 10 )) {
837 TVector3 SV_def(vtx->
x(), vtx->
y(), vtx->
z());
841 double px = (
track->p4() ).Px();
842 double py = (
track->p4() ).Py();
845 double d0Err2 =
track->definingParametersCovMatrixVec()[0];
847 double z0Err2 =
track->definingParametersCovMatrixVec()[2];
849 double d0z0Cov =
track->definingParametersCovMatrixVec()[1];
853 TVector3 SV = SV_def - trk_origin;
858 double d0toSV =
d0 + (SV[0]*upx + SV[1]*upy);
859 double d0toSVErr2 = upx*SV_cov(0, 0)*upx + 2*upx*SV_cov(1, 0)*upy
860 + upy*SV_cov(1, 1)*upy + d0Err2;
865 double z0corr = (SV[0]*upx + SV[1]*upy)*cot_theta;
866 double z0toSV =
z0 + z0corr - SV[2];
867 double z0toSVErr2 = SV_cov(2, 2) + z0Err2;
869 double docaSV = sqrt(
pow(d0toSV, 2) +
pow(z0toSV, 2) );
871 double chi2testSV(999.);
872 if ( chi2DefToUse == 2 ) {
873 if (d0toSVErr2 !=0 && z0toSVErr2 != 0)
874 chi2testSV =
log(
pow( d0toSV, 2)/d0toSVErr2
875 +
pow( z0toSV, 2)/z0toSVErr2);
877 res = {d0toSV, sqrt(d0toSVErr2), z0toSV, sqrt(z0toSVErr2),
878 chi2testSV, (doDCAin3D ? docaSV : d0toSV), 4,
881 if ( chi2DefToUse > 7 && chi2DefToUse < 10 ) {
883 if ( chi2DefToUse == 8 ) {
888 dmat(2,0) = -d0toSV*
cos(
phi);
889 dmat(2,1) = -d0toSV*
sin(
phi);
891 track->definingParametersCovMatrix();
892 AmgSymMatrix(3) mCovTrk3D = dmat.transpose()*mCovTrk5D*dmat;
897 double chi2testSV =
log( dvec.transpose()
900 double vtx3DErr2 = duvec.transpose()*poscov*duvec;
901 double trk3DErr2 = duvec.transpose()*mCovTrk3D*duvec;
903 res = {d0toSV, sqrt(d0Err2), z0toSV, sqrt(z0Err2),
904 chi2testSV, (doDCAin3D ? docaSV : d0toSV), 5,
905 vtx3DErr2, trk3DErr2,
phi};
907 if ( chi2DefToUse == 9 ) {
915 AmgSymMatrix(2) mCovVtx2D = dmat.transpose()*SV_cov*dmat;
917 mCovTrk2D(0,0) = d0Err2;
918 mCovTrk2D(0,1) = d0z0Cov;
919 mCovTrk2D(1,0) = d0z0Cov;
920 mCovTrk2D(1,1) = z0Err2;
924 chi2testSV =
log( dvec.transpose()*(mCovVtx2D+mCovTrk2D).
inverse()
926 double vtx2DErr2 = duvec.transpose()*mCovVtx2D*duvec;
927 double trk2DErr2 = duvec.transpose()*mCovTrk2D*duvec;
929 if ( vtx2DErr2 < 0. || trk2DErr2 < 0. ) {
931 "getTrackLogChi2DCA(): "
932 <<
"vtx2DErr2 = " << vtx2DErr2
933 <<
" trk2DErr2 = " << trk2DErr2
934 <<
" chi2testSV = " << chi2testSV);
944 <<
" z0toSV = " << z0toSV
946 <<
" docaSV = " << docaSV);
950 res = {d0toSV, sqrt(d0Err2), z0toSV, sqrt(z0Err2),
951 chi2testSV, (doDCAin3D ? docaSV : d0toSV), 6,
952 vtx2DErr2, trk2DErr2,
phi};
956 <<
" docaSV == 0 !");
960 }
else if ( chi2DefToUse > 2 && chi2DefToUse < 5 ) {
966 if (chi2DefToUse == 4) {
979 double z0toPV =
track->z0() +
track->vz() - vtx->
z();
980 double z0Err2 =
track->definingParametersCovMatrixVec()[2];
981 if (chi2DefToUse == 4) z0Err2+= vtx->covariancePosition()(2,2);
982 double z0sign = z0toPV / sqrt( z0Err2 );
985 res = {-999., -99., z0toPV, sqrt(z0Err2),
chi2, -100., 4, -99., -99.,
991 " track pointer is NULL!");
◆ initialize()
StatusCode DerivationFramework::BPhysVertexTrackBase::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 402 of file BPhysVertexTrackBase.cxx.
404 ATH_MSG_DEBUG(
"BPhysVertexTrackBase::initialize() -- begin");
421 <<
") and RefPVContainerNames ("
428 <<
") and BranchPrefixes ("
444 const std::string tvaWp =
456 m_mttc = std::make_unique<TrackTypeCounter>(*
this,
name());
◆ initializeHook()
StatusCode DerivationFramework::BPhysVertexTrackBase::initializeHook |
( |
| ) |
|
|
protectedvirtual |
◆ initPvAssocTypeVec()
void DerivationFramework::BPhysVertexTrackBase::initPvAssocTypeVec |
( |
| ) |
|
|
protectedvirtual |
◆ 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& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ 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()
◆ rttor()
uint64_t DerivationFramework::BPhysVertexTrackBase::rttor |
( |
const std::vector< uint64_t > & |
vtypes | ) |
|
|
static |
◆ selectTracks() [1/2]
Definition at line 1241 of file BPhysVertexTrackBase.cxx.
1254 <<
" " << exclTracks
1255 <<
" for decay candidate " << cand.
vtx()
1256 <<
"; candPV: " << candPV <<
" candRefPV: " << candRefPV);
1263 inpTracks->
begin(); trkItr != inpTracks->
end(); ++trkItr) {
1269 m_mttc->addToCounter(trackTypesForTrack, itt, bname,
"all");
1275 m_mttc->addToCounter(trackTypesForTrack, itt, bname,
"ats");
1283 if ( trackTypesForTrack == 0x0 ) {
1292 m_mttc->addToCounter(trackTypesForTrack, itt, bname,
"att");
1296 != exclTracks.end() )
continue;
1299 m_mttc->addToCounter(trackTypesForTrack, itt, bname,
"fin");
1302 tracks.push_back(
track);
◆ selectTracks() [2/2]
◆ 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.
◆ trackToString()
◆ ttall()
uint64_t DerivationFramework::BPhysVertexTrackBase::ttall |
( |
| ) |
|
|
static |
◆ ttallMin()
uint64_t DerivationFramework::BPhysVertexTrackBase::ttallMin |
( |
| ) |
|
|
static |
◆ ttb()
◆ tts()
◆ updateVHKA()
◆ wrapLines()
std::string DerivationFramework::BPhysVertexTrackBase::wrapLines |
( |
const std::string & |
lines, |
|
|
const std::string & |
prefix |
|
) |
| |
|
static |
◆ m_branchBaseName
std::string DerivationFramework::BPhysVertexTrackBase::m_branchBaseName |
|
protected |
◆ m_branchPrefixes
std::vector<std::string> DerivationFramework::BPhysVertexTrackBase::m_branchPrefixes |
|
protected |
◆ m_branchSuffix
std::string DerivationFramework::BPhysVertexTrackBase::m_branchSuffix |
|
protected |
◆ m_debugTracksInEvents
std::vector<uint64_t> DerivationFramework::BPhysVertexTrackBase::m_debugTracksInEvents |
|
protected |
◆ m_debugTracksInThisEvent
bool DerivationFramework::BPhysVertexTrackBase::m_debugTracksInThisEvent {} |
|
mutableprotected |
◆ m_debugTrackTypes
int DerivationFramework::BPhysVertexTrackBase::m_debugTrackTypes {} |
|
protected |
◆ m_detStore
◆ m_doVertexType
int DerivationFramework::BPhysVertexTrackBase::m_doVertexType {} |
|
protected |
◆ m_eventInfo
◆ m_evtNumber
uint64_t DerivationFramework::BPhysVertexTrackBase::m_evtNumber {} |
|
mutableprotected |
◆ m_evtStore
◆ m_incPrecVerticesInDecay
bool DerivationFramework::BPhysVertexTrackBase::m_incPrecVerticesInDecay {} |
|
protected |
◆ m_minNTracksInPV
int DerivationFramework::BPhysVertexTrackBase::m_minNTracksInPV {} |
|
protected |
◆ m_mttc
std::unique_ptr<TrackTypeCounter> DerivationFramework::BPhysVertexTrackBase::m_mttc |
|
protected |
◆ m_nEvtsSeen
unsigned int DerivationFramework::BPhysVertexTrackBase::m_nEvtsSeen {} |
|
mutableprotected |
◆ m_pvAssocResMap
StringIntMap_t DerivationFramework::BPhysVertexTrackBase::m_pvAssocResMap |
|
mutableprotected |
◆ m_pvAssocTypes
◆ m_pvContainerName
std::string DerivationFramework::BPhysVertexTrackBase::m_pvContainerName |
|
protected |
◆ m_pvtxContainer
◆ m_pvTypesToConsider
std::vector<uint64_t> DerivationFramework::BPhysVertexTrackBase::m_pvTypesToConsider |
|
protected |
◆ m_refPVAuxContainer
◆ m_refPVContainer
◆ m_refPVContainerNames
std::vector<std::string> DerivationFramework::BPhysVertexTrackBase::m_refPVContainerNames |
|
protected |
◆ m_runNumber
unsigned int DerivationFramework::BPhysVertexTrackBase::m_runNumber {} |
|
mutableprotected |
◆ m_svtxAuxContainer
◆ m_svtxContainer
◆ m_trackParticleContainerName
std::string DerivationFramework::BPhysVertexTrackBase::m_trackParticleContainerName |
|
protected |
◆ m_tracks
◆ m_tracksAux
◆ m_trackSelectionTools
ToolHandleArray<TrkSelTool> DerivationFramework::BPhysVertexTrackBase::m_trackSelectionTools |
|
protected |
◆ m_trackToVertexTool
◆ m_trackTypesUsed
uint64_t DerivationFramework::BPhysVertexTrackBase::m_trackTypesUsed {} |
|
protected |
◆ m_tvaTool
◆ m_tvaToolHasWpLoose
bool DerivationFramework::BPhysVertexTrackBase::m_tvaToolHasWpLoose {} |
|
protected |
◆ m_useTrackTypes
std::vector<uint64_t> DerivationFramework::BPhysVertexTrackBase::m_useTrackTypes |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vertexContainerNames
std::vector<std::string> DerivationFramework::BPhysVertexTrackBase::m_vertexContainerNames |
|
protected |
◆ m_vhka
◆ n_track_types
const int DerivationFramework::BPhysVertexTrackBase::n_track_types = 33 |
|
static |
◆ s_track_type_all_cached
uint64_t DerivationFramework::BPhysVertexTrackBase::s_track_type_all_cached = 0x0 |
|
staticprivate |
◆ track_type_bit
const uint64_t DerivationFramework::BPhysVertexTrackBase::track_type_bit |
|
static |
Initial value:=
{0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40,
0x80, 0x100, 0x200, 0x400,
0x800, 0x1000, 0x2000, 0x4000,
0x8000, 0x10000, 0x20000, 0x40000,
0x80000, 0x100000, 0x200000, 0x400000,
0x800000, 0x1000000, 0x2000000, 0x4000000,
0x8000000, 0x10000000, 0x20000000, 0x40000000,
0x80000000, 0x100000000}
Definition at line 125 of file BPhysVertexTrackBase.h.
◆ track_type_str
const std::string DerivationFramework::BPhysVertexTrackBase::track_type_str |
|
static |
Initial value:=
{"ASSOCPV", "PVTYPE0", "PVTYPE1", "PVTYPE2", "PVTYPE3", "NONE", "NULLVP",
"CAPVRFN3U0", "CAPVNRN3U0", "CAPVRF3DU0", "CAPVNR3DU0",
"CAPVRFN3U1", "CAPVNRN3U1", "CAPVRF3DU1", "CAPVNR3DU1",
"CAPVRFN3U2", "CAPVNRN3U2", "CAPVRF3DU2", "CAPVNR3DU2",
"CAPVRFNNU3", "CAPVNRNNU3", "CAPVRFNNU4", "CAPVNRNNU4",
"CAPVRFNNU5", "CAPVNRNNU5", "CAPVRFNNU6", "CAPVNRNNU6",
"CAPVRFNNU7", "CAPVNRNNU7", "CAPVRFNNU8", "CAPVNRNNU8",
"CAPVRFNNU9", "CAPVNRNNU9"}
Definition at line 124 of file BPhysVertexTrackBase.h.
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
float x() const
Returns the x position.
Const iterator class for DataVector/DataList.
int nMuons()
: Methods providing access to the linked muons
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Temporary container used until we have I/O for AuxStoreInternal.
static const std::string pv_type_str[]
Scalar phi() const
phi method
int nRefTrks()
Returns number of stored refitted track momenta.
std::string find(const std::string &s)
return a remapped string
uint64_t eventNumber() const
The current event's event number.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
StatusCode accept(const xAOD::Muon *mu)
Scalar theta() const
theta method
TrackParticleAuxContainer_v5 TrackParticleAuxContainer
Definition of the current TrackParticle auxiliary container.
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const xAOD::Muon * muon(const size_t index)
Returns pointer to the i-th linked muon.
bool msgLvl(const MSG::Level lvl) const
float beamPosSigmaX() const
The width of the beam spot in the X direction.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
const Amg::Vector3D & position() const
Returns the 3-pos.
bool const RAWDATA *ch2 const
std::vector< const xAOD::Muon * > MuonBag
#define AmgMatrix(rows, cols)
uint32_t runNumber() const
The current event's run number.
AmgSymMatrix(3) BPhysAddMuonBasedInvMass
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
pv_type
: Enum type of the PV
const xAOD::Vertex * precedingVertex(const size_t index)
Returns pointer to a preceding vertex.
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
std::pair< std::vector< unsigned int >, bool > res
T getProperty(const asg::IAsgTool *interface_tool, const std::string &prop_name)
double chi2(TH1 *h0, TH1 *h1)
#define CHECK(...)
Evaluate an expression and check for errors.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::vector< const xAOD::TrackParticle * > TrackBag
float z() const
Returns the z position.
const xAOD::Vertex * origPv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
original PV
const xAOD::IParticle * refTrkOrigin(const size_t index) const
: Returns the original track (charged or neutral) corresponding to the i-th refitted track
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
float beamPosSigmaY() const
The width of the beam spot in the Y direction.
Ensure that the ATLAS eigen extensions are properly loaded.
Definition of ATLAS Math & Geometry primitives (Amg)
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Eigen::Matrix< double, 3, 1 > Vector3D
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
float beamPosSigmaXY() const
The beam spot shape's X-Y correlation.
Class describing a Vertex.
TVector3 refTrk(const size_t index)
Returns i-th refitted track 3-momentum.
#define ATH_MSG_WARNING(x)
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
int nPrecedingVertices()
: Links to preceding vertices
float y() const
Returns the y position.
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
const std::vector< TVector3 > & refTrks()
Returns refitted track momenta.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
=============================================================================
static const unsigned int n_pv_types
Class describing a TrackParticle.
const std::vector< const xAOD::Muon * > & muons()
Returns linked muons.
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>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.