89 const HepMC::GenEvent* myGenEvent = 0;
106 const HepMC::GenEvent* thePUEvents = 0;
109 bool isPileUpXF =
iEvent.getByLabel(
"mixGenPU",
"generator",theHepMCProductCrossingFrame);
113 bool genPartXF =
iEvent.getByLabel(
"genParticlesFromMixingModule",genEvtXF);
114 if(genPartXF) myGenParticlesXF = &(*genEvtXF);
120 myGenEvent = theHepMCProduct->GetEvent();
122 if ( theVertexGenerator ) {
123 TMatrixD* boost = theVertexGenerator->boost();
124 if ( boost ) theHepMCProduct->boostToLab(boost,
"momentum");
126 myGenEvent = theHepMCProduct->GetEvent();
129 fevt->setBeamSpot(BSPosition_);
132 bool genPart =
false;
137 if ( genPart ) myGenParticles = &(*genEvt);
140 if ( !myGenEvent && !genPart )
141 std::cout <<
"There is no generator input for this event, under "
142 <<
"any form (HepMCProduct, genParticles)" << std::endl
143 <<
"Please check SourceLabel or GenParticleLabel" << std::endl;
148 bool isPileUp =
iEvent.getByLabel(
"famosPileUp",
"PileUpEvents",thePileUpEvents);
149 thePUEvents = isPileUp ? thePileUpEvents->GetEvent() : 0;
154 if (myGenParticlesXF) {
162 if ( theVertexGenerator ) {
163 HepMC::FourVector theVertex(
164 (theVertexGenerator->X()-theVertexGenerator->beamSpot().X()+BSPosition_.X())*10.,
165 (theVertexGenerator->Y()-theVertexGenerator->beamSpot().Y()+BSPosition_.Y())*10.,
166 (theVertexGenerator->Z()-theVertexGenerator->beamSpot().Z()+BSPosition_.Z())*10.,
168 if ( fabs(theVertexGenerator->Z()) > 1E-10 ) theHepMCProduct->applyVtxGen( &theVertex );
195 calo->loadFromEcalBarrel(*
p4);
196 calo->loadFromEcalEndcap(*p5);
197 calo->loadFromPreshower(*p6);
198 calo->loadFromHcal(*p7);
200 calo->loadMuonSimTracks(*m1);
208 iEvent.put(v1,
"VertexTypes");
210 iEvent.put(p5,
"EcalHitsEE");
211 iEvent.put(p6,
"EcalHitsES");
212 iEvent.put(p7,
"HcalHits");
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
std::vector< PCaloHit > PCaloHitContainer
edm::InputTag theBeamSpotLabel
FamosManager * famosManager_
edm::InputTag theSourceLabel
std::vector< FSimVertexType > FSimVertexTypeCollection
collection of FSimVertexType objects
void reconstruct(const HepMC::GenEvent *evt, const reco::GenParticleCollection *particles, const HepMC::GenEvent *pu, const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
The real thing is done here.
edm::InputTag theGenParticleLabel
CalorimetryManager * calorimetryManager() const
The calorimeter.
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< SimVertex > SimVertexContainer
std::vector< PSimHit > PSimHitContainer
TrajectoryManager * trackerManager() const
The tracker.
FSimEvent * simEvent() const
The generated event.
std::vector< SimTrack > SimTrackContainer
static std::string const source