test
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 Types | Private Attributes
TotemRPClusterProducerAlgorithm Class Reference

#include <TotemRPClusterProducerAlgorithm.h>

Public Member Functions

int buildClusters (unsigned int detId, const std::vector< TotemRPDigi > &digi, std::vector< TotemRPCluster > &clusters)
 
 TotemRPClusterProducerAlgorithm (const edm::ParameterSet &param)
 
 ~TotemRPClusterProducerAlgorithm ()
 

Private Types

typedef std::set< TotemRPDigiTotemRPDigiSet
 

Private Attributes

const edm::ParameterSetparam_
 
TotemRPDigiSet strip_digi_set_
 input digi set, strip by strip More...
 
int verbosity_
 

Detailed Description

Definition at line 22 of file TotemRPClusterProducerAlgorithm.h.

Member Typedef Documentation

Definition at line 32 of file TotemRPClusterProducerAlgorithm.h.

Constructor & Destructor Documentation

TotemRPClusterProducerAlgorithm::TotemRPClusterProducerAlgorithm ( const edm::ParameterSet param)

Definition at line 16 of file TotemRPClusterProducerAlgorithm.cc.

References edm::ParameterSet::getParameter(), param_, and verbosity_.

17  :param_(param)
18 {
19  verbosity_ = param_.getParameter<int>("verbosity");
20 }
T getParameter(std::string const &) const
TotemRPClusterProducerAlgorithm::~TotemRPClusterProducerAlgorithm ( )

Definition at line 24 of file TotemRPClusterProducerAlgorithm.cc.

25 {
26 }

Member Function Documentation

int TotemRPClusterProducerAlgorithm::buildClusters ( unsigned int  detId,
const std::vector< TotemRPDigi > &  digi,
std::vector< TotemRPCluster > &  clusters 
)

Definition at line 30 of file TotemRPClusterProducerAlgorithm.cc.

References i, and strip_digi_set_.

Referenced by TotemRPClusterProducer::run().

31 {
32  clusters.clear();
33 
34  strip_digi_set_.clear();
35  strip_digi_set_.insert(digi.begin(), digi.end());
36 
37  if (strip_digi_set_.size() == 0)
38  return 0;
39 
40  bool iter_beg=true;
41  int cluster_beg=-16;
42  int cluster_end;
43  int prev_strip=-16;
44  int cur_strip;
45 
46  for (TotemRPDigiSet::const_iterator i=strip_digi_set_.begin(); i!=strip_digi_set_.end(); ++i)
47  {
48  cur_strip = i->getStripNumber();
49  bool non_continuity = (cur_strip!=prev_strip+1);
50 
51  if (iter_beg)
52  {
53  cluster_beg=cur_strip;
54  iter_beg=false;
55  }
56  else if (non_continuity)
57  {
58  cluster_end=prev_strip;
59  clusters.push_back(TotemRPCluster((uint16_t)cluster_beg, (uint16_t) cluster_end));
60 
61  cluster_beg=cur_strip;
62  }
63 
64  prev_strip=cur_strip;
65  }
66 
67  if (!iter_beg)
68  {
69  cluster_end=prev_strip;
70  clusters.push_back(TotemRPCluster((uint16_t)cluster_beg, (uint16_t) cluster_end));
71  }
72 
73  return clusters.size();
74 }
int i
Definition: DBlmapReader.cc:9
Cluster of TOTEM RP strip hits.
TotemRPDigiSet strip_digi_set_
input digi set, strip by strip

Member Data Documentation

const edm::ParameterSet& TotemRPClusterProducerAlgorithm::param_
private

Definition at line 36 of file TotemRPClusterProducerAlgorithm.h.

Referenced by TotemRPClusterProducerAlgorithm().

TotemRPDigiSet TotemRPClusterProducerAlgorithm::strip_digi_set_
private

input digi set, strip by strip

Definition at line 34 of file TotemRPClusterProducerAlgorithm.h.

Referenced by buildClusters().

int TotemRPClusterProducerAlgorithm::verbosity_
private

Definition at line 38 of file TotemRPClusterProducerAlgorithm.h.

Referenced by TotemRPClusterProducerAlgorithm().