ATLAS Offline Software
BVertexTrackIsoTool.h
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 // BVertexTrackIsoTool.h
7 //============================================================================
8 //
9 // Author : Wolfgang Walkowiak <Wolfgang.Walkowiak@cern.ch.>
10 // Changes:
11 //
12 // Add B vertex track isolation information for different configurations,
13 // different track selections and different PV-to-SV association methods.
14 //
15 // For an usage example see BPHY8.py .
16 //
17 //============================================================================
18 //
19 #ifndef DERIVATIONFRAMEWORK_BVertexTrackIsoTool_H
20 #define DERIVATIONFRAMEWORK_BVertexTrackIsoTool_H
21 
23 #include "boost/multi_array.hpp"
24 
25 namespace InDet {
26  class IInDetTrackSelectionTool;
27 }
28 
29 namespace DerivationFramework {
30 
32 
33  private:
35 
36  //
37  // internal helper class
38  //
39  protected:
40  class IsoItem : public BaseItem {
41 
42  public:
43  IsoItem(const std::string& Name="_none_",
44  const std::string& Bname="iso",
45  const std::string& Prefix="",
46  double IsoValue=-1., int NTracks=0);
47  virtual ~IsoItem();
48 
49  virtual void setup(const std::string& Name,
50  const std::string& Bname="iso",
51  const std::string& Prefix="");
52  virtual void setup(const std::string& Name,
53  const std::string& Bname,
54  const std::string& Prefix,
55  double IsoValue, int NTracks=0);
56  virtual void resetVals();
57  virtual void copyVals(const BaseItem& item);
58  virtual void copyVals(const IsoItem& item);
59  virtual std::string isoName() const;
60  virtual std::string nTracksName() const;
61 
62  public:
63  double isoValue;
64  int nTracks;
65  }; // IsoItem
66 
67  public:
68  BVertexTrackIsoTool(const std::string& t, const std::string& n,
69  const IInterface* p);
70 
71  protected:
72  // Hook methods
73  virtual StatusCode initializeHook();
74  virtual StatusCode finalizeHook();
75 
76  virtual StatusCode addBranchesVCSetupHook(size_t ivc) const;
77 
78  virtual StatusCode addBranchesSVLoopHook(const xAOD::Vertex* vtx) const;
79 
80  virtual StatusCode calcValuesHook(const xAOD::Vertex* vtx,
81  const unsigned int ipv,
82  const unsigned int its,
83  const unsigned int itt) const;
84  virtual bool fastFillHook(const xAOD::Vertex* vtx,
85  const int ipv) const;
86 
87  private:
88  virtual StatusCode saveIsolation(const xAOD::Vertex* vtx) const;
89  virtual StatusCode calculateIsolation(const xAOD::Vertex* vtx) const;
90  virtual StatusCode calcIsolation(IsoItem& iso,
91  const xAOD::Vertex* vtx,
92  const double coneSize,
93  const double logChi2Max,
94  const int doLogChi2,
95  const ToolHandle<TrkSelTool>& tSelTool,
97  pvAssocType,
98  const int trackTypes ) const;
99 
100  virtual void initResults();
101  virtual void setResultsPrefix(std::string prefix) const;
102 
103  virtual std::string buildBranchName(unsigned int ic,
104  unsigned int its,
105  unsigned int ipv,
106  unsigned int itt) const;
107 
108  private:
109  // job options
110  std::vector<double> m_isoConeSizes;
111  std::vector<double> m_isoTrkImpLogChi2Max;
112  std::vector<int> m_isoDoTrkImpLogChi2Cut;
114 
115  // results array
116  typedef boost::multi_array<IsoItem, 4> IsoItem4_t;
118 
119  }; // BVertexTrackIsoTool
120 } // namespace
121 
122 #endif // DERIVATIONFRAMEWORK_BVertexTrackIsoTool_H
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
DerivationFramework::BVertexTrackIsoTool::m_isoConeSizes
std::vector< double > m_isoConeSizes
Definition: BVertexTrackIsoTool.h:110
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
BPhysVertexTrackBase.h
DerivationFramework::BVertexTrackIsoTool::m_useOptimizedAlgo
bool m_useOptimizedAlgo
Definition: BVertexTrackIsoTool.h:113
DerivationFramework::BVertexTrackIsoTool::IsoItem::nTracks
int nTracks
Definition: BVertexTrackIsoTool.h:64
DerivationFramework::BVertexTrackIsoTool
Definition: BVertexTrackIsoTool.h:31
DerivationFramework::BVertexTrackIsoTool::m_isoTrkImpLogChi2Max
std::vector< double > m_isoTrkImpLogChi2Max
Definition: BVertexTrackIsoTool.h:111
DerivationFramework::BVertexTrackIsoTool::m_results
IsoItem4_t m_results
Definition: BVertexTrackIsoTool.h:117
DerivationFramework::BVertexTrackIsoTool::m_isoDoTrkImpLogChi2Cut
std::vector< int > m_isoDoTrkImpLogChi2Cut
Definition: BVertexTrackIsoTool.h:112
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::BPhysHelper::pv_type
pv_type
: Enum type of the PV
Definition: BPhysHelper.h:475
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::BVertexTrackIsoTool::IsoItem
Definition: BVertexTrackIsoTool.h:40
grepfile.ic
int ic
Definition: grepfile.py:33
python.InDetPriVxFinderConfig.setup
setup
Definition: InDetPriVxFinderConfig.py:124
DerivationFramework::BVertexTrackIsoTool::IsoItem::isoValue
double isoValue
Definition: BVertexTrackIsoTool.h:63
item
Definition: ItemListSvc.h:43
Name
JetDumper::Name Name
Definition: JetDumper.cxx:19
DerivationFramework::BVertexTrackIsoTool::IsoItem4_t
boost::multi_array< IsoItem, 4 > IsoItem4_t
Definition: BVertexTrackIsoTool.h:116
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
DerivationFramework::BPhysVertexTrackBase::BaseItem
Definition: BPhysVertexTrackBase.h:60
DerivationFramework::BVertexTrackIsoTool::super
BPhysVertexTrackBase super
Definition: BVertexTrackIsoTool.h:34
DerivationFramework::BPhysVertexTrackBase
Definition: BPhysVertexTrackBase.h:57
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27