18 ISvcLocator* pSvcLocator ) :
56 return StatusCode::SUCCESS;
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 ) {
133 ATH_MSG_DEBUG(
" ** pt=" <<
jet->p4().Et() / Gaudi::Units::GeV <<
" eta=" <<
jet->eta() <<
" phi=" <<
jet->phi() );
142 std::vector< ElementLink< xAOD::VertexContainer > > SV1_vertex = SV1_verticesAcc(*bTag);
143 if(SV1_vertex.size() >= 1) nJetsWithSV++;
161 std::string flavour =
"DATA_";
164 if( offlineJetIndex == -1 ) {
165 ATH_MSG_WARNING(
"Could not match online jet to an offline jet. Skipping Event.");
169 const xAOD::Jet *matchedOfflineJet = qualityOfflineJetCollection.at(offlineJetIndex);
172 if( HadronConeExclTruthLabelIDAcc.
isAvailable( *matchedOfflineJet ) ==
false ) {
173 ATH_MSG_ERROR(
"Input sample is MC but matched offline jet has no 'HadronConeExclTruthLabelID' aux data. Something is wrong!" );
174 return StatusCode::FAILURE;
176 int HadronConeExclTruthLabelID = HadronConeExclTruthLabelIDAcc( *matchedOfflineJet );
177 ATH_MSG_DEBUG(
" ** 'HadronConeExclTruthLabelID' is " << HadronConeExclTruthLabelID );
179 if( HadronConeExclTruthLabelID == 0 ) flavour =
"U_";
180 else if( HadronConeExclTruthLabelID == 4 ) flavour =
"C_";
181 else if( HadronConeExclTruthLabelID == 5 ) flavour =
"B_";
195 return StatusCode::SUCCESS;
204 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
size_type size() const noexcept
Returns the number of elements in the collection.
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
bool passTriggerJetKinematicSelection(const xAOD::Jet *) const
StatusCode retrieveCollectionfromStoreGate(const EventContext &, const CONTAINER *&, const SG::ReadHandleKey< CONTAINER > &) const
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer *) const
int getMatchedOfflineJetIndex(const xAOD::Jet *, const std::vector< const xAOD::Jet * > &) const
Gaudi::Property< float > m_minJetEta
virtual StatusCode initialize()
Gaudi::Property< float > m_maxJetEta
Gaudi::Property< float > m_minJetPt
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual StatusCode initialize() override
ToolHandle< Trig::TrigDecisionTool > m_trigDec
std::vector< std::string > m_bJetChains
PhysicsTriggerVariablePlots()
int m_nTotal_qualityOnlineJets
SG::ReadHandleKey< xAOD::VertexContainer > m_trigVertexKey
virtual StatusCode execute() override
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trigTrackKey
int m_nTotal_otherFlavour
SG::ReadHandleKey< xAOD::JetContainer > m_offJetKey
virtual ~PhysicsTriggerVariablePlots()
virtual StatusCode finalize() override
int m_nTotal_noMatchedOffJet
StatusCode analyseBTaggingObject(const xAOD::Jet *, const std::string &, std::string="")
StatusCode fillHistogram(const std::string &, T)
StatusCode initializeHistograms()
StatusCode analyseTrackParticleObjects(const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="")
PhysicsVariablePlots(const std::string &name, ISvcLocator *pSvcLocator)
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
bool eventType(EventType type) const
Check for one particular bitmask value.
@ IS_SIMULATION
true: simulation, false: data
float z() const
Returns the z position.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
float y() const
Returns the y position.
float x() const
Returns the x position.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
static const unsigned int Physics
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
BTagging_v1 BTagging
Definition of the current "BTagging version".
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Helper for azimuthal angle calculations.