ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Analysis::IPTag Class Reference

#include <IPTag.h>

Inheritance diagram for Analysis::IPTag:
Collaboration diagram for Analysis::IPTag:

Public Member Functions

 IPTag (const std::string &, const std::string &, const IInterface *)
 
virtual ~IPTag ()
 Implementations of the methods defined in the abstract base class. More...
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual StatusCode tagJet (const xAOD::Vertex &priVtx, const xAOD::Jet &jetToTag, xAOD::BTagging &BTag, const std::string &jetName) const override
 
void trackWeight (const std::string &jetAuthor, const TrackGrade &grade, double sa0, double sz0, double &twb, double &twu, double &twc) const
 calculate individual track contribution to the three likelihoods: More...
 
virtual void finalizeHistos () override
 

Private Attributes

std::string m_runModus
 This switch is needed to indicate what to do. More...
 
std::string m_xAODBaseName
 base name string for persistification in xaod More...
 
HistoHelperRootm_histoHelper
 Histogram Helper Class. More...
 
bool m_flipIP
 VD: bool switches. More...
 
bool m_flipZIP
 
bool m_usePosIP
 
bool m_useNegIP
 
bool m_useZIPSignForPosNeg
 
bool m_use2DSignForIP3D
 
bool m_useD0SignForZ0
 
bool m_sortPt
 
bool m_sortD0sig
 
bool m_sortZ0D0sig
 
bool m_RejectBadTracks
 
bool m_SignWithSvx
 
bool m_checkOverflows
 
bool m_doForcedCalib
 
bool m_useCHypo
 
bool m_unbiasIPEstimation
 
bool m_storeTrackParticles
 
bool m_storeIpValues
 
bool m_storeTrackParameters
 
std::string m_trackAssociationName
 Name of the track-to-jet association in the BTagging object. More...
 
std::string m_impactParameterView
 specify the tag type (1D or 2D) More...
 
std::string m_forcedCalibName
 forcing the calibration folder of a given collection More...
 
std::string m_referenceType
 for reference mode: More...
 
double m_purificationDeltaR
 
double m_jetPtMinRef
 
std::string m_secVxFinderName
 names of fools for getting the secondary vertex information More...
 
int m_NtrkMin
 additional switch for smart track selection More...
 
int m_NtrkMax
 
float m_trkFract
 
std::string m_sortOption
 
std::vector< std::string > m_hypotheses
 
std::vector< std::string > m_trackGradePartitionsDefinition
 track classification. More...
 
std::vector< TrackGradePartition * > m_trackGradePartitions
 
std::vector< std::string > m_jetCollectionList
 
ToolHandle< TrackSelectorm_trackSelectorTool
 Track selection cuts for IPTagging. More...
 
ToolHandle< NewLikelihoodToolm_likelihoodTool
 Pointer to the likelihood tool. More...
 
ToolHandle< SVForIPToolm_SVForIPTool
 Pointer to the SV tool. More...
 
ToolHandle< ITrackGradeFactorym_trackGradeFactory
 ToolHandle for the ITrackGradeFactory tool. More...
 
ToolHandle< Trk::ITrackToVertexIPEstimatorm_trackToVertexIPEstimator
 GP: Tool for the estimation of the IPs to the Vertex. More...
 
std::atomic< int > m_nbjet
 
std::atomic< int > m_ncjet
 
std::atomic< int > m_nljet
 

Detailed Description

b-jet tagger based on 2D or 3D impact parameter

Author
CPPM Marseille

Definition at line 34 of file IPTag.h.

Constructor & Destructor Documentation

◆ IPTag()

Analysis::IPTag::IPTag ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 62 of file IPTag.cxx.

63  : base_class(t,n,p),
64  m_runModus("analysis"),
65  m_histoHelper(0),
66  m_sortPt(false),
67  m_sortD0sig(false),
68  m_sortZ0D0sig(false),
70  m_secVxFinderName("InDetVKalVxInJetTool"),
71  m_trackSelectorTool("Analysis::TrackSelector", this),
72  m_likelihoodTool("Analysis::NewLikelihoodTool", this),
73  m_SVForIPTool("Analysis::SVForIPTool", this),
74  m_trackGradeFactory("Analysis::BasicTrackGradeFactory", this),
76  {
77  // global configuration:
78  declareProperty("Runmodus" , m_runModus);
79  declareProperty("xAODBaseName" , m_xAODBaseName);
80 
81  declareProperty("flipIPSign" , m_flipIP = false);
82  declareProperty("flipZIPSign" , m_flipZIP = false);
83  declareProperty("usePosIP" , m_usePosIP = true);
84  declareProperty("useNegIP" , m_useNegIP = true);
85  declareProperty("useZIPSignForPosNeg" , m_useZIPSignForPosNeg = false);
86  declareProperty("use2DSignForIP3D" , m_use2DSignForIP3D = false);
87  declareProperty("useD0SignForZ0" , m_useD0SignForZ0 = false);
88  declareProperty("RejectBadTracks" , m_RejectBadTracks = true);
89  declareProperty("SignWithSvx" , m_SignWithSvx = false);
90  declareProperty("checkOverflows" , m_checkOverflows = false);
91  declareProperty("useForcedCalibration", m_doForcedCalib = false);
92  declareProperty("UseCHypo" , m_useCHypo = true);
93  declareProperty("unbiasIPEstimation" , m_unbiasIPEstimation);
94 
95  declareProperty("trackAssociationName" , m_trackAssociationName = "BTagTrackToJetAssociator");
96  declareProperty("jetCollectionList" , m_jetCollectionList);
97  declareProperty("impactParameterView" , m_impactParameterView = "2D");
98  declareProperty("ForcedCalibrationName" , m_forcedCalibName = "Cone4H1Tower");
99 
100  declareProperty("trackGradePartitions" , m_trackGradePartitionsDefinition);
101  m_trackGradePartitionsDefinition.push_back("Good");
102 
103  declareProperty("referenceType" , m_referenceType = "ALL"); // B, UDSG, ALL
104  declareProperty("purificationDeltaR" , m_purificationDeltaR = 0.8);
105  declareProperty("jetPtMinRef" , m_jetPtMinRef = 15.*Gaudi::Units::GeV);
106 
107  declareProperty("SecVxFinderName" ,m_secVxFinderName);
108 
109  declareProperty("NtrkMin" , m_NtrkMin =6 );
110  declareProperty("NtrkMax" , m_NtrkMax =6 );
111  declareProperty("NtrkFract" , m_trkFract=1.0 );
112  declareProperty("SortingMode" , m_sortOption="None"); //"None");
113 #define PROP(name, def) declareProperty( #name, m_ ## name = def)
114  PROP(storeTrackParticles, true);
115  PROP(storeIpValues, false);
116  PROP(storeTrackParameters, true);
117 #undef PROP
118 
119  // tools:
120  declareProperty("trackSelectorTool" , m_trackSelectorTool );
121  declareProperty("LikelihoodTool" , m_likelihoodTool );
122  declareProperty("SVForIPTool" , m_SVForIPTool );
123  declareProperty("trackGradeFactory" , m_trackGradeFactory );
124  declareProperty("TrackToVertexIPEstimator" , m_trackToVertexIPEstimator );
125  }

◆ ~IPTag()

Analysis::IPTag::~IPTag ( )
virtual

Implementations of the methods defined in the abstract base class.

Definition at line 129 of file IPTag.cxx.

129  {
130  delete m_histoHelper;
131  for (size_t i = 0; i < m_trackGradePartitions.size(); i++)
132  delete m_trackGradePartitions[i];
133  }

Member Function Documentation

◆ finalize()

StatusCode Analysis::IPTag::finalize ( )
overridevirtual

Definition at line 323 of file IPTag.cxx.

323  {
324  if( m_runModus == "reference" ) {
325  ATH_MSG_INFO("#BTAG# Number of jets used for calibration for reference "
326  << m_referenceType << " : #b= " << m_nbjet << " #light= " << m_nljet << " #charm= " << m_ncjet );
327  }
328  return StatusCode::SUCCESS;
329  }

