ATLAS Offline Software
Select_Bmumu.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //============================================================================
6 // Select_Bmumu.cxx
7 //============================================================================
8 //
9 // Author : Wolfgang Walkowiak <Wolfgang.Walkowiak@cern.ch.>
10 // Changes:
11 //
12 // Based on Select_onia2mumu.h.
13 // Original author: Daniel Scheirich <daniel.scheirich@cern.ch>
14 //
15 // Select B candidates for the B(s)mumu analysis including for
16 // the reference channels used.
17 //
18 // For an example see BPHY8.py .
19 //
20 // Job options provided by this class:
21 // - V0Tools -- ToolHandle for V0Tools (default: Trk::V0Tools)
22 // - HypothesisName -- name given to the hypothesis (passed flag)
23 // - InputVtxContainerName -- name of the input vertex container
24 // - TrkMasses" -- list of masses to be assigned to the tracks
25 // used for lifetime calculation
26 // (Make sure to give them in correct order!)
27 // - VtxMassHypo -- mass used in the calculation of lifetime
28 // - MassMin -- minimum of mass range
29 // - MassMax -- maximum of mass range
30 // - Chi2Max -- maximum chi2 cut
31 // - DoVertexType -- bits defining vertex association types
32 // to be used
33 // - Do3d -- add 3d proper time
34 // - BlindMassMin -- minimum of blinded mass range
35 // - BlindMassMax -- maximum blinded mass range
36 // - DoBlinding -- switch to enable blinding (default: false)
37 // - DoCutBlinded -- cut blinded vertices (default: false)
38 // - BlindOnlyAllMuonsTight -- only blind candidates with all tight muons
39 // - UseMuCalcMass -- use MUCALC mass in mass cuts (default: false)
40 // - SubDecVtxContNames -- names of containers with sub-decay candidates
41 // (in order of sub decays)
42 // - SubDecVtxHypoCondNames -- names of hypothesis required to be passed
43 // by sub-decay candidates
44 // - SubDecVtxHypoFlagNames -- names of hypothesis passed flags set by
45 // this algorithm on sub-decay candidates
46 // (taken as
47 // SupDecVtxHypoCondName+'_'+HypthesisName
48 // if not explicitely given)
49 //
50 //============================================================================
51 //
53 
54 #include <vector>
55 #include <string>
56 #include "TVector3.h"
57 
63 
64 /*
65  * Some useful typedefs
66  */
68 typedef std::vector<VertexLink> VertexLinkVector;
69 
70 namespace DerivationFramework {
71 
72  Select_Bmumu::Select_Bmumu(const std::string& t,
73  const std::string& n,
74  const IInterface* p) :
75  CfAthAlgTool(t,n,p),
76  m_v0Tools("Trk::V0Tools"),
77  m_muSelectionTool("CP::MuonSelectionTool/MuonSelectionTool") {
78 
79  declareInterface<DerivationFramework::IAugmentationTool>(this);
80 
81  // Declare tools
82  declareProperty("V0Tools", m_v0Tools);
83  declareProperty("MuonSelectionTool", m_muSelectionTool);
84 
85  // Declare user-defined properties
86 
87  declareProperty("HypothesisName" , m_hypoName = "A");
88  declareProperty("InputVtxContainerName" , m_inputVtxContainerName = "JpsiCandidates");
89  declareProperty("TrkMasses" , m_trkMasses = std::vector<double>(2, 105.658) );
90  declareProperty("VtxMassHypo" , m_massHypo = 3096.916 );
91  declareProperty("MassMax" , m_massMax = 6000);
92  declareProperty("MassMin" , m_massMin = 2000);
93  declareProperty("Chi2Max" , m_chi2Max = 200);
94  declareProperty("DoVertexType" , m_DoVertexType = 7);
95  declareProperty("Do3d" , m_do3d = false);
96  declareProperty("BlindMassMin" , m_blindMassMin = 0.);
97  declareProperty("BlindMassMax" , m_blindMassMax = 0.);
98  declareProperty("DoBlinding" , m_doBlinding = false);
99  declareProperty("DoCutBlinded" , m_doCutBlinded = false);
100  declareProperty("BlindOnlyAllMuonsTight", m_blindOnlyAllMuonsTight = false);
101  declareProperty("UseMuCalcMass" , m_useMuCalcMass = false);
102  declareProperty("SubDecVtxContNames" , m_subDecVtxContNames = {});
103  declareProperty("SubDecVtxHypoCondNames", m_subDecVtxHypoCondNames = {});
104  declareProperty("SubDecVtxHypoFlagNames", m_subDecVtxHypoFlagNames = {});
105  }
106  //----------------------------------------------------------------------------
108 
109  ATH_MSG_DEBUG("in initialize()");
110 
111  // retrieve V0 tools
112  CHECK( m_v0Tools.retrieve() );
113 
114  // retrieve MuonSelectionTool
115  if ( m_blindOnlyAllMuonsTight ) {
116  CHECK( m_muSelectionTool.retrieve() );
117  }
118 
119  // check length of sub-decay vertex container and required hypo name
120  // vectors
121  if ( m_subDecVtxContNames.size() != m_subDecVtxHypoCondNames.size() ) {
122  ATH_MSG_ERROR("initialize(): number of elements for options "
123  << "SubDecVtxContNames and SubDecVtxHypoCondNames does not "
124  << "match : " << m_subDecVtxContNames.size()
125  << " != " << m_subDecVtxHypoCondNames << " !!");
126  }
127  // check the length of condition and flag hypo name vectors and append
128  // to the later if necessary
129  if ( m_subDecVtxHypoCondNames.size() > m_subDecVtxHypoFlagNames.size() ) {
130  ATH_MSG_INFO("initialize(): SubDecVtxHypoFlagNames ("
131  << m_subDecVtxHypoFlagNames.size()
132  << ") < SubDecVtxHypoCondNames ("
133  << m_subDecVtxHypoCondNames.size()
134  << ") ... appending to the first.");
135  for ( unsigned int i = m_subDecVtxHypoFlagNames.size();
136  i < m_subDecVtxHypoCondNames.size(); ++i) {
137  std::string flagname = m_hypoName+"_"+m_subDecVtxHypoCondNames[i];
138  ATH_MSG_INFO("initialize(): SubDecVtxHypoFlagNames[" << i << "] = "
139  << flagname);
140  m_subDecVtxHypoFlagNames.push_back(flagname);
141  }
142  } else if ( m_subDecVtxHypoCondNames.size()
143  < m_subDecVtxHypoFlagNames.size() ) {
144  ATH_MSG_ERROR("initialize(): SubDecVtxHypoFlagNames ("
145  << m_subDecVtxHypoFlagNames.size()
146  << ") > SubDecVtxHypoCondNames ("
147  << m_subDecVtxHypoCondNames.size()
148  << ") ! Configuration error!");
149  }
150  return StatusCode::SUCCESS;
151  }
152  //----------------------------------------------------------------------------
154 
155  // everything all right
156  return StatusCode::SUCCESS;
157  }
158  //---------------------------------------------------------------------------
160  xAOD::BPhysHelper::pv_type pv_t) const {
161 
162  constexpr float errConst = -9999999;
163  const xAOD::Vertex* pv = bcand.pv(pv_t);
164  if (pv) {
165  // decorate the vertex.
166  // Proper decay time assuming constant mass hypothesis m_massHypo
167  BPHYS_CHECK( bcand.setTau(m_v0Tools->tau(bcand.vtx(), pv, m_massHypo),
168  pv_t,
170  // Proper decay time assuming error constant mass hypothesis m_massHypo
171  BPHYS_CHECK( bcand.setTauErr( m_v0Tools->tauError(bcand.vtx(), pv,
172  m_massHypo),
173  pv_t,
175 
176  BPHYS_CHECK( bcand.setTau(m_v0Tools->tau(bcand.vtx(),pv, m_trkMasses),
177  pv_t,
179 
180  BPHYS_CHECK( bcand.setTauErr(m_v0Tools->tauError(bcand.vtx(), pv,
181  m_trkMasses),
182  pv_t,
184  //enum pv_type {PV_MAX_SUM_PT2, PV_MIN_A0, PV_MIN_Z0, PV_MIN_Z0_BA};
185  } else {
186 
187  BPHYS_CHECK( bcand.setTau(errConst, pv_t,
189  // Proper decay time assuming error constant mass hypothesis m_massHypo
190  BPHYS_CHECK( bcand.setTauErr( errConst,
191  pv_t,
193 
194  BPHYS_CHECK( bcand.setTau( errConst,
195  pv_t,
197 
198  BPHYS_CHECK( bcand.setTauErr( errConst,
199  pv_t,
201  }
202 
203  if(m_do3d){
204 
205  BPHYS_CHECK( bcand.setTau3d( pv ?
206  m_v0Tools->tau3D(bcand.vtx(), pv,
207  m_massHypo)
208  : errConst, pv_t,
210  // Proper decay time assuming error constant mass hypothesis m_massHypo
211  BPHYS_CHECK( bcand.setTau3dErr( pv ?
212  m_v0Tools->tau3DError(bcand.vtx(), pv,
213  m_massHypo)
214  : errConst, pv_t,
216  );
217 
218  BPHYS_CHECK( bcand.setTau3d( pv ?
219  m_v0Tools->tau3D(bcand.vtx(), pv,
220  m_trkMasses)
221  : errConst, pv_t,
223 
224  BPHYS_CHECK( bcand.setTau3dErr( pv ?
225  m_v0Tools->tau3DError(bcand.vtx(), pv,
226  m_trkMasses)
227  : errConst, pv_t,
229  );
230  }
231 
232  }
233  //---------------------------------------------------------------------------
235 
236  // Jpsi container and its auxilliary store
237  xAOD::VertexContainer* bcandContainer = NULL;
238  xAOD::VertexAuxContainer* bcandAuxContainer = NULL;
239 
240  // retrieve from the StoreGate
241  CHECK(evtStore()->retrieve(bcandContainer, m_inputVtxContainerName));
242  CHECK(evtStore()->retrieve(bcandAuxContainer,
243  m_inputVtxContainerName+"Aux."));
244 
245  // for sub-decays
246  std::vector<xAOD::VertexContainer*> subCandConts;
247  std::vector<xAOD::VertexAuxContainer*> subCandAuxConts;
248 
249  // retrieve from StoreGate
250  for (auto cname : m_subDecVtxContNames) {
251  xAOD::VertexContainer* subCandCont = NULL;
252  xAOD::VertexAuxContainer* subCandAuxCont = NULL;
253  CHECK(evtStore()->retrieve(subCandCont , cname));
254  CHECK(evtStore()->retrieve(subCandAuxCont, cname+"Aux."));
255  subCandConts.push_back(subCandCont);
256  subCandAuxConts.push_back(subCandAuxCont);
257  }
258 
259  // preset pass flag to false for subdecays
260  for (unsigned int isub=0; isub < subCandConts.size(); ++isub) {
261  xAOD::VertexContainer* subCandCont = subCandConts[isub];
262  if ( subCandCont != NULL ) {
263  for (xAOD::VertexContainer::iterator it = subCandCont->begin();
264  it != subCandCont->end(); ++it) {
265  if ( *it != NULL ) {
266  // only set subdecay passed flag to false if not yet set at all
268  // set subdecay blinding flag to true if not yet set at all
269  // and blinding is requested
270  if ( m_doBlinding ) {
272  m_subDecVtxHypoFlagNames[isub]+"_blinded",
273  true);
274  }
275  } else {
276  ATH_MSG_WARNING("addBranches(): NULL pointer elements in "
277  "xAOD::VertexContainer !!");
278  }
279  } // for subCandCont
280  } // if subCandCont != NULL
281  } // for subCandConts
282 
283  bool doPt = (m_DoVertexType & 1) != 0;
284  bool doA0 = (m_DoVertexType & 2) != 0;
285  bool doZ0 = (m_DoVertexType & 4) != 0;
286  bool doZ0BA = (m_DoVertexType & 8) != 0;
287 
288  // loop over B candidates and perform selection and augmentation
289  // counters
290  int nPassMassCuts = 0;
291  int nPassChi2Cut = 0;
292  int nPassPrecVtxCut = 0;
293  int nInBlindedRegion = 0;
294  int nInBlindedRegionAllMuonsTight = 0;
295  xAOD::VertexContainer::iterator bcandItr = bcandContainer->begin();
296  for (; bcandItr!=bcandContainer->end(); ++bcandItr) {
297  // create BPhysHypoHelper
298  xAOD::BPhysHypoHelper bcand(m_hypoName, *bcandItr);
299 
300  //----------------------------------------------------
301  // decorate the vertex - part 1
302  //----------------------------------------------------
303  // a) invariant mass and error
304  if ( !bcand.setMass(m_trkMasses) )
305  ATH_MSG_WARNING("Decoration bcand.setMass failed");
306 
307  double massErr = m_v0Tools->invariantMassError(bcand.vtx(), m_trkMasses);
308  if ( !bcand.setMassErr(massErr) )
309  ATH_MSG_WARNING("Decoration bcand.setMassErr failed");
310 
311  // b) proper decay time and error:
312  // retrieve the refitted PV (or the original one,
313  // if the PV refitting was turned off)
314  // -- deferred to after the selection --
315  /*
316  if (doPt) ProcessVertex(bcand, xAOD::BPhysHelper::PV_MAX_SUM_PT2);
317  if (doA0) ProcessVertex(bcand, xAOD::BPhysHelper::PV_MIN_A0);
318  if (doZ0) ProcessVertex(bcand, xAOD::BPhysHelper::PV_MIN_Z0);
319  if (doZ0BA) ProcessVertex(bcand, xAOD::BPhysHelper::PV_MIN_Z0_BA);
320  */
321 
322  //----------------------------------------------------
323  // perform the selection (i.e. flag the vertex)
324  //----------------------------------------------------
325  // flag the vertex indicating that it is selected by this selector
326  bcand.setPass(true);
327  if ( m_doBlinding ) {
328  setPass(*bcand.vtx(),
329  m_hypoName+"_blinded", false);
330  }
331 
332  // now we check other cuts. if one of them didn't pass, set the flag to 0
333  // and continue to the next candidate:
334 
335  // 1) invariant mass cuts
336  bool passedMuCalcMassCut(m_useMuCalcMass);
337  bool blindedMuCalcMass(true);
338  if ( m_useMuCalcMass ) {
339  std::string bname = m_hypoName+"_MUCALC_mass";
340  static const SG::AuxElement::Accessor<float> mucalcAcc(bname);
341  if ( mucalcAcc.isAvailable(**bcandItr) ) {
342  passedMuCalcMassCut = massCuts(mucalcAcc(**bcandItr));
343  blindedMuCalcMass = massInBlindedRegion(mucalcAcc(**bcandItr));
344  } else {
345  passedMuCalcMassCut = false;
346  blindedMuCalcMass = false;
347  ATH_MSG_INFO("MUCALC mass not available: " << bname << " !");
348  }
349  }
350  bool passedMassCut = massCuts(bcand.mass());
351  bool blindedMass = massInBlindedRegion(bcand.mass());
352 
353  // 1a) muon quality cuts
354  bool allMuonsTight =
356 
357  // 1b) mark candidates in blinded region
358  if ( blindedMass && blindedMuCalcMass ) {
359  if ( m_doBlinding ) {
360  nInBlindedRegion++;
361  if ( allMuonsTight ) {
362  nInBlindedRegionAllMuonsTight++;
363  setPass(*bcand.vtx(),
364  m_hypoName+"_blinded", true);
365  }
366  }
367  }
368 
369  // 1c) cut on the mass range
370  if ( !(passedMassCut || passedMuCalcMassCut) ) {
371  bcand.setPass(false); // flag as failed
372  continue;
373  }
374  nPassMassCuts++;
375 
376  // 2) chi2 cut
377  if ( bcand.vtx()->chiSquared() > m_chi2Max) {
378  bcand.setPass(false);; // flag as failed
379  continue;
380  }
381  nPassChi2Cut++;
382 
383  // 3) preceeding vertices: within their mass ranges?
384  int npVtx = bcand.nPrecedingVertices();
385  if ( npVtx > (int)m_subDecVtxContNames.size() ) {
386  ATH_MSG_WARNING("addBranches(): npVtx > m_subDecVtxContNames.size() !"
387  " (" << npVtx << " > " << m_subDecVtxContNames.size()
388  << ")");
389  }
390  npVtx = std::min(npVtx, (int)m_subDecVtxContNames.size());
391  // check preceeding vertices
392  bool pVtxOk = true;
393  for (int ipv=0; ipv<npVtx; ++ipv) {
394  const xAOD::Vertex* pVtx = bcand.precedingVertex(ipv);
395  if ( !pass(*pVtx, m_subDecVtxHypoCondNames[ipv]) ) {
396  pVtxOk = false;
397  continue;
398  }
399  }
400  if ( !pVtxOk ) {
401  bcand.setPass(false);; // flag as failed
402  continue;
403  }
404  // mark preceeding vertices
405  for (int ipv=0; ipv<npVtx; ++ipv) {
406  setPass(*bcand.precedingVertex(ipv),
407  m_subDecVtxHypoFlagNames[ipv], true);
408  if ( m_doBlinding && !(blindedMass && blindedMuCalcMass
409  && allMuonsTight) ) {
410  setPass(*bcand.precedingVertex(ipv),
411  m_subDecVtxHypoFlagNames[ipv]+"_blinded", false);
412  }
413  }
414  nPassPrecVtxCut++;
415 
416  //----------------------------------------------------
417  // decorate the vertex - part 2
418  //----------------------------------------------------
419  // b) proper decay time and error:
420  // retrieve the refitted PV (or the original one,
421  // if the PV refitting was turned off)
426 
427  } // end of loop over bcand candidates
428 
429  // counters
430  // event level
431  addEvent("allEvents");
432  if ( bcandContainer->size() > 0 ) addEvent("eventsWithCands");
433  if ( nPassMassCuts > 0 ) addEvent("massCutEvents");
434  if ( nPassChi2Cut > 0 ) addEvent("chi2CutEvents");
435  if ( nPassPrecVtxCut > 0 ) addEvent("precVtxCutEvents");
436  if ( m_doBlinding && nInBlindedRegion > 0 ) addEvent("blindedRegionEvents");
437  // candidate level
438  addToCounter("allCandidates" , bcandContainer->size());
439  addToCounter("massCutCandidates" , nPassMassCuts);
440  addToCounter("chi2CutCandidates" , nPassChi2Cut);
441  addToCounter("precVtxCutCandidates", nPassPrecVtxCut);
442  if ( m_doBlinding ) {
443  addToCounter("blindedRegionCandidates", nInBlindedRegion);
444  if ( m_blindOnlyAllMuonsTight ) {
445  addToCounter("blindedRegionCandidatesWithAllMuonsTight",
446  nInBlindedRegionAllMuonsTight);
447  }
448  }
449 
450  // all OK
451  return StatusCode::SUCCESS;
452  }
453  //---------------------------------------------------------------------------
454  // Check whether mass cuts (including a possibly blinding region cut)
455  // are passed.
456  //---------------------------------------------------------------------------
457  bool Select_Bmumu::massCuts(float mass) const {
458 
459  return (mass > m_massMin && mass < m_massMax)
461  }
462  //---------------------------------------------------------------------------
463  // Check whether mass cuts (including a possibly blinding region cut)
464  // are passed.
465  //---------------------------------------------------------------------------
467  return ( mass > m_blindMassMin && mass < m_blindMassMax );
468  }
469  //--------------------------------------------------------------------------
470  // Check whether all muons are of quality tight.
471  //--------------------------------------------------------------------------
472  bool Select_Bmumu::checkAllMuonsTight(const std::vector<const xAOD::Muon*>&
473  muons, int maxMuonsToCheck) const {
474 
475  bool allTight(true);
476  int ncheckMax = muons.size();
477  if ( maxMuonsToCheck > -1 ) {
478  ncheckMax = std::min((int)muons.size(), maxMuonsToCheck);
479  }
480  for (int imu=0; imu < ncheckMax; ++imu) {
481  xAOD::Muon::Quality muQuality =
482  m_muSelectionTool->getQuality(*muons[imu]);
483  if ( !(muQuality <= xAOD::Muon::Tight) ) {
484  allTight = false;
485  break;
486  }
487  }
488  return allTight;
489  }
490  //---------------------------------------------------------------------------
491  // Helper to check whether an element is marked as passing a specific
492  // hypothesis.
493  //---------------------------------------------------------------------------
494  bool Select_Bmumu::pass(const SG::AuxElement& em, const std::string& hypo) const {
495 
496  SG::AuxElement::Accessor<Char_t> flagAcc("passed_"+hypo);
497  return flagAcc.isAvailable(em) && flagAcc(em) != 0;
498  }
499  //---------------------------------------------------------------------------
500  // Helper to set an element marked as passing a specific hypothesis.
501  //---------------------------------------------------------------------------
502  bool Select_Bmumu::setPass(const SG::AuxElement& em, const std::string& hypo,
503  bool passVal) const {
504 
505  SG::AuxElement::Decorator<Char_t> flagDec("passed_"+hypo);
506  flagDec(em) = passVal;
507  return true;
508  }
509  //---------------------------------------------------------------------------
510  // Helper to set an element marked as passing a specific hypothesis
511  // if the element doesn't have the specific flag yet.
512  // Returns true if action had to be taken.
513  //---------------------------------------------------------------------------
514  bool Select_Bmumu::setPassIfNotAvailable(SG::AuxElement& em, const std::string& hypo,
515  bool passVal) const {
516 
517  SG::AuxElement::Accessor<Char_t> flagAcc("passed_"+hypo);
518  bool exists = flagAcc.isAvailable(em);
519  if ( !exists ) {
520  setPass(em, hypo, passVal);
521  }
522  return !exists;
523  }
524  //---------------------------------------------------------------------------
525  // Fetch a vector of preceeding vertices for a specific vertex
526  //---------------------------------------------------------------------------
527  /*
528  std::vector<xAOD::Vertex*>
529  Select_Bmumu::getPrecedingVertices(const xAOD::Vertex* vtx) {
530 
531  // new vector of vertices
532  std::vector<xAOD::Vertex*> vtxList;
533 
534  // Create auxiliary branches accessors
535  static SG::AuxElement::Accessor<VertexLinkVector>
536  precedingVertexLinksAcc("PrecedingVertexLinks");
537 
538  // check if branch exists
539  if( precedingVertexLinksAcc.isAvailable(*vtx) ) {
540 
541  // retrieve the precedingVertex links...
542  const VertexLinkVector& precedingVertexLinks =
543  precedingVertexLinksAcc(*vtx);
544 
545  // ... and check if they are all valid
546  for ( VertexLinkVector::const_iterator precedingVertexLinksItr =
547  precedingVertexLinks.begin();
548  precedingVertexLinksItr!=precedingVertexLinks.end();
549  ++precedingVertexLinksItr) {
550  // check if links are valid
551  if( (*precedingVertexLinksItr).isValid() ) {
552  // xAOD::Vertex* vtx2 = *precedingVertexLinkItr;
553  // vtxList.push_back(*(*precedingVertexLinksItr));
554  }
555  } // for
556  } // if available
557 
558  return vtxList;
559  }
560  */
561  //---------------------------------------------------------------------------
562 
563 } // namespace DerivationFramework
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::BPhysHypoHelper::setMass
bool setMass(const float val)
Set given invariant mass and its error.
Definition: BPhysHypoHelper.cxx:49
DerivationFramework::Select_Bmumu::Select_Bmumu
Select_Bmumu(const std::string &t, const std::string &n, const IInterface *p)
Definition: Select_Bmumu.cxx:72
DerivationFramework::Select_Bmumu::finalize
StatusCode finalize() override
Definition: Select_Bmumu.cxx:153
V0Tools.h
DerivationFramework::Select_Bmumu::m_massHypo
double m_massHypo
vertex mass hypothesis
Definition: Select_Bmumu.h:96
xAOD::BPhysHypoHelper::setTau3dErr
bool setTau3dErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time error
Definition: BPhysHypoHelper.cxx:319
DerivationFramework::Select_Bmumu::m_doBlinding
bool m_doBlinding
enable blinding range
Definition: Select_Bmumu.h:104
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
DerivationFramework::Select_Bmumu::m_trkMasses
std::vector< double > m_trkMasses
track mass hypotheses
Definition: Select_Bmumu.h:95
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::CfAthAlgTool::addToCounter
virtual bool addToCounter(const std::string &name, uint64_t counts=1, double weight=1.) const
Definition: CfAthAlgTool.cxx:115
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
Select_Bmumu.h
DerivationFramework::Select_Bmumu::m_do3d
bool m_do3d
add 3d proper time
Definition: Select_Bmumu.h:101
xAOD::BPhysHypoHelper::setTauErr
bool setTauErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time error
Definition: BPhysHypoHelper.cxx:176
DerivationFramework::Select_Bmumu::massInBlindedRegion
bool massInBlindedRegion(float mass) const
Definition: Select_Bmumu.cxx:466
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
VertexLink
ElementLink< xAOD::VertexContainer > VertexLink
Definition: Select_Bmumu.cxx:67
DerivationFramework::Select_Bmumu::pass
bool pass(const SG::AuxElement &em, const std::string &hypo) const
Definition: Select_Bmumu.cxx:494
skel.it
it
Definition: skel.GENtoEVGEN.py:396
DerivationFramework::CfAthAlgTool::addEvent
virtual bool addEvent(const std::string &name, double weight=1.) const
Definition: CfAthAlgTool.cxx:104
xAOD::BPhysHelper::PV_MIN_Z0
@ PV_MIN_Z0
Definition: BPhysHelper.h:475
DerivationFramework::Select_Bmumu::m_blindMassMin
double m_blindMassMin
blinding mass range
Definition: Select_Bmumu.h:102
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::BPhysHypoHelper::TAU_INV_MASS
@ TAU_INV_MASS
Definition: BPhysHypoHelper.h:137
DerivationFramework::Select_Bmumu::initialize
StatusCode initialize() override
initialization and finalization
Definition: Select_Bmumu.cxx:107
VertexLinkVector
std::vector< VertexLink > VertexLinkVector
Definition: Select_Bmumu.cxx:68
DerivationFramework::Select_Bmumu::addBranches
virtual StatusCode addBranches() const override
: augmentation and selection Retrieved vertices are augmented with usual information.
Definition: Select_Bmumu.cxx:234
DerivationFramework::Select_Bmumu::m_muSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muSelectionTool
Definition: Select_Bmumu.h:89
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::BPhysHypoHelper
Definition: BPhysHypoHelper.h:73
DerivationFramework::Select_Bmumu::m_useMuCalcMass
bool m_useMuCalcMass
also check against MUCALC mass
Definition: Select_Bmumu.h:107
BPHYS_CHECK
#define BPHYS_CHECK(EXP)
Useful CHECK macro.
Definition: BPhysHelper.h:738
xAOD::BPhysHypoHelper::mass
float mass() const
Get invariant mass and its error.
Definition: BPhysHypoHelper.cxx:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::Select_Bmumu::m_massMin
double m_massMin
invariant mass range
Definition: Select_Bmumu.h:98
xAOD::BPhysHelper::pv_type
pv_type
: Enum type of the PV
Definition: BPhysHelper.h:475
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::Select_Bmumu::m_massMax
double m_massMax
invariant mass range
Definition: Select_Bmumu.h:97
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::BPhysHypoHelper::setPass
bool setPass(bool passVal)
get the pass flag for this hypothesis
Definition: BPhysHypoHelper.cxx:364
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::BPhysHelper::precedingVertex
const xAOD::Vertex * precedingVertex(const size_t index)
Returns pointer to a preceding vertex.
Definition: BPhysHelper.cxx:613
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::Select_Bmumu::m_chi2Max
double m_chi2Max
max chi2 cut
Definition: Select_Bmumu.h:99
BPhysHypoHelper.h
: B-physcis xAOD helpers.
DerivationFramework::Select_Bmumu::ProcessVertex
void ProcessVertex(xAOD::BPhysHypoHelper &, xAOD::BPhysHelper::pv_type) const
Definition: Select_Bmumu.cxx:159
xAOD::BPhysHelper::PV_MIN_A0
@ PV_MIN_A0
Definition: BPhysHelper.h:475
DerivationFramework::Select_Bmumu::m_doCutBlinded
bool m_doCutBlinded
enable cutting blinded vertices
Definition: Select_Bmumu.h:105
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
xAOD::BPhysHypoHelper::TAU_CONST_MASS
@ TAU_CONST_MASS
Definition: BPhysHypoHelper.h:137
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
LikeEnum::Tight
@ Tight
Definition: LikelihoodEnums.h:15
xAOD::BPhysHypoHelper::setTau3d
bool setTau3d(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time
Definition: BPhysHypoHelper.cxx:283
xAOD::BPhysHelper::vtx
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
Definition: BPhysHelper.h:108
DerivationFramework::Select_Bmumu::m_subDecVtxHypoFlagNames
std::vector< std::string > m_subDecVtxHypoFlagNames
names of hypo flags set on sub-decays if passing
Definition: Select_Bmumu.h:111
xAOD::BPhysHelper::PV_MAX_SUM_PT2
@ PV_MAX_SUM_PT2
Definition: BPhysHelper.h:475
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DerivationFramework::Select_Bmumu::m_subDecVtxContNames
std::vector< std::string > m_subDecVtxContNames
names of sub-decay vertex containers
Definition: Select_Bmumu.h:109
VertexContainer.h
xAOD::Vertex_v1::chiSquared
float chiSquared() const
Returns the of the vertex fit as float.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::Select_Bmumu::m_hypoName
std::string m_hypoName
job options
Definition: Select_Bmumu.h:93
xAOD::BPhysHelper::nPrecedingVertices
int nPrecedingVertices()
: Links to preceding vertices
Definition: BPhysHelper.cxx:601
python.changerun.pv
pv
Definition: changerun.py:81
DerivationFramework::Select_Bmumu::m_DoVertexType
int m_DoVertexType
Allows user to skip certain vertexes - bitwise test 7==all(111)
Definition: Select_Bmumu.h:100
xAOD::BPhysHelper::pv
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
Definition: BPhysHelper.cxx:796
DerivationFramework::Select_Bmumu::m_blindOnlyAllMuonsTight
bool m_blindOnlyAllMuonsTight
only blind candidates with all tight muons
Definition: Select_Bmumu.h:106
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::BPhysHelper::muons
const std::vector< const xAOD::Muon * > & muons()
Returns linked muons.
Definition: BPhysHelper.cxx:468
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9
DerivationFramework::Select_Bmumu::m_subDecVtxHypoCondNames
std::vector< std::string > m_subDecVtxHypoCondNames
hypo names for sub-decays to be considered
Definition: Select_Bmumu.h:110
DerivationFramework::Select_Bmumu::m_inputVtxContainerName
std::string m_inputVtxContainerName
name of the input container name
Definition: Select_Bmumu.h:94
DerivationFramework::Select_Bmumu::massCuts
bool massCuts(float mass) const
Definition: Select_Bmumu.cxx:457
xAOD::BPhysHypoHelper::setTau
bool setTau(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
: Set the proper decay time and error.
Definition: BPhysHypoHelper.cxx:140
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DerivationFramework::Select_Bmumu::setPassIfNotAvailable
bool setPassIfNotAvailable(SG::AuxElement &em, const std::string &hypo, bool passVal) const
Definition: Select_Bmumu.cxx:514
DerivationFramework::Select_Bmumu::m_blindMassMax
double m_blindMassMax
blinding mass range
Definition: Select_Bmumu.h:103
DerivationFramework::CfAthAlgTool
Definition: CfAthAlgTool.h:35
DerivationFramework::Select_Bmumu::checkAllMuonsTight
bool checkAllMuonsTight(const std::vector< const xAOD::Muon * > &muons, int maxMuonsToCheck=-1) const
Definition: Select_Bmumu.cxx:472
xAOD::BPhysHelper::PV_MIN_Z0_BA
@ PV_MIN_Z0_BA
Definition: BPhysHelper.h:475
xAOD::BPhysHypoHelper::setMassErr
bool setMassErr(const float val)
invariant mass error
Definition: BPhysHypoHelper.cxx:54
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
AuxElement.h
Base class for elements of a container that can have aux data.
VertexAuxContainer.h
DerivationFramework::Select_Bmumu::m_v0Tools
ToolHandle< Trk::V0Tools > m_v0Tools
tools
Definition: Select_Bmumu.h:88
DerivationFramework::Select_Bmumu::setPass
bool setPass(const SG::AuxElement &em, const std::string &hypo, bool passVal) const
Definition: Select_Bmumu.cxx:502