CMS 3D CMS Logo

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 
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
StripClusterSelectorTopBottom::tTrackerGeom_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tTrackerGeom_
Definition: StripClusterSelectorTopBottom.h:40
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:41
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
mps_fire.end
end
Definition: mps_fire.py:242
Point3DBase< float, LocalTag >
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
StripClusterSelectorTopBottom
Definition: StripClusterSelectorTopBottom.h:28
edm::EventSetup
Definition: EventSetup.h:58
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:42
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