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