SimDataFormats
GeneratorProducts
interface
HepMC3Product.h
Go to the documentation of this file.
1
#ifndef SimDataFormats_GeneratorProducts_HepMC3Product_h
2
#define SimDataFormats_GeneratorProducts_HepMC3Product_h
3
9
#include "
DataFormats/Common/interface/Ref.h
"
10
#include <TMatrixD.h>
11
#include <HepMC3/GenEvent.h>
12
#include <cstddef>
13
14
namespace
HepMC3
{
15
class
FourVector;
16
class
GenParticle
;
17
class
GenVertex;
18
}
// namespace HepMC3
19
20
namespace
edm
{
21
class
HepMC3Product
{
22
public
:
23
HepMC3Product
() :
evt_
(nullptr),
isVtxGenApplied_
(
false
),
isVtxBoostApplied_
(
false
),
isPBoostApplied_
(
false
) {}
24
25
explicit
HepMC3Product
(HepMC3::GenEvent *evt);
26
virtual
~HepMC3Product
();
27
28
void
addHepMCData
(HepMC3::GenEvent *evt);
29
30
void
applyVtxGen
(HepMC3::FourVector
const
*vtxShift) {
applyVtxGen
(*vtxShift); }
31
void
applyVtxGen
(HepMC3::FourVector
const
&vtxShift);
32
33
void
boostToLab
(TMatrixD
const
*lorentz,
std::string
const
&
type
);
34
35
const
HepMC3::GenEvent &
getHepMCData
()
const
;
36
37
const
HepMC3::GenEvent *
GetEvent
()
const
{
return
evt_
; }
38
39
bool
isVtxGenApplied
()
const
{
return
isVtxGenApplied_
; }
40
bool
isVtxBoostApplied
()
const
{
return
isVtxBoostApplied_
; }
41
bool
isPBoostApplied
()
const
{
return
isPBoostApplied_
; }
42
43
HepMC3Product
(
HepMC3Product
const
&orig);
44
HepMC3Product
&
operator=
(
HepMC3Product
const
&
other
);
45
HepMC3Product
(
HepMC3Product
&&orig);
46
HepMC3Product
&
operator=
(
HepMC3Product
&&
other
);
47
void
swap
(
HepMC3Product
&
other
);
48
49
private
:
50
HepMC3::GenEvent *
evt_
;
51
52
bool
isVtxGenApplied_
;
53
bool
isVtxBoostApplied_
;
54
bool
isPBoostApplied_
;
55
};
56
57
// This allows edm::Refs to work with HepMC3Product
58
namespace
refhelper {
59
template
<>
60
struct
FindTrait
<
edm
::
HepMC3Product
,
HepMC3::GenParticle
> {
61
struct
Find {
62
using
first_argument_type
=
edm::HepMC3Product
const
&;
63
using
second_argument_type
=
int
;
64
using
result_type
=
HepMC3::GenParticle
const
*;
65
66
result_type
operator()
(
first_argument_type
iContainer,
second_argument_type
iBarCode) {
67
//return iContainer.getHepMCData().barcode_to_particle(iBarCode);
68
return
nullptr
;
69
}
70
};
71
72
typedef
Find
value
;
73
};
74
75
template
<>
76
struct
FindTrait
<
edm
::
HepMC3Product
, HepMC3::GenVertex> {
77
struct
Find {
78
using
first_argument_type
=
edm::HepMC3Product
const
&;
79
using
second_argument_type
=
int
;
80
using
result_type
= HepMC3::GenVertex
const
*;
81
82
result_type
operator()
(
first_argument_type
iContainer,
second_argument_type
iBarCode) {
83
//return iContainer.getHepMCData().barcode_to_vertex(iBarCode);
84
return
nullptr
;
85
}
86
};
87
88
typedef
Find
value
;
89
};
90
}
// namespace refhelper
91
}
// namespace edm
92
93
#endif // SimDataFormats_GeneratorProducts_HepMC3Product_h
edm::HepMC3Product::evt_
HepMC3::GenEvent * evt_
Definition:
HepMC3Product.h:50
GenParticle.GenParticle
GenParticle
Definition:
GenParticle.py:18
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::Find::second_argument_type
int second_argument_type
Definition:
HepMC3Product.h:63
edm::HepMC3Product::getHepMCData
const HepMC3::GenEvent & getHepMCData() const
Definition:
HepMC3Product.cc:113
HepMC3
Definition:
GenEventInfoProduct3.h:9
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::Find::first_argument_type
edm::HepMC3Product const & first_argument_type
Definition:
HepMC3Product.h:62
edm::HepMC3Product::operator=
HepMC3Product & operator=(HepMC3Product const &other)
Definition:
HepMC3Product.cc:135
edm::HepMC3Product::~HepMC3Product
virtual ~HepMC3Product()
Definition:
HepMC3Product.cc:22
edm::HepMC3Product
Definition:
HepMC3Product.h:21
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::second_argument_type
int second_argument_type
Definition:
HepMC3Product.h:79
GenParticle
Definition:
GenParticle.py:1
edm::HepMC3Product::isPBoostApplied_
bool isPBoostApplied_
Definition:
HepMC3Product.h:54
funct::false
false
Definition:
Factorize.h:29
edm::HepMC3Product::isPBoostApplied
bool isPBoostApplied() const
Definition:
HepMC3Product.h:41
edm::HepMC3Product::boostToLab
void boostToLab(TMatrixD const *lorentz, std::string const &type)
Definition:
HepMC3Product.cc:49
edm::HepMC3Product::isVtxGenApplied_
bool isVtxGenApplied_
Definition:
HepMC3Product.h:52
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:39
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::HepMC3Product::isVtxBoostApplied_
bool isVtxBoostApplied_
Definition:
HepMC3Product.h:53
edm::HepMC3Product::swap
void swap(HepMC3Product &other)
Definition:
HepMC3Product.cc:126
createfilelist.int
int
Definition:
createfilelist.py:10
edm::HepMC3Product::isVtxGenApplied
bool isVtxGenApplied() const
Definition:
HepMC3Product.h:39
edm::HepMC3Product::isVtxBoostApplied
bool isVtxBoostApplied() const
Definition:
HepMC3Product.h:40
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::Find::result_type
HepMC3::GenParticle const * result_type
Definition:
HepMC3Product.h:64
trackingPlots.other
other
Definition:
trackingPlots.py:1464
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::operator()
result_type operator()(first_argument_type iContainer, second_argument_type iBarCode)
Definition:
HepMC3Product.h:82
edm::HepMC3Product::applyVtxGen
void applyVtxGen(HepMC3::FourVector const *vtxShift)
Definition:
HepMC3Product.h:30
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::value
Find value
Definition:
HepMC3Product.h:72
edm::HepMC3Product::addHepMCData
void addHepMCData(HepMC3::GenEvent *evt)
Definition:
HepMC3Product.cc:30
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::first_argument_type
edm::HepMC3Product const & first_argument_type
Definition:
HepMC3Product.h:78
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::result_type
HepMC3::GenVertex const * result_type
Definition:
HepMC3Product.h:80
Ref.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::value
Find value
Definition:
HepMC3Product.h:88
edm::HepMC3Product::HepMC3Product
HepMC3Product()
Definition:
HepMC3Product.h:23
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::Find::operator()
result_type operator()(first_argument_type iContainer, second_argument_type iBarCode)
Definition:
HepMC3Product.h:66
edm::refhelper::FindTrait
Definition:
RefTraits.h:41
edm::HepMC3Product::GetEvent
const HepMC3::GenEvent * GetEvent() const
Definition:
HepMC3Product.h:37
Generated for CMSSW Reference Manual by
1.8.14