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 Member Functions | Private Attributes
SimHitMatcher Class Reference

#include <SimHitMatcher.h>

Public Member Functions

std::set< unsigned int > chamberIdsGEM () const
 GEM chamber detIds with SimHits. More...
 
std::set< unsigned int > detIdsGEM () const
 GEM partitions' detIds with SimHits. More...
 
std::set< unsigned int > detIdsGEMCoincidences () const
 
std::set< int > hitCoPadsInDetId (unsigned int) const
 
std::set< int > hitPadsInDetId (unsigned int) const
 
std::set< int > hitPartitions () const
 
const edm::PSimHitContainerhitsInChamber (unsigned int) const
 
const edm::PSimHitContainerhitsInDetId (unsigned int) const
 simhits from a particular partition (GEM)/layer (CSC), chamber or superchamber More...
 
const edm::PSimHitContainerhitsInSuperChamber (unsigned int) const
 
std::set< int > hitStripsInDetId (unsigned int, int margin_n_strips=0) const
 
int nCoincidencePadsWithHits () const
 How many coincidence pads with simhits in GEM did this simtrack get? More...
 
int nLayersWithHitsInSuperChamber (unsigned int) const
 
int nPadsWithHits () const
 How many pads with simhits in GEM did this simtrack get? More...
 
 SimHitMatcher (const SimTrack &track, const edm::Event &, const GEMGeometry &geom, const edm::ParameterSet &cfg, edm::EDGetToken &simhitToken, edm::EDGetToken &simtrackToken, edm::EDGetToken &simvertexToken)
 
const edm::PSimHitContainersimHitsGEM () const
 access to all the GEM SimHits More...
 
GlobalPoint simHitsMeanPosition (const edm::PSimHitContainer &sim_hits) const
 calculate Global average position for a provided collection of simhits More...
 
float simHitsMeanStrip (const edm::PSimHitContainer &sim_hits) const
 calculate average strip (strip for GEM, half-strip for CSC) number for a provided collection of simhits More...
 
std::set< unsigned int > superChamberIdsGEM () const
 GEM superchamber detIds with SimHits. More...
 
std::set< unsigned int > superChamberIdsGEMCoincidences () const
 GEM superchamber detIds with SimHits 2 layers of coincidence pads. More...
 
 ~SimHitMatcher ()
 

Private Member Functions

std::vector< unsigned int > getIdsOfSimTrackShower (unsigned trk_id, const edm::SimTrackContainer &simTracks, const edm::SimVertexContainer &simVertices)
 
void init (const edm::Event &)
 
void matchSimHitsToSimTrack (std::vector< unsigned int > track_ids, const edm::PSimHitContainer &gem_hits)
 

Private Attributes

bool discardEleHitsGEM_
 
std::map< unsigned int,
edm::PSimHitContainer
gem_chamber_to_hits_
 
std::map< unsigned int,
edm::PSimHitContainer
gem_detid_to_hits_
 
std::map< unsigned int,
std::set< int > > 
gem_detids_to_copads_
 
std::map< unsigned int,
std::set< int > > 
gem_detids_to_pads_
 
const GEMGeometrygem_geo_
 
edm::Handle
< edm::PSimHitContainer
gem_hits
 
edm::PSimHitContainer gem_hits_
 
std::map< unsigned int,
edm::PSimHitContainer
gem_superchamber_to_hits_
 
edm::PSimHitContainer no_hits_
 
edm::Handle
< edm::SimTrackContainer
sim_tracks
 
edm::Handle
< edm::SimVertexContainer
sim_vertices
 
std::string simInputLabel_
 
bool simMuOnlyGEM_
 
const SimTracktrack_
 
std::map< unsigned int,
unsigned int > 
trkid_to_index_
 
bool verbose_
 

Detailed Description

Description: Matching of SimHit for SimTrack in CSC & GEM

Original Author: "Vadim Khotilovich"

Id:
SimHitMatcher.h,v 1.3 2013/02/17 15:55:16 khotilov Exp

Definition at line 32 of file SimHitMatcher.h.

Constructor & Destructor Documentation

SimHitMatcher::SimHitMatcher ( const SimTrack track,
const edm::Event e,
const GEMGeometry geom,
const edm::ParameterSet cfg,
edm::EDGetToken simhitToken,
edm::EDGetToken simtrackToken,
edm::EDGetToken simvertexToken 
)

Definition at line 25 of file SimHitMatcher.cc.

SimHitMatcher::~SimHitMatcher ( )

Definition at line 39 of file SimHitMatcher.cc.

Member Function Documentation

std::set< unsigned int > SimHitMatcher::chamberIdsGEM ( ) const

GEM chamber detIds with SimHits.

Definition at line 219 of file SimHitMatcher.cc.

Referenced by GEMSimTrackMatch::analyze().

std::set< unsigned int > SimHitMatcher::detIdsGEM ( ) const

GEM partitions' detIds with SimHits.

Definition at line 203 of file SimHitMatcher.cc.

Referenced by GEMRecHitMatcher::matchRecHitsToSimTrack().

std::set< unsigned int > SimHitMatcher::detIdsGEMCoincidences ( ) const

GEM detid's with hits in 2 layers of coincidence pads those are layer==1 only detid's

Definition at line 211 of file SimHitMatcher.cc.

std::vector< unsigned int > SimHitMatcher::getIdsOfSimTrackShower ( unsigned  trk_id,
const edm::SimTrackContainer simTracks,
const edm::SimVertexContainer simVertices 
)
private

Definition at line 89 of file SimHitMatcher.cc.

std::set< int > SimHitMatcher::hitCoPadsInDetId ( unsigned int  detid) const

