![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/IToolSvc.h"
40 const std::string&
name,
41 const IInterface*
parent ) :
43 m_muonAugmenter(
"Muons"),
45 m_antiKt4EMTopoPlots (0,
"BTag/AntiKt4EMTopoJets/" ,
"antiKt4EMTopoJets"),
46 m_antiKt4EMPFlowJetsPlots (0,
"BTag/AntiKt4EMPFlowJets/" ,
"antiKt4EMPFlowJets"),
47 m_antiKt10UFOCSSKSoftDropBeta100Zcut10Jets (0,
"BTag/AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets/",
"antiKt10UFOCSSKSoftDropBeta100Zcut10Jets"),
48 m_antiKtVR30Rmax4Rmin02PV0TrackJetsPlots (0,
"BTag/AntiKtVR30Rmax4Rmin02PV0TrackJets/",
"antiKtVR30Rmax4Rmin02PV0TrackJets"),
116 return StatusCode::SUCCESS;
122 std::vector<HistData>
hists =
plots.retrieveBookedHistograms();
128 return StatusCode::SUCCESS;
141 return StatusCode::SUCCESS;
160 int dsid =
event->mcChannelNumber();
163 if(
dsid == 410000 ||
dsid == 601229){
166 else if(
dsid == 427080 ||
dsid == 427081 ||
dsid == 801271 ||
dsid == 800030) {
172 ATH_MSG_WARNING(
"It is checked if the sample is ttbar (has dsid 410000) or Zprime (has dsid 427080). None applies (read dsid is " <<
dsid <<
"). Applying default pT cut of 20000 MeV now.");
192 for (; vtx_itr != vtx_end; ++vtx_itr) {
194 if ((*vtx_itr)->nTrackParticles() >= 2) {
196 if ((*vtx_itr)->vertexType() == 1) {
208 return StatusCode::SUCCESS;
224 if (jetException != StatusCode::SUCCESS)
continue;
226 int nJets_withCut = 0;
227 int nJets_containing_moun = 0;
228 int nJets_containing_SV = 0;
229 std::map<std::string, int> nJetsThatPassedWPCuts;
230 plot->initializeNJetsThatPassedWPCutsMap(nJetsThatPassedWPCuts);
233 bool muon_info_available =
false;
234 if(
jets->size() > 0){
237 softMuon_linkAcc(
"softMuon_link");
239 muon_info_available =
true;
244 std::string label_name =
"HadronConeExclTruthLabelID";
250 if(
jet->pt() <= ptCut)
continue;
254 if (
plot->m_JVT_defined &&
jet->getAttribute<
float>(
"Jvt") <
plot->m_JVT_cut
256 && std::abs(
jet->eta()) < 2.4 )
continue;
257 if (
plot->m_JVTLargerEta_defined &&
jet->getAttribute<
float>(
"Jvt") <
plot->m_JVTLargerEta_cut
267 int truth_label(1000);
270 if(
acc.isAvailable(*
jet))
jet->getAttribute(label_name, truth_label);
279 if(! muon_info_available){
286 plot->fillOther(
jet, btag, contains_muon, jet_Lxy, truth_label,
event);
287 if(contains_muon) nJets_containing_moun++;
293 int num_HF_tracks_in_jet;
294 plot->fillTrackVariables(
jet, btag, myVertex, track_truth_associations, contains_muon, truth_label, num_HF_tracks_in_jet,
event);
297 plot->fillSVVariables(btag, track_truth_associations, contains_muon, truth_label, num_HF_tracks_in_jet, contains_SV,
event);
298 if(contains_SV) nJets_containing_SV++;
300 plot->fillDiscriminantVariables(btag,
jet, jet_Lxy, truth_label, contains_muon,
m_onZprime, nJetsThatPassedWPCuts,
event);
304 plot->fillTrackVariables_for_largeRjet(
jet, myVertex, truth_label,
event);
306 plot->fillDiscriminantVariables_for_largeRjet(
jet, truth_label,
m_onZprime, nJetsThatPassedWPCuts,
event);
309 ATH_MSG_WARNING(
"btag (obtained by xAOD::BTaggingUtilities::getBTagging(*jet)) is a null pointer.");
314 plot->fillMultiplicities(nJets_withCut, tracks->
size(), npv, myVertex->
nTrackParticles(), nJets_containing_moun, nJets_containing_SV, nJetsThatPassedWPCuts,
event);
320 return StatusCode::SUCCESS;
331 return StatusCode::SUCCESS;
341 std::map<const xAOD::TrackParticle*, int> truthValues;
345 BTagTrackToJetAssociatorAcc(
"BTagTrackToJetAssociator");
346 std::vector< ElementLink< xAOD::TrackParticleContainer > > assocTracks =
347 BTagTrackToJetAssociatorAcc(*btag);
350 for(
unsigned int i = 0;
i < assocTracks.size();
i++) {
351 if (!assocTracks.at(
i).isValid())
continue;
363 truthValues.insert( std::make_pair(
track, origin ) );
368 std::vector< ElementLink< xAOD::VertexContainer > > MSV_vertices;
370 MSV_verticesAcc(
"MSV_vertices");
371 try { MSV_vertices = MSV_verticesAcc(*btag); }
375 for (
unsigned int i = 0;
i < MSV_vertices.size();
i++) {
376 if (!MSV_vertices.at(
i).isValid())
continue;
380 std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > MSV_assocTracks = vtx->
trackParticleLinks();
383 for(
unsigned int i = 0;
i < MSV_assocTracks.size();
i++) {
384 if (!MSV_assocTracks.at(
i).isValid())
continue;
396 truthValues.insert( std::make_pair(
track, origin ) );
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
JetTagDQA::BTaggingValidationPlots m_antiKt10UFOCSSKSoftDropBeta100Zcut10Jets
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
void augment(const xAOD::BTagging &btag) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
float m_JVTCutAntiKt4EMTopoJets
Helper class to provide constant type-safe access to aux data.
float m_JVTCutAntiKt4EMPFlowJets
float m_truthMatchProbabilityCut
float m_JVTCutLargerEtaAntiKt4EMTopoJets
Gaudi::Property< std::vector< std::vector< std::string > > > m_HistogramDefinitionsVector
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
FlavorTagDiscriminants::BTagMuonAugmenter m_muonAugmenter
POOL::TEvent event(POOL::TEvent::kClassAccess)
std::map< std::string, JetTagDQA::BTaggingValidationPlots * > m_btagplots
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string m_DL1dv01Name
virtual ~PhysValBTag()
Destructor:
PhysValBTag()
Default constructor:
virtual StatusCode initialize()
#define CHECK(...)
Evaluate an expression and check for errors.
std::string m_jetNameEMTopo
StatusCode book(PlotBase &plots)
ToolHandle< InDet::IInDetTrackTruthOriginTool > m_trackTruthOriginTool
Class describing the basic event information.
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::map< const xAOD::TrackParticle *, int > getTrackTruthAssociations(const xAOD::BTagging *btag) const
std::map< std::string, std::vector< std::string > > m_HistogramDefinitionsMap
Class describing a Vertex.
std::string m_GN2Xv01Name
#define ATH_MSG_WARNING(x)
std::string m_jetNamePFlow
JetTagDQA::BTaggingValidationPlots m_antiKt4EMTopoPlots
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Class describing a TrackParticle.
const T * at(size_type n) const
Access an element, as an rvalue.
Helper class to provide constant type-safe access to aux data.
JetTagDQA::BTaggingValidationPlots m_antiKt4EMPFlowJetsPlots
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
size_type size() const noexcept
Returns the number of elements in the collection.
std::string m_jetNameTrackJet
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
JetTagDQA::BTaggingValidationPlots m_antiKtVR30Rmax4Rmin02PV0TrackJetsPlots