CMS 3D CMS Logo

PixelClusterSelectorTopBottom.cc
Go to the documentation of this file.
3 
6  event.getByToken(token_, input);
7 
8  const TrackerGeometry& theTracker = setup.getData(tTrackerGeom_);
9 
10  auto output = std::make_unique<SiPixelClusterCollectionNew>();
11 
12  for (SiPixelClusterCollectionNew::const_iterator clustSet = input->begin(); clustSet != input->end(); ++clustSet) {
13  edmNew::DetSet<SiPixelCluster>::const_iterator clustIt = clustSet->begin();
15 
16  DetId detIdObject(clustSet->detId());
18  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detIdObject));
19  const PixelTopology* topol = (&(theGeomDet->specificTopology()));
20 
21  for (; clustIt != end; ++clustIt) {
22  LocalPoint lpclust = topol->localPosition(MeasurementPoint((*clustIt).x(), (*clustIt).y()));
23  GlobalPoint GPclust = theGeomDet->surface().toGlobal(Local3DPoint(lpclust.x(), lpclust.y(), lpclust.z()));
24  double clustY = GPclust.y();
25  if ((clustY * y_) > 0) {
26  spc.push_back(*clustIt);
27  }
28  }
29  }
30  event.put(std::move(output));
31 }
32 
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T z() const
Definition: PV3DBase.h:61
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
data_type const * const_iterator
Definition: DetSetNew.h:31
static std::string const input
Definition: EdmProvDump.cc:47
edm::EDGetTokenT< SiPixelClusterCollectionNew > token_
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
void produce(edm::StreamID, edm::Event &event, const edm::EventSetup &setup) const override
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > const tTrackerGeom_
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9