◆ finalizeHistos()

virtual void Analysis::IPTag::finalizeHistos ( )
inlineoverridevirtual

Definition at line 56 of file IPTag.h.

56 {};

◆ initialize()

StatusCode Analysis::IPTag::initialize ( )
overridevirtual

creation of TrackSelector: (private instance)

retrieving histoHelper:

retrieving the track grade factory

prepare the track partitions:

configure likelihood:

book calibration histograms if needed

Definition at line 138 of file IPTag.cxx.

138  {
139 
140  // VD: deciding the track sorting mode
141  if ( m_sortOption=="None" ) {
142  ATH_MSG_DEBUG("#BTAG# No sorting applied ");
143  m_sortPt =false;
144  m_sortD0sig =false;
145  m_sortZ0D0sig=false;
146  } else if ( m_sortOption=="SortPt" ) {
147  ATH_MSG_DEBUG("#BTAG# Tracks will be sorted by Pt ");
148  m_sortPt =true;
149  m_sortD0sig =false;
150  m_sortZ0D0sig=false;
151  } else if ( m_sortOption=="SortD0" ) {
152  ATH_MSG_DEBUG("#BTAG# Tracks will be sorted by |d0Sig| ");
153  m_sortPt =false;
154  m_sortD0sig =true;
155  m_sortZ0D0sig=false;
156  } else if ( m_sortOption=="SortZ0D0" ) {
157  ATH_MSG_DEBUG("#BTAG# Tracks will be sorted by sqrt( |d0Sig|^2 + |z0Sig|^2 ) ");
158  m_sortPt =false;
159  m_sortD0sig =false;
160  m_sortZ0D0sig=true;
161  } else {
162  ATH_MSG_ERROR("#BTAG# sorting option NOT recognised (please use: <None>, <SortPt>, <SortD0> ");
163  return StatusCode::FAILURE;
164  }
165 
166  if ( m_sortOption=="None" ) {
167  m_NtrkMax =1000;
169  m_trkFract=1.0;
170  } else {
171  if (m_trkFract!=1.0) {
172  ATH_MSG_DEBUG("#BTAG# Considering only first "<< m_trkFract << " % of the tracks in the jet but keeping at least " << m_NtrkMin);
173  } else {
174  ATH_MSG_DEBUG("#BTAG# Considering only maximum "<< m_NtrkMax << " per jet");
175  }
176  }
177 
178 
179  m_hypotheses.push_back("B");
180  m_hypotheses.push_back("U");
181  if(m_useCHypo){
182  m_hypotheses.push_back("C");
183  }
184 
185  // FF: comment out V0 finding
186  if (m_SVForIPTool.retrieve().isFailure() ) {
187  ATH_MSG_FATAL("#BTAG# Failed to retrieve tool " << m_SVForIPTool);
188  return StatusCode::FAILURE;
189  } else {
190  ATH_MSG_DEBUG("#BTAG# Retrieved tool " << m_SVForIPTool);
191  }
192  if (m_trackToVertexIPEstimator.retrieve().isFailure() ) {
193  ATH_MSG_FATAL("#BTAG# Failed to retrieve tool " << m_trackToVertexIPEstimator);
194  return StatusCode::FAILURE;
195  } else {
196  ATH_MSG_DEBUG("#BTAG# Retrieved tool " << m_trackToVertexIPEstimator);
197  }
198 
199 
201  if ( m_trackSelectorTool.retrieve().isFailure() ) {
202  ATH_MSG_FATAL("#BTAG# Failed to retrieve tool " << m_trackSelectorTool);
203  return StatusCode::FAILURE;
204  } else {
205  ATH_MSG_DEBUG("#BTAG# Retrieved tool " << m_trackSelectorTool);
206  }
207 
209  ITHistSvc* myHistoSvc;
210  if( service( "THistSvc", myHistoSvc ).isSuccess() ) {
211  ATH_MSG_DEBUG("#BTAG# HistoSvc loaded successfully.");
212  m_histoHelper = new HistoHelperRoot(myHistoSvc);
214  } else {
215  ATH_MSG_ERROR("#BTAG# HistoSvc could NOT bo loaded.");
216  }
217 
219  if ( m_trackGradeFactory.retrieve().isFailure() ) {
220  ATH_MSG_FATAL("#BTAG# Failed to retrieve tool " << m_trackGradeFactory);
221  return StatusCode::FAILURE;
222  } else {
223  ATH_MSG_DEBUG("#BTAG# Retrieved tool " << m_trackGradeFactory);
224  }
225 
226 
228  int nbPart = m_trackGradePartitionsDefinition.size();
229  ATH_MSG_DEBUG("#BTAG# Defining " << nbPart <<" track partitions: ");
230  for(int i=0;i<nbPart;i++) {
231  TrackGradePartition* part(0);
232  try {
233  part = new TrackGradePartition(m_trackGradePartitionsDefinition[i],
235  }
236  catch (std::string error) {
237  ATH_MSG_ERROR("#BTAG# Reported error " << error);
238  ATH_MSG_ERROR("#BTAG# List of categories provided to IPTag by jO : ");
239  for (int l=0;l<nbPart;l++) {
240  ATH_MSG_ERROR("#BTAG# string " << m_trackGradePartitionsDefinition[l]);
241  }
242  ATH_MSG_ERROR("#BTAG# List of categories provided by the TrackGradeFactory " << m_trackGradeFactory);
243 
244  const TrackGradesDefinition & trackFactoryGradesDefinition = m_trackGradeFactory->getTrackGradesDefinition();
245  const std::vector<TrackGrade> & gradeList = trackFactoryGradesDefinition.getList();
246  std::vector<TrackGrade>::const_iterator listIter=gradeList.begin();
247  std::vector<TrackGrade>::const_iterator listEnd=gradeList.end();
248  if (msgLvl(MSG::ERROR)) {
249  for ( ; listIter !=listEnd ; ++listIter ) {
250  ATH_MSG_ERROR("#BTAG# n. " << (*listIter).gradeNumber() << " string " << (*listIter).gradeString());
251  }
252  }
253  ATH_MSG_ERROR("#BTAG# Terminating now... ");
254  return StatusCode::FAILURE;
255  }
256  ATH_MSG_DEBUG((*part));
257  m_trackGradePartitions.push_back(part);
258  }
259 
261  if( m_runModus == "analysis" ) {
262  if ( m_likelihoodTool.retrieve().isFailure() ) {
263  ATH_MSG_FATAL("#BTAG# Failed to retrieve tool " << m_likelihoodTool);
264  return StatusCode::FAILURE;
265  } else {
266  ATH_MSG_DEBUG("#BTAG# Retrieved tool " << m_likelihoodTool);
267  }
268  m_likelihoodTool->defineHypotheses(m_hypotheses);
269  m_likelihoodTool->printStatus();
270  }
271 
272  const TrackGradesDefinition & trackFactoryGradesDefinition = m_trackGradeFactory->getTrackGradesDefinition();
273  const std::vector<TrackGrade> & gradeList = trackFactoryGradesDefinition.getList();
274  std::vector<TrackGrade>::const_iterator listBegin=gradeList.begin();
275  std::vector<TrackGrade>::const_iterator listEnd=gradeList.end();
276 
278  if( m_runModus == "reference" ) {
279  ATH_MSG_DEBUG("#BTAG# running IPTag in reference mode");
280  for(uint j=0;j<m_jetCollectionList.size();j++) {
281 
282  for (std::vector<TrackGrade>::const_iterator listIter=listBegin ; listIter !=listEnd ; ++listIter ) {
283  const TrackGrade & grd = (*listIter);
284  if(m_impactParameterView=="1D") {
285  for(uint ih=0;ih<m_hypotheses.size();ih++) {
286  std::string hName = "/RefFile/IP1D/" + m_jetCollectionList[j] + "/"
287  + m_hypotheses[ih] + "/" + grd.gradeString() + "/SipZ0";
288  ATH_MSG_VERBOSE("#BTAG# booking for IP1D: " << hName);
289  m_histoHelper->bookHisto(hName,"Signed Impact Parameter (z)",400,-40.,60.);
290  }
291  }
292  if(m_impactParameterView=="2D") {
293  for(uint ih=0;ih<m_hypotheses.size();ih++) {
294  std::string hName = "/RefFile/IP2D/" + m_jetCollectionList[j] + "/"
295  + m_hypotheses[ih] + "/" + grd.gradeString() + "/SipA0";
296  ATH_MSG_VERBOSE("#BTAG# booking for IP2D: " << hName);
297  m_histoHelper->bookHisto(hName,"Signed Impact Parameter (rphi)",400,-40.,60.);
298  }
299  }
300  if(m_impactParameterView=="3D") {
301  const int nbx = 36;
302  const int nby = 21;
303  double xbi[nbx] = {-40.0,-20.0,-15.0,-10.0,-8.0,-6.0,-5.5,-5.0,-4.5,-4.0,-3.5,-3.0,-2.5,-2.0,-1.5,-1.0,-0.5,
304  0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,8.0,10.0,15.0,20.0,40.0,60.0};
305  double ybi[nby] = {-40.,-20.,-12.,-8.,-4.,-3.,-2.,-1.,-0.5,0.,0.5,1.,2.,3.,4.,6.,8.,12.,20.,40.,60.};
306  for(uint ih=0;ih<m_hypotheses.size();ih++) {
307  std::string hName = "/RefFile/IP3D/" + m_jetCollectionList[j] + "/"
308  + m_hypotheses[ih] + "/" + grd.gradeString() + "/Sip3D";
309  ATH_MSG_VERBOSE("#BTAG# booking for IP3D: " << hName);
310  m_histoHelper->bookHisto(hName,"Signed IP Z0 vs (rphi)",nbx-1,xbi,nby-1,ybi);
311  }
312  }
313  } // endloop on partitions
314 
315  }
316  // ms m_histoHelper->print();
317  }
318 
319  return StatusCode::SUCCESS;
320  }

◆ tagJet()

StatusCode Analysis::IPTag::tagJet ( const xAOD::Vertex priVtx,
const xAOD::Jet jetToTag,
xAOD::BTagging BTag,
const std::string &  jetName 
) const
overridevirtual

author to know which jet algorithm:

for the reference mode we need the true label:

extract the TrackParticles from the jet and apply track selection:

jet direction:

prepare vectors with all track information: TP links, i.p. significances, track grade, etc

track parameters defined at the primary vertex:

use new Tool for "unbiased" IP estimation

sign of the impact parameter

option to flip signs for negative tag method

select according to sign: skip tracks if not ok

significances

fill reference histograms:

  • ms

fill information to xaod:

define and compute likelihood:

fill likelihood information in xaod:

fill trackParticle links and other track informations in xaod:

Definition at line 332 of file IPTag.cxx.

336  {
337  ATH_MSG_VERBOSE("#BTAG# m_impactParameterView = " << m_impactParameterView );
339  std::string author = jetName;
341  ATH_MSG_VERBOSE("#BTAG# Using jet type " << author << " for calibrations.");
342 
344  int label = -1;
345  //std::string label = "N/A";
346  std::string pref = "";
347  // FF: Disable reference mode running for now
348  if( m_runModus == "reference" ) {
349  // here we require a jet selection:
350  if( jetToTag.pt()>m_jetPtMinRef && fabs(jetToTag.eta())<2.5 ) {
351  label = xAOD::jetFlavourLabel(&jetToTag);
352  double deltaRtoClosestB = 999., deltaRtoClosestC = 999., deltaRtoClosestT = 999.;
353  double deltaRmin(0.);
354  if (jetToTag.getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
355  // for purification: require no b or c quark closer than dR=m_purificationDeltaR
356  jetToTag.getAttribute("TruthLabelDeltaR_C",deltaRtoClosestC);
357  jetToTag.getAttribute("TruthLabelDeltaR_T",deltaRtoClosestT);
358  deltaRmin = deltaRtoClosestB < deltaRtoClosestC ? deltaRtoClosestB : deltaRtoClosestC;
359  deltaRmin = deltaRtoClosestT < deltaRmin ? deltaRtoClosestT : deltaRmin;
360  } else {
361  ATH_MSG_ERROR("#BTAG# No TruthInfo ! Cannot run in reference mode !");
362  return StatusCode::FAILURE;
363  }
364  if ( ( "B"==m_referenceType && 5==label ) || // b-jets
365  ( "UDSG"==m_referenceType && 0==label ) || // light jets
366  ( "ALL"==m_referenceType && // all jets: b + purified light jets
367  ( 5==label || 4==label || ( 0==label && deltaRmin > m_purificationDeltaR ) ) )
368  ) {
369  if (5==label) {
370  pref = m_hypotheses[0];
371  m_nbjet++;
372  } else if (0==label) {
373  pref = m_hypotheses[1];
374  m_nljet++;
375  } else if (4==label && m_useCHypo) {
376  pref = m_hypotheses[2];
377  m_ncjet++;
378  }
379  }
380  }
381  }
382 
383  std::vector<GradedTrack> tracksInJet;
384  int nbPart = m_trackGradePartitionsDefinition.size();
385 
386  std::vector<const xAOD::TrackParticle*> TrkFromV0;
387  Amg::Vector3D SvxDirection;
388  bool canUseSvxDirection=false;
389 
390  if (m_SignWithSvx) {
391  m_SVForIPTool->getDirectionFromSecondaryVertexInfo(SvxDirection,canUseSvxDirection,//output
392  &BTag,m_secVxFinderName,priVtx);//input
393  }
394 
395  // bad tracks from V0s, conversions, interactions:
396  m_SVForIPTool->getTrkFromV0FromSecondaryVertexInfo(TrkFromV0,//output
397  &BTag,m_secVxFinderName);//input
398  if (TrkFromV0.size()!=0) ATH_MSG_DEBUG("#BTAG# TrkFromV0 : number of reconstructed bad tracks: " << TrkFromV0.size());
399 
401  int nbTrak = 0;
403  trackAssocAcc (m_trackAssociationName);
404  std::vector< ElementLink< xAOD::TrackParticleContainer > > associationLinks =
405  trackAssocAcc (BTag);
406  double sumTrkpT = 0;
407  if( associationLinks.size() == 0 ) {
408  ATH_MSG_VERBOSE("#BTAG# Could not find tracks associated with BTagging object as " << m_trackAssociationName);
409  } else {
410 
411  std::vector< ElementLink< xAOD::TrackParticleContainer> >::const_iterator trkIter;
412  // We loop over the tracks twice: the first time is to compute the summed pt of all tracks satisfying
413  // the "normal" criteria; the second time a possibly tighter pt cut may be applied
414  for( trkIter = associationLinks.begin(); trkIter != associationLinks.end() ; ++trkIter ) {
415  const xAOD::TrackParticle* aTemp = **trkIter;
416 
417 
418  if (m_trackSelectorTool->selectTrack(priVtx.position(),
419  aTemp))
420  {
421  sumTrkpT += aTemp->pt();
422  }
423  }
424 
425  for( trkIter = associationLinks.begin(); trkIter != associationLinks.end() ; ++trkIter ) {
426  const xAOD::TrackParticle* aTemp = **trkIter;
427  nbTrak++;
428  if( m_trackSelectorTool->selectTrack(priVtx.position(), aTemp, sumTrkpT) ) {
429  TrackGrade* theGrade = m_trackGradeFactory->getGrade(*aTemp, jetToTag.p4() );
430  ATH_MSG_VERBOSE("#BTAG# result of selectTrack is OK, grade= " << theGrade->gradeString() );
431  bool tobeUsed = false;
432  for(int i=0;i<nbPart;i++) {
435  *theGrade )
436  != (m_trackGradePartitions[i]->grades()).end() ) tobeUsed = true;
437  }
438  // is it a bad track ?
439  if( std::find(TrkFromV0.begin(),TrkFromV0.end(),aTemp) != TrkFromV0.end() ) {
440  ATH_MSG_VERBOSE("#BTAG# Bad track in jet, pt = " << aTemp->pt() << " eta = "
441  << aTemp->eta() << " phi = " << aTemp->phi() );
442  if (m_RejectBadTracks) tobeUsed = false;
443  }
444  // check required IP sign:
445  if (tobeUsed) tracksInJet.push_back(GradedTrack(*trkIter, *theGrade));
446  delete theGrade;
447  theGrade=0;
448  }
449  }
450  }
451 
452  ATH_MSG_VERBOSE("#BTAG# #tracks = " << nbTrak);
453  ATH_MSG_VERBOSE("#BTAG# the z of the primary = " << priVtx.position().z());
454 
456  Amg::Vector3D jetDirection(jetToTag.px(),jetToTag.py(),jetToTag.pz());
457  Amg::Vector3D unit = jetDirection.unit();
458  if (m_SignWithSvx && canUseSvxDirection) {
459  unit = SvxDirection.unit();
460  ATH_MSG_DEBUG("#BTAG# Using direction from sec vertex finder: " <<
461  " phi: " << unit.phi() << " theta: " << unit.theta() <<
462  " instead of jet direction phi: " << jetDirection.phi() <<
463  " theta: " << jetDirection.theta() );
464  }
465 
467  std::vector<ElementLink<xAOD::TrackParticleContainer> > IPTracks;
468  std::vector<double> vectD0;
469  std::vector<double> vectD0Signi;
470  std::vector<double> vectZ0;
471  std::vector<double> vectZ0Signi;
472  std::vector<TrackGrade> vectGrades;
474  std::vector<bool> vectFromV0;
475  std::vector<float> vectWeightB;
476  std::vector<float> vectWeightU;
477  std::vector<float> vectWeightC;
478  std::vector<myIPxDinfo> vectObj;
479 
480  // reserve approximate space (optimization):
481  const int nbTrackMean = 5;
482  vectD0.reserve(nbTrackMean);
483  vectD0Signi.reserve(nbTrackMean);
484  vectZ0.reserve(nbTrackMean);
485  vectZ0Signi.reserve(nbTrackMean);
486  vectGrades.reserve(nbTrackMean);
487  vectFromV0.reserve(nbTrackMean);
488  vectWeightB.reserve(nbTrackMean);
489  vectWeightU.reserve(nbTrackMean);
490  vectWeightC.reserve(nbTrackMean);
491  vectObj.reserve(nbTrackMean);
492 
493  for (std::vector<GradedTrack>::iterator trkItr = tracksInJet.begin();
494  trkItr != tracksInJet.end(); ++trkItr) {
495 
496  const xAOD::TrackParticle* trk = *(trkItr->track);
497  bool isFromV0 = (std::find(TrkFromV0.begin(),TrkFromV0.end(),trk) != TrkFromV0.end());
498 
500  double d0wrtPriVtx(0.);
501  double z0wrtPriVtx(0.);
502  double d0ErrwrtPriVtx(1.);
503  double z0ErrwrtPriVtx(1.);
504 
506  std::unique_ptr<Trk::ImpactParametersAndSigma> myIPandSigma = nullptr;
508  myIPandSigma = m_trackToVertexIPEstimator->estimate(trk, &priVtx, m_unbiasIPEstimation);
509  }
510  if(0==myIPandSigma) {
511  ATH_MSG_WARNING("#BTAG# IPTAG: trackToVertexIPEstimator failed !");
512  } else {
513  d0wrtPriVtx=myIPandSigma->IPd0;
514  d0ErrwrtPriVtx=myIPandSigma->sigmad0;
515  z0wrtPriVtx=myIPandSigma->IPz0SinTheta;
516  z0ErrwrtPriVtx=myIPandSigma->sigmaz0SinTheta;
517  }
518 
520  double signOfIP(1.);
521  if (m_impactParameterView=="2D" || m_impactParameterView=="1D" ||
523  signOfIP=m_trackToVertexIPEstimator->get2DLifetimeSignOfTrack(trk->perigeeParameters(),
524  unit, priVtx);
525  }
527  signOfIP=m_trackToVertexIPEstimator->get3DLifetimeSignOfTrack(trk->perigeeParameters(),
528  unit, priVtx);
529  }
530  double signOfZIP = m_trackToVertexIPEstimator->getZLifetimeSignOfTrack(trk->perigeeParameters(),
531  unit, priVtx);
532 
533  if (m_useD0SignForZ0) signOfZIP = signOfIP;
534 
536  if(m_flipIP && m_runModus!="reference") signOfIP = -signOfIP;
537  if(m_flipZIP && m_runModus!="reference") signOfZIP = -signOfZIP;
538 
540  if( m_runModus != "reference" ) {
541  if(signOfIP>0 && !m_usePosIP) continue;
542  if(signOfIP<0 && !m_useNegIP) continue;
543  if( m_useZIPSignForPosNeg ) {
544  if(m_impactParameterView=="3D" && signOfZIP>0 && !m_usePosIP) continue;
545  if(m_impactParameterView=="3D" && signOfZIP<0 && !m_useNegIP) continue;
546  }
547  }
548 
550  double sIP = signOfIP*fabs(d0wrtPriVtx);
551  double significance= signOfIP*fabs(d0wrtPriVtx/d0ErrwrtPriVtx);
552  double szIP = signOfZIP*fabs(z0wrtPriVtx);
553  double z0Sig = signOfZIP*fabs(z0wrtPriVtx/z0ErrwrtPriVtx);
554 
555  ATH_MSG_VERBOSE("#BTAG# IPTAG: Trk: grade= " << trkItr->grade.gradeString()
556  << " Eta= " << trk->eta() << " Phi= " << trk->phi() << " pT= " << trk->pt()
557  << " d0= " << sIP
558  << "+-" << d0ErrwrtPriVtx
559  << " sigd0= " << significance
560  << " z0= " << szIP
561  << "+-" << z0ErrwrtPriVtx
562  << " sigz0= " << z0Sig);
563 
564  // VD: I know that this is ugly but I want to minimise the changes as much as I can
565  myIPxDinfo tmpObj;
566  tmpObj.trk=trkItr->track;
567  tmpObj.d0 =sIP;
568  tmpObj.d0sig=significance;
569  tmpObj.z0 =szIP;
570  tmpObj.z0sig=z0Sig;
571  tmpObj.grade=trkItr->grade;
572  tmpObj.trkP =trk;
573  tmpObj.fromV0=isFromV0;
574  // compute individual track contribution to likelihood:
575  double tpb = 0., tpu = 0., tpc = 0.;
576  this->trackWeight(author,trkItr->grade,significance,z0Sig,tpb,tpu,tpc);
577  tmpObj.wB =tpb;
578  tmpObj.wU =tpu;
579  tmpObj.wC =tpc;
580  vectObj.push_back(tmpObj);
581  }
582 
583  if (m_sortPt) std::sort( vectObj.begin() , vectObj.end() , StructPTsorting );
584  if (m_sortD0sig) std::sort( vectObj.begin() , vectObj.end() , StructD0Sigsorting );
585  if (m_sortZ0D0sig) std::sort( vectObj.begin() , vectObj.end() , StructZ0D0Sigsorting );
586 
587  int resizeVal=vectObj.size();
588  if (m_NtrkMax!=1000) {
589  if ( m_trkFract==1.0 ) {
590  if ( m_NtrkMax<resizeVal ) resizeVal=m_NtrkMax;
591  } else {
592  int resizeVal2=(int)( (float)resizeVal*m_trkFract);
593  if (resizeVal<m_NtrkMin) resizeVal=m_NtrkMin;
594  if ( resizeVal2<resizeVal ) resizeVal=resizeVal2;
595  }
596  }
598  //std::cout << "before resizing: " << vectObj.size() << std::endl;
599  vectObj.resize(resizeVal);
600  //std::cout << "after resizing: " << vectObj.size() << std::endl;
601 
602  for (unsigned int i=0; i<vectObj.size(); i++) {
603  //if( m_impactParameterView=="3D" ) std::cout << i << " track pt: " << ((vectObj[i]).trkP)->pt() << " d0sig: " << (vectObj[i]).d0sig << std::endl;
605  if( m_runModus == "reference" ) {
607  if( !pref.empty() ) { // current jet passes selection for Sig or Bkg
608  ATH_MSG_DEBUG("#BTAG# filling ref histo for " << pref);
609  const TrackGradesDefinition & trackFactoryGradesDefinition = m_trackGradeFactory->getTrackGradesDefinition();
610  const std::vector<TrackGrade> & gradeList = trackFactoryGradesDefinition.getList();
611  std::vector<TrackGrade>::const_iterator listIter=gradeList.begin();
612  std::vector<TrackGrade>::const_iterator listEnd=gradeList.end();
613  for ( ; listIter !=listEnd ; ++listIter ) {
614  const TrackGrade & grd = (*listIter);
615  ATH_MSG_DEBUG("#BTAG# filling ref histo for grade " << grd.gradeString() );
616  if( grd==(vectObj[i]).grade ) { // check the grade of current track
617  ATH_MSG_DEBUG("#BTAG# track is of required grade ");
618  const std::string suffix = "_" + grd.gradeString();
619  if( m_impactParameterView=="1D" ) {
620  std::string hName = "/RefFile/IP1D/" + author + "/"
621  + pref + "/" + grd.gradeString() + "/SipZ0";
622  ATH_MSG_DEBUG("#BTAG# histo 1D: " << hName);
623  m_histoHelper->fillHisto(hName, (vectObj[i]).z0sig );
624  }
625  if( m_impactParameterView=="2D" ) {
626  std::string hName = "/RefFile/IP2D/" + author + "/"
627  + pref + "/" + grd.gradeString() + "/SipA0";
628  ATH_MSG_DEBUG("#BTAG# histo 2D: " << hName);
629  m_histoHelper->fillHisto(hName, (vectObj[i]).d0sig );
630  }
631  if( m_impactParameterView=="3D" ) {
632  std::string hName = "/RefFile/IP3D/" + author + "/"
633  + pref + "/" + grd.gradeString() + "/Sip3D";
634  ATH_MSG_DEBUG("#BTAG# histo 3D: " << hName);
635  m_histoHelper->fillHisto(hName,(vectObj[i]).d0sig, (vectObj[i]).z0sig);
636  }
637  }
638  }
639  }
640  }//*/ ////// END of reference mode ....
641 
642  IPTracks.push_back( (vectObj[i]).trk );
643  vectD0.push_back( (vectObj[i]).d0 );
644  vectD0Signi.push_back( (vectObj[i]).d0sig );
645  vectZ0.push_back( (vectObj[i]).z0 );
646  vectZ0Signi.push_back( (vectObj[i]).z0sig );
647  vectGrades.push_back( (vectObj[i]).grade );
649  vectFromV0.push_back( (vectObj[i]).fromV0 );
650  vectWeightB.push_back( (vectObj[i]).wB );
651  vectWeightU.push_back( (vectObj[i]).wU );
652  vectWeightC.push_back( (vectObj[i]).wC );
653 
654  } // endloop on tracks
655 
657  if(m_runModus=="analysis") {
658 
660  std::vector<Slice> slices;
661  for(unsigned int i=0; i<vectD0Signi.size(); i++) {
662  if(m_impactParameterView=="3D") {
663  AtomicProperty atom1(vectD0Signi[i],"Significance of IP (rphi)");
664  AtomicProperty atom2(vectZ0Signi[i],"Significance of Z0");
665  std::string compoName(author+"#");
666  compoName += vectGrades[i].gradeString();
667  compoName += "/Sip3D";
668  Composite compo1(compoName);
669  compo1.atoms.push_back(atom1);
670  compo1.atoms.push_back(atom2);
671  Slice slice1("IP3D");
672  slice1.composites.push_back(compo1);
673  slices.push_back(slice1);
674  }
675  if(m_impactParameterView=="2D") {
676  AtomicProperty atom1(vectD0Signi[i],"Significance of IP (rphi)");
677  std::string compoName(author+"#");
678  compoName += vectGrades[i].gradeString();
679  compoName += "/SipA0";
680  Composite compo1(compoName);
681  compo1.atoms.push_back(atom1);
682  Slice slice1("IP2D");
683  slice1.composites.push_back(compo1);
684  slices.push_back(slice1);
685  }
686  if(m_impactParameterView=="1D") {
687  AtomicProperty atom1(vectZ0Signi[i],"Significance of IP (z)");
688  std::string compoName(author+"#");
689  compoName += vectGrades[i].gradeString();
690  compoName += "/SipZ0";
691  Composite compo1(compoName);
692  compo1.atoms.push_back(atom1);
693  Slice slice1("IP1D");
694  slice1.composites.push_back(compo1);
695  slices.push_back(slice1);
696  }
697  }
698  std::vector<double> lkl;
699  lkl.reserve(3);
700  if(vectD0Signi.size()>0) {
701  lkl = m_likelihoodTool->calculateLikelihood(slices);
702  if (lkl.size() != 3) {
703  ATH_MSG_WARNING("#BTAG# likelihood size is " << lkl.size() << " expected size is 3");
704  lkl.resize(3,0.0);
705  }
706  } else {
707  lkl.push_back(1.);
708  lkl.push_back(1.e9);
709  lkl.push_back(1.e9);
710  }
711 
712  ATH_MSG_DEBUG("#BTAG# likelihood : number of values = " << lkl.size() );
713  ATH_MSG_DEBUG("#BTAG# likelihood : "
714  << "pb= " << lkl[0] << " pu= " << lkl[1] << " pc= " << lkl[2] );
715 
717  BTag.setVariable<float>(m_xAODBaseName, "pb", lkl[0]);
718  BTag.setVariable<float>(m_xAODBaseName, "pu", lkl[1]);
719  if (m_useCHypo) BTag.setVariable<float>(m_xAODBaseName, "pc", lkl[2]);
720 
723  if (IPTracks.size() == 0) {
724  ATH_MSG_VERBOSE("#BTAG# IPTracks is empty.");
725  }
726  else
727  {
728  ATH_MSG_VERBOSE("#BTAG# IPTracks is not empty: "<<IPTracks.size());
729  }
730  // NB: all vector<double> are converted as vector<float> for persistency.
731  std::vector<float> f_vectD0( vectD0.begin(), vectD0.end() );
732  std::vector<float> f_vectD0Signi( vectD0Signi.begin(), vectD0Signi.end() );
733  std::vector<float> f_vectZ0( vectZ0.begin(), vectZ0.end() );
734  std::vector<float> f_vectZ0Signi( vectZ0Signi.begin(), vectZ0Signi.end() );
735  std::vector<int> i_vectGrades( vectGrades.begin(), vectGrades.end() );
736  // specific fast accessors for mainstream instances of IPTag: IP3D, IP2D
737  if( "IP3D"==m_xAODBaseName ) {
738  if (m_storeTrackParticles) BTag.setIP3D_TrackParticleLinks(IPTracks);
739  if (m_storeIpValues) {
740  BTag.setTaggerInfo(f_vectD0, xAOD::BTagInfo::IP3D_valD0wrtPVofTracks);
741  BTag.setTaggerInfo(f_vectZ0, xAOD::BTagInfo::IP3D_valZ0wrtPVofTracks);
742  }
744  BTag.setTaggerInfo(f_vectD0Signi, xAOD::BTagInfo::IP3D_sigD0wrtPVofTracks);
745  BTag.setTaggerInfo(f_vectZ0Signi, xAOD::BTagInfo::IP3D_sigZ0wrtPVofTracks);
746  BTag.setTaggerInfo(vectWeightB, xAOD::BTagInfo::IP3D_weightBofTracks);
747  BTag.setTaggerInfo(vectWeightU, xAOD::BTagInfo::IP3D_weightUofTracks);
748  BTag.setTaggerInfo(vectWeightC, xAOD::BTagInfo::IP3D_weightCofTracks);
749  BTag.setTaggerInfo(vectFromV0, xAOD::BTagInfo::IP3D_flagFromV0ofTracks);
750  BTag.setTaggerInfo(i_vectGrades, xAOD::BTagInfo::IP3D_gradeOfTracks);
751  }
752  } else {
753  if( "IP2D"==m_xAODBaseName ) {
754  if (m_storeTrackParticles) BTag.setIP2D_TrackParticleLinks(IPTracks);
755  if (m_storeIpValues) BTag.setTaggerInfo(f_vectD0, xAOD::BTagInfo::IP2D_valD0wrtPVofTracks);
757  BTag.setTaggerInfo(f_vectD0Signi, xAOD::BTagInfo::IP2D_sigD0wrtPVofTracks);
758  BTag.setTaggerInfo(vectWeightB, xAOD::BTagInfo::IP2D_weightBofTracks);
759  BTag.setTaggerInfo(vectWeightU, xAOD::BTagInfo::IP2D_weightUofTracks);
760  BTag.setTaggerInfo(vectWeightC, xAOD::BTagInfo::IP2D_weightCofTracks);
761  BTag.setTaggerInfo(vectFromV0, xAOD::BTagInfo::IP2D_flagFromV0ofTracks);
762  BTag.setTaggerInfo(i_vectGrades, xAOD::BTagInfo::IP2D_gradeOfTracks);
763  }
764  } else { // generic accessors
766  if (m_storeTrackParticles) {
767  BTag.setVariable<std::vector<ElementLink<xAOD::TrackParticleContainer> > > (
768  m_xAODBaseName, "TrackParticleLinks", IPTracks );
769  BTag.setDynTPELName( m_xAODBaseName, "TrackParticleLinks");
770  }
771  if (m_storeIpValues) {
772  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "valD0wrtPVofTracks", f_vectD0);
773  if (m_impactParameterView=="3D") {
774  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "valZ0wrtPVofTracks", f_vectZ0);
775  }
776  }
778  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "sigD0wrtPVofTracks", f_vectD0Signi);
779  if(m_impactParameterView=="3D") {
780  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "sigZ0wrtPVofTracks", f_vectZ0Signi);
781  }
782  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "weightBofTracks", vectWeightB);
783  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "weightUofTracks", vectWeightU);
784  BTag.setVariable< std::vector<float> > (m_xAODBaseName, "weightCofTracks", vectWeightC);
785  BTag.setVariable< std::vector<bool> > (m_xAODBaseName, "flagFromV0ofTracks", vectFromV0);
786  BTag.setVariable< std::vector<int> > (m_xAODBaseName, "gradeOfTracks", i_vectGrades);
787  }
788  }
789  }
790  }
791 
792  return StatusCode::SUCCESS;
793  }

