CMS 3D CMS Logo

StripClusterSelectorTopBottom.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<edmNew::DetSetVector<SiStripCluster>>();
13 
14  for (edmNew::DetSetVector<SiStripCluster>::const_iterator clustSet = input->begin(); clustSet != input->end();
15  ++clustSet) {
16  edmNew::DetSet<SiStripCluster>::const_iterator clustIt = clustSet->begin();
18 
19  DetId detIdObject(clustSet->detId());
21  const StripGeomDetUnit* theGeomDet = dynamic_cast<const StripGeomDetUnit*>(theTracker.idToDet(detIdObject));
22  const StripTopology* topol = dynamic_cast<const StripTopology*>(&(theGeomDet->specificTopology()));
23 
24  for (; clustIt != end; ++clustIt) {
25  LocalPoint lpclust = topol->localPosition(clustIt->barycenter());
26  GlobalPoint GPclust = theGeomDet->surface().toGlobal(Local3DPoint(lpclust.x(), lpclust.y(), lpclust.z()));
27  double clustY = GPclust.y();
28  if ((clustY * y_) > 0) {
29  spc.push_back(*clustIt);
30  }
31  }
32  }
33  event.put(std::move(output));
34 }
35 
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::StreamID
Definition: StreamID.h:30
input
static const std::string input
Definition: EdmProvDump.cc:48
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
StripClusterSelectorTopBottom::produce
void produce(edm::StreamID, edm::Event &event, const edm::EventSetup &setup) const override
Definition: StripClusterSelectorTopBottom.cc:4
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
StripClusterSelectorTopBottom::token_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > token_
Definition: StripClusterSelectorTopBottom.h:40
edm::Handle
Definition: AssociativeIterator.h:50
StripClusterSelectorTopBottom.h
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mps_fire.end
end
Definition: mps_fire.py:242
edm::ESHandle< TrackerGeometry >
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
Point3DBase< float, LocalTag >
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
StripClusterSelectorTopBottom
Definition: StripClusterSelectorTopBottom.h:29
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
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
StripTopology
Definition: StripTopology.h:11
StripClusterSelectorTopBottom::y_
double y_
Definition: StripClusterSelectorTopBottom.h:41
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TrackerGeometry
Definition: TrackerGeometry.h:14
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31