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 &, const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > &)
 

Typedef Documentation

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

Definition at line 19 of file ShallowTools.h.

Function Documentation

LocalVector shallow::drift ( const StripGeomDetUnit stripDet,
const MagneticField magfield,
const SiStripLorentzAngle lorentzAngle 
)

Definition at line 38 of file ShallowTools.cc.

References Surface::bounds(), GeomDet::geographicalId(), SiStripLorentzAngle::getLorentzAngle(), MagneticField::inTesla(), GloballyPositioned< T >::position(), GeomDet::specificSurface(), GeomDet::surface(), Bounds::thickness(), toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by analyzer::SiPixelLorentzAngle::analyze(), DTLinearDriftAlgo::compute(), DTLinearDriftFromDBAlgo::compute(), DTNoDriftAlgo::compute(), ChargeDrifterFP420::drift(), Phase2StripCPE::fillParam(), ClusterShapeHitFilter::getSizes(), ShallowSimhitClustersProducer::produce(), ShallowTrackClustersProducer::produce(), SiStripTrackingRecHitsValid::rechitanalysis(), SiStripTrackingRecHitsValid::rechitanalysis_matched(), and DTParametrizedDriftAlgo::setES().

38  {
39  LocalVector lbfield=( stripDet->surface()).toLocal( magfield.inTesla(stripDet->surface().position()));
40  float tanLorentzAnglePerTesla = lorentzAngle.getLorentzAngle(stripDet->geographicalId());
41  float driftz = stripDet->specificSurface().bounds().thickness();
42  float driftx =-tanLorentzAnglePerTesla * lbfield.y() * driftz;
43  float drifty = tanLorentzAnglePerTesla * lbfield.x() * driftz;
44  return LocalVector(driftx,drifty,driftz);
45 }
Local3DVector LocalVector
Definition: LocalVector.h:12
T y() const
Definition: PV3DBase.h:63
const Bounds & bounds() const
Definition: Surface.h:120
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
float getLorentzAngle(const uint32_t &) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
virtual float thickness() const =0
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:45
int shallow::findTrackIndex ( const edm::Handle< edm::View< reco::Track > > &  h,
const reco::Track t 
)

Definition at line 28 of file ShallowTools.cc.

References end, and l1t::tracks.

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

28  {
30  it = tracks->begin(),
31  end = tracks->end();
32  //Compare addresses
33  for(; it!=end; it++) { if (&(*it)==track) { return it - tracks->begin(); } }
34  return -2;
35 }
#define end
Definition: vmac.h:39
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
CLUSTERMAP shallow::make_cluster_map ( const edm::Event iEvent,
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > &  cluster_token 
)

Definition at line 14 of file ShallowTools.cc.

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

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

14  {
15  CLUSTERMAP clustermap;
17  iEvent.getByToken(cluster_token, clusters);
18 
19  unsigned int clusterindex = 0;
20  BOOST_FOREACH(const edmNew::DetSet<SiStripCluster>& ds, *clusters)
21  BOOST_FOREACH(const SiStripCluster& cluster, ds)
22  clustermap.insert( std::make_pair( std::make_pair(ds.detId(),cluster.firstStrip()),
23  clusterindex++));
24  return clustermap;
25 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
return(e1-e2)*(e1-e2)+dp *dp
std::map< std::pair< uint32_t, uint16_t >, unsigned int > CLUSTERMAP
Definition: ShallowTools.h:19