ATLAS Offline Software
Loading...
Searching...
No Matches
FixHepMC.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef XAOD_ANALYSIS
6
7#ifndef FIX_HEPMC
8#define FIX_HEPMC
9
12#include "TruthUtils/Loops.h"
13#include <set>
14#include <memory>
15
16
31class FixHepMC : public GenBase {
32public:
33
34 FixHepMC(const std::string& name, ISvcLocator* pSvcLocator);
35 StatusCode execute();
36 StatusCode finalize();
37
38
39private:
40
42
43 bool isPID0(const HepMC::ConstGenParticlePtr& p) const;
45 bool isSimpleLoop(const HepMC::ConstGenParticlePtr& p) const;
46 bool fromDecay(const HepMC::ConstGenParticlePtr& p, std::shared_ptr<std::set<int> >& storage) const;
48
50
51 bool m_killLoops; // Kill loops?
52 bool m_killPDG0; // Kill PDG0 particles?
53 bool m_cleanDecays; // Clean decays?
54 bool m_purgeUnstableWithoutEndVtx; // Remove unstable particles without decay vertex?
55 bool m_ignoreSemiDisconnected; // Ignore semi-disconnected particles (normal in Sherpa)
56 std::string m_forced_momentum{""}; // Force momentum unit for the event
57 std::string m_forced_length{""}; // Force length unit for the event
58 bool m_unitsFix; // Attempt to identify and fix momentum units problems
60
62
70
71 std::map<int,int> m_pidmap;
72 std::map<int,int> m_replacedpid_counts;
73
74
76
77
78};
79
80
81#endif
82
83#endif
bool isPID0(const HepMC::ConstGenParticlePtr &p) const
Definition FixHepMC.cxx:599
StatusCode execute()
Definition FixHepMC.cxx:97
FixHepMC(const std::string &name, ISvcLocator *pSvcLocator)
Definition FixHepMC.cxx:14
bool m_purgeUnstableWithoutEndVtx
Definition FixHepMC.h:54
long m_replacedPIDs
Definition FixHepMC.h:68
bool m_killPDG0
Definition FixHepMC.h:52
bool isNonTransportableInDecayChain(const HepMC::ConstGenParticlePtr &p) const
Definition FixHepMC.cxx:631
std::string m_forced_momentum
Definition FixHepMC.h:56
bool m_unitsFix
Definition FixHepMC.h:58
bool fromDecay(const HepMC::ConstGenParticlePtr &p, std::shared_ptr< std::set< int > > &storage) const
Definition FixHepMC.cxx:604
long m_totalSeen
Definition FixHepMC.h:67
StatusCode finalize()
Definition FixHepMC.cxx:582
long m_pdg0Killed
Definition FixHepMC.h:64
long m_decayCleaned
Definition FixHepMC.h:65
bool m_ignoreSemiDisconnected
Definition FixHepMC.h:55
bool m_cleanDecays
Definition FixHepMC.h:53
bool m_killLoops
Definition FixHepMC.h:51
long m_unstablePurged
Definition FixHepMC.h:66
std::map< int, int > m_replacedpid_counts
map of counters of replacements.
Definition FixHepMC.h:72
long m_loopKilled
Definition FixHepMC.h:63
std::map< int, int > m_pidmap
map of pids to change.
Definition FixHepMC.h:71
MC::Loops< HepMC::GenEvent, HepMC::ConstGenParticlePtr, HepMC::ConstGenVertexPtr > m_looper
member to detect loops
Definition FixHepMC.h:75
bool isSimpleLoop(const HepMC::ConstGenParticlePtr &p) const
Definition FixHepMC.cxx:637
std::string m_forced_length
Definition FixHepMC.h:57
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenBase.cxx:11
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38