CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SimHitSelectorFromDB Class Reference

#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
 

Detailed Description

Definition at line 11 of file SimHitSelectorFromDB.h.

Constructor & Destructor Documentation

SimHitSelectorFromDB::SimHitSelectorFromDB ( )

Definition at line 3 of file SimHitSelectorFromDB.cc.

std::vector< std::pair< const PSimHit *, int > > theNewSimHitList
SimHitSelectorFromDB::~SimHitSelectorFromDB ( )
inline

Definition at line 15 of file SimHitSelectorFromDB.h.

15 {};

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 DigiSimLinkProducer::produce().

7  {
8  theNewSimHitList.clear();
9  int counter =0;
10  for(MixCollection<PSimHit>::iterator it = simhit->begin(); it!= simhit->end();it++){
11  counter++;
12  if(detId.size()!=0){
13  uint32_t tkid = (*it).detUnitId();
14  if (detId.find(tkid) != detId.end()){
15  // theNewSimHitList.push_back((*it));
16  // std::cout << "Hit in the MAP " << counter << std::endl;
17  theNewSimHitList.push_back(std::make_pair(&(*it), counter));
18  }
19  }else{
20  // theNewSimHitList.push_back((*it));
21  // std::cout << "Hit NOT in the MAP " << counter << std::endl;
22  theNewSimHitList.push_back(std::make_pair(&(*it),counter));
23  }
24  }
25  return theNewSimHitList;
26 }
std::vector< std::pair< const PSimHit *, int > > theNewSimHitList
iterator begin()

Member Data Documentation

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

Definition at line 21 of file SimHitSelectorFromDB.h.

Referenced by getSimHit().