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  // Assignment operator:
65  //CompactHardTruth &operator=(const CompactHardTruth &alg);
66 
67  // Athena algorithm Hooks
68  virtual StatusCode initialize();
69  virtual StatusCode execute();
70  virtual StatusCode finalize();
71 
72 
73  // Parton is quark or gluon
74  virtual bool isParton( HepMC::ConstGenParticlePtr );
75 
76  // Final parton is quark or gluon ending in vertex giving !isParton
78 
79  // Total in/out FourVector for vertex
80  virtual HepMC::FourVector vtxInMom(HepMC::ConstGenVertexPtr);
81  virtual HepMC::FourVector vtxOutMom(HepMC::ConstGenVertexPtr);
82 
83  private:
84 
87 
89  std::string m_mcEventsName;
90  std::string m_thinnedMcEventsName;
91 
92  // Variables
93  int m_evtCount = 0;
94  int m_missCount = 0;
95  float m_partonCut;
96  float m_hardCut;
97 
98  int m_dangleFound = 0;
99  int m_dangleRemoved = 0;
100  float m_danglePtMax = 0.0F;
102 
104 
106  int m_thinVertices = 0;
107 
108 };
109 
110 
111 } //> end namespace DerivationFramework
112 #endif //> !DERIVATIONFRAMEWORK_COMPACTHARDTRUTH_H
DerivationFramework::CompactHardTruth::m_maxCount
int m_maxCount
Definition: CompactHardTruth.h:103
DerivationFramework::CompactHardTruth::m_missCount
int m_missCount
Definition: CompactHardTruth.h:94
DerivationFramework::CompactHardTruth::execute
virtual StatusCode execute()
Definition: CompactHardTruth.cxx:110
GenEvent.h
GenVertex.h
DerivationFramework::CompactHardTruth
Definition: CompactHardTruth.h:49
DerivationFramework::CompactHardTruth::isParton
virtual bool isParton(HepMC::ConstGenParticlePtr)
Definition: CompactHardTruth.cxx:1385
GenParticle.h
DerivationFramework::CompactHardTruth::m_dangleFound
int m_dangleFound
Definition: CompactHardTruth.h:98
AthAlgorithm.h
DerivationFramework::CompactHardTruth::m_danglePtCut
float m_danglePtCut
Definition: CompactHardTruth.h:101
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
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
DerivationFramework::CompactHardTruth::m_thinVertices
int m_thinVertices
Definition: CompactHardTruth.h:106
DerivationFramework::CompactHardTruth::m_mcEventsName
std::string m_mcEventsName
Containers.
Definition: CompactHardTruth.h:89
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
DerivationFramework::CompactHardTruth::m_partonCut
float m_partonCut
Definition: CompactHardTruth.h:95
DerivationFramework::CompactHardTruth::m_hardCut
float m_hardCut
Definition: CompactHardTruth.h:96
DerivationFramework::CompactHardTruth::vtxInMom
virtual HepMC::FourVector vtxInMom(HepMC::ConstGenVertexPtr)
Definition: CompactHardTruth.cxx:1403
TH1F
Definition: rootspy.cxx:320
DerivationFramework::CompactHardTruth::m_danglePtMax
float m_danglePtMax
Definition: CompactHardTruth.h:100
DerivationFramework::CompactHardTruth::m_evtCount
int m_evtCount
Definition: CompactHardTruth.h:93
DerivationFramework::CompactHardTruth::m_thinnedMcEventsName
std::string m_thinnedMcEventsName
Definition: CompactHardTruth.h:90
DerivationFramework::CompactHardTruth::CompactHardTruth
CompactHardTruth()
Default constructor:
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
DerivationFramework::CompactHardTruth::isFinalParton
virtual bool isFinalParton(HepMC::ConstGenParticlePtr)
Definition: CompactHardTruth.cxx:1395
DerivationFramework::CompactHardTruth::m_dangleRemoved
int m_dangleRemoved
Definition: CompactHardTruth.h:99
DerivationFramework::CompactHardTruth::vtxOutMom
virtual HepMC::FourVector vtxOutMom(HepMC::ConstGenVertexPtr)
Definition: CompactHardTruth.cxx:1425
DerivationFramework::CompactHardTruth::m_thinParticles
int m_thinParticles
Definition: CompactHardTruth.h:105