ATLAS Offline Software
CompactHardTruth.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // CompactHardTruth.h
8 // Header file for class CompactHardTruth
9 // Author: Frank Paige <paige@bnl.gov>
10 //
11 // Algorithm to construct small, consistent hard-scattering HepMC truth
12 // record from GEN_EVENT. Only final partons have physical momenta, so
13 // must recluster them. Main steps:
14 // (1) Identify hadronization vertices with partons in, hadrons out.
15 // (2) Detach their incoming partons and delete their descendants.
16 // (3) Iteratively recombine 1->2 branchings of final partons with
17 // mass M < Mcut. Split 2->1 nonperturbative color recombinations.
18 // (4) Remove partons not connected to hard process. May make apparent
19 // anomalies, e.g., dropping soft q from incoming g -> g q.
20 //
21 // New final partons have correct momenta and ancestors/descendants.
22 // CompactHardTruth changes particles/vertices, so it cannot be used directly
23 // with thinning, but it can be used in parallel.
24 //
26 #ifndef DERIVATIONFRAMEWORK_COMPACTHARDTRUTH_H
27 #define DERIVATIONFRAMEWORK_COMPACTHARDTRUTH_H 1
28 
29 // STL includes
30 #include <string>
31 
32 // FrameWork includes
34 #include "GaudiKernel/ToolHandle.h"
35 
36 #include "AtlasHepMC/GenEvent.h"
37 #include "AtlasHepMC/GenParticle.h"
38 #include "AtlasHepMC/GenVertex.h"
39 
40 // fwd declares
41 class IMcVtxFilterTool;
42 class TH1F;
43 
44 
45 namespace DerivationFramework {
46 
48  : public ::AthAlgorithm
49 {
50 
52  // Public methods:
54  public:
55 
56  // Copy constructor:
57 
59  CompactHardTruth( const std::string& name, ISvcLocator* pSvcLocator );
60 
62  virtual ~CompactHardTruth();
63 
64  // Athena algorithm Hooks
65  virtual StatusCode initialize();
66  virtual StatusCode execute();
67  virtual StatusCode finalize();
68 
69  // Total in/out FourVector for vertex
70  virtual HepMC::FourVector vtxInMom(HepMC::ConstGenVertexPtr);
71  virtual HepMC::FourVector vtxOutMom(HepMC::ConstGenVertexPtr);
72 
73  private:
74 
77 
79  std::string m_mcEventsName;
80  std::string m_thinnedMcEventsName;
81 
82  // Variables
83  int m_evtCount = 0;
84  int m_missCount = 0;
85  float m_partonCut;
86  float m_hardCut;
87 
88  int m_dangleFound = 0;
89  int m_dangleRemoved = 0;
90  float m_danglePtMax = 0.0F;
92 
94 
95  int m_thinParticles = 0;
96  int m_thinVertices = 0;
97 
98 };
99 
100 
101 } //> end namespace DerivationFramework
102 #endif //> !DERIVATIONFRAMEWORK_COMPACTHARDTRUTH_H
DerivationFramework::CompactHardTruth::m_maxCount
int m_maxCount
Definition: CompactHardTruth.h:93
DerivationFramework::CompactHardTruth::m_missCount
int m_missCount
Definition: CompactHardTruth.h:84
DerivationFramework::CompactHardTruth::execute
virtual StatusCode execute()
Definition: CompactHardTruth.cxx:110
GenEvent.h
GenVertex.h
DerivationFramework::CompactHardTruth
Definition: CompactHardTruth.h:49
GenParticle.h
DerivationFramework::CompactHardTruth::m_dangleFound
int m_dangleFound
Definition: CompactHardTruth.h:88
AthAlgorithm.h
DerivationFramework::CompactHardTruth::m_danglePtCut
float m_danglePtCut
Definition: CompactHardTruth.h:91
IMcVtxFilterTool
Definition: IMcVtxFilterTool.h:27
DerivationFramework::CompactHardTruth::initialize
virtual StatusCode initialize()
Definition: CompactHardTruth.cxx:70
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::CompactHardTruth::~CompactHardTruth
virtual ~CompactHardTruth()
Destructor:
Definition: CompactHardTruth.cxx:66
AthAlgorithm
Definition: AthAlgorithm.h:47
DerivationFramework::CompactHardTruth::finalize
virtual StatusCode finalize()
Definition: CompactHardTruth.cxx:94
DerivationFramework::CompactHardTruth::m_thinVertices
int m_thinVertices
Definition: CompactHardTruth.h:96
DerivationFramework::CompactHardTruth::m_mcEventsName
std::string m_mcEventsName
Containers.
Definition: CompactHardTruth.h:79
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DerivationFramework::CompactHardTruth::m_partonCut
float m_partonCut
Definition: CompactHardTruth.h:85
DerivationFramework::CompactHardTruth::m_hardCut
float m_hardCut
Definition: CompactHardTruth.h:86
DerivationFramework::CompactHardTruth::vtxInMom
virtual HepMC::FourVector vtxInMom(HepMC::ConstGenVertexPtr)
Definition: CompactHardTruth.cxx:1386
DerivationFramework::CompactHardTruth::m_danglePtMax
float m_danglePtMax
Definition: CompactHardTruth.h:90
DerivationFramework::CompactHardTruth::m_evtCount
int m_evtCount
Definition: CompactHardTruth.h:83
DerivationFramework::CompactHardTruth::m_thinnedMcEventsName
std::string m_thinnedMcEventsName
Definition: CompactHardTruth.h:80
DerivationFramework::CompactHardTruth::CompactHardTruth
CompactHardTruth()
Default constructor:
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
DerivationFramework::CompactHardTruth::m_dangleRemoved
int m_dangleRemoved
Definition: CompactHardTruth.h:89
DerivationFramework::CompactHardTruth::vtxOutMom
virtual HepMC::FourVector vtxOutMom(HepMC::ConstGenVertexPtr)
Definition: CompactHardTruth.cxx:1408
DerivationFramework::CompactHardTruth::m_thinParticles
int m_thinParticles
Definition: CompactHardTruth.h:95