22 declareInterface<Trk::IPRD_TruthTrajectoryManipulator>(
this);
29 msg(MSG::ERROR) <<
"Could not get AtlasID helper !" <<
endmsg;
30 return StatusCode::FAILURE;
32 return StatusCode::SUCCESS;
37 return StatusCode::SUCCESS;
43 srand(
static_cast< unsigned int >( time(
nullptr ) ) );
45 const double prob_pix = pdg_id == 2212 ? 4. : 0;
46 const double prob_sct = 4.375;
47 std::vector<const Trk::PrepRawData* >::iterator prdIter = prdvec.
prds.begin();
48 std::vector<const Trk::PrepRawData* >::iterator prdIterE = prdvec.
prds.end();
50 while( prdIter != prdIterE ){
51 if(
m_atlasId->is_pixel((*prdIter)->identify()) ){
52 if( prob_pix > 0 ? rand()%100 <= prob_pix :
false ){
53 prdIter = prdvec.
prds.erase(prdIter);
54 prdIterE = prdvec.
prds.end();
58 else if(
m_atlasId->is_sct((*prdIter)->identify()) ){
59 if( rand()%100 <= prob_sct ){
60 prdIter = prdvec.
prds.erase(prdIter);
61 prdIterE = prdvec.
prds.end();
#define ATH_MSG_VERBOSE(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
const ServiceHandle< StoreGateSvc > & detStore() const
virtual bool manipulateTruthTrajectory(Trk::PRD_TruthTrajectory &) const
Interface method from IPRD_TruthTrajectoryManipulator.
const AtlasDetectorID * m_atlasId
ID pixel helper.
PRD_TruthTrajectoryManipulatorID(const std::string &t, const std::string &n, const IInterface *p)
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
simple definitiion of a PRD_TruhtTrajectory
std::vector< const Trk::PrepRawData * > prds
public members
HepMC::ConstGenParticlePtr genParticle