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 Member Functions | Private Attributes | Friends
pftools::CaloWindow Class Reference

#include <CaloWindow.h>

Public Member Functions

bool addHit (double eta, double phi, double energy)
 
 CaloWindow ()
 
 CaloWindow (double eta, double phi, unsigned nRings, double deltaR, unsigned nPanes, double axis=0.0)
 
std::map< unsigned, CaloRinggetRingDepositions () const
 
std::map< unsigned, double > getRingEnergySummations () const
 
void init (double eta, double phi, unsigned nRings, double deltaR, unsigned nPanes, double axis=0.0)
 
void printEnergies (std::ostream &s, double range=1.0)
 
void reset ()
 
std::vector< double > stream (double normalisation=1.0) const
 
virtual ~CaloWindow ()
 

Private Member Functions

std::pair< unsigned, unsigned > relativePosition (double eta, double phi) const
 

Private Attributes

double axis_
 
double baryEta_
 
double baryPhi_
 
double deltaR_
 
std::map< unsigned, CaloRingenergies_
 
unsigned nPanes_
 
unsigned nRings_
 

Friends

std::ostream & operator<< (std::ostream &s, const CaloWindow &caloWindow)
 

Detailed Description

Definition at line 94 of file CaloWindow.h.

Constructor & Destructor Documentation

CaloWindow::CaloWindow ( )

Definition at line 124 of file CaloWindow.cc.

CaloWindow::CaloWindow ( double  eta,
double  phi,
unsigned  nRings,
double  deltaR,
unsigned  nPanes,
double  axis = 0.0 
)

Create a circular calo window centred on eta, phi, with nRings of size deltaR.

Definition at line 129 of file CaloWindow.cc.

CaloWindow::~CaloWindow ( )
virtual

Definition at line 156 of file CaloWindow.cc.

Member Function Documentation

bool CaloWindow::addHit ( double  eta,
double  phi,
double  energy 
)

Adds a hit contribution. If eta, phi are outside the window, this method returns false and does not add the energy to the window.

If ok, it returns true.

Definition at line 226 of file CaloWindow.cc.

std::map<unsigned, CaloRing> pftools::CaloWindow::getRingDepositions ( ) const
inline

Return a vector of vectors: Each inner vector corresponds to a ring of window panes around the barycentre and the first entry of the bary centre itself

Definition at line 122 of file CaloWindow.h.

References energies_.

122  {
123  return energies_;
124  }
std::map< unsigned, CaloRing > energies_
Definition: CaloWindow.h:163
std::map< unsigned, double > CaloWindow::getRingEnergySummations ( ) const

Definition at line 246 of file CaloWindow.cc.

void CaloWindow::init ( double  eta,
double  phi,
unsigned  nRings,
double  deltaR,
unsigned  nPanes,
double  axis = 0.0 
)

Definition at line 138 of file CaloWindow.cc.

void CaloWindow::printEnergies ( std::ostream &  s,
double  range = 1.0 
)

Definition at line 113 of file CaloWindow.cc.

std::pair< unsigned, unsigned > CaloWindow::relativePosition ( double  eta,
double  phi 
) const
private

Definition at line 160 of file CaloWindow.cc.

void CaloWindow::reset ( void  )

Definition at line 134 of file CaloWindow.cc.

vector< double > CaloWindow::stream ( double  normalisation = 1.0) const

Collapses all energies in all CaloRings into one vector of doubles

Parameters
normalisation- divide each energy by this value
Returns
a vector of doubles

Definition at line 95 of file CaloWindow.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const CaloWindow caloWindow 
)
friend

Member Data Documentation

double pftools::CaloWindow::axis_
private

Definition at line 154 of file CaloWindow.h.

double pftools::CaloWindow::baryEta_
private

Definition at line 144 of file CaloWindow.h.

double pftools::CaloWindow::baryPhi_
private

Definition at line 145 of file CaloWindow.h.

double pftools::CaloWindow::deltaR_
private

Definition at line 149 of file CaloWindow.h.

std::map<unsigned, CaloRing> pftools::CaloWindow::energies_
private

Definition at line 163 of file CaloWindow.h.

Referenced by getRingDepositions().

unsigned pftools::CaloWindow::nPanes_
private

Definition at line 151 of file CaloWindow.h.

unsigned pftools::CaloWindow::nRings_
private

Definition at line 147 of file CaloWindow.h.