GSI Helmholtzzentrum für Schwerionenforschung
Hi, this is how I asked for the 4-momentum true values of my particles: ********** SmartDataPtr<McParticleCol> mcParticles(eventSvc(),"/Event/MC/McParticleCol"); if( ! mcParticles ){ log << MSG::ERROR << " Unable to retrieve McParticleCol" << endreq; return StatusCode::FAILURE; } for( McParticleCol::iterator it_mc = mcParticles->begin(); it_mc != mcParticles->end(); it_mc++ ){ cout<<"PID: "<<(*it_mc)->particleProperty()<<", px: "<< (*it_mc)->initialFourMomentum().px()<<", py: "<< (*it_mc)->initialFourMomentum().py()<<", pz: "<< (*it_mc)->initialFourMomentum().pz()<<", E: "<< (*it_mc)->initialFourMomentum().e()<<", theta: " <<(*it_mc)->initialFourMomentum().theta()<<endl; int PID = (*it_mc)->particleProperty(); double mcpx = (*it_mc)->initialFourMomentum().px(); double mcpy = (*it_mc)->initialFourMomentum().py(); double mcpz = (*it_mc)->initialFourMomentum().pz(); double mcE = (*it_mc)->initialFourMomentum().e(); m_mcPid = PID; m_mcP4x = mcpx; m_mcP4y = mcpy; m_mcP4z = mcpz; m_mcP4E = mcE; m_mc->write(); }