CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TotemRPClusterProducer Class Reference
Inheritance diagram for TotemRPClusterProducer:
edm::stream::EDProducer<>

Public Member Functions

void produce (edm::Event &e, const edm::EventSetup &c) override
 
 TotemRPClusterProducer (const edm::ParameterSet &conf)
 
 ~TotemRPClusterProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 

Private Member Functions

void run (const edm::DetSetVector< TotemRPDigi > &input, edm::DetSetVector< TotemRPCluster > &output)
 

Private Attributes

TotemRPClusterProducerAlgorithm algorithm_
 
edm::ParameterSet conf_
 
edm::InputTag digiInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > digiInputTagToken_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Merges neighbouring active TOTEM RP strips into clusters.

Definition at line 28 of file TotemRPClusterProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 58 of file TotemRPClusterProducer.cc.

References digiInputTag_, digiInputTagToken_, edm::ParameterSet::getParameter(), and verbosity_.

58  :
59  conf_(conf), algorithm_(conf)
60 {
61  verbosity_ = conf.getParameter<int>("verbosity");
62 
63  digiInputTag_ = conf.getParameter<edm::InputTag>("tagDigi");
64  digiInputTagToken_ = consumes<edm::DetSetVector<TotemRPDigi> >(digiInputTag_);
65 
66  produces< edm::DetSetVector<TotemRPCluster> > ();
67 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > digiInputTagToken_
TotemRPClusterProducerAlgorithm algorithm_
TotemRPClusterProducer::~TotemRPClusterProducer ( )
inlineoverride

Member Function Documentation

void TotemRPClusterProducer::fillDescriptions ( edm::ConfigurationDescriptions descr)
static

Definition at line 103 of file TotemRPClusterProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and DEFINE_FWK_MODULE.

Referenced by ~TotemRPClusterProducer().

104 {
106 
107  desc.add<edm::InputTag>( "tagDigi", edm::InputTag( "totemRPRawToDigi", "TrackingStrip" ) )
108  ->setComment( "input digis collection to retrieve" );
109  desc.add<int>( "verbosity", 0 );
110 
111  descr.add( "totemRPClusterProducer", desc );
112 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TotemRPClusterProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 71 of file TotemRPClusterProducer.cc.

References digiInputTagToken_, edm::Event::getByToken(), input, convertSQLitetoXML_cfg::output, edm::Event::put(), and run().

Referenced by ~TotemRPClusterProducer().

72 {
73  // get input
76 
77  // prepare output
79 
80  // run clusterisation
81  if (!input->empty())
82  run(*input, output);
83 
84  // save output to event
85  e.put(make_unique<DetSetVector<TotemRPCluster>>(output));
86 }
void run(const edm::DetSetVector< TotemRPDigi > &input, edm::DetSetVector< TotemRPCluster > &output)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > digiInputTagToken_
static std::string const input
Definition: EdmProvDump.cc:44
void TotemRPClusterProducer::run ( const edm::DetSetVector< TotemRPDigi > &  input,
edm::DetSetVector< TotemRPCluster > &  output 
)
private

Definition at line 90 of file TotemRPClusterProducer.cc.

References algorithm_, TotemRPClusterProducerAlgorithm::buildClusters(), edm::DetSet< T >::data, and edm::DetSetVector< T >::find_or_insert().

Referenced by produce().

91 {
92  for (const auto &ds_digi : input)
93  {
94  edm::DetSet<TotemRPCluster> &ds_cluster = output.find_or_insert(ds_digi.id);
95 
96  algorithm_.buildClusters(ds_digi.id, ds_digi.data, ds_cluster.data);
97  }
98 }
TotemRPClusterProducerAlgorithm algorithm_
reference find_or_insert(det_id_type id)
Definition: DetSetVector.h:254
int buildClusters(unsigned int detId, const std::vector< TotemRPDigi > &digi, std::vector< TotemRPCluster > &clusters)
collection_type data
Definition: DetSet.h:78

Member Data Documentation

TotemRPClusterProducerAlgorithm TotemRPClusterProducer::algorithm_
private

Definition at line 45 of file TotemRPClusterProducer.cc.

Referenced by run().

edm::ParameterSet TotemRPClusterProducer::conf_
private

Definition at line 40 of file TotemRPClusterProducer.cc.

edm::InputTag TotemRPClusterProducer::digiInputTag_
private

Definition at line 42 of file TotemRPClusterProducer.cc.

Referenced by TotemRPClusterProducer().

edm::EDGetTokenT<edm::DetSetVector<TotemRPDigi> > TotemRPClusterProducer::digiInputTagToken_
private

Definition at line 43 of file TotemRPClusterProducer.cc.

Referenced by produce(), and TotemRPClusterProducer().

int TotemRPClusterProducer::verbosity_
private

Definition at line 41 of file TotemRPClusterProducer.cc.

Referenced by TotemRPClusterProducer().