◆ trackWeight()

void Analysis::IPTag::trackWeight ( const std::string &  jetAuthor,
const TrackGrade grade,
double  sa0,
double  sz0,
double &  twb,
double &  twu,
double &  twc 
) const

calculate individual track contribution to the three likelihoods:

compute individual track contribution to the likelihoods:

define and compute likelihood:

Definition at line 796 of file IPTag.cxx.

797  { // output parameters
799  std::vector<Slice> slices;
800  if(m_impactParameterView=="3D") {
801  AtomicProperty atom1(sa0,"Significance of IP (rphi)");
802  AtomicProperty atom2(sz0,"Significance of Z0");
803  std::string compoName(author+"#");
804  compoName += grade.gradeString();
805  compoName += "/Sip3D";
806  Composite compo1(compoName);
807  compo1.atoms.push_back(atom1);
808  compo1.atoms.push_back(atom2);
809  Slice slice1("IP3D");
810  slice1.composites.push_back(compo1);
811  slices.push_back(slice1);
812  }
813  if(m_impactParameterView=="2D") {
814  AtomicProperty atom1(sa0,"Significance of IP (rphi)");
815  std::string compoName(author+"#");
816  compoName += grade.gradeString();
817  compoName += "/SipA0";
818  Composite compo1(compoName);
819  compo1.atoms.push_back(atom1);
820  Slice slice1("IP2D");
821  slice1.composites.push_back(compo1);
822  slices.push_back(slice1);
823  }
824  if(m_impactParameterView=="1D") {
825  AtomicProperty atom1(sz0,"Significance of IP (z)");
826  std::string compoName(author+"#");
827  compoName += grade.gradeString();
828  compoName += "/SipZ0";
829  Composite compo1(compoName);
830  compo1.atoms.push_back(atom1);
831  Slice slice1("IP1D");
832  slice1.composites.push_back(compo1);
833  slices.push_back(slice1);
834  }
835  std::vector<double> tmp = m_likelihoodTool->calculateLikelihood(slices);
836  twb = tmp[0];
837  twu = tmp[1];
838  twc = 0.;
839  if(m_useCHypo) twc = tmp[2];
840  }

