CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
PixelClusterSelectorTopBottom Class Reference

#include <PixelClusterSelectorTopBottom.h>

Inheritance diagram for PixelClusterSelectorTopBottom:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 PixelClusterSelectorTopBottom (const edm::ParameterSet &cfg)
 
void produce (edm::Event &event, const edm::EventSetup &setup)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::InputTag label_
 
double y_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 30 of file PixelClusterSelectorTopBottom.h.

Constructor & Destructor Documentation

PixelClusterSelectorTopBottom::PixelClusterSelectorTopBottom ( const edm::ParameterSet cfg)
inlineexplicit

Definition at line 33 of file PixelClusterSelectorTopBottom.h.

33  :
34  label_( cfg.getParameter<edm::InputTag>( "label" ) ),
35  y_( cfg.getParameter<double>( "y" ) ) { produces<SiPixelClusterCollectionNew>(); }
T getParameter(std::string const &) const

Member Function Documentation

void PixelClusterSelectorTopBottom::produce ( edm::Event event,
const edm::EventSetup setup 
)
virtual

Implements edm::EDProducer.

Definition at line 4 of file PixelClusterSelectorTopBottom.cc.

References end, relativeConstraints::geom, edm::EventSetup::get(), TrackerGeometry::idToDet(), LaserDQM_cfg::input, label_, Topology::localPosition(), convertSQLitetoXML_cfg::output, PixelGeomDetUnit::specificTopology(), GeomDet::surface(), Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), y_, and PV3DBase< T, PVType, FrameType >::z().

4  {
5 
7  event.getByLabel(label_, input);
8 
10  setup.get<TrackerDigiGeometryRecord>().get( geom );
11  const TrackerGeometry& theTracker( *geom );
12 
13  std::auto_ptr<SiPixelClusterCollectionNew> output( new SiPixelClusterCollectionNew() );
14 
15  for (SiPixelClusterCollectionNew::const_iterator clustSet = input->begin(); clustSet!=input->end(); ++clustSet) {
16  edmNew::DetSet<SiPixelCluster>::const_iterator clustIt = clustSet->begin();
18 
19  DetId detIdObject( clustSet->detId() );
21  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*> (theTracker.idToDet(detIdObject) );
22  const PixelTopology * topol = (&(theGeomDet->specificTopology()));
23 
24  for(; clustIt!=end;++clustIt) {
25  LocalPoint lpclust = topol->localPosition(MeasurementPoint((*clustIt).x(),(*clustIt).y()));
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( output );
34 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T y() const
Definition: PV3DBase.h:62
data_type const * const_iterator
Definition: DetSetNew.h:25
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T z() const
Definition: PV3DBase.h:63
#define end
Definition: vmac.h:38
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
Definition: DetId.h:20
const T & get() const
Definition: EventSetup.h:55
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
edmNew::DetSetVector< SiPixelCluster > SiPixelClusterCollectionNew
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
T x() const
Definition: PV3DBase.h:61

Member Data Documentation

edm::InputTag PixelClusterSelectorTopBottom::label_
private
double PixelClusterSelectorTopBottom::y_
private

Definition at line 41 of file PixelClusterSelectorTopBottom.h.

Referenced by produce().