CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
T y() const
Definition: PV3DBase.h:60
data_type const * const_iterator
Definition: DetSetNew.h:31
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
static std::string const input
Definition: EdmProvDump.cc:47
bool getData(T &iHolder) const
Definition: EventSetup.h:122
edm::EDGetTokenT< SiPixelClusterCollectionNew > token_
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T z() const
Definition: PV3DBase.h:61
def move
Definition: eostools.py:511
const TrackerGeomDet * idToDet(DetId) const override
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
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.
string end
Definition: dataset.py:937
T x() const
Definition: PV3DBase.h:59
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > const tTrackerGeom_
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9