ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
RegSelLayer::PhiCluster Class Reference
Collaboration diagram for RegSelLayer::PhiCluster:

Public Member Functions

void addModule (const RegSelModule &m)
 
unsigned size () const
 

Private Attributes

std::vector< int > m_N
 
std::vector< double > m_positions
 

Detailed Description

Definition at line 98 of file RegSelLayer.h.

Member Function Documentation

◆ addModule()

void RegSelLayer::PhiCluster::addModule ( const RegSelModule m)

Definition at line 87 of file RegSelLayer.cxx.

87  {
88 
89  static const double M_TWOPI = 2*M_PI;
90 
91  double pmin = m.phiMin();
92  double pmax = m.phiMax();
93 
94  if ( pmin>pmax ) pmax+=M_TWOPI;
95 
96  double overlap = 0.2*std::fabs(pmax-pmin);
97  double start = pmin;
98 
99  bool notoverlaping = true;
100  for ( int i=m_positions.size() ; i-- ; ) {
101 
102  double tdelphi = m_positions[i]-start;
103 
104  if ( tdelphi>M_PI ) start+=M_TWOPI;
105  if ( tdelphi<-M_PI ) start-=M_TWOPI;
106 
107  if ( std::fabs(m_positions[i]-start)<overlap ) {
109  m_N[i]++;
110  m_positions[i] /= m_N[i];
111  notoverlaping = false;
112  break;
113  }
114  }
115 
116  if ( notoverlaping ) {
117  m_N.push_back(1);
118  m_positions.push_back(start);
119  }
120 
121 }

◆ size()

unsigned RegSelLayer::PhiCluster::size ( ) const
inline

Definition at line 103 of file RegSelLayer.h.

Member Data Documentation

◆ m_N

std::vector<int> RegSelLayer::PhiCluster::m_N
private

Definition at line 105 of file RegSelLayer.h.

◆ m_positions

std::vector<double> RegSelLayer::PhiCluster::m_positions
private

Definition at line 106 of file RegSelLayer.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
M_PI
#define M_PI
Definition: ActiveFraction.h:11
lumiFormat.i
int i
Definition: lumiFormat.py:85
RegSelLayer::PhiCluster::m_N
std::vector< int > m_N
Definition: RegSelLayer.h:105
RegSelLayer::PhiCluster::m_positions
std::vector< double > m_positions
Definition: RegSelLayer.h:106
TrackOverlayDecisionAlg::M_TWOPI
const double M_TWOPI
Definition: TrackOverlayDecisionAlg.h:27