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
Phase2TrackerClusterizer Class Reference
Inheritance diagram for Phase2TrackerClusterizer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 Phase2TrackerClusterizer (const edm::ParameterSet &conf)
 
void produce (edm::StreamID sid, edm::Event &event, const edm::EventSetup &eventSetup) const overridefinal
 
virtual ~Phase2TrackerClusterizer ()
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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

std::unique_ptr
< Phase2TrackerClusterizerAlgorithm
clusterizer_
 
edm::EDGetTokenT
< edm::DetSetVector
< Phase2TrackerDigi > > 
token_
 

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 27 of file Phase2TrackerClusterizer.cc.

Constructor & Destructor Documentation

Phase2TrackerClusterizer::Phase2TrackerClusterizer ( const edm::ParameterSet conf)
explicit

Definition at line 45 of file Phase2TrackerClusterizer.cc.

45  :
46  clusterizer_(new Phase2TrackerClusterizerAlgorithm(conf.getParameter< unsigned int >("maxClusterSize"), conf.getParameter< unsigned int >("maxNumberClusters"))),
48  produces< Phase2TrackerCluster1DCollectionNew >();
49  }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_
std::unique_ptr< Phase2TrackerClusterizerAlgorithm > clusterizer_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Phase2TrackerClusterizer::~Phase2TrackerClusterizer ( )
virtual

Definition at line 51 of file Phase2TrackerClusterizer.cc.

51 { }

Member Function Documentation

void Phase2TrackerClusterizer::produce ( edm::StreamID  sid,
edm::Event event,
const edm::EventSetup eventSetup 
) const
finaloverridevirtual

Implements edm::global::EDProducerBase.

Definition at line 57 of file Phase2TrackerClusterizer.cc.

References assert(), clusterizer_, HLT_25ns10e33_v2_cff::clusters, edm::EventSetup::get(), TrackerGeometry::idToDetUnit(), and token_.

57  {
58 
59  // Get the Digis
61  event.getByToken(token_, digis);
62 
63  // Get the geometry
65  eventSetup.get< TrackerDigiGeometryRecord >().get(geomHandle);
66  const TrackerGeometry* tkGeom(&(*geomHandle));
67 
68  // Global container for the clusters of each modules
69  std::auto_ptr< Phase2TrackerCluster1DCollectionNew > outputClusters(new Phase2TrackerCluster1DCollectionNew());
70 
71  // Go over all the modules
72  for (auto DSViter : *digis) {
73  DetId detId(DSViter.detId());
74 
75  // Geometry
76  const GeomDetUnit* geomDetUnit(tkGeom->idToDetUnit(detId));
77  const PixelGeomDetUnit* pixDet = dynamic_cast< const PixelGeomDetUnit* >(geomDetUnit);
78  if (!pixDet) assert(0);
79 
80  // Container for the clusters that will be produced for this modules
81  Phase2TrackerCluster1DCollectionNew::FastFiller clusters(*outputClusters, DSViter.detId());
82 
83  // Setup the clusterizer algorithm for this detector (see ClusterizerAlgorithm for more details)
84  clusterizer_->setup(pixDet);
85 
86  // Pass the list of Digis to the main algorithm
87  // This function will store the clusters in the previously created container
88  clusterizer_->clusterizeDetUnit(DSViter, clusters);
89 
90  if (clusters.empty()) clusters.abort();
91  }
92 
93  // Add the data to the output
94  outputClusters->shrink_to_fit();
95  event.put(outputClusters);
96  }
edmNew::DetSetVector< Phase2TrackerCluster1D > Phase2TrackerCluster1DCollectionNew
assert(m_qm.get())
edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_
std::unique_ptr< Phase2TrackerClusterizerAlgorithm > clusterizer_
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56

Member Data Documentation

std::unique_ptr< Phase2TrackerClusterizerAlgorithm > Phase2TrackerClusterizer::clusterizer_
private

Definition at line 35 of file Phase2TrackerClusterizer.cc.

Referenced by produce().

edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > Phase2TrackerClusterizer::token_
private

Definition at line 36 of file Phase2TrackerClusterizer.cc.

Referenced by produce().