Member Data Documentation

◆ m_checkOverflows

bool Analysis::IPTag::m_checkOverflows
private

Definition at line 84 of file IPTag.h.

◆ m_doForcedCalib

bool Analysis::IPTag::m_doForcedCalib
private

Definition at line 85 of file IPTag.h.

◆ m_flipIP

bool Analysis::IPTag::m_flipIP
private

VD: bool switches.

Definition at line 72 of file IPTag.h.

◆ m_flipZIP

bool Analysis::IPTag::m_flipZIP
private

Definition at line 73 of file IPTag.h.

◆ m_forcedCalibName

std::string Analysis::IPTag::m_forcedCalibName
private

forcing the calibration folder of a given collection

Definition at line 102 of file IPTag.h.

◆ m_histoHelper

HistoHelperRoot* Analysis::IPTag::m_histoHelper
private

Histogram Helper Class.

Definition at line 69 of file IPTag.h.

◆ m_hypotheses

std::vector<std::string> Analysis::IPTag::m_hypotheses
private

Definition at line 120 of file IPTag.h.

◆ m_impactParameterView

std::string Analysis::IPTag::m_impactParameterView
private

specify the tag type (1D or 2D)

Definition at line 99 of file IPTag.h.

◆ m_jetCollectionList

std::vector<std::string> Analysis::IPTag::m_jetCollectionList
private

