CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
)

Definition at line 39 of file ShallowTools.cc.

References BoundSurface::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 SiStripTrackingRecHitsValid::analyze(), SiPixelLorentzAngle::analyze(), DTLinearDriftAlgo::compute(), DTLinearDriftFromDBAlgo::compute(), DTNoDriftAlgo::compute(), ChargeDrifterFP420::drift(), ClusterShapeHitFilter::getSizes(), ShallowTrackClustersProducer::produce(), and ShallowSimhitClustersProducer::produce().

39  {
40  LocalVector lbfield=( stripDet->surface()).toLocal( magfield.inTesla(stripDet->surface().position()));
41  float tanLorentzAnglePerTesla = lorentzAngle.getLorentzAngle(stripDet->geographicalId());
42  float driftz = stripDet->specificSurface().bounds().thickness();
43  float driftx =-tanLorentzAnglePerTesla * lbfield.y() * driftz;
44  float drifty = tanLorentzAnglePerTesla * lbfield.x() * driftz;
45  return LocalVector(driftx,drifty,driftz);
46 }
Local3DVector LocalVector
Definition: LocalVector.h:12
const float & getLorentzAngle(const uint32_t &) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
T y() const
Definition: PV3DBase.h:62
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:38
virtual float thickness() const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
const Bounds & bounds() const
Definition: BoundSurface.h:89
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
T x() const
Definition: PV3DBase.h:61
const PositionType & position() const
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().

29  {
31  it = tracks->begin(),
32  end = tracks->end();
33  //Compare addresses
34  for(; it!=end; it++) { if (&(*it)==track) { return it - tracks->begin(); } }
35  return -2;
36 }
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
#define end
Definition: vmac.h:38
tuple tracks
Definition: testEve_cfg.py:39
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().

15  {
16  CLUSTERMAP clustermap;
18  iEvent.getByLabel(clusterLabel, clusters);
19 
20  unsigned int clusterindex = 0;
21  BOOST_FOREACH(const edmNew::DetSet<SiStripCluster>& ds, *clusters)
22  BOOST_FOREACH(const SiStripCluster& cluster, ds)
23  clustermap.insert( std::make_pair( std::make_pair(ds.detId(),cluster.firstStrip()),
24  clusterindex++));
25  return clustermap;
26 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
string const
Definition: compareJSON.py:14
std::map< std::pair< uint32_t, uint16_t >, unsigned int > CLUSTERMAP
Definition: ShallowTools.h:16
bool insert(Storage &, ItemType *, const IdTag &)