|
ATLAS Offline Software
|
Go to the documentation of this file.
18 ISvcLocator* pSvcLocator ) :
22 declareProperty(
"bJetChains", m_bJetChains);
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 ) {
142 std::vector< ElementLink< xAOD::VertexContainer > > SV1_vertex = SV1_verticesAcc(*bTag);
143 if(SV1_vertex.size() >= 1) nJetsWithSV++;
161 std::string flavour =
"DATA_";
162 if( eventInfo->
eventType(xAOD::EventInfo::EventType::IS_SIMULATION) ) {
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;
virtual ~PhysicsTriggerVariablePlots()
bool passTriggerJetKinematicSelection(const xAOD::Jet *) const
float x() const
Returns the x position.
Gaudi::Property< float > m_minJetEta
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
StatusCode analyseTrackParticleObjects(const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="")
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
virtual StatusCode initialize() override
virtual StatusCode execute() override
virtual StatusCode finalize() override
Helper class to provide constant type-safe access to aux data.
StatusCode initializeHistograms()
SG::ReadHandleKey< xAOD::VertexContainer > m_trigVertexKey
bool isValid() const
Test to see if the link can be dereferenced.
SG::ReadHandleKey< xAOD::JetContainer > m_offJetKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
int m_nTotal_qualityOnlineJets
ToolHandle< Trig::TrigDecisionTool > m_trigDec
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
PhysicsTriggerVariablePlots()
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.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
int getMatchedOfflineJetIndex(const xAOD::Jet *, const std::vector< const xAOD::Jet * > &) const
Helper for azimuthal angle calculations.
int m_nTotal_noMatchedOffJet
Class describing the basic event information.
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
float y() const
Returns the y position.
std::vector< std::string > m_bJetChains
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trigTrackKey
Gaudi::Property< float > m_maxJetEta
size_type size() const noexcept
Returns the number of elements in the collection.
StatusCode fillHistogram(const std::string &, T)
virtual StatusCode initialize()
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer *) const
bool eventType(EventType type) const
Check for one particular bitmask value.