Definition at line 124 of file IPTag.h.

◆ m_jetPtMinRef

double Analysis::IPTag::m_jetPtMinRef
private

Definition at line 107 of file IPTag.h.

◆ m_likelihoodTool

ToolHandle< NewLikelihoodTool > Analysis::IPTag::m_likelihoodTool
private

Pointer to the likelihood tool.

Definition at line 132 of file IPTag.h.

◆ m_nbjet

std::atomic<int> Analysis::IPTag::m_nbjet
mutableprivate

Definition at line 144 of file IPTag.h.

◆ m_ncjet

std::atomic<int> Analysis::IPTag::m_ncjet
mutableprivate

Definition at line 145 of file IPTag.h.

◆ m_nljet

std::atomic<int> Analysis::IPTag::m_nljet
mutableprivate

Definition at line 146 of file IPTag.h.

◆ m_NtrkMax

int Analysis::IPTag::m_NtrkMax
private

Definition at line 114 of file IPTag.h.

◆ m_NtrkMin

int Analysis::IPTag::m_NtrkMin
private

additional switch for smart track selection

Definition at line 113 of file IPTag.h.

◆ m_purificationDeltaR

double Analysis::IPTag::m_purificationDeltaR
private

Definition at line 106 of file IPTag.h.

◆ m_referenceType

