GSI Forum - RDF feed
type: channel
description: GSI Helmholtzzentrum für Schwerionenforschung
items: How to get BES3 MC truth data?
items: Re: How to get BES3 MC truth data?

How to get BES3 MC truth data?
type: item
creator: Xia Wan
date: 2009-02-17T10:04:53-00:00

Re: How to get BES3 MC truth data?
type: item
description: 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(); }
creator: Cristina Morales
date: 2011-08-02T09:10:33-00:00