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::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PixelClusterSelectorTopBottom (const edm::ParameterSet &cfg)
 
void produce (edm::StreamID, edm::Event &event, const edm::EventSetup &setup) const override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::EDGetTokenT
< SiPixelClusterCollectionNew
token_
 
double y_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 28 of file PixelClusterSelectorTopBottom.h.

Constructor & Destructor Documentation

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

Definition at line 31 of file PixelClusterSelectorTopBottom.h.

31  :
32  token_( consumes<SiPixelClusterCollectionNew>(cfg.getParameter<edm::InputTag>( "label" )) ),
33  y_( cfg.getParameter<double>( "y" ) ) { produces<SiPixelClusterCollectionNew>(); }
T getParameter(std::string const &) const
edm::EDGetTokenT< SiPixelClusterCollectionNew > token_

Member Function Documentation

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

Implements edm::global::EDProducerBase.

Definition at line 4 of file PixelClusterSelectorTopBottom.cc.

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

4  {
5 
7  event.getByToken(token_, 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:114
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T y() const
Definition: PV3DBase.h:63
data_type const * const_iterator
Definition: DetSetNew.h:30
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
static std::string const input
Definition: EdmProvDump.cc:43
edm::EDGetTokenT< SiPixelClusterCollectionNew > token_
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T z() const
Definition: PV3DBase.h:64
#define end
Definition: vmac.h:37
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
edmNew::DetSetVector< SiPixelCluster > SiPixelClusterCollectionNew
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

edm::EDGetTokenT<SiPixelClusterCollectionNew> PixelClusterSelectorTopBottom::token_
private

Definition at line 38 of file PixelClusterSelectorTopBottom.h.

Referenced by produce().

double PixelClusterSelectorTopBottom::y_
private

Definition at line 39 of file PixelClusterSelectorTopBottom.h.

Referenced by produce().