std::string Analysis::IPTag::m_referenceType
private

for reference mode:

Definition at line 105 of file IPTag.h.

◆ m_RejectBadTracks

bool Analysis::IPTag::m_RejectBadTracks
private

Definition at line 82 of file IPTag.h.

◆ m_runModus

std::string Analysis::IPTag::m_runModus
private

This switch is needed to indicate what to do.

The algorithm can be run to produce reference histograms from the given MC files (m_runModus=0) or to work in analysis mode (m_runModus=1) where already made reference histograms are read. 0=Do not read histos, 1=Read referece histos (analysis mode)

Definition at line 63 of file IPTag.h.

◆ m_secVxFinderName

std::string Analysis::IPTag::m_secVxFinderName
private

names of fools for getting the secondary vertex information

Definition at line 110 of file IPTag.h.

◆ m_SignWithSvx

bool Analysis::IPTag::m_SignWithSvx
private

Definition at line 83 of file IPTag.h.

◆ m_sortD0sig

bool Analysis::IPTag::m_sortD0sig
private

Definition at line 80 of file IPTag.h.

◆ m_sortOption

std::string Analysis::IPTag::m_sortOption
private

Definition at line 116 of file IPTag.h.

◆ m_sortPt

bool Analysis::IPTag::m_sortPt
private

