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
StripClusterSelectorTopBottom Class Reference

#include <StripClusterSelectorTopBottom.h>

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

Public Member Functions

void produce (edm::Event &event, const edm::EventSetup &setup)
 
 StripClusterSelectorTopBottom (const edm::ParameterSet &cfg)
 
- 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 31 of file StripClusterSelectorTopBottom.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file StripClusterSelectorTopBottom.h.

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

Member Function Documentation

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(), LaserDQM_cfg::input, label_, StripTopology::localPosition(), convertSQLitetoXML_cfg::output, 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<edmNew::DetSetVector<SiStripCluster> > output( new edmNew::DetSetVector<SiStripCluster>() );
14 
15  for (edmNew::DetSetVector<SiStripCluster>::const_iterator clustSet = input->begin(); clustSet!=input->end(); ++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( output );
34 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
T y() const
Definition: PV3DBase.h:62
data_type const * const_iterator
Definition: DetSetNew.h:25
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 LocalPoint localPosition(float strip) const =0
T x() const
Definition: PV3DBase.h:61

Member Data Documentation

edm::InputTag StripClusterSelectorTopBottom::label_
private
double StripClusterSelectorTopBottom::y_
private

Definition at line 42 of file StripClusterSelectorTopBottom.h.

Referenced by produce().