Definition at line 33 of file MixEvtVtxGenerator.cc.
◆ MixEvtVtxGenerator()
◆ ~MixEvtVtxGenerator()
MixEvtVtxGenerator::~MixEvtVtxGenerator |
( |
| ) |
|
|
override |
◆ getRecVertex()
HepMC::FourVector * MixEvtVtxGenerator::getRecVertex |
( |
edm::Event & |
evt | ) |
|
|
virtual |
◆ getVertex()
HepMC::FourVector * MixEvtVtxGenerator::getVertex |
( |
edm::Event & |
evt | ) |
|
|
virtual |
Definition at line 86 of file MixEvtVtxGenerator.cc.
87 HepMC::GenVertex* genvtx =
nullptr;
95 throw cms::Exception(
"MatchVtx") <<
"Mixing has " <<
mix.size() <<
" sub-events, should have been at least 2"
100 throw cms::Exception(
"MatchVtx") <<
"Input background does not have smeared vertex!" << endl;
107 inev =
input->GetEvent();
110 genvtx = inev->signal_process_vertex();
112 HepMC::GenEvent::particle_const_iterator
pt = inev->particles_begin();
113 HepMC::GenEvent::particle_const_iterator ptend = inev->particles_end();
114 while (!genvtx || (genvtx->particles_in_size() == 1 &&
pt != ptend)) {
116 cout <<
"End reached, No Gen Vertex!" << endl;
117 genvtx = (*pt)->production_vertex();
121 double aX, aY, aZ, aT;
123 aX = genvtx->position().x();
124 aY = genvtx->position().y();
125 aZ = genvtx->position().z();
126 aT = genvtx->position().t();
129 fVertex =
new HepMC::FourVector();
131 LogInfo(
"MatchVtx") <<
" setting vertex "
132 <<
" aX " << aX <<
" aY " << aY <<
" aZ " << aZ <<
" aT " << aT << endl;
References cfLabel, gather_cfg::cout, Exception, fVertex, edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), input, edm::HepMCProduct::isVtxGenApplied(), GeneratorMix_cff::mix, edm::Handle< T >::product(), DiDispStaMuonMonitor_cfi::pt, signalLabel, and useCF_.
Referenced by produce().
◆ produce()
◆ boost_
TMatrixD* MixEvtVtxGenerator::boost_ |
|
protected |
◆ cfLabel
◆ fVertex
HepMC::FourVector* MixEvtVtxGenerator::fVertex |
|
protected |
◆ hiLabel
◆ signalLabel
◆ useCF_
bool MixEvtVtxGenerator::useCF_ |
|
private |
◆ useRecVertex
bool MixEvtVtxGenerator::useRecVertex |
|
private |
◆ vtxOffset
std::vector<double> MixEvtVtxGenerator::vtxOffset |
|
private |