Definition at line 79 of file IPTag.h.

◆ m_sortZ0D0sig

bool Analysis::IPTag::m_sortZ0D0sig
private

Definition at line 81 of file IPTag.h.

◆ m_storeIpValues

bool Analysis::IPTag::m_storeIpValues
private

Definition at line 91 of file IPTag.h.

◆ m_storeTrackParameters

bool Analysis::IPTag::m_storeTrackParameters
private

Definition at line 92 of file IPTag.h.

◆ m_storeTrackParticles

bool Analysis::IPTag::m_storeTrackParticles
private

Definition at line 90 of file IPTag.h.

◆ m_SVForIPTool

ToolHandle< SVForIPTool > Analysis::IPTag::m_SVForIPTool
private

Pointer to the SV tool.

Definition at line 135 of file IPTag.h.

◆ m_trackAssociationName

std::string Analysis::IPTag::m_trackAssociationName
private

Name of the track-to-jet association in the BTagging object.

Definition at line 96 of file IPTag.h.

◆ m_trackGradeFactory

ToolHandle< ITrackGradeFactory > Analysis::IPTag::m_trackGradeFactory
private

ToolHandle for the ITrackGradeFactory tool.

Definition at line 138 of file IPTag.h.

◆ m_trackGradePartitions

std::vector<TrackGradePartition*> Analysis::IPTag::m_trackGradePartitions
private

Definition at line 123 of file IPTag.h.

◆ m_trackGradePartitionsDefinition

std::vector<std::string> Analysis::IPTag::m_trackGradePartitionsDefinition
private

track classification.

Definition at line 122 of file IPTag.h.

◆ m_trackSelectorTool

ToolHandle< TrackSelector > Analysis::IPTag::m_trackSelectorTool
private

Track selection cuts for IPTagging.

Definition at line 129 of file IPTag.h.

◆ m_trackToVertexIPEstimator

ToolHandle< Trk::ITrackToVertexIPEstimator > Analysis::IPTag::m_trackToVertexIPEstimator
private

GP: Tool for the estimation of the IPs to the Vertex.

Definition at line 141 of file IPTag.h.

◆ m_trkFract

float Analysis::IPTag::m_trkFract
private

Definition at line 115 of file IPTag.h.

◆ m_unbiasIPEstimation

bool Analysis::IPTag::m_unbiasIPEstimation
private

Definition at line 87 of file IPTag.h.

◆ m_use2DSignForIP3D

bool Analysis::IPTag::m_use2DSignForIP3D
private

Definition at line 77 of file IPTag.h.

◆ m_useCHypo

bool Analysis::IPTag::m_useCHypo
private

Definition at line 86 of file IPTag.h.

◆ m_useD0SignForZ0

bool Analysis::IPTag::m_useD0SignForZ0
private

Definition at line 78 of file IPTag.h.

◆ m_useNegIP

bool Analysis::IPTag::m_useNegIP
private

Definition at line 75 of file IPTag.h.

◆ m_usePosIP

bool Analysis::IPTag::m_usePosIP
private

Definition at line 74 of file IPTag.h.

◆ m_useZIPSignForPosNeg

bool Analysis::IPTag::m_useZIPSignForPosNeg
private

Definition at line 76 of file IPTag.h.

◆ m_xAODBaseName

std::string Analysis::IPTag::m_xAODBaseName
private

base name string for persistification in xaod

