CMS 3D CMS Logo

Public Member Functions | Private Attributes

SimHitSelectorFromDB Class Reference

#include <SimHitSelectorFromDB.h>

List of all members.

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

Detailed Description

Definition at line 11 of file SimHitSelectorFromDB.h.


Constructor & Destructor Documentation

SimHitSelectorFromDB::SimHitSelectorFromDB ( )

Definition at line 3 of file SimHitSelectorFromDB.cc.

SimHitSelectorFromDB::~SimHitSelectorFromDB ( ) [inline]

Definition at line 15 of file SimHitSelectorFromDB.h.

{};

Member Function Documentation

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(), 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;
}

Member Data Documentation

std::vector<std::pair<const PSimHit*, int > > SimHitSelectorFromDB::theNewSimHitList [private]

Definition at line 21 of file SimHitSelectorFromDB.h.

Referenced by getSimHit().