ATLAS Offline Software
PhysicsVariablePlots.cxx
Go to the documentation of this file.
1 //Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 
5 
9 
10 #include "xAODMuon/MuonContainer.h"
13 
14 #include "CxxUtils/phihelper.h"
15 
17 
18 namespace FTAGValidation {
19 
21  ISvcLocator* pSvcLocator ) :
22  FTAGValidationAlgorithm( name, pSvcLocator ) {}
23 
25 
26  /* ===================================================================== */
27 
29  ATH_MSG_INFO( "Inizializing " << name() << " ..." );
31 
32  ATH_MSG_INFO( "Properties declaration:" );
33  ATH_MSG_INFO( " -- " << m_jetKey );
34  ATH_MSG_INFO( " -- " << m_vertexKey );
35  ATH_MSG_INFO( " -- " << m_trackKey );
36 
37  ATH_MSG_INFO( " -- " << m_minJetEta );
38  ATH_MSG_INFO( " -- " << m_maxJetEta );
39  ATH_MSG_INFO( " -- " << m_minJetPt );
40 
41  ATH_CHECK( m_jetKey.initialize() );
42  ATH_CHECK( m_vertexKey.initialize() );
44 
45  ATH_CHECK( m_histSvc.retrieve() );
47 
48  return StatusCode::SUCCESS;
49  }
50 
52  ATH_MSG_DEBUG( "Executing " << name() << " ..." );
53 
54  const EventContext context = getContext();
55 
56  /* =========================================================================================================================================== */
57  /* ==== Retrieve Collections */
58  /* =========================================================================================================================================== */
59 
60  // Event Info
62  ATH_CHECK( eventInfoHandle.isValid() );
63  const xAOD::EventInfo *eventInfo = eventInfoHandle.get();
64 
65  // Retrieve Jet Collection
66  const xAOD::JetContainer *jetCollection = nullptr;
68 
69  // Retrieve Vertex Collection
70  const xAOD::VertexContainer *vertexCollection = nullptr;
71  ATH_CHECK( retrieveCollectionfromStoreGate( context,vertexCollection,m_vertexKey ) );
72  ATH_CHECK( fillHistogram( "nPrimVtx",vertexCollection->size() ) );
73 
74  const xAOD::Vertex *primaryVertex = getPrimaryVertex( vertexCollection );
75  if ( primaryVertex == nullptr ) {
76  ATH_MSG_ERROR( "Could not retrieve Primary Vertex" );
77  return StatusCode::FAILURE;
78  }
79 
80  ATH_CHECK( fillHistogram( "nTracksPrimVtx",primaryVertex->nTrackParticles() ) );
81  ATH_CHECK( fillHistogram( "PV_x" ,primaryVertex->x() ) );
82  ATH_CHECK( fillHistogram( "PV_y" ,primaryVertex->y() ) );
83  ATH_CHECK( fillHistogram( "PV_z" ,primaryVertex->z() ) );
84 
85  // Retrieve TrackParticleCollection
86  const xAOD::TrackParticleContainer *trackParticleCollection = nullptr;
87  ATH_CHECK( retrieveCollectionfromStoreGate( context,trackParticleCollection,m_trackKey) );
88  ATH_CHECK( fillHistogram( "nTracks",trackParticleCollection->size() ) );
89 
90  /* =========================================================================================================================================== */
91  /* ==== ShortList jets */
92  /* =========================================================================================================================================== */
93 
94  std::vector< const xAOD::Jet* > qualityJetCollection;
95 
96  for ( const xAOD::Jet *jet : *jetCollection ) {
97  if ( not passJetQualitySelection( jet ) ) continue;
98  if ( not passJetKinematicSelection( jet ) ) continue;
99  if ( not passJetJVTSelection( jet,m_jetKey.key() ) ) continue;
100  qualityJetCollection.push_back( jet );
101  }
102 
103  ATH_CHECK( fillHistogram( "nJets",qualityJetCollection.size() ) );
104 
105  /* =========================================================================================================================================== */
106  /* ==== Run on Jets */
107  /* =========================================================================================================================================== */
108 
109  int nJetsWithMuon = 0;
110  int nJetsWithSV = 0;
111 
112  for ( const xAOD::Jet *jet : qualityJetCollection ) {
113 
114  ATH_MSG_DEBUG( "JET KINEMATICS:" );
115  ATH_MSG_DEBUG( " ** pt=" << jet->p4().Et() / Gaudi::Units::GeV <<
116  " eta=" << jet->eta() <<
117  " phi=" << jet->phi() );
118 
119  ATH_CHECK( fillHistogram( "jet_E" , jet->e() / Gaudi::Units::GeV ) );
120  ATH_CHECK( fillHistogram( "jet_pT" , jet->pt() / Gaudi::Units::GeV ) );
121  ATH_CHECK( fillHistogram( "jet_eta" , jet->eta() ) );
122  ATH_CHECK( fillHistogram( "jet_phi" , jet->phi() ) );
123  //nMuons and nSV1
125  static const SG::ConstAccessor<std::vector< ElementLink< xAOD::VertexContainer > > > SV1_verticesAcc("SV1_vertices");
126  std::vector< ElementLink< xAOD::VertexContainer > > SV1_vertex = SV1_verticesAcc(*bTag);
127  if(SV1_vertex.size() >= 1) nJetsWithSV++;
128 
129  static const SG::ConstAccessor< ElementLink<xAOD::MuonContainer> > SMT_mu_linkAcc("SMT_mu_link");
130  if (SMT_mu_linkAcc.isAvailable(*bTag)) {
131  ElementLink<xAOD::MuonContainer> muonLink = SMT_mu_linkAcc(*bTag);
132  if ( muonLink.isValid() ) {
133  const xAOD::Muon* muon=(*muonLink);
134  if ( muon != 0 ) {
135  nJetsWithMuon++;
136  ATH_CHECK( fillHistogram( "muon_pT_frac" , muon->pt() / jet->pt() ) );
137  }
138  }
139  }
140  else {
141  ATH_MSG_DEBUG( "SMT_mu_link is not available." );
142  }
143 
144  // Retrieve jet flavour
145  std::string flavour = "DATA_";
146  if ( eventInfo->eventType(xAOD::EventInfo::EventType::IS_SIMULATION) ) {
147 
148  static const SG::ConstAccessor< int > HadronConeExclTruthLabelIDAcc("HadronConeExclTruthLabelID");
149  if ( HadronConeExclTruthLabelIDAcc.isAvailable( *jet ) == false ) {
150  ATH_MSG_ERROR( "Input sample is MC but jet has no 'HadronConeExclTruthLabelID' aux data. Something is wrong!" );
151  return StatusCode::FAILURE;
152  }
153 
154  int HadronConeExclTruthLabelID = HadronConeExclTruthLabelIDAcc(*jet);
155  ATH_MSG_DEBUG( " ** 'HadronConeExclTruthLabelID' is " << HadronConeExclTruthLabelID );
156  ATH_CHECK( fillHistogram( "truth_label" , HadronConeExclTruthLabelID ) );
157 
158  if ( HadronConeExclTruthLabelID == 0 ) flavour = "U_";
159  else if ( HadronConeExclTruthLabelID == 4 ) flavour = "C_";
160  else if ( HadronConeExclTruthLabelID == 5 ) flavour = "B_";
161  else continue;
162  }
163 
164  ATH_CHECK( analyseTrackParticleObjects( jet,primaryVertex,flavour ) );
165  ATH_CHECK( analyseBTaggingObject( jet,flavour ) );
166  }
167 
168  ATH_CHECK( fillHistogram( "nJetsWithMuon" , nJetsWithMuon ) );
169  ATH_CHECK( fillHistogram( "fracJetsWithMuon" , double(nJetsWithMuon)/double(qualityJetCollection.size()) ) );
170  ATH_CHECK( fillHistogram( "nJetsWithSV" , nJetsWithSV ) );
171  ATH_CHECK( fillHistogram( "fracJetsWithSV" , double(nJetsWithSV)/double(qualityJetCollection.size()) ) );
172 
173  return StatusCode::SUCCESS;
174  }
175 
177  ATH_MSG_INFO( "Finalizing " << name() << " ..." );
178  return StatusCode::SUCCESS;
179  }
180 
181  /* ===================================================================== */
182 
184 
185  // 1D histograms
186  ATH_MSG_DEBUG( "Defining 1D histograms ..." );
187  for ( const std::vector< std::string >& definitions : m_Histograms1Ddefinitions ) {
188  ATH_MSG_DEBUG( " ** " << definitions.at( HISTO::NAME ) << " of type " << definitions.at( HISTO::TYPE ) );
189 
190  if ( definitions.at( HISTO::TYPE ) == "TH1I" )
191  ATH_CHECK( defineHistogram< TH1I >( definitions.at( HISTO::NAME ),
192  definitions.at( HISTO::TITLE ),
193  std::stoi( definitions.at( HISTO::XBINS ) ),
194  std::stoi( definitions.at( HISTO::XMIN ) ),
195  std::stoi( definitions.at( HISTO::XMAX ) ),
196  definitions.at( HISTO::PATH ) ) );
197  else if ( definitions.at( HISTO::TYPE ) == "TH1F" )
198  ATH_CHECK( defineHistogram< TH1F >( definitions.at( HISTO::NAME ),
199  definitions.at( HISTO::TITLE ),
200  std::stoi( definitions.at( HISTO::XBINS ) ),
201  std::stof( definitions.at( HISTO::XMIN ) ),
202  std::stof( definitions.at( HISTO::XMAX ) ),
203  definitions.at( HISTO::PATH )) );
204  else if ( definitions.at( HISTO::TYPE ) == "TH1D" )
205  ATH_CHECK( defineHistogram< TH1D >( definitions.at( HISTO::NAME ),
206  definitions.at( HISTO::TITLE ),
207  std::stoi( definitions.at( HISTO::XBINS ) ),
208  std::stof( definitions.at( HISTO::XMIN ) ),
209  std::stof( definitions.at( HISTO::XMAX ) ),
210  definitions.at( HISTO::PATH )) );
211  }
212 
213  // 2D histograms
214  ATH_MSG_DEBUG( "Defining 2D histograms ..." );
215  for ( const std::vector< std::string >& definitions : m_Histograms2Ddefinitions ) {
216  ATH_MSG_DEBUG( " ** " << definitions.at( HISTO::NAME ) << " of type " << definitions.at( HISTO::TYPE ) );
217 
218  if ( definitions.at( HISTO::TYPE ) == "TH2I" )
219  ATH_CHECK( defineHistogram< TH2I >( definitions.at( HISTO::NAME ),
220  definitions.at( HISTO::TITLE ),
221  std::stoi( definitions.at( HISTO::XBINS ) ),
222  std::stoi( definitions.at( HISTO::XMIN ) ),
223  std::stoi( definitions.at( HISTO::XMAX ) ),
224  std::stoi( definitions.at( HISTO::YBINS ) ),
225  std::stoi( definitions.at( HISTO::YMIN ) ),
226  std::stoi( definitions.at( HISTO::YMAX ) ),
227  definitions.at( HISTO::PATH ) ) );
228  else if ( definitions.at( HISTO::TYPE ) == "TH2F" )
229  ATH_CHECK( defineHistogram< TH2F >( definitions.at( HISTO::NAME ),
230  definitions.at( HISTO::TITLE ),
231  std::stoi( definitions.at( HISTO::XBINS ) ),
232  std::stof( definitions.at( HISTO::XMIN ) ),
233  std::stof( definitions.at( HISTO::XMAX ) ),
234  std::stoi( definitions.at( HISTO::YBINS ) ),
235  std::stof( definitions.at( HISTO::YMIN ) ),
236  std::stof( definitions.at( HISTO::YMAX ) ),
237  definitions.at( HISTO::PATH )) );
238  else if ( definitions.at( HISTO::TYPE ) == "TH2D" )
239  ATH_CHECK( defineHistogram< TH2D >( definitions.at( HISTO::NAME ),
240  definitions.at( HISTO::TITLE ),
241  std::stoi( definitions.at( HISTO::XBINS ) ),
242  std::stof( definitions.at( HISTO::XMIN ) ),
243  std::stof( definitions.at( HISTO::XMAX ) ),
244  std::stoi( definitions.at( HISTO::YBINS ) ),
245  std::stof( definitions.at( HISTO::YMIN ) ),
246  std::stof( definitions.at( HISTO::YMAX ) ),
247  definitions.at( HISTO::PATH )) );
248  }
249 
250 
251  return StatusCode::SUCCESS;
252  }
253 
255  const xAOD::Vertex *primaryVertex,
256  const std::string& flavour,
257  std::string chain ) {
258 
259  if( chain != "" ) chain = chain + "_";
260 
261  /* =========================================================================================================================================== */
262  /* ==== Ghost Tracks */
263  /* =========================================================================================================================================== */
264 /*
265  if( chain == "" ) { //No ghost tracks at trigger level
266  ATH_MSG_DEBUG( "GHOST TRACKS:" );
267 
268  std::vector< const xAOD::IParticle* > trackVector = jet->getAssociatedObjects< xAOD::IParticle >( xAOD::JetAttribute::GhostTrack );
269  ATH_CHECK( fillHistogram( chain+flavour+"nGhostTracksInJet",trackVector.size() ) );
270  ATH_MSG_DEBUG( " ** nGhostTracks: " << trackVector.size() );
271 
272  for ( const xAOD::IParticle* iparticle : trackVector ) {
273  const xAOD::TrackParticle* trackParticle = dynamic_cast< const xAOD::TrackParticle* >( iparticle );
274  if( not trackParticle ) continue;
275 
276  CHECK( computeAndStoreTrackVariables( flavour,jet,
277  "ghost",trackParticle,
278  primaryVertex ) );
279  }
280  }
281 */
282 
283  /* =========================================================================================================================================== */
284  /* ==== BTagTrackToJetAssociator Tracks */
285  /* =========================================================================================================================================== */
286 
287  ATH_MSG_DEBUG( "BTagTrackToJetAssociator TRACKS:" );
288  const xAOD::BTagging* bTaggingObject = xAOD::BTaggingUtilities::getBTagging( *jet );
289 
290  if ( !bTaggingObject ) {
291  ATH_MSG_ERROR( "Could not retrieve b-tagging object from selected jet." );
292  return StatusCode::FAILURE;
293  }
294 
295  static const SG::ConstAccessor< std::vector< ElementLink<xAOD::TrackParticleContainer> > > BTagTrackToJetAssociatorAcc("BTagTrackToJetAssociator");
296  if ( not BTagTrackToJetAssociatorAcc.isAvailable(*bTaggingObject) ) {
297  ATH_MSG_ERROR( "Cannot retrieve 'BTagTrackToJetAssociator' auxdata from b-tagging object!" );
298  return StatusCode::FAILURE;
299  }
300 
301  std::vector< ElementLink< xAOD::TrackParticleContainer > > assocTracks = BTagTrackToJetAssociatorAcc(*bTaggingObject);
302  ATH_CHECK( fillHistogram( chain+flavour+"numTracks_perJet",assocTracks.size() ) );
303  ATH_MSG_DEBUG( " ** nBTagTracksInJet: " << assocTracks.size() );
304 
305  for ( const ElementLink< xAOD::TrackParticleContainer >& trackEL : assocTracks ) {
306  if ( not trackEL.isValid() ) continue;
307 
308  const xAOD::TrackParticle* trackParticle = *trackEL;
309 
311  "",trackParticle, //Only supporting one track type to simplify merging with PhysVal definitions
312  primaryVertex,chain ) );
313  }
314 
315 
316 
317  return StatusCode::SUCCESS;
318  }
319 
321  const std::string& trackType, const xAOD::TrackParticle *trackParticle,
322  const xAOD::Vertex* primaryVertex, const std::string& chain) {
323 
324  std::string flavour = jetType + trackType;
325 
326  // Jet Variables
327  float jet_pt = jet->pt();
328  float jet_eta = jet->eta();
329  float jet_phi = jet->phi();
330 
331  // track Variables
332  float track_pt = trackParticle->pt();
333  float fracEt = track_pt / jet_pt;
334 
335  ATH_CHECK( fillHistogram( chain+flavour+"track_pT_frac",fracEt ) );
336  ATH_MSG_DEBUG( " ** pTfrac = " << fracEt );
337 
338  float track_eta = trackParticle->eta();
339  float track_phi = trackParticle->phi();
340 
341  float deltaEta = fabs( jet_eta - track_eta );
342  float deltaPhi = CxxUtils::wrapToPi( jet_phi - track_phi );
343  float deltaR = sqrt( deltaEta*deltaEta + deltaPhi*deltaPhi );
344 
345  ATH_CHECK( fillHistogram( chain+flavour+"DeltaR_jet_track",deltaR ) );
346  ATH_MSG_DEBUG( " ** deltaR = " << deltaR );
347 
348  float d0 = trackParticle->d0();
349  float sigmad0 = sqrt( trackParticle->definingParametersCovMatrix()( Trk::d0, Trk::d0 ) );
350  float z0 = trackParticle->z0() + trackParticle->vz() - primaryVertex->z();
351  float sigmaz0 = sqrt( trackParticle->definingParametersCovMatrix()( Trk::z0, Trk::z0 ) );
352 
353  ATH_CHECK( fillHistogram( chain+flavour+"track_d0",d0 ) );
354  ATH_CHECK( fillHistogram( chain+flavour+"track_sigd0",d0/sigmad0 ) );
355 
356  ATH_CHECK( fillHistogram( chain+flavour+"track_z0",z0 ) );
357  ATH_CHECK( fillHistogram( chain+flavour+"track_sigz0",z0/sigmaz0 ) );
358 
359  ATH_MSG_DEBUG( " ** d0 +/- err [significance] = " << d0 << " +/- " << sigmad0 << " [ " << d0/sigmad0 << " ]" );
360  ATH_MSG_DEBUG( " ** z0 +/- err [significance] = " << z0 << " +/- " << sigmaz0 << " [ " << z0/sigmaz0 << " ]" );
361 
362  if (trackType == "bTag" || trackType == "") {
363 
364  if (chain != "") {
365  BTagTrackIpAccessor accessor("btagIp_");
366  float d0_signed_sig = accessor.getSignedIp(*trackParticle, *jet).ip3d_signed_d0_significance;
367  float z0_signed_sig = accessor.getSignedIp(*trackParticle, *jet).ip3d_signed_z0_significance;
368  ATH_CHECK( fillHistogram( chain+flavour+"track_sigd0_signed", d0_signed_sig) );
369  ATH_CHECK( fillHistogram( chain+flavour+"track_sigz0_signed", z0_signed_sig) );
370  }
371 
372  uint8_t nInnHits = -1;
373  uint8_t nNextToInnHits = -1;
374  uint8_t nBLHits = -1;
375  uint8_t nsharedBLHits = -1;
376  uint8_t nsplitBLHits = -1;
377  uint8_t nPixHits = -1;
378  uint8_t nPixHoles = -1;
379  uint8_t nsharedPixHits = -1;
380  uint8_t nsplitPixHits = -1;
381  uint8_t nSCTHits = -1;
382  uint8_t nSCTHoles = -1;
383  uint8_t nsharedSCTHits = -1;
384 
386  ATH_CHECK( trackParticle->summaryValue(nNextToInnHits,xAOD::numberOfNextToInnermostPixelLayerHits) );
387  ATH_CHECK( trackParticle->summaryValue(nBLHits,xAOD::numberOfBLayerHits) );
388  ATH_CHECK( trackParticle->summaryValue(nsharedBLHits,xAOD::numberOfBLayerSharedHits) );
389  ATH_CHECK( trackParticle->summaryValue(nsplitBLHits,xAOD::numberOfBLayerSplitHits) );
390  ATH_CHECK( trackParticle->summaryValue(nPixHits,xAOD::numberOfPixelHits) );
391  ATH_CHECK( trackParticle->summaryValue(nPixHoles,xAOD::numberOfPixelHoles) );
392  ATH_CHECK( trackParticle->summaryValue(nsharedPixHits,xAOD::numberOfPixelSharedHits) );
393  ATH_CHECK( trackParticle->summaryValue(nsplitPixHits,xAOD::numberOfPixelSplitHits) );
396  ATH_CHECK( trackParticle->summaryValue(nsharedSCTHits,xAOD::numberOfSCTSharedHits) );
397 
398  ATH_CHECK( fillHistogram( chain+flavour+"nInnHits", nInnHits) );
399  ATH_CHECK( fillHistogram( chain+flavour+"nNextToInnHits", nNextToInnHits) );
400  ATH_CHECK( fillHistogram( chain+flavour+"nBLHits", nBLHits) );
401  ATH_CHECK( fillHistogram( chain+flavour+"nsharedBLHits", nsharedBLHits) );
402  ATH_CHECK( fillHistogram( chain+flavour+"nsplitBLHits", nsplitBLHits) );
403  ATH_CHECK( fillHistogram( chain+flavour+"nPixHits", nPixHits) );
404  ATH_CHECK( fillHistogram( chain+flavour+"nPixHoles", nPixHoles) );
405  ATH_CHECK( fillHistogram( chain+flavour+"nsharedPixHits", nsharedPixHits) );
406  ATH_CHECK( fillHistogram( chain+flavour+"nsplitPixHits", nsplitPixHits) );
407  ATH_CHECK( fillHistogram( chain+flavour+"nSCTHits", nSCTHits) );
408  ATH_CHECK( fillHistogram( chain+flavour+"nSCTHoles", nSCTHoles) );
409  ATH_CHECK( fillHistogram( chain+flavour+"nsharedSCTHits", nsharedSCTHits) );
410  }
411 
412  return StatusCode::SUCCESS;
413  }
414 
416  const std::string& flavour,
417  std::string chain) {
418 
419  if( chain != "" ) chain = chain + "_";
420 
421  float jetPt = jet->p4().Et() / Gaudi::Units::GeV;
422  float jetEta = jet->eta();
423 
424  // Retrieve b-tagging object
425  const xAOD::BTagging *bTaggingObject = xAOD::BTaggingUtilities::getBTagging( *jet );
426  if ( !bTaggingObject ) {
427  ATH_MSG_ERROR( "Could not retrieve b-tagging object from selected jet." );
428  return StatusCode::FAILURE;
429  }
430 
431  // Available variables listed in PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/BTaggingContent.py
432  ATH_MSG_DEBUG( "BTAGGING:" );
433 
434  // IP2D
435  double IP2D_pu = -1;
436  double IP2D_pb = -1;
437  double IP2D_pc = -1;
438  bTaggingObject->pu( "IP2D",IP2D_pu );
439  bTaggingObject->pb( "IP2D",IP2D_pb );
440  bTaggingObject->pc( "IP2D",IP2D_pc );
441 
442  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_pu",IP2D_pu ) );
443  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_pb",IP2D_pb ) );
444  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_pc",IP2D_pc ) );
445  ATH_MSG_DEBUG( " ** IP2D [pu,pb,pc] = [" << IP2D_pu <<"," << IP2D_pb << "," << IP2D_pc << "]" );
446 
447 
448  int IP2D_nTrks = -1;
449  std::vector< float > IP2D_weightBOfTracks;
450  std::vector< float > IP2D_weightCOfTracks;
451  std::vector< float > IP2D_weightUOfTracks;
452  std::vector< int > IP2D_gradeOfTracks;
453 
454  bTaggingObject->variable< int >( "IP2D", "nTrks", IP2D_nTrks );
455 
456  static const SG::ConstAccessor< std::vector< float > > IP2D_weightBOfTracksAcc( "IP2D_weightBOfTracks" );
457  IP2D_weightBOfTracks = IP2D_weightBOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
458 
459  static const SG::ConstAccessor< std::vector< float > > IP2D_weightCOfTracksAcc( "IP2D_weightCOfTracks" );
460  IP2D_weightCOfTracks = IP2D_weightCOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
461 
462  static const SG::ConstAccessor< std::vector< float > > IP2D_weightUOfTracksAcc( "IP2D_weightUOfTracks" );
463  IP2D_weightUOfTracks = IP2D_weightUOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
464 
465  static const SG::ConstAccessor< std::vector< int > > IP2D_gradeOfTracksAcc( "IP2D_gradeOfTracks" );
466  IP2D_gradeOfTracks = IP2D_gradeOfTracksAcc.withDefault(*bTaggingObject, std::vector< int >());
467 
468  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_nTracks",IP2D_nTrks ) );
469  for ( unsigned int i(0); i < IP2D_gradeOfTracks.size(); i++ )
470  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_gradeOfTracks", IP2D_gradeOfTracks.at(i) ) );
471  for ( unsigned int i(0); i < IP2D_weightBOfTracks.size(); i++ )
472  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_weightBOfTracks", IP2D_weightBOfTracks.at(i) ) );
473  for ( unsigned int i(0); i < IP2D_weightCOfTracks.size(); i++ )
474  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_weightCOfTracks", IP2D_weightCOfTracks.at(i) ) );
475  for ( unsigned int i(0); i < IP2D_weightUOfTracks.size(); i++ )
476  ATH_CHECK( fillHistogram( chain+flavour+"IP2D_weightUOfTracks", IP2D_weightUOfTracks.at(i) ) );
477 
478  // IP3D
479  double IP3D_pu = -1;
480  double IP3D_pb = -1;
481  double IP3D_pc = -1;
482  double IP3D_LLR = bTaggingObject->IP3D_loglikelihoodratio();
483  bTaggingObject->pu( "IP3D",IP3D_pu );
484  bTaggingObject->pb( "IP3D",IP3D_pb );
485  bTaggingObject->pc( "IP3D",IP3D_pc );
486 
487  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_pu",IP3D_pu ) );
488  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_pb",IP3D_pb ) );
489  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_pc",IP3D_pc ) );
490  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_LLR",IP3D_LLR ) );
491  ATH_MSG_DEBUG( " ** IP3D [pu,pb,pc] = [" << IP3D_pu <<"," << IP3D_pb << "," << IP3D_pc << "]" );
492 
493  int IP3D_nTrks = -1;
494  std::vector< float > IP3D_weightBOfTracks;
495  std::vector< float > IP3D_weightCOfTracks;
496  std::vector< float > IP3D_weightUOfTracks;
497  std::vector< int > IP3D_gradeOfTracks;
498  std::vector< float > IP3D_D0wrtPVOfTracks;
499  std::vector< float > IP3D_sigD0wrtPVOfTracks;
500  std::vector< float > IP3D_Z0wrtPVOfTracks;
501  std::vector< float > IP3D_sigZ0wrtPVOfTracks;
502 
503  bTaggingObject->variable< int >( "IP3D", "nTrks", IP3D_nTrks );
504 
505  static const SG::ConstAccessor< std::vector< float > > IP3D_weightBOfTracksAcc( "IP3D_weightBOfTracks" );
506  IP3D_weightBOfTracks = IP3D_weightBOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
507 
508  static const SG::ConstAccessor< std::vector< float > > IP3D_weightCOfTracksAcc( "IP3D_weightCOfTracks" );
509  IP3D_weightCOfTracks = IP3D_weightCOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
510 
511  static const SG::ConstAccessor< std::vector< float > > IP3D_weightUOfTracksAcc( "IP3D_weightUOfTracks" );
512  IP3D_weightUOfTracks = IP3D_weightUOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
513 
514  static const SG::ConstAccessor< std::vector< int > > IP3D_gradeOfTracksAcc( "IP3D_gradeOfTracks" );
515  IP3D_gradeOfTracks = IP3D_gradeOfTracksAcc.withDefault(*bTaggingObject, std::vector< int >());
516 
517  static const SG::ConstAccessor< std::vector< float > > IP3D_D0wrtPVOfTracksAcc( "IP3D_D0wrtPVOfTracks" );
518  IP3D_D0wrtPVOfTracks = IP3D_D0wrtPVOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
519 
520  static const SG::ConstAccessor< std::vector< float > > IP3D_Z0wrtPVOfTracksAcc( "IP3D_Z0wrtPVOfTracks" );
521  IP3D_Z0wrtPVOfTracks = IP3D_Z0wrtPVOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
522 
523  static const SG::ConstAccessor< std::vector< float > > IP3D_sigD0wrtPVOfTracksAcc( "IP3D_sigD0wrtPVOfTracks" );
524  IP3D_sigD0wrtPVOfTracks = IP3D_sigD0wrtPVOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
525 
526  static const SG::ConstAccessor< std::vector< float > > IP3D_sigZ0wrtPVOfTracksAcc( "IP3D_sigZ0wrtPVOfTracks" );
527  IP3D_sigZ0wrtPVOfTracks = IP3D_sigZ0wrtPVOfTracksAcc.withDefault(*bTaggingObject, std::vector< float >());
528 
529  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() );
530  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_nTracks",IP3D_nTrks ) );
531  for ( unsigned int i(0); i < IP3D_gradeOfTracks.size(); i++ )
532  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_gradeOfTracks", IP3D_gradeOfTracks.at(i) ) );
533  for ( unsigned int i(0); i < IP3D_weightBOfTracks.size(); i++ )
534  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_weightBOfTracks", IP3D_weightBOfTracks.at(i) ) );
535  for ( unsigned int i(0); i < IP3D_weightCOfTracks.size(); i++ )
536  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_weightCOfTracks", IP3D_weightCOfTracks.at(i) ) );
537  for ( unsigned int i(0); i < IP3D_weightUOfTracks.size(); i++ )
538  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_weightUOfTracks", IP3D_weightUOfTracks.at(i) ) );
539  for ( unsigned int i(0); i < IP3D_D0wrtPVOfTracks.size(); i++ )
540  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_D0wrtPVOfTracks", IP3D_D0wrtPVOfTracks.at(i) ) ); //value
541  for ( unsigned int i(0); i < IP3D_sigD0wrtPVOfTracks.size(); i++ )
542  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_sigD0wrtPVOfTracks", IP3D_sigD0wrtPVOfTracks.at(i) ) ); //significance
543  for ( unsigned int i(0); i < IP3D_Z0wrtPVOfTracks.size(); i++ )
544  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_Z0wrtPVOfTracks", IP3D_Z0wrtPVOfTracks.at(i) ) ); //value
545  for ( unsigned int i(0); i < IP3D_sigZ0wrtPVOfTracks.size(); i++ )
546  ATH_CHECK( fillHistogram( chain+flavour+"IP3D_sigZ0wrtPVOfTracks", IP3D_sigZ0wrtPVOfTracks.at(i) ) ); //significance
547 
548  // SV1
549  double SV1_pu = -1;
550  double SV1_pb = -1;
551  double SV1_pc = -1;
552 
553  bTaggingObject->pu( "SV1",SV1_pu );
554  bTaggingObject->pb( "SV1",SV1_pb );
555  bTaggingObject->pc( "SV1",SV1_pc );
556 
557  ATH_CHECK( fillHistogram( chain+flavour+"SV1_pu",SV1_pu ) );
558  ATH_CHECK( fillHistogram( chain+flavour+"SV1_pb",SV1_pb ) );
559  ATH_CHECK( fillHistogram( chain+flavour+"SV1_pc",SV1_pc ) );
560  ATH_MSG_DEBUG( " ** SV1 [pu,pb,pc] = [" << SV1_pu <<"," << SV1_pb << "," << SV1_pc << "]" );
561 
562  float SV1_masssvx = -1;
563  float SV1_efracsvx = -1;
564  float SV1_deltaR = -1;
565  int SV1_N2Tpair = -1;
566  float SV1_significance3d = -1;
567  float SV1_energyTrkInJet = -1;
568  int SV1_NGTinSvx = -1;
569  float SV1_Lxy = -1;
570 
571  bTaggingObject->variable< float >( "SV1", "masssvx", SV1_masssvx );
572  bTaggingObject->variable< float >( "SV1", "efracsvx", SV1_efracsvx );
573  bTaggingObject->variable< float >( "SV1", "deltaR", SV1_deltaR );
574  bTaggingObject->variable< int >( "SV1", "N2Tpair", SV1_N2Tpair );
575  bTaggingObject->variable< float >( "SV1", "significance3d", SV1_significance3d );
576  bTaggingObject->variable< float >( "SV1", "energyTrkInJet", SV1_energyTrkInJet );
577  bTaggingObject->variable< int >( "SV1", "NGTinSvx", SV1_NGTinSvx );
578  bTaggingObject->variable< float >( "SV1", "Lxy", SV1_Lxy );
579 
580  ATH_CHECK( fillHistogram( chain+flavour+"SV1_masssvx",SV1_masssvx ) );
581  ATH_CHECK( fillHistogram( chain+flavour+"SV1_efracsvx",SV1_efracsvx ) );
582  ATH_CHECK( fillHistogram( chain+flavour+"SV1_deltaR",SV1_deltaR ) );
583  ATH_CHECK( fillHistogram( chain+flavour+"SV1_N2Tpair",SV1_N2Tpair ) );
584  ATH_CHECK( fillHistogram( chain+flavour+"SV1_significance3d",SV1_significance3d ) );
585  ATH_CHECK( fillHistogram( chain+flavour+"SV1_energyTrkInJet",SV1_energyTrkInJet ) );
586  ATH_CHECK( fillHistogram( chain+flavour+"SV1_NGTinSvx",SV1_NGTinSvx ) );
587  ATH_CHECK( fillHistogram( chain+flavour+"SV1_Lxy",SV1_Lxy ) );
588 
589  ATH_CHECK( fillHistogram( chain+flavour+"SV1_masssvx_vs_pT_2D",jetPt,SV1_masssvx ) );
590  ATH_CHECK( fillHistogram( chain+flavour+"SV1_N2Tpair_vs_pT_2D",jetPt,SV1_N2Tpair ) );
591  ATH_CHECK( fillHistogram( chain+flavour+"SV1_efracsvx_vs_pT_2D",jetPt,SV1_efracsvx ) );
592  ATH_CHECK( fillHistogram( chain+flavour+"SV1_deltaR_vs_pT_2D",jetPt,SV1_deltaR ) );
593  ATH_CHECK( fillHistogram( chain+flavour+"SV1_masssvx_vs_eta_2D",jetEta,SV1_masssvx ) );
594  ATH_CHECK( fillHistogram( chain+flavour+"SV1_N2Tpair_vs_eta_2D",jetEta,SV1_N2Tpair ) );
595  ATH_CHECK( fillHistogram( chain+flavour+"SV1_efracsvx_vs_eta_2D",jetEta,SV1_efracsvx ) );
596  ATH_CHECK( fillHistogram( chain+flavour+"SV1_deltaR_vs_eta_2D",jetEta,SV1_deltaR ) );
597 
598 
599  ATH_MSG_DEBUG( " ** SV1 [masssvx,efracsvx,deltaR,N2Tpair] = [" << SV1_masssvx <<
600  "," << SV1_efracsvx <<
601  "," << SV1_deltaR <<
602  "," << SV1_N2Tpair << "]" );
603 
604  // Jet Fitter
605  int JetFitter_N2Tpair = -1;
606  int JetFitter_nVTX = -1;
607  int JetFitter_nSingleTracks = -1;
608  int JetFitter_nTracksAtVtx = -1;
609  float JetFitter_mass = -1;
610  float JetFitter_energyFraction = -1;
611  float JetFitter_significance3d = -1;
612  bTaggingObject->variable< int >( "JetFitter","N2Tpair",JetFitter_N2Tpair );
613  bTaggingObject->variable< int >( "JetFitter","nVTX",JetFitter_nVTX );
614  bTaggingObject->variable< int >( "JetFitter","nSingleTracks",JetFitter_nSingleTracks );
615  bTaggingObject->variable< int >( "JetFitter","nTracksAtVtx",JetFitter_nTracksAtVtx );
616  bTaggingObject->variable< float >( "JetFitter","mass",JetFitter_mass );
617  bTaggingObject->variable< float >( "JetFitter","energyFraction",JetFitter_energyFraction );
618  bTaggingObject->variable< float >( "JetFitter","significance3d",JetFitter_significance3d );
619 
620  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_N2Tpair",JetFitter_N2Tpair ) );
621  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_nVTX",JetFitter_nVTX ) );
622  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_nSingleTracks",JetFitter_nSingleTracks ) );
623  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_nTracksAtVtx",JetFitter_nTracksAtVtx ) );
624  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_mass",JetFitter_mass ) );
625  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_energyFraction",JetFitter_energyFraction ) );
626  ATH_CHECK( fillHistogram( chain+flavour+"JetFitter_significance3d",JetFitter_significance3d ) );
627  ATH_MSG_DEBUG( " ** JetFitter [mass] = [" << JetFitter_mass <<"]" );
628 
629  // RNNIP
630  double RNNIP_pu = -1;
631  double RNNIP_pb = -1;
632  double RNNIP_pc = -1;
633  double RNNIP_LLR = -1;
634  bTaggingObject->pu( "rnnip",RNNIP_pu );
635  bTaggingObject->pb( "rnnip",RNNIP_pb );
636  bTaggingObject->pc( "rnnip",RNNIP_pc );
637  bTaggingObject->loglikelihoodratio( "rnnip", RNNIP_LLR);
638 
639  ATH_CHECK( fillHistogram( chain+flavour+"RNNIP_pu",RNNIP_pu ) );
640  ATH_CHECK( fillHistogram( chain+flavour+"RNNIP_pb",RNNIP_pb ) );
641  ATH_CHECK( fillHistogram( chain+flavour+"RNNIP_pc",RNNIP_pc ) );
642  ATH_CHECK( fillHistogram( chain+flavour+"RNNIP_LLR",RNNIP_LLR ) );
643  ATH_MSG_DEBUG( " ** RNNIP [pu,pb,pc] = [" << RNNIP_pu <<"," << RNNIP_pb << "," << RNNIP_pc << "]" );
644 
645  // DL1
646  double DL1_pu = -1;
647  double DL1_pb = -1;
648  double DL1_pc = -1;
649  bTaggingObject->pu( "DL1",DL1_pu );
650  bTaggingObject->pb( "DL1",DL1_pb );
651  bTaggingObject->pc( "DL1",DL1_pc );
652  ATH_CHECK( fillHistogram( chain+flavour+"DL1_pu",DL1_pu ) );
653  ATH_CHECK( fillHistogram( chain+flavour+"DL1_pb",DL1_pb ) );
654  ATH_CHECK( fillHistogram( chain+flavour+"DL1_pc",DL1_pc ) );
655 
656  // DL1r
657  double DL1r_pu = -1;
658  double DL1r_pb = -1;
659  double DL1r_pc = -1;
660  bTaggingObject->pu( "DL1r",DL1r_pu );
661  bTaggingObject->pb( "DL1r",DL1r_pb );
662  bTaggingObject->pc( "DL1r",DL1r_pc );
663 
664  if ( DL1r_pu == -1 &&
665  DL1r_pb == -1 &&
666  DL1r_pc == -1 ) {
667  bTaggingObject->pu( "DL1rnn",DL1r_pu );
668  bTaggingObject->pb( "DL1rnn",DL1r_pb );
669  bTaggingObject->pc( "DL1rnn",DL1r_pc );
670  }
671 
672  float cFraction = 0.03;
673  float DL1r = 0;
674  if ( DL1r_pu != -1 && DL1r_pb != -1 && DL1r_pc != -1 )
675  DL1r = log( DL1r_pb / ( DL1r_pu * ( 1 - cFraction ) + DL1r_pc * cFraction ) );
676 
677  float bFraction = 0.03;
678  float DL1rc = 0;
679  if ( DL1r_pu != -1 && DL1r_pb != -1 && DL1r_pc != -1 )
680  DL1rc = log( DL1r_pb / ( DL1r_pu * ( 1 - bFraction ) + DL1r_pc * bFraction ) );
681 
682  ATH_CHECK( fillHistogram( chain+flavour+"DL1r_LLR",DL1r ) );
683  ATH_CHECK( fillHistogram( chain+flavour+"DL1rc",DL1rc ) );
684  ATH_CHECK( fillHistogram( chain+flavour+"DL1r_pu",DL1r_pu ) );
685  ATH_CHECK( fillHistogram( chain+flavour+"DL1r_pb",DL1r_pb ) );
686  ATH_CHECK( fillHistogram( chain+flavour+"DL1r_pc",DL1r_pc ) );
687  ATH_MSG_DEBUG( " ** DL1r = " << DL1r );
688  ATH_MSG_DEBUG( " ** DL1r [pu,pb,pc] = [" << DL1r_pu <<"," << DL1r_pb << "," << DL1r_pc << "]" );
689 
690  // MV2
691  double mv2c10_discriminant = -2;
692  bTaggingObject->MVx_discriminant( "MV2c10",mv2c10_discriminant );
693 
694  ATH_CHECK( fillHistogram( chain+flavour+"MV2c10_discriminant",mv2c10_discriminant ) );
695  ATH_MSG_DEBUG( " ** MV2c10 = " << mv2c10_discriminant );
696 
697  return StatusCode::SUCCESS;
698  }
699 
700 }
701 
702 
703 
PhysicsVariablePlots.h
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:261
BTaggingUtilities.h
xAOD::Vertex_v1::x
float x() const
Returns the x position.
FTAGValidation::FTAGValidationAlgorithm
Definition: FTAGValidationAlgorithm.h:19
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
BTagTrackIpAccessor.h
FTAGValidation::FTAGValidationAlgorithm::m_minJetEta
Gaudi::Property< float > m_minJetEta
Definition: FTAGValidationAlgorithm.h:50
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
FTAGValidation::PhysicsVariablePlots::m_jetKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetKey
Definition: PhysicsVariablePlots.h:68
FTAGValidation::PhysicsVariablePlots::m_Histograms2Ddefinitions
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms2Ddefinitions
Definition: PhysicsVariablePlots.h:80
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
FTAGValidation::PhysicsVariablePlots::analyseTrackParticleObjects
StatusCode analyseTrackParticleObjects(const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="")
Definition: PhysicsVariablePlots.cxx:254
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
xAOD::numberOfSCTSharedHits
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:272
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
FTAGValidation::PhysicsVariablePlots::analyseBTaggingObject
StatusCode analyseBTaggingObject(const xAOD::Jet *, const std::string &, std::string="")
Definition: PhysicsVariablePlots.cxx:415
FTAGValidation::FTAGValidationAlgorithm::retrieveCollectionfromStoreGate
StatusCode retrieveCollectionfromStoreGate(const EventContext &, const CONTAINER *&, const SG::ReadHandleKey< CONTAINER > &) const
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
FTAGValidation::FTAGValidationAlgorithm::passJetQualitySelection
bool passJetQualitySelection(const xAOD::Jet *) const
Definition: FTAGValidationAlgorithm.cxx:38
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
xAOD::BTagging_v1::loglikelihoodratio
bool loglikelihoodratio(const std::string &taggername, double &value, const std::string &signal="pb", const std::string &bckgd="pu") const
Definition: BTagging_v1.cxx:322
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
CxxUtils::wrapToPi
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Definition: phihelper.h:24
xAOD::JetFitter_nSingleTracks
@ JetFitter_nSingleTracks
JetFitter : Number of single tracks.
Definition: BTaggingEnums.h:46
xAOD::TrackParticle_v1::summaryValue
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Definition: TrackParticle_v1.cxx:736
xAOD::TrackParticle_v1::vz
float vz() const
The z origin for the parameters.
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
Trk::z0
@ z0
Definition: ParamDefs.h:64
FTAGValidation::PhysicsVariablePlots::~PhysicsVariablePlots
virtual ~PhysicsVariablePlots()
Definition: PhysicsVariablePlots.cxx:24
xAOD::SV1_N2Tpair
@ SV1_N2Tpair
SV1 : Number of 2-track pairs.
Definition: BTaggingEnums.h:35
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
FTAGValidation::PhysicsVariablePlots::initialize
virtual StatusCode initialize() override
Definition: PhysicsVariablePlots.cxx:28
xAOD::IP2D_gradeOfTracks
@ IP2D_gradeOfTracks
IP2D: track grade.
Definition: BTaggingEnums.h:65
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
FTAGValidation::PhysicsVariablePlots::initializeHistograms
StatusCode initializeHistograms()
Definition: PhysicsVariablePlots.cxx:183
xAOD::IP2D_pu
IP2D_pu
Definition: BTagging_v1.cxx:168
xAOD::numberOfBLayerHits
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
Definition: TrackingPrimitives.h:231
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::numberOfBLayerSplitHits
@ numberOfBLayerSplitHits
number of Pixel b-layer hits split by cluster splitting [unit8_t].
Definition: TrackingPrimitives.h:234
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
MuonAuxContainer.h
xAOD::JetFitter_energyFraction
@ JetFitter_energyFraction
JetFitter : Jet efrac.
Definition: BTaggingEnums.h:52
xAOD::JetFitter_nVTX
@ JetFitter_nVTX
JetFitter : Number of vertices.
Definition: BTaggingEnums.h:44
BTagTrackIpAccessor
Definition: BTagTrackIpAccessor.h:29
xAOD::numberOfPixelSharedHits
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:262
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
BTaggingAuxContainer.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FTAGValidation
Definition: FTAGValidationAlgorithm.h:16
xAOD::BTagging_v1::pc
bool pc(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:367
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
IDTPM::nSCTHits
float nSCTHits(const U &p)
Definition: TrackParametersHelper.h:365
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FTAGValidation::PhysicsVariablePlots::m_Histograms1Ddefinitions
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms1Ddefinitions
Definition: PhysicsVariablePlots.h:78
SG::ReadHandle::get
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::IP3D_gradeOfTracks
@ IP3D_gradeOfTracks
IP3D: track grade.
Definition: BTaggingEnums.h:82
FTAGValidation::PhysicsVariablePlots::execute
virtual StatusCode execute() override
Definition: PhysicsVariablePlots.cxx:51
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
xAOD::JetFitter_mass
@ JetFitter_mass
JetFitter : Jet mass.
Definition: BTaggingEnums.h:50
xAOD::JetFitter_nTracksAtVtx
@ JetFitter_nTracksAtVtx
JetFitter : Number of tracks at vertex.
Definition: BTaggingEnums.h:48
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::SV1_efracsvx
@ SV1_efracsvx
SV1 : energy fraction.
Definition: BTaggingEnums.h:39
xAOD::Vertex_v1::z
float z() const
Returns the z position.
FTAGValidation::FTAGValidationAlgorithm::m_minJetPt
Gaudi::Property< float > m_minJetPt
Definition: FTAGValidationAlgorithm.h:56
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::numberOfPixelSplitHits
@ numberOfPixelSplitHits
number of Pixel all-layer hits split by cluster splitting [unit8_t].
Definition: TrackingPrimitives.h:263
FTAGValidation::FTAGValidationAlgorithm::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: FTAGValidationAlgorithm.h:47
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:270
xAOD::BTagging_v1
Definition: BTagging_v1.h:39
IDTPM::nSCTHoles
float nSCTHoles(const U &p)
Definition: TrackParametersHelper.h:375
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
FTAGValidation::PhysicsVariablePlots::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: PhysicsVariablePlots.h:70
xAOD::JetFitter_significance3d
@ JetFitter_significance3d
JetFitter : 3D vertex significance.
Definition: BTaggingEnums.h:54
FTAGValidation::PhysicsVariablePlots::finalize
virtual StatusCode finalize() override
Definition: PhysicsVariablePlots.cxx:176
xAOD::JetFitter_N2Tpair
@ JetFitter_N2Tpair
JetFitter : Number of 2-track pairs.
Definition: BTaggingEnums.h:60
TYPE
#define TYPE(CODE, TYP, IOTYP)
xAOD::BTagging_v1::pu
bool pu(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:353
BTaggingContainer.h
xAOD::SV1_NGTinSvx
@ SV1_NGTinSvx
SV1 : Number of good tracks in vertex.
Definition: BTaggingEnums.h:33
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:248
xAOD::TrackParticle_v1::definingParametersCovMatrix
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
Definition: TrackParticle_v1.cxx:246
xAOD::BTagging_v1::IP3D_loglikelihoodratio
float IP3D_loglikelihoodratio() const
get IP3D log likelihood ratio
Definition: BTagging_v1.h:159
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::d0
@ d0
Definition: ParamDefs.h:63
FTAGValidation::FTAGValidationAlgorithm::passJetJVTSelection
bool passJetJVTSelection(const xAOD::Jet *, const std::string &jetType="AntiKt4EMTopoJets") const
Definition: FTAGValidationAlgorithm.cxx:102
xAOD::numberOfBLayerSharedHits
@ numberOfBLayerSharedHits
number of Pixel b-layer hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:233
phihelper.h
Helper for azimuthal angle calculations.
FTAGValidation::PhysicsVariablePlots::computeAndStoreTrackVariables
StatusCode computeAndStoreTrackVariables(const std::string &, const xAOD::Jet *, const std::string &, const xAOD::TrackParticle *, const xAOD::Vertex *, const std::string &="")
Definition: PhysicsVariablePlots.cxx:320
FTAGValidation::PhysicsVariablePlots::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: PhysicsVariablePlots.h:66
xAOD::JetAttributeAccessor::accessor
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Definition: JetAccessorMap.h:26
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
MuonContainer.h
xAOD::BTaggingUtilities::getBTagging
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
Definition: BTaggingUtilities.cxx:37
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
ConvertOldUJHistosToNewHistos.jetType
string jetType
Definition: ConvertOldUJHistosToNewHistos.py:121
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
FTAGValidation::PhysicsVariablePlots::m_trackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
Definition: PhysicsVariablePlots.h:72
PATH
TString PATH
Definition: run_EoverP.cxx:91
xAOD::Vertex_v1::y
float y() const
Returns the y position.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
xAOD::BTagging_v1::variable
bool variable(const std::string &taggername, const std::string &variablename, T &value) const
get variables by string
Definition: BTagging_v1.h:297
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Trk::jet_phi
@ jet_phi
Definition: JetVtxParamDefs.h:28
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
FTAGValidation::PhysicsVariablePlots::PhysicsVariablePlots
PhysicsVariablePlots()
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
FTAGValidation::FTAGValidationAlgorithm::m_maxJetEta
Gaudi::Property< float > m_maxJetEta
Definition: FTAGValidationAlgorithm.h:53
FTAGValidation::FTAGValidationAlgorithm::passJetKinematicSelection
bool passJetKinematicSelection(const xAOD::Jet *) const
Definition: FTAGValidationAlgorithm.cxx:21
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
runIDPVM.jetCollection
jetCollection
Definition: runIDPVM.py:112
FTAGValidation::PhysicsVariablePlots::fillHistogram
StatusCode fillHistogram(const std::string &, T)
FTAGValidation::FTAGValidationAlgorithm::initialize
virtual StatusCode initialize()
Definition: FTAGValidationAlgorithm.cxx:13
FTAGValidation::FTAGValidationAlgorithm::getPrimaryVertex
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer *) const
Definition: FTAGValidationAlgorithm.cxx:126
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
xAOD::SV1_masssvx
@ SV1_masssvx
SV1 : vertex mass.
Definition: BTaggingEnums.h:37
xAOD::BTagging_v1::MVx_discriminant
bool MVx_discriminant(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:381
xAOD::BTagging_v1::pb
bool pb(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:360
SG::ConstAccessor::withDefault
const_reference_type withDefault(const ELT &e, const T &deflt) const
Fetch the variable for one element, as a const reference, with a default.