CMS 3D CMS Logo

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