src
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 <HepMC3/Data/GenEventData.h>
13
#include <cstddef>
14
15
namespace
HepMC3
{
16
class
FourVector;
17
class
GenParticle
;
18
class
GenVertex;
19
}
// namespace HepMC3
20
21
namespace
edm
{
22
class
HepMC3Product
{
23
public
:
24
HepMC3Product
() :
isVtxGenApplied_
(
false
),
isVtxBoostApplied_
(
false
),
isPBoostApplied_
(
false
) {}
25
26
explicit
HepMC3Product
(HepMC3::GenEvent *evt);
27
~HepMC3Product
();
28
29
void
addHepMCData
(HepMC3::GenEvent *evt);
30
31
void
applyVtxGen
(HepMC3::FourVector
const
*vtxShift) {
applyVtxGen
(*vtxShift); }
32
void
applyVtxGen
(HepMC3::FourVector
const
&vtxShift);
33
34
void
boostToLab
(TMatrixD
const
*lorentz,
std::string
const
&
type
);
35
36
const
HepMC3::GenEventData *
GetEvent
()
const
{
return
&
evt_
; }
37
38
bool
isVtxGenApplied
()
const
{
return
isVtxGenApplied_
; }
39
bool
isVtxBoostApplied
()
const
{
return
isVtxBoostApplied_
; }
40
bool
isPBoostApplied
()
const
{
return
isPBoostApplied_
; }
41
42
private
:
43
HepMC3::GenEventData
evt_
;
44
45
bool
isVtxGenApplied_
;
46
bool
isVtxBoostApplied_
;
47
bool
isPBoostApplied_
;
48
};
49
50
// This allows edm::Refs to work with HepMC3Product
51
namespace
refhelper {
52
template
<>
53
struct
FindTrait
<
edm
::
HepMC3Product
,
HepMC3::GenParticle
> {
54
struct
Find {
55
using
first_argument_type
=
edm::HepMC3Product
const
&;
56
using
second_argument_type
=
int
;
57
using
result_type
=
HepMC3::GenParticle
const
*;
58
59
result_type
operator()
(
first_argument_type
iContainer,
second_argument_type
iBarCode) {
60
//return iContainer.getHepMCData().barcode_to_particle(iBarCode);
61
return
nullptr
;
62
}
63
};
64
65
typedef
Find
value
;
66
};
67
68
template
<>
69
struct
FindTrait
<
edm
::
HepMC3Product
, HepMC3::GenVertex> {
70
struct
Find {
71
using
first_argument_type
=
edm::HepMC3Product
const
&;
72
using
second_argument_type
=
int
;
73
using
result_type
= HepMC3::GenVertex
const
*;
74
75
result_type
operator()
(
first_argument_type
iContainer,
second_argument_type
iBarCode) {
76
//return iContainer.getHepMCData().barcode_to_vertex(iBarCode);
77
return
nullptr
;
78
}
79
};
80
81
typedef
Find
value
;
82
};
83
}
// namespace refhelper
84
}
// namespace edm
85
86
#endif // SimDataFormats_GeneratorProducts_HepMC3Product_h
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:56
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:55
edm::HepMC3Product::~HepMC3Product
~HepMC3Product()
edm::HepMC3Product
Definition:
HepMC3Product.h:22
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::second_argument_type
int second_argument_type
Definition:
HepMC3Product.h:72
GenParticle
Definition:
GenParticle.py:1
edm::HepMC3Product::isPBoostApplied_
bool isPBoostApplied_
Definition:
HepMC3Product.h:47
funct::false
false
Definition:
Factorize.h:29
edm::HepMC3Product::isPBoostApplied
bool isPBoostApplied() const
Definition:
HepMC3Product.h:40
edm::HepMC3Product::boostToLab
void boostToLab(TMatrixD const *lorentz, std::string const &type)
Definition:
HepMC3Product.cc:41
edm::HepMC3Product::isVtxGenApplied_
bool isVtxGenApplied_
Definition:
HepMC3Product.h:45
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:46
createfilelist.int
int
Definition:
createfilelist.py:10
edm::HepMC3Product::isVtxGenApplied
bool isVtxGenApplied() const
Definition:
HepMC3Product.h:38
edm::HepMC3Product::isVtxBoostApplied
bool isVtxBoostApplied() const
Definition:
HepMC3Product.h:39
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::Find::result_type
HepMC3::GenParticle const * result_type
Definition:
HepMC3Product.h:57
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::operator()
result_type operator()(first_argument_type iContainer, second_argument_type iBarCode)
Definition:
HepMC3Product.h:75
edm::HepMC3Product::applyVtxGen
void applyVtxGen(HepMC3::FourVector const *vtxShift)
Definition:
HepMC3Product.h:31
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::value
Find value
Definition:
HepMC3Product.h:65
edm::HepMC3Product::addHepMCData
void addHepMCData(HepMC3::GenEvent *evt)
Definition:
HepMC3Product.cc:26
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::first_argument_type
edm::HepMC3Product const & first_argument_type
Definition:
HepMC3Product.h:71
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::Find::result_type
HepMC3::GenVertex const * result_type
Definition:
HepMC3Product.h:73
Ref.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenVertex >::value
Find value
Definition:
HepMC3Product.h:81
edm::HepMC3Product::HepMC3Product
HepMC3Product()
Definition:
HepMC3Product.h:24
edm::refhelper::FindTrait< edm::HepMC3Product, HepMC3::GenParticle >::Find::operator()
result_type operator()(first_argument_type iContainer, second_argument_type iBarCode)
Definition:
HepMC3Product.h:59
edm::refhelper::FindTrait
Definition:
RefTraits.h:41
edm::HepMC3Product::evt_
HepMC3::GenEventData evt_
Definition:
HepMC3Product.h:43
edm::HepMC3Product::GetEvent
const HepMC3::GenEventData * GetEvent() const
Definition:
HepMC3Product.h:36
Generated for CMSSW Reference Manual by
1.8.14