CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StripClusterSelectorTopBottom.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<edmNew::DetSetVector<SiStripCluster>>();
11 
12  for (edmNew::DetSetVector<SiStripCluster>::const_iterator clustSet = input->begin(); clustSet != input->end();
13  ++clustSet) {
14  edmNew::DetSet<SiStripCluster>::const_iterator clustIt = clustSet->begin();
16 
17  DetId detIdObject(clustSet->detId());
19  const StripGeomDetUnit* theGeomDet = dynamic_cast<const StripGeomDetUnit*>(theTracker.idToDet(detIdObject));
20  const StripTopology* topol = dynamic_cast<const StripTopology*>(&(theGeomDet->specificTopology()));
21 
22  for (; clustIt != end; ++clustIt) {
23  LocalPoint lpclust = topol->localPosition(clustIt->barycenter());
24  GlobalPoint GPclust = theGeomDet->surface().toGlobal(Local3DPoint(lpclust.x(), lpclust.y(), lpclust.z()));
25  double clustY = GPclust.y();
26  if ((clustY * y_) > 0) {
27  spc.push_back(*clustIt);
28  }
29  }
30  }
31  event.put(std::move(output));
32 }
33 
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > token_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
T y() const
Definition: PV3DBase.h:60
void produce(edm::StreamID, edm::Event &event, const edm::EventSetup &setup) const override
data_type const * const_iterator
Definition: DetSetNew.h:31
static std::string const input
Definition: EdmProvDump.cc:47
bool getData(T &iHolder) const
Definition: EventSetup.h:122
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
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > const tTrackerGeom_
string end
Definition: dataset.py:937
virtual LocalPoint localPosition(float strip) const =0
T x() const
Definition: PV3DBase.h:59
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9