|
ATLAS Offline Software
|
#include <PhysicsTriggerVariablePlots.h>
|
| PhysicsTriggerVariablePlots (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~PhysicsTriggerVariablePlots () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
|
StatusCode | initializeHistograms () |
|
StatusCode | analyseTrackParticleObjects (const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="") |
|
StatusCode | computeAndStoreTrackVariables (const std::string &, const xAOD::Jet *, const std::string &, const xAOD::TrackParticle *, const xAOD::Vertex *, const std::string="") |
|
StatusCode | analyseBTaggingObject (const xAOD::Jet *, const std::string &, std::string="") |
|
template<typename T > |
StatusCode | defineHistogram (const std::string &, const std::string &, int, double, double, const std::string &path="") |
|
template<typename T > |
StatusCode | defineHistogram (const std::string &, const std::string &, int, double, double, int, double, double, const std::string &path="") |
|
template<typename T > |
StatusCode | fillHistogram (const std::string &, T) |
|
template<typename T , typename U > |
StatusCode | fillHistogram (const std::string &, T, U) |
|
template<class CONTAINER > |
StatusCode | retrieveCollectionfromStoreGate (const EventContext &, const CONTAINER *&, const SG::ReadHandleKey< CONTAINER > &) const |
|
bool | passJetKinematicSelection (const xAOD::Jet *) const |
|
bool | passTriggerJetKinematicSelection (const xAOD::Jet *) const |
|
bool | passJetQualitySelection (const xAOD::Jet *) const |
|
bool | passJetJVTSelection (const xAOD::Jet *, const std::string &jetType="AntiKt4EMTopoJets") const |
|
const xAOD::Vertex * | getPrimaryVertex (const xAOD::VertexContainer *) const |
|
int | getMatchedOfflineJetIndex (const xAOD::Jet *, std::vector< const xAOD::Jet * >) 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...
|
|
◆ StoreGateSvc_t
◆ HISTO
◆ PhysicsTriggerVariablePlots() [1/2]
FTAGValidation::PhysicsTriggerVariablePlots::PhysicsTriggerVariablePlots |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~PhysicsTriggerVariablePlots()
FTAGValidation::PhysicsTriggerVariablePlots::~PhysicsTriggerVariablePlots |
( |
| ) |
|
|
virtual |
◆ PhysicsTriggerVariablePlots() [2/2]
FTAGValidation::PhysicsTriggerVariablePlots::PhysicsTriggerVariablePlots |
( |
| ) |
|
|
private |
◆ analyseBTaggingObject()
StatusCode FTAGValidation::PhysicsVariablePlots::analyseBTaggingObject |
( |
const xAOD::Jet * |
jet, |
|
|
const std::string & |
flavour, |
|
|
std::string |
chain = "" |
|
) |
| |
|
protectedinherited |
Definition at line 410 of file PhysicsVariablePlots.cxx.
417 float jetEta =
jet->eta();
421 if ( !bTaggingObject ) {
422 ATH_MSG_ERROR(
"Could not retrieve b-tagging object from selected jet." );
423 return StatusCode::FAILURE;
435 bTaggingObject->
pb(
"IP2D",IP2D_pb );
436 bTaggingObject->
pc(
"IP2D",IP2D_pc );
442 ATH_MSG_DEBUG(
" ** IP2D [pu,pb,pc] = [" <<
IP2D_pu <<
"," << IP2D_pb <<
"," << IP2D_pc <<
"]" );
446 std::vector< float > IP2D_weightBOfTracks;
447 std::vector< float > IP2D_weightCOfTracks;
448 std::vector< float > IP2D_weightUOfTracks;
455 bTaggingObject->
variable<
int >(
"IP2D",
"nTrks", IP2D_nTrks );
456 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP2D_weightBOfTracks" ) )
457 IP2D_weightBOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP2D_weightBOfTracks" );
458 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP2D_weightCOfTracks" ) )
459 IP2D_weightCOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP2D_weightCOfTracks" );
460 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP2D_weightUOfTracks" ) )
461 IP2D_weightUOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP2D_weightUOfTracks" );
462 if ( bTaggingObject->
isAvailable< std::vector< int > >(
"IP2D_gradeOfTracks" ) )
477 for (
unsigned int i(0);
i < IP2D_weightBOfTracks.size();
i++ )
479 for (
unsigned int i(0);
i < IP2D_weightCOfTracks.size();
i++ )
481 for (
unsigned int i(0);
i < IP2D_weightUOfTracks.size();
i++ )
498 bTaggingObject->
pu(
"IP3D",IP3D_pu );
499 bTaggingObject->
pb(
"IP3D",IP3D_pb );
500 bTaggingObject->
pc(
"IP3D",IP3D_pc );
506 ATH_MSG_DEBUG(
" ** IP3D [pu,pb,pc] = [" << IP3D_pu <<
"," << IP3D_pb <<
"," << IP3D_pc <<
"]" );
509 std::vector< float > IP3D_weightBOfTracks;
510 std::vector< float > IP3D_weightCOfTracks;
511 std::vector< float > IP3D_weightUOfTracks;
513 std::vector< float > IP3D_D0wrtPVOfTracks;
514 std::vector< float > IP3D_sigD0wrtPVOfTracks;
515 std::vector< float > IP3D_Z0wrtPVOfTracks;
516 std::vector< float > IP3D_sigZ0wrtPVOfTracks;
518 bTaggingObject->
variable<
int >(
"IP3D",
"nTrks", IP3D_nTrks );
519 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_weightBOfTracks" ) )
520 IP3D_weightBOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_weightBOfTracks" );
521 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_weightCOfTracks" ) )
522 IP3D_weightCOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_weightCOfTracks" );
523 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_weightUOfTracks" ) )
524 IP3D_weightUOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_weightUOfTracks" );
525 if ( bTaggingObject->
isAvailable< std::vector< int > >(
"IP3D_gradeOfTracks" ) )
528 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_D0wrtPVOfTracks" ) )
529 IP3D_D0wrtPVOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_D0wrtPVOfTracks" );
530 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_Z0wrtPVOfTracks" ) )
531 IP3D_Z0wrtPVOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_Z0wrtPVOfTracks" );
532 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_sigD0wrtPVOfTracks" ) )
533 IP3D_sigD0wrtPVOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_sigD0wrtPVOfTracks" );
534 if ( bTaggingObject->
isAvailable< std::vector< float > >(
"IP3D_sigZ0wrtPVOfTracks" ) )
535 IP3D_sigZ0wrtPVOfTracks = bTaggingObject->
auxdata< std::vector< float > >(
"IP3D_sigZ0wrtPVOfTracks" );
537 ATH_MSG_DEBUG(
"Size IP3D_gradeOfTracks/_weightBOfTracks/_weightUOfTracks/_D0wrtPVOfTracks/_sigD0wrtPVOfTracks/_Z0wrtPVOfTracks/_sigZ0wrtPVOfTracks: " <<
IP3D_gradeOfTracks.size() <<
", "<< IP3D_weightBOfTracks.size() <<
", " << IP3D_weightUOfTracks.size() <<
", " << IP3D_D0wrtPVOfTracks.size() <<
", " << IP3D_sigD0wrtPVOfTracks.size() <<
", " << IP3D_Z0wrtPVOfTracks.size() <<
", " << IP3D_sigZ0wrtPVOfTracks.size() );
541 for (
unsigned int i(0);
i < IP3D_weightBOfTracks.size();
i++ )
543 for (
unsigned int i(0);
i < IP3D_weightCOfTracks.size();
i++ )
545 for (
unsigned int i(0);
i < IP3D_weightUOfTracks.size();
i++ )
547 for (
unsigned int i(0);
i < IP3D_D0wrtPVOfTracks.size();
i++ )
549 for (
unsigned int i(0);
i < IP3D_sigD0wrtPVOfTracks.size();
i++ )
551 for (
unsigned int i(0);
i < IP3D_Z0wrtPVOfTracks.size();
i++ )
553 for (
unsigned int i(0);
i < IP3D_sigZ0wrtPVOfTracks.size();
i++ )
562 bTaggingObject->
pu(
"SV1",SV1_pu );
563 bTaggingObject->
pb(
"SV1",SV1_pb );
564 bTaggingObject->
pc(
"SV1",SV1_pc );
570 ATH_MSG_DEBUG(
" ** SV1 [pu,pb,pc] = [" << SV1_pu <<
"," << SV1_pb <<
"," << SV1_pc <<
"]" );
574 float SV1_deltaR = -1;
576 float SV1_significance3d = -1;
577 float SV1_energyTrkInJet = -1;
583 bTaggingObject->
variable<
float >(
"SV1",
"deltaR", SV1_deltaR );
585 bTaggingObject->
variable<
float >(
"SV1",
"significance3d", SV1_significance3d );
586 bTaggingObject->
variable<
float >(
"SV1",
"energyTrkInJet", SV1_energyTrkInJet );
588 bTaggingObject->
variable<
float >(
"SV1",
"Lxy", SV1_Lxy );
650 double RNNIP_pu = -1;
651 double RNNIP_pb = -1;
652 double RNNIP_pc = -1;
653 double RNNIP_LLR = -1;
654 bTaggingObject->
pu(
"rnnip",RNNIP_pu );
655 bTaggingObject->
pb(
"rnnip",RNNIP_pb );
656 bTaggingObject->
pc(
"rnnip",RNNIP_pc );
663 ATH_MSG_DEBUG(
" ** RNNIP [pu,pb,pc] = [" << RNNIP_pu <<
"," << RNNIP_pb <<
"," << RNNIP_pc <<
"]" );
669 bTaggingObject->
pu(
"DL1",DL1_pu );
670 bTaggingObject->
pb(
"DL1",DL1_pb );
671 bTaggingObject->
pc(
"DL1",DL1_pc );
680 bTaggingObject->
pu(
"DL1r",DL1r_pu );
681 bTaggingObject->
pb(
"DL1r",DL1r_pb );
682 bTaggingObject->
pc(
"DL1r",DL1r_pc );
684 if ( DL1r_pu == -1 &&
687 bTaggingObject->
pu(
"DL1rnn",DL1r_pu );
688 bTaggingObject->
pb(
"DL1rnn",DL1r_pb );
689 bTaggingObject->
pc(
"DL1rnn",DL1r_pc );
692 float cFraction = 0.03;
694 if ( DL1r_pu != -1 && DL1r_pb != -1 && DL1r_pc != -1 )
695 DL1r =
log( DL1r_pb / ( DL1r_pu * ( 1 - cFraction ) + DL1r_pc * cFraction ) );
697 float bFraction = 0.03;
699 if ( DL1r_pu != -1 && DL1r_pb != -1 && DL1r_pc != -1 )
700 DL1rc =
log( DL1r_pb / ( DL1r_pu * ( 1 - bFraction ) + DL1r_pc * bFraction ) );
708 ATH_MSG_DEBUG(
" ** DL1r [pu,pb,pc] = [" << DL1r_pu <<
"," << DL1r_pb <<
"," << DL1r_pc <<
"]" );
711 double mv2c10_discriminant = -2;
717 return StatusCode::SUCCESS;
◆ analyseTrackParticleObjects()
StatusCode FTAGValidation::PhysicsVariablePlots::analyseTrackParticleObjects |
( |
const xAOD::Jet * |
jet, |
|
|
const xAOD::Vertex * |
primaryVertex, |
|
|
const std::string & |
flavour, |
|
|
std::string |
chain = "" |
|
) |
| |
|
protectedinherited |
Definition at line 250 of file PhysicsVariablePlots.cxx.
286 if ( !bTaggingObject ) {
287 ATH_MSG_ERROR(
"Could not retrieve b-tagging object from selected jet." );
288 return StatusCode::FAILURE;
292 ATH_MSG_ERROR(
"Cannot retrieve 'BTagTrackToJetAssociator' auxdata from b-tagging object!" );
293 return StatusCode::FAILURE;
296 std::vector< ElementLink< xAOD::TrackParticleContainer > > assocTracks = bTaggingObject->
auxdata< std::vector< ElementLink<xAOD::TrackParticleContainer > > >(
"BTagTrackToJetAssociator");
298 ATH_MSG_DEBUG(
" ** nBTagTracksInJet: " << assocTracks.size() );
301 if ( not trackEL.isValid() )
continue;
307 primaryVertex,
chain ) );
312 return StatusCode::SUCCESS;
◆ computeAndStoreTrackVariables()
Definition at line 315 of file PhysicsVariablePlots.cxx.
319 std::string flavour =
jetType + trackType;
322 float jet_pt =
jet->pt();
323 float jet_eta =
jet->eta();
327 float track_pt = trackParticle->
pt();
328 float fracEt = track_pt / jet_pt;
333 float track_eta = trackParticle->
eta();
334 float track_phi = trackParticle->
phi();
336 float deltaEta = fabs( jet_eta - track_eta );
343 float d0 = trackParticle->
d0();
345 float z0 = trackParticle->
z0() + trackParticle->
vz() - primaryVertex->
z();
354 ATH_MSG_DEBUG(
" ** d0 +/- err [significance] = " <<
d0 <<
" +/- " << sigmad0 <<
" [ " <<
d0/sigmad0 <<
" ]" );
355 ATH_MSG_DEBUG(
" ** z0 +/- err [significance] = " <<
z0 <<
" +/- " << sigmaz0 <<
" [ " <<
z0/sigmaz0 <<
" ]" );
357 if (trackType ==
"bTag" || trackType ==
"") {
361 float d0_signed_sig =
accessor.getSignedIp(*trackParticle, *
jet).ip3d_signed_d0_significance;
362 float z0_signed_sig =
accessor.getSignedIp(*trackParticle, *
jet).ip3d_signed_z0_significance;
407 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ defineHistogram() [1/2]
template<typename T >
StatusCode FTAGValidation::PhysicsVariablePlots::defineHistogram |
( |
const std::string & |
, |
|
|
const std::string & |
, |
|
|
int |
, |
|
|
double |
, |
|
|
double |
, |
|
|
const std::string & |
path = "" |
|
) |
| |
|
protectedinherited |
◆ defineHistogram() [2/2]
template<typename T >
StatusCode FTAGValidation::PhysicsVariablePlots::defineHistogram |
( |
const std::string & |
, |
|
|
const std::string & |
, |
|
|
int |
, |
|
|
double |
, |
|
|
double |
, |
|
|
int |
, |
|
|
double |
, |
|
|
double |
, |
|
|
const std::string & |
path = "" |
|
) |
| |
|
protectedinherited |
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode FTAGValidation::PhysicsTriggerVariablePlots::execute |
( |
| ) |
|
|
overridevirtual |
Reimplemented from FTAGValidation::PhysicsVariablePlots.
Definition at line 59 of file PhysicsTriggerVariablePlots.cxx.
63 const EventContext context = getContext();
78 std::vector< const xAOD::Jet* > qualityOfflineJetCollection;
84 qualityOfflineJetCollection.push_back(
jet );
102 if ( primaryVertex ==
nullptr ) {
103 ATH_MSG_WARNING(
"Could not retrieve Primary Vertex. Skip this event!" );
105 return StatusCode::SUCCESS;
119 int nJetsWithMuon = 0;
124 int n_qualityJets = 0;
125 for(
const auto& jetLinkInfo : onlineJets ) {
141 std::vector< ElementLink< xAOD::VertexContainer > > SV1_vertex = bTag->
auxdata<std::vector< ElementLink< xAOD::VertexContainer > > >(
"SV1_vertices");
142 if(SV1_vertex.size() >= 1) nJetsWithSV++;
159 std::string flavour =
"DATA_";
160 if( eventInfo->
eventType(xAOD::EventInfo::EventType::IS_SIMULATION) ) {
162 if( offlineJetIndex == -1 ) {
163 ATH_MSG_WARNING(
"Could not match online jet to an offline jet. Skipping Event.");
167 const xAOD::Jet *matchedOfflineJet = qualityOfflineJetCollection.at(offlineJetIndex);
169 if( matchedOfflineJet->
isAvailable<
int >(
"HadronConeExclTruthLabelID" ) ==
false ) {
170 ATH_MSG_ERROR(
"Input sample is MC but matched offline jet has no 'HadronConeExclTruthLabelID' aux data. Something is wrong!" );
171 return StatusCode::FAILURE;
173 int HadronConeExclTruthLabelID = matchedOfflineJet->
auxdata<
int >(
"HadronConeExclTruthLabelID");
174 ATH_MSG_DEBUG(
" ** 'HadronConeExclTruthLabelID' is " << HadronConeExclTruthLabelID );
176 if( HadronConeExclTruthLabelID == 0 ) flavour =
"U_";
177 else if( HadronConeExclTruthLabelID == 4 ) flavour =
"C_";
178 else if( HadronConeExclTruthLabelID == 5 ) flavour =
"B_";
192 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ fillHistogram() [1/2]
template<typename T >
StatusCode FTAGValidation::PhysicsVariablePlots::fillHistogram |
( |
const std::string & |
, |
|
|
T |
|
|
) |
| |
|
protectedinherited |
◆ fillHistogram() [2/2]
template<typename T , typename U >
StatusCode FTAGValidation::PhysicsVariablePlots::fillHistogram |
( |
const std::string & |
, |
|
|
T |
, |
|
|
U |
|
|
) |
| |
|
protectedinherited |
◆ finalize()
StatusCode FTAGValidation::PhysicsTriggerVariablePlots::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getMatchedOfflineJetIndex()
int FTAGValidation::FTAGValidationAlgorithm::getMatchedOfflineJetIndex |
( |
const xAOD::Jet * |
onJet, |
|
|
std::vector< const xAOD::Jet * > |
offJets |
|
) |
| const |
|
protectedinherited |
Definition at line 143 of file FTAGValidationAlgorithm.cxx.
144 int matchedOffJetIndex = -1;
147 TLorentzVector onJet_4vec, offJet_4vec;
148 onJet_4vec.SetPtEtaPhiM(onJet->
pt(), onJet->
eta(), onJet->
phi(), onJet->
m());
153 offJet_4vec.SetPtEtaPhiM(offJet->
pt(), offJet->
eta(), offJet->
phi(), offJet->
m());
154 double deltaR = onJet_4vec.DeltaR( offJet_4vec );
157 if (
deltaR > 0.1 )
continue;
158 if (
deltaR < minDr || matchedOffJetIndex == -1 ) {
160 matchedOffJetIndex =
index;
164 ATH_MSG_DEBUG(
"matchedOffJetIndex: " << matchedOffJetIndex );
165 return matchedOffJetIndex;
◆ getPrimaryVertex()
Definition at line 125 of file FTAGValidationAlgorithm.cxx.
127 if ( vertexContainer->
size() == 0 ) {
128 ATH_MSG_WARNING(
"Vertex Container has size 0! This can't be right!" );
132 for (
unsigned int i(0);
i<vertexContainer->
size();
i++ ) {
138 ATH_MSG_DEBUG(
"None of the vertexes in the vertex container is a primary vertex!" );
140 return vertexContainer->
at(0);
◆ initialize()
StatusCode FTAGValidation::PhysicsTriggerVariablePlots::initialize |
( |
| ) |
|
|
overridevirtual |
◆ initializeHistograms()
StatusCode FTAGValidation::PhysicsVariablePlots::initializeHistograms |
( |
| ) |
|
|
protectedinherited |
Definition at line 179 of file PhysicsVariablePlots.cxx.
187 ATH_CHECK( defineHistogram< TH1I >( definitions.at( HISTO::NAME ),
188 definitions.at( HISTO::TITLE ),
189 std::stoi( definitions.at( HISTO::XBINS ) ),
190 std::stoi( definitions.at( HISTO::XMIN ) ),
191 std::stoi( definitions.at( HISTO::XMAX ) ),
193 else if ( definitions.at(
HISTO::TYPE ) ==
"TH1F" )
194 ATH_CHECK( defineHistogram< TH1F >( definitions.at( HISTO::NAME ),
195 definitions.at( HISTO::TITLE ),
196 std::stoi( definitions.at( HISTO::XBINS ) ),
197 std::stof( definitions.at( HISTO::XMIN ) ),
198 std::stof( definitions.at( HISTO::XMAX ) ),
200 else if ( definitions.at(
HISTO::TYPE ) ==
"TH1D" )
201 ATH_CHECK( defineHistogram< TH1D >( definitions.at( HISTO::NAME ),
202 definitions.at( HISTO::TITLE ),
203 std::stoi( definitions.at( HISTO::XBINS ) ),
204 std::stof( definitions.at( HISTO::XMIN ) ),
205 std::stof( definitions.at( HISTO::XMAX ) ),
215 ATH_CHECK( defineHistogram< TH2I >( definitions.at( HISTO::NAME ),
216 definitions.at( HISTO::TITLE ),
217 std::stoi( definitions.at( HISTO::XBINS ) ),
218 std::stoi( definitions.at( HISTO::XMIN ) ),
219 std::stoi( definitions.at( HISTO::XMAX ) ),
220 std::stoi( definitions.at( HISTO::YBINS ) ),
221 std::stoi( definitions.at( HISTO::YMIN ) ),
222 std::stoi( definitions.at( HISTO::YMAX ) ),
224 else if ( definitions.at(
HISTO::TYPE ) ==
"TH2F" )
225 ATH_CHECK( defineHistogram< TH2F >( definitions.at( HISTO::NAME ),
226 definitions.at( HISTO::TITLE ),
227 std::stoi( definitions.at( HISTO::XBINS ) ),
228 std::stof( definitions.at( HISTO::XMIN ) ),
229 std::stof( definitions.at( HISTO::XMAX ) ),
230 std::stoi( definitions.at( HISTO::YBINS ) ),
231 std::stof( definitions.at( HISTO::YMIN ) ),
232 std::stof( definitions.at( HISTO::YMAX ) ),
234 else if ( definitions.at(
HISTO::TYPE ) ==
"TH2D" )
235 ATH_CHECK( defineHistogram< TH2D >( definitions.at( HISTO::NAME ),
236 definitions.at( HISTO::TITLE ),
237 std::stoi( definitions.at( HISTO::XBINS ) ),
238 std::stof( definitions.at( HISTO::XMIN ) ),
239 std::stof( definitions.at( HISTO::XMAX ) ),
240 std::stoi( definitions.at( HISTO::YBINS ) ),
241 std::stof( definitions.at( HISTO::YMIN ) ),
242 std::stof( definitions.at( HISTO::YMAX ) ),
247 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.
◆ 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.
◆ passJetJVTSelection()
bool FTAGValidation::FTAGValidationAlgorithm::passJetJVTSelection |
( |
const xAOD::Jet * |
jet, |
|
|
const std::string & |
jetType = "AntiKt4EMTopoJets" |
|
) |
| const |
|
protectedinherited |
Definition at line 102 of file FTAGValidationAlgorithm.cxx.
105 if (
jet->isAvailable<
float >(
"Jvt" ) ==
false ) {
110 float jvt =
jet->auxdata<
float >(
"Jvt" );
111 double jvtCut = 0.59;
112 if (
jetType ==
"AntiKt4EMPFlowJets" )
117 if ( fabs(
jet->eta() ) >= 2.4 )
◆ passJetKinematicSelection()
bool FTAGValidation::FTAGValidationAlgorithm::passJetKinematicSelection |
( |
const xAOD::Jet * |
jet | ) |
const |
|
protectedinherited |
◆ passJetQualitySelection()
bool FTAGValidation::FTAGValidationAlgorithm::passJetQualitySelection |
( |
const xAOD::Jet * |
jet | ) |
const |
|
protectedinherited |
Definition at line 38 of file FTAGValidationAlgorithm.cxx.
44 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::LArQuality' is not available." );
50 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::Timing' is not available." );
56 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::HECQuality' is not available." );
62 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::NegativeE' is not available." );
66 std::vector< float > SumPtTrkPt1000;
68 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::SumPtTrkPt1000' is not available." );
71 float chf = SumPtTrkPt1000.size() > 0 ? SumPtTrkPt1000.at(0)/
jet->pt() : -1;
75 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::EMFrac' is not available." );
81 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::HECFrac' is not available." );
85 float fracSamplingMax = 0;
87 ATH_MSG_ERROR(
"JetAttribute 'xAOD::JetAttribute::FracSamplingMax' is not available." );
91 if ( hecf > 0.5 && fabs( hecq ) > 0.5 )
return false;
93 if ( emf > 0.95 && fabs( jetQuality ) > 0.8 && fabs(
jet->eta() ) < 2.8 )
return false;
94 if ( fabs( jetTime ) > 25 )
return false;
95 if ( emf < 0.05 && chf < 0.05 && fabs(
jet->eta() ) < 2 )
return false;
96 if ( emf< 0.05 && fabs(
jet->eta() ) >= 2 )
return false;
97 if ( fracSamplingMax > 0.99 && fabs(
jet->eta() ) < 2 )
return false;
◆ passTriggerJetKinematicSelection()
bool FTAGValidation::FTAGValidationAlgorithm::passTriggerJetKinematicSelection |
( |
const xAOD::Jet * |
jet | ) |
const |
|
protectedinherited |
◆ renounce()
◆ renounceArray()
◆ retrieveCollectionfromStoreGate()
template<class CONTAINER >
StatusCode FTAGValidation::FTAGValidationAlgorithm::retrieveCollectionfromStoreGate |
( |
const EventContext & |
, |
|
|
const CONTAINER *& |
, |
|
|
const SG::ReadHandleKey< CONTAINER > & |
|
|
) |
| const |
|
protectedinherited |
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_bJetChains
std::vector<std::string> FTAGValidation::PhysicsTriggerVariablePlots::m_bJetChains |
|
private |
◆ m_detStore
◆ m_eventInfoKey
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_Histograms1D
std::map< const std::string,TH1* > FTAGValidation::PhysicsVariablePlots::m_Histograms1D |
|
privateinherited |
◆ m_Histograms1Ddefinitions
Gaudi::Property< std::vector< std::vector< std::string > > > FTAGValidation::PhysicsVariablePlots::m_Histograms1Ddefinitions |
|
privateinherited |
Initial value:{ this,"Histograms1D",{},
"Map with 1D histograms" }
Definition at line 78 of file PhysicsVariablePlots.h.
◆ m_Histograms2D
std::map< const std::string,TH2* > FTAGValidation::PhysicsVariablePlots::m_Histograms2D |
|
privateinherited |
◆ m_Histograms2Ddefinitions
Gaudi::Property< std::vector< std::vector< std::string > > > FTAGValidation::PhysicsVariablePlots::m_Histograms2Ddefinitions |
|
privateinherited |
Initial value:{ this,"Histograms2D",{},
"Map with 1D histograms" }
Definition at line 80 of file PhysicsVariablePlots.h.
◆ m_histSvc
ServiceHandle< ITHistSvc > FTAGValidation::PhysicsVariablePlots::m_histSvc { this, "THistSvc", "", "Histogramming svc" } |
|
privateinherited |
◆ m_jetKey
Initial value:{ this, "JetCollectionKey", "",
"Input Jet collection name" }
Definition at line 68 of file PhysicsVariablePlots.h.
◆ m_maxJetEta
Gaudi::Property< float > FTAGValidation::FTAGValidationAlgorithm::m_maxJetEta |
|
protectedinherited |
◆ m_maxTrigJetEta
Gaudi::Property< float > FTAGValidation::FTAGValidationAlgorithm::m_maxTrigJetEta |
|
protectedinherited |
Initial value:{ this,"MaxTrigJetEta",2.5,
"Maximum Trigger Eta range for jets"}
Definition at line 59 of file FTAGValidationAlgorithm.h.
◆ m_minJetEta
Gaudi::Property< float > FTAGValidation::FTAGValidationAlgorithm::m_minJetEta |
|
protectedinherited |
◆ m_minJetPt
Gaudi::Property< float > FTAGValidation::FTAGValidationAlgorithm::m_minJetPt |
|
protectedinherited |
◆ m_minTrigJetPt
Gaudi::Property< float > FTAGValidation::FTAGValidationAlgorithm::m_minTrigJetPt |
|
protectedinherited |
◆ m_nTotal_events
int FTAGValidation::PhysicsTriggerVariablePlots::m_nTotal_events |
|
private |
◆ m_nTotal_noMatchedOffJet
int FTAGValidation::PhysicsTriggerVariablePlots::m_nTotal_noMatchedOffJet |
|
private |
◆ m_nTotal_noPV
int FTAGValidation::PhysicsTriggerVariablePlots::m_nTotal_noPV |
|
private |
◆ m_nTotal_otherFlavour
int FTAGValidation::PhysicsTriggerVariablePlots::m_nTotal_otherFlavour |
|
private |
◆ m_nTotal_qualityOnlineJets
int FTAGValidation::PhysicsTriggerVariablePlots::m_nTotal_qualityOnlineJets |
|
private |
◆ m_offJetKey
◆ m_trackKey
Initial value:{ this, "TrackParticleCollectionKey", "",
"Input Track collection name" }
Definition at line 72 of file PhysicsVariablePlots.h.
◆ m_trigDec
◆ m_trigTrackKey
◆ m_trigVertexKey
◆ m_varHandleArraysDeclared
◆ m_vertexKey
Initial value:{ this, "VertexCollectionKey", "",
"Input Vertex collection name" }
Definition at line 70 of file PhysicsVariablePlots.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.
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
bool passTriggerJetKinematicSelection(const xAOD::Jet *) const
float x() const
Returns the x position.
Gaudi::Property< float > m_minJetEta
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms2Ddefinitions
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Gaudi::Property< float > m_minTrigJetPt
StatusCode analyseTrackParticleObjects(const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="")
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
StatusCode analyseBTaggingObject(const xAOD::Jet *, const std::string &, std::string="")
int m_nTotal_otherFlavour
StatusCode retrieveCollectionfromStoreGate(const EventContext &, const CONTAINER *&, const SG::ReadHandleKey< CONTAINER > &) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
bool loglikelihoodratio(const std::string &taggername, double &value, const std::string &signal="pb", const std::string &bckgd="pu") const
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
@ JetFitter_nSingleTracks
JetFitter : Number of single tracks.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
float vz() const
The z origin for the parameters.
float z0() const
Returns the parameter.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual double phi() const
The azimuthal angle ( ) of the particle.
@ SV1_N2Tpair
SV1 : Number of 2-track pairs.
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ IP2D_gradeOfTracks
IP2D: track grade.
StatusCode initializeHistograms()
SG::ReadHandleKey< xAOD::VertexContainer > m_trigVertexKey
bool isValid() const
Test to see if the link can be dereferenced.
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
@ numberOfBLayerSplitHits
number of Pixel b-layer hits split by cluster splitting [unit8_t].
float d0() const
Returns the parameter.
SG::ReadHandleKey< xAOD::JetContainer > m_offJetKey
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
@ JetFitter_energyFraction
JetFitter : Jet efrac.
@ JetFitter_nVTX
JetFitter : Number of vertices.
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
virtual StatusCode sysInitialize() override
Override sysInitialize.
int m_nTotal_qualityOnlineJets
bool pc(const std::string &taggername, double &value) const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
ToolHandle< Trig::TrigDecisionTool > m_trigDec
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms1Ddefinitions
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
@ IP3D_gradeOfTracks
IP3D: track grade.
Gaudi::Property< float > m_maxTrigJetEta
@ JetFitter_mass
JetFitter : Jet mass.
@ JetFitter_nTracksAtVtx
JetFitter : Number of tracks at vertex.
#define CHECK(...)
Evaluate an expression and check for errors.
@ SV1_efracsvx
SV1 : energy fraction.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float z() const
Returns the z position.
Gaudi::Property< float > m_minJetPt
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
@ numberOfPixelSplitHits
number of Pixel all-layer hits split by cluster splitting [unit8_t].
StatusCode computeAndStoreTrackVariables(const std::string &, const xAOD::Jet *, const std::string &, const xAOD::TrackParticle *, const xAOD::Vertex *, const std::string="")
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
@ numberOfSCTHoles
number of SCT holes [unit8_t].
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual double eta() const
The pseudorapidity ( ) of the particle.
Accessor< T, ALLOC >::reference_type auxdata(const std::string &name)
Fetch an aux data variable, as a non-const reference.
@ JetFitter_significance3d
JetFitter : 3D vertex significance.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ JetFitter_N2Tpair
JetFitter : Number of 2-track pairs.
#define TYPE(CODE, TYP, IOTYP)
bool pu(const std::string &taggername, double &value) const
@ SV1_NGTinSvx
SV1 : Number of good tracks in vertex.
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if an aux variable is available for reading.
float IP3D_loglikelihoodratio() const
get IP3D log likelihood ratio
@ numberOfBLayerSharedHits
number of Pixel b-layer hits shared by several tracks [unit8_t].
bool nSCTHits(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
int m_nTotal_noMatchedOffJet
bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Class describing the basic event information.
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
DataObjIDColl m_extendedExtraObjects
virtual double m() const
The invariant mass of the particle.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
float y() const
Returns the y position.
T & auxdata(const std::string &name, const std::string &clsname="")
Fetch an aux data variable, as a non-const reference.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< std::string > m_bJetChains
@ numberOfSCTHits
number of hits in SCT [unit8_t].
bool variable(const std::string &taggername, const std::string &variablename, T &value) const
get variables by string
Class describing a TrackParticle.
const T * at(size_type n) const
Access an element, as an rvalue.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trigTrackKey
Gaudi::Property< float > m_maxJetEta
virtual double pt() const
The transverse momentum ( ) of the particle.
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>
StatusCode fillHistogram(const std::string &, T)
virtual StatusCode initialize()
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer *) const
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
bool eventType(EventType type) const
Check for one particular bitmask value.
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ SV1_masssvx
SV1 : vertex mass.
bool MVx_discriminant(const std::string &taggername, double &value) const
bool pb(const std::string &taggername, double &value) const
int getMatchedOfflineJetIndex(const xAOD::Jet *, std::vector< const xAOD::Jet * >) const