#include <SimHitSelectorFromDB.h>
Public Member Functions | |
std::vector< std::pair< const PSimHit *, int > > | getSimHit (std::auto_ptr< MixCollection< PSimHit > > &, std::map< uint32_t, std::vector< int > > &) |
SimHitSelectorFromDB () | |
~SimHitSelectorFromDB () | |
Private Attributes | |
std::vector< std::pair< const PSimHit *, int > > | theNewSimHitList |
Definition at line 11 of file SimHitSelectorFromDB.h.
SimHitSelectorFromDB::SimHitSelectorFromDB | ( | ) |
Definition at line 3 of file SimHitSelectorFromDB.cc.
:theNewSimHitList(0){}
SimHitSelectorFromDB::~SimHitSelectorFromDB | ( | ) | [inline] |
Definition at line 15 of file SimHitSelectorFromDB.h.
{};
std::vector< std::pair< const PSimHit *, int > > SimHitSelectorFromDB::getSimHit | ( | std::auto_ptr< MixCollection< PSimHit > > & | simhit, |
std::map< uint32_t, std::vector< int > > & | detId | ||
) |
Definition at line 6 of file SimHitSelectorFromDB.cc.
References MixCollection< T >::begin(), cmsDriverOptions::counter, and theNewSimHitList.
Referenced by SiStripDigitizer::produce().
{ theNewSimHitList.clear(); int counter =0; for(MixCollection<PSimHit>::iterator it = simhit->begin(); it!= simhit->end();it++){ counter++; if(detId.size()!=0){ uint32_t tkid = (*it).detUnitId(); if (detId.find(tkid) != detId.end()){ // theNewSimHitList.push_back((*it)); // std::cout << "Hit in the MAP " << counter << std::endl; theNewSimHitList.push_back(std::make_pair(&(*it), counter)); } }else{ // theNewSimHitList.push_back((*it)); // std::cout << "Hit NOT in the MAP " << counter << std::endl; theNewSimHitList.push_back(std::make_pair(&(*it),counter)); } } return theNewSimHitList; }
std::vector<std::pair<const PSimHit*, int > > SimHitSelectorFromDB::theNewSimHitList [private] |
Definition at line 21 of file SimHitSelectorFromDB.h.
Referenced by getSimHit().