CMS 3D CMS Logo

Typedefs | Functions

shallow Namespace Reference

Typedefs

typedef std::map< std::pair
< uint32_t, uint16_t >
, unsigned int > 
CLUSTERMAP

Functions

LocalVector drift (const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
int findTrackIndex (const edm::Handle< edm::View< reco::Track > > &h, const reco::Track *t)
CLUSTERMAP make_cluster_map (const edm::Event &, edm::InputTag &)

Typedef Documentation

typedef std::map<std::pair<uint32_t, uint16_t>, unsigned int> shallow::CLUSTERMAP

Definition at line 16 of file ShallowTools.h.


Function Documentation

LocalVector shallow::drift ( const StripGeomDetUnit stripDet,
const MagneticField magfield,
const SiStripLorentzAngle lorentzAngle 
)
int shallow::findTrackIndex ( const edm::Handle< edm::View< reco::Track > > &  h,
const reco::Track t 
)

Definition at line 29 of file ShallowTools.cc.

References end, and testEve_cfg::tracks.

Referenced by ShallowTrackClustersProducer::produce(), ShallowSimTracksProducer::produce(), and ShallowGainCalibration::produce().

                                                                                     {
  edm::View<reco::Track>::const_iterator
    it = tracks->begin(),
    end = tracks->end();
  //Compare addresses
  for(; it!=end; it++) {    if (&(*it)==track) { return it - tracks->begin(); }  }
  return -2;
}
CLUSTERMAP shallow::make_cluster_map ( const edm::Event iEvent,
edm::InputTag clusterLabel 
)

Definition at line 15 of file ShallowTools.cc.

References edmNew::DetSet< T >::detId(), SiStripCluster::firstStrip(), and edm::Event::getByLabel().

Referenced by ShallowRechitClustersProducer::produce(), ShallowTrackClustersProducer::produce(), and ShallowSimhitClustersProducer::produce().

                                                                     {
  CLUSTERMAP clustermap;
  edm::Handle<edmNew::DetSetVector<SiStripCluster> > clusters;
  iEvent.getByLabel(clusterLabel, clusters);
  
  unsigned int clusterindex = 0;  
  BOOST_FOREACH(const edmNew::DetSet<SiStripCluster>& ds, *clusters)
    BOOST_FOREACH(const SiStripCluster& cluster, ds)
    clustermap.insert( std::make_pair( std::make_pair(ds.detId(),cluster.firstStrip()),
                                       clusterindex++));
  return clustermap;
}