Definition at line 66 of file IPTag.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::IP3D_weightBofTracks
@ IP3D_weightBofTracks
IP3D : track contribution to B likelihood.
Definition: BTaggingEnums.h:94
Analysis::IPTag::m_trackGradeFactory
ToolHandle< ITrackGradeFactory > m_trackGradeFactory
ToolHandle for the ITrackGradeFactory tool.
Definition: IPTag.h:138
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
xAOD::IP2D_weightCofTracks
@ IP2D_weightCofTracks
IP2D : track contribution to C likelihood.
Definition: BTaggingEnums.h:77
Analysis::IPTag::m_unbiasIPEstimation
bool m_unbiasIPEstimation
Definition: IPTag.h:87
Analysis::IPTag::m_sortD0sig
bool m_sortD0sig
Definition: IPTag.h:80
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Analysis::IPTag::m_SignWithSvx
bool m_SignWithSvx
Definition: IPTag.h:83
Analysis::IPTag::m_RejectBadTracks
bool m_RejectBadTracks
Definition: IPTag.h:82
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Analysis::IPTag::m_jetCollectionList
std::vector< std::string > m_jetCollectionList
Definition: IPTag.h:124
xAOD::IP2D_weightUofTracks
@ IP2D_weightUofTracks
IP2D : track contribution to U likelihood.
Definition: BTaggingEnums.h:75
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Analysis::IPTag::m_storeTrackParameters
bool m_storeTrackParameters
Definition: IPTag.h:92
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Analysis::IPTag::m_storeIpValues
bool m_storeIpValues
Definition: IPTag.h:91
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Analysis::IPTag::m_use2DSignForIP3D
bool m_use2DSignForIP3D
Definition: IPTag.h:77
xAOD::IP2D_valD0wrtPVofTracks
@ IP2D_valD0wrtPVofTracks
IP2D : d0 value with respect to primary vertex.
Definition: BTaggingEnums.h:69
Analysis::StructPTsorting
bool StructPTsorting(const myIPxDinfo &objA, const myIPxDinfo &objB)
Definition: IPTag.cxx:42
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
Analysis::IPTag::m_sortOption
std::string m_sortOption
Definition: IPTag.h:116
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
Analysis::IPTag::m_forcedCalibName
std::string m_forcedCalibName
forcing the calibration folder of a given collection
Definition: IPTag.h:102
xAOD::IP2D_sigD0wrtPVofTracks
@ IP2D_sigD0wrtPVofTracks
IP2D : d0 significance with respect to primary vertex.
Definition: BTaggingEnums.h:71
Analysis::IPTag::m_sortPt
bool m_sortPt
Definition: IPTag.h:79
xAOD::IP3D_valD0wrtPVofTracks
@ IP3D_valD0wrtPVofTracks
IP3D : d0 value with respect to primary vertex.
Definition: BTaggingEnums.h:86
Analysis::HistoHelperRoot::setCheckOverflows
void setCheckOverflows(bool b)
Definition: HistoHelperRoot.h:71
xAOD::IP3D_sigD0wrtPVofTracks
@ IP3D_sigD0wrtPVofTracks
IP3D : d0 significance with respect to primary vertex.
Definition: BTaggingEnums.h:88
Analysis::IPTag::m_jetPtMinRef
double m_jetPtMinRef
Definition: IPTag.h:107
Trk::ImpactParametersAndSigma::IPd0
double IPd0
Definition: ITrackToVertexIPEstimator.h:34
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
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:54
Trk::ImpactParametersAndSigma::IPz0SinTheta
double IPz0SinTheta
Definition: ITrackToVertexIPEstimator.h:36
Analysis::IPTag::m_useZIPSignForPosNeg
bool m_useZIPSignForPosNeg
Definition: IPTag.h:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TestSUSYToolsAlg.pref
pref
Definition: TestSUSYToolsAlg.py:82
Analysis::IPTag::m_sortZ0D0sig
bool m_sortZ0D0sig
Definition: IPTag.h:81
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::IP3D_flagFromV0ofTracks
@ IP3D_flagFromV0ofTracks
IP3D : tracks from V0.
Definition: BTaggingEnums.h:84
Analysis::IPTag::m_xAODBaseName
std::string m_xAODBaseName
base name string for persistification in xaod
Definition: IPTag.h:66
Analysis::IPTag::trackWeight
void trackWeight(const std::string &jetAuthor, const TrackGrade &grade, double sa0, double sz0, double &twb, double &twu, double &twc) const
calculate individual track contribution to the three likelihoods:
Definition: IPTag.cxx:796
xAOD::Jet_v1::getAttribute
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Analysis::IPTag::m_likelihoodTool
ToolHandle< NewLikelihoodTool > m_likelihoodTool
Pointer to the likelihood tool.
Definition: IPTag.h:132
Analysis::StructD0Sigsorting
bool StructD0Sigsorting(const myIPxDinfo &objA, const myIPxDinfo &objB)
Definition: IPTag.cxx:46
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
xAOD::Jet_v1::pz
float pz() const
The z-component of the jet's momentum.
Definition: Jet_v1.cxx:99
xAOD::jetFlavourLabel
int jetFlavourLabel(const xAOD::Jet *jet, JetFlavourLabelType=ExclConeHadron)
Definition: JetFlavourInfo.cxx:93
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Analysis::IPTag::m_purificationDeltaR
double m_purificationDeltaR
Definition: IPTag.h:106
lumiFormat.i
int i
Definition: lumiFormat.py:92
Analysis::IPTag::m_useCHypo
bool m_useCHypo
Definition: IPTag.h:86
beamspotman.n
n
Definition: beamspotman.py:731
Analysis::HistoHelperRoot::bookHisto
void bookHisto(const std::string &histoName, const std::string &histoTitle, unsigned int bins, double minx, double maxx)
Definition: HistoHelperRoot.cxx:55
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::IP3D_gradeOfTracks
@ IP3D_gradeOfTracks
IP3D: track grade.
Definition: BTaggingEnums.h:82
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
Analysis::IPTag::m_impactParameterView
std::string m_impactParameterView
specify the tag type (1D or 2D)
Definition: IPTag.h:99
Analysis::IPTag::m_useNegIP
bool m_useNegIP
Definition: IPTag.h:75
Analysis::IPTag::m_hypotheses
std::vector< std::string > m_hypotheses
Definition: IPTag.h:120
Analysis::IPTag::m_flipIP
bool m_flipIP
VD: bool switches.
Definition: IPTag.h:72
Trk::ImpactParametersAndSigma::sigmad0
double sigmad0
Definition: ITrackToVertexIPEstimator.h:37
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
xAOD::Jet_v1::py
float py() const
The y-component of the jet's momentum.
Definition: Jet_v1.cxx:94
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
Analysis::IPTag::m_trackToVertexIPEstimator
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
GP: Tool for the estimation of the IPs to the Vertex.
Definition: IPTag.h:141
PROP
#define PROP(name, def)
xAOD::IP3D_sigZ0wrtPVofTracks
@ IP3D_sigZ0wrtPVofTracks
IP3D : z0 significance with respect to primary vertex.
Definition: BTaggingEnums.h:92
Analysis::IPTag::m_nljet
std::atomic< int > m_nljet
Definition: IPTag.h:146
Analysis::IPTag::m_trackGradePartitions
std::vector< TrackGradePartition * > m_trackGradePartitions
Definition: IPTag.h:123
xAOD::Jet_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: Jet_v1.cxx:49
xAOD::IP2D_flagFromV0ofTracks
@ IP2D_flagFromV0ofTracks
IP2D : tracks from V0.
Definition: BTaggingEnums.h:67
Analysis::IPTag::m_histoHelper
HistoHelperRoot * m_histoHelper
Histogram Helper Class.
Definition: IPTag.h:69
Analysis::IPTag::m_doForcedCalib
bool m_doForcedCalib
Definition: IPTag.h:85
xAOD::Jet_v1::px
float px() const
The x-component of the jet's momentum.
Definition: Jet_v1.cxx:90
Analysis::IPTag::m_SVForIPTool
ToolHandle< SVForIPTool > m_SVForIPTool
Pointer to the SV tool.
Definition: IPTag.h:135
Analysis::IPTag::m_checkOverflows
bool m_checkOverflows
Definition: IPTag.h:84
Analysis::StructZ0D0Sigsorting
bool StructZ0D0Sigsorting(const myIPxDinfo &objA, const myIPxDinfo &objB)
Definition: IPTag.cxx:50
Analysis::IPTag::m_nbjet
std::atomic< int > m_nbjet
Definition: IPTag.h:144
Analysis::IPTag::m_ncjet
std::atomic< int > m_ncjet
Definition: IPTag.h:145
xAOD::IP2D_weightBofTracks
@ IP2D_weightBofTracks
IP2D : track contribution to B likelihood.
Definition: BTaggingEnums.h:73
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Analysis::IPTag::m_NtrkMin
int m_NtrkMin
additional switch for smart track selection
Definition: IPTag.h:113
Analysis::IPTag::m_trackSelectorTool
ToolHandle< TrackSelector > m_trackSelectorTool
Track selection cuts for IPTagging.
Definition: IPTag.h:129
Analysis::IPTag::m_secVxFinderName
std::string m_secVxFinderName
names of fools for getting the secondary vertex information
Definition: IPTag.h:110
Analysis::IPTag::m_trackAssociationName
std::string m_trackAssociationName
Name of the track-to-jet association in the BTagging object.
Definition: IPTag.h:96
xAOD::Jet_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Jet_v1.cxx:71
Trk::ImpactParametersAndSigma::sigmaz0SinTheta
double sigmaz0SinTheta
Definition: ITrackToVertexIPEstimator.h:39
xAOD::IP3D_valZ0wrtPVofTracks
@ IP3D_valZ0wrtPVofTracks
IP3D : z0 value with respect to primary vertex.
Definition: BTaggingEnums.h:90
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:20
JetTagCalibConfig.grades
grades
Definition: JetTagCalibConfig.py:13
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
Analysis::IPTag::m_runModus
std::string m_runModus
This switch is needed to indicate what to do.
Definition: IPTag.h:56
Analysis::IPTag::m_flipZIP
bool m_flipZIP
Definition: IPTag.h:73
Analysis::IPTag::m_useD0SignForZ0
bool m_useD0SignForZ0
Definition: IPTag.h:78
Analysis::HistoHelperRoot::fillHisto
void fillHisto(const std::string &histoName, double) const
Definition: HistoHelperRoot.cxx:103
Analysis::IPTag::m_trackGradePartitionsDefinition
std::vector< std::string > m_trackGradePartitionsDefinition
track classification.
Definition: IPTag.h:122
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::IP3D_weightUofTracks
@ IP3D_weightUofTracks
IP3D : track contribution to U likelihood.
Definition: BTaggingEnums.h:96
Analysis::IPTag::m_NtrkMax
int m_NtrkMax
Definition: IPTag.h:114
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAODType::BTag
@ BTag
The object is a b-tagging object.
Definition: ObjectType.h:60
Analysis::IPTag::m_trkFract
float m_trkFract
Definition: IPTag.h:115
xAOD::Jet_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: Jet_v1.cxx:44
error
Definition: IImpactPoint3dEstimator.h:70
Analysis::IPTag::m_usePosIP
bool m_usePosIP
Definition: IPTag.h:74
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
xAOD::IP3D_weightCofTracks
@ IP3D_weightCofTracks
IP3D : track contribution to C likelihood.
Definition: BTaggingEnums.h:98
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
Analysis::IPTag::m_referenceType
std::string m_referenceType
for reference mode:
Definition: IPTag.h:105
Analysis::IPTag::m_storeTrackParticles
bool m_storeTrackParticles
Definition: IPTag.h:90