CMS 3D CMS Logo

ShallowTools.cc
Go to the documentation of this file.
2 
8 
9 namespace shallow {
10 
14  CLUSTERMAP clustermap;
16  iEvent.getByToken(cluster_token, clusters);
17 
18  unsigned int clusterindex = 0;
19  for (auto const& ds : *clusters)
20  for (auto const& cluster : ds)
21  clustermap.insert(std::make_pair(std::make_pair(ds.detId(), cluster.firstStrip()), clusterindex++));
22  return clustermap;
23  }
24 
27  //Compare addresses
28  for (; it != end; it++) {
29  if (&(*it) == track) {
30  return it - tracks->begin();
31  }
32  }
33  return -2;
34  }
35 
37  const MagneticField& magfield,
38  const SiStripLorentzAngle& lorentzAngle) {
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  }
46 
47 } // namespace shallow
Vector3DBase< float, LocalTag >
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
ShallowTools.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
StripGeomDetUnit.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm::Handle
Definition: AssociativeIterator.h:50
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
shallow::drift
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:36
SiStripLorentzAngle
Definition: SiStripLorentzAngle.h:26
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
mps_fire.end
end
Definition: mps_fire.py:242
reco::Track
Definition: Track.h:27
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
edm::View
Definition: CaloClusterFwd.h:14
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Bounds::thickness
virtual float thickness() const =0
SiStripCluster.h
Event.h
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
iEvent
int iEvent
Definition: GenABIO.cc:224
MagneticField.h
GeomDet::specificSurface
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
SiStripLorentzAngle::getLorentzAngle
float getLorentzAngle(const uint32_t &) const
Definition: SiStripLorentzAngle.cc:15
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
edmNew::DetSetVector
Definition: DetSetNew.h:13
shallow::make_cluster_map
CLUSTERMAP make_cluster_map(const edm::Event &, const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > &)
Definition: ShallowTools.cc:12
toLocal
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
Definition: ConversionProducer.h:199
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
shallow
Definition: ShallowTools.h:19
SiStripLorentzAngle.h
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
volumeBasedMagneticField_160812_cfi.magfield
magfield
Definition: volumeBasedMagneticField_160812_cfi.py:11
shallow::CLUSTERMAP
std::map< std::pair< uint32_t, uint16_t >, unsigned int > CLUSTERMAP
Definition: ShallowTools.h:21
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
shallow::findTrackIndex
int findTrackIndex(const edm::Handle< edm::View< reco::Track > > &h, const reco::Track *t)
Definition: ShallowTools.cc:25