18 evt_(evt), isVtxGenApplied_(
false), isVtxBoostApplied_(
false), isPBoostApplied_(
false) {
47 vt!=
evt_->vertices_end(); ++vt )
50 double x = (*vt)->position().x() + vtxShift->x() ;
51 double y = (*vt)->position().y() + vtxShift->y() ;
52 double z = (*vt)->position().z() + vtxShift->z() ;
53 double t = (*vt)->position().t() + vtxShift->t() ;
55 (*vt)->set_position( HepMC::FourVector(x,y,z,t) ) ;
78 TMatrixD tmplorentz(*lorentz);
81 if ( type ==
"vertex") {
89 vt!=
evt_->vertices_end(); ++vt ) {
93 p4(0,0) = (*vt)->position().t();
94 p4(1,0) = (*vt)->position().x();
95 p4(2,0) = (*vt)->position().z();
96 p4(3,0) = (*vt)->position().y();
99 p4lab = tmplorentz *
p4;
101 (*vt)->set_position( HepMC::FourVector(p4lab(1,0),p4lab(3,0),p4lab(2,0), p4lab(0,0) ) ) ;
106 else if ( type ==
"momentum") {
113 for ( HepMC::GenEvent::particle_iterator
part=
evt_->particles_begin();
118 p4(0,0) = (*part)->momentum().e();
119 p4(1,0) = (*part)->momentum().x();
120 p4(2,0) = (*part)->momentum().z();
121 p4(3,0) = (*part)->momentum().y();
124 p4lab = tmplorentz *
p4;
126 (*part)->set_momentum( HepMC::FourVector(p4lab(1,0),p4lab(3,0),p4lab(2,0),p4lab(0,0) ) ) ;
132 std::cout <<
" no type found for boostToLab(std::string), options are vertex or momentum" << std::endl;
140 const HepMC::GenEvent&
void applyVtxGen(HepMC::FourVector *vtxShift)
bool isVtxBoostApplied() const
void boostToLab(TMatrixD *lorentz, std::string type)
void swap(HepMCProduct &other)
void addHepMCData(HepMC::GenEvent *evt)
HepMCProduct & operator=(HepMCProduct const &other)
T x() const
Cartesian x coordinate.
const HepMC::GenEvent & getHepMCData() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool isPBoostApplied() const
bool isVtxGenApplied() const
return(e1-e2)*(e1-e2)+dp *dp
VertexRefVector::iterator vertex_iterator
iterator over a vector of references to Vertex objects in the same collection
volatile std::atomic< bool > shutdown_flag false