Definition at line 385 of file SimHitMatcher.cc.

std::set< int > SimHitMatcher::hitPadsInDetId ( unsigned int  detid) const

Definition at line 377 of file SimHitMatcher.cc.

std::set< int > SimHitMatcher::hitPartitions ( ) const

Definition at line 393 of file SimHitMatcher.cc.

const edm::PSimHitContainer & SimHitMatcher::hitsInChamber ( unsigned int  detid) const

Definition at line 262 of file SimHitMatcher.cc.

const edm::PSimHitContainer & SimHitMatcher::hitsInDetId ( unsigned int  detid) const

simhits from a particular partition (GEM)/layer (CSC), chamber or superchamber

Definition at line 250 of file SimHitMatcher.cc.

const edm::PSimHitContainer & SimHitMatcher::hitsInSuperChamber ( unsigned int  detid) const

Definition at line 275 of file SimHitMatcher.cc.

std::set< int > SimHitMatcher::hitStripsInDetId ( unsigned int  detid,
int  margin_n_strips = 0 
) const

Definition at line 355 of file SimHitMatcher.cc.

Referenced by GEMRecHitMatcher::matchRecHitsToSimTrack().

void SimHitMatcher::init ( const edm::Event e)
private

Definition at line 42 of file SimHitMatcher.cc.

void SimHitMatcher::matchSimHitsToSimTrack ( std::vector< unsigned int >  track_ids,
const edm::PSimHitContainer gem_hits 
)
private

Definition at line 127 of file SimHitMatcher.cc.

int SimHitMatcher::nCoincidencePadsWithHits ( ) const

How many coincidence pads with simhits in GEM did this simtrack get?

Definition at line 420 of file SimHitMatcher.cc.

int SimHitMatcher::nLayersWithHitsInSuperChamber ( unsigned int  detid) const

#layers with hits for CSC: "super-chamber" means chamber

Definition at line 288 of file SimHitMatcher.cc.

int SimHitMatcher::nPadsWithHits ( ) const

How many pads with simhits in GEM did this simtrack get?

Definition at line 408 of file SimHitMatcher.cc.

const edm::PSimHitContainer& SimHitMatcher::simHitsGEM ( ) const
inline

access to all the GEM SimHits

Definition at line 41 of file SimHitMatcher.h.

References gem_hits_.

41 {return gem_hits_;}
edm::PSimHitContainer gem_hits_
GlobalPoint SimHitMatcher::simHitsMeanPosition ( const edm::PSimHitContainer sim_hits) const

calculate Global average position for a provided collection of simhits

Definition at line 305 of file SimHitMatcher.cc.

float SimHitMatcher::simHitsMeanStrip ( const edm::PSimHitContainer sim_hits) const

calculate average strip (strip for GEM, half-strip for CSC) number for a provided collection of simhits

Definition at line 331 of file SimHitMatcher.cc.

std::set< unsigned int > SimHitMatcher::superChamberIdsGEM ( ) const

GEM superchamber detIds with SimHits.

Definition at line 228 of file SimHitMatcher.cc.

std::set< unsigned int > SimHitMatcher::superChamberIdsGEMCoincidences ( ) const

GEM superchamber detIds with SimHits 2 layers of coincidence pads.

Definition at line 237 of file SimHitMatcher.cc.

Member Data Documentation

bool SimHitMatcher::discardEleHitsGEM_
private

Definition at line 94 of file SimHitMatcher.h.

std::map<unsigned int, edm::PSimHitContainer > SimHitMatcher::gem_chamber_to_hits_
private

Definition at line 109 of file SimHitMatcher.h.

std::map<unsigned int, edm::PSimHitContainer > SimHitMatcher::gem_detid_to_hits_
private

Definition at line 108 of file SimHitMatcher.h.

std::map<unsigned int, std::set<int> > SimHitMatcher::gem_detids_to_copads_
private

Definition at line 115 of file SimHitMatcher.h.

std::map<unsigned int, std::set<int> > SimHitMatcher::gem_detids_to_pads_
private

Definition at line 113 of file SimHitMatcher.h.

const GEMGeometry& SimHitMatcher::gem_geo_
private

Definition at line 103 of file SimHitMatcher.h.

edm::Handle<edm::PSimHitContainer> SimHitMatcher::gem_hits
private

Definition at line 98 of file SimHitMatcher.h.

edm::PSimHitContainer SimHitMatcher::gem_hits_
private

Definition at line 107 of file SimHitMatcher.h.

Referenced by simHitsGEM().

std::map<unsigned int, edm::PSimHitContainer > SimHitMatcher::gem_superchamber_to_hits_
private

Definition at line 110 of file SimHitMatcher.h.

edm::PSimHitContainer SimHitMatcher::no_hits_
private

Definition at line 106 of file SimHitMatcher.h.

edm::Handle<edm::SimTrackContainer> SimHitMatcher::sim_tracks
private

Definition at line 99 of file SimHitMatcher.h.

edm::Handle<edm::SimVertexContainer> SimHitMatcher::sim_vertices
private

Definition at line 100 of file SimHitMatcher.h.

std::string SimHitMatcher::simInputLabel_
private

Definition at line 96 of file SimHitMatcher.h.

bool SimHitMatcher::simMuOnlyGEM_
private

Definition at line 93 of file SimHitMatcher.h.

const SimTrack& SimHitMatcher::track_
private

Definition at line 87 of file SimHitMatcher.h.

std::map<unsigned int, unsigned int> SimHitMatcher::trkid_to_index_
private

Definition at line 104 of file SimHitMatcher.h.

bool SimHitMatcher::verbose_
private

Definition at line 95 of file SimHitMatcher.h.