#include <StripClusterSelectorTopBottom.h>
Public Member Functions | |
void | produce (edm::Event &event, const edm::EventSetup &setup) |
StripClusterSelectorTopBottom (const edm::ParameterSet &cfg) | |
Private Attributes | |
edm::InputTag | label_ |
double | y_ |
Definition at line 31 of file StripClusterSelectorTopBottom.h.
StripClusterSelectorTopBottom::StripClusterSelectorTopBottom | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
Definition at line 34 of file StripClusterSelectorTopBottom.h.
: label_( cfg.getParameter<edm::InputTag>( "label" ) ), y_( cfg.getParameter<double>( "y" ) ) { produces<edmNew::DetSetVector<SiStripCluster> >(); }
void StripClusterSelectorTopBottom::produce | ( | edm::Event & | event, |
const edm::EventSetup & | setup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 4 of file StripClusterSelectorTopBottom.cc.
References end, relativeConstraints::geom, edm::EventSetup::get(), TrackerGeometry::idToDet(), collect_tpl::input, label_, StripTopology::localPosition(), convertSQLitetoXML_cfg::output, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), y_, and PV3DBase< T, PVType, FrameType >::z().
{ edm::Handle< edmNew::DetSetVector<SiStripCluster> > input; event.getByLabel(label_, input); edm::ESHandle<TrackerGeometry> geom; setup.get<TrackerDigiGeometryRecord>().get( geom ); const TrackerGeometry& theTracker( *geom ); std::auto_ptr<edmNew::DetSetVector<SiStripCluster> > output( new edmNew::DetSetVector<SiStripCluster>() ); for (edmNew::DetSetVector<SiStripCluster>::const_iterator clustSet = input->begin(); clustSet!=input->end(); ++clustSet) { edmNew::DetSet<SiStripCluster>::const_iterator clustIt = clustSet->begin(); edmNew::DetSet<SiStripCluster>::const_iterator end = clustSet->end(); DetId detIdObject( clustSet->detId() ); edmNew::DetSetVector<SiStripCluster>::FastFiller spc(*output, detIdObject.rawId()); const StripGeomDetUnit* theGeomDet = dynamic_cast<const StripGeomDetUnit*> (theTracker.idToDet(detIdObject) ); const StripTopology * topol = dynamic_cast<const StripTopology*>(&(theGeomDet->specificTopology())); for(; clustIt!=end;++clustIt) { LocalPoint lpclust = topol->localPosition(clustIt->barycenter()); GlobalPoint GPclust = theGeomDet->surface().toGlobal(Local3DPoint(lpclust.x(),lpclust.y(),lpclust.z())); double clustY = GPclust.y(); if ((clustY * y_) > 0) { spc.push_back(*clustIt); } } } event.put( output ); }
Definition at line 41 of file StripClusterSelectorTopBottom.h.
Referenced by produce().
double StripClusterSelectorTopBottom::y_ [private] |
Definition at line 42 of file StripClusterSelectorTopBottom.h.
Referenced by produce().