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 
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::StreamID
Definition: StreamID.h:30
PixelClusterSelectorTopBottom
Definition: PixelClusterSelectorTopBottom.h:26
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:72
PixelClusterSelectorTopBottom::tTrackerGeom_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tTrackerGeom_
Definition: PixelClusterSelectorTopBottom.h:38
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
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
mps_fire.end
end
Definition: mps_fire.py:242
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
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:58
PixelClusterSelectorTopBottom.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
edmNew::DetSetVector::FastFiller
Definition: DetSetVectorNew.h:202
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