void DelphesSimulation::ConvertHT( TObjArray * Input , ParticleCollection * coll ){ Candidate * cand; for(int j = 0; j < Input->GetEntries(); ++j) { cand = static_cast<Candidate *>(Input->At(j)); ParticleHandle outptc = coll->create(); BareParticle& core = outptc.mod().Core; core.P4.Px = (double ) cand->Momentum.X(); core.P4.Py = (double ) cand->Momentum.Y(); } }
StatusCode DummySimulation::execute() { const MCParticleCollection* inparticles = m_genphandle.get(); ParticleCollection* particles = new ParticleCollection(); for(auto ipart=inparticles->begin(); ipart!=inparticles->end(); ++ipart) { const MCParticle ptc = (*ipart).read(); if(ptc.Core.Status==1) { ParticleHandle outptc = particles->create(); outptc.mod().Core = ptc.Core; } } m_recphandle.put(particles); return StatusCode::SUCCESS; }
void DelphesSimulation::ConvertParticle( TObjArray * Input , ParticleCollection * coll ){ Candidate * cand; for(int j = 0; j < Input->GetEntries(); ++j) { cand = static_cast<Candidate *>(Input->At(j)); ParticleHandle outptc = coll->create(); BareParticle& core = outptc.mod().Core; if (cand->Momentum.Pt()!=0) { // protection against the boring message Warning in <TVector3::PseudoRapidity>: transvers momentum = 0! return +/- 10e10 core.Type = cand->PID; core.Status = cand->Status; core.P4.Px = (double ) cand->Momentum.X(); core.P4.Py = (double ) cand->Momentum.Y(); core.P4.Pz = (double ) cand->Momentum.Z(); core.P4.Mass = (double) cand->Mass ; core.Vertex.X = (double) cand->Position.X() ; core.Vertex.Y = (double) cand->Position.Y() ; core.Vertex.Z = (double) cand->Position.Z() ; } } }