#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, CaloRing > | getRingDepositions () 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, CaloRing > | energies_ |
unsigned | nPanes_ |
unsigned | nRings_ |
Friends | |
std::ostream & | operator<< (std::ostream &s, const CaloWindow &caloWindow) |
Definition at line 94 of file CaloWindow.h.
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.
References init().
|
virtual |
Definition at line 156 of file CaloWindow.cc.
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.
References pftools::CaloRing::addEnergy(), EnergyCorrector::c, energies_, nRings_, position, and relativePosition().
Referenced by pftools::TestCaloWindow::doTest(), and pftools::Calibratable::fillCaloWindow().
|
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_.
std::map< unsigned, double > CaloWindow::getRingEnergySummations | ( | ) | const |
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.
References axis_, baryEta_, baryPhi_, EnergyCorrector::c, deltaR(), deltaR_, energies_, eta, j, nPanes_, nRings_, and alignCSCRings::r.
Referenced by CaloWindow().
void CaloWindow::printEnergies | ( | std::ostream & | s, |
double | range = 1.0 |
||
) |
Definition at line 113 of file CaloWindow.cc.
References EnergyCorrector::c, energies_, and pftools::CaloRing::printEnergies().
|
private |
Definition at line 160 of file CaloWindow.cc.
References axis_, baryEta_, baryPhi_, SiPixelRawToDigiRegional_cfi::deltaPhi, deltaR(), deltaR_, dPhi(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, energies_, nRings_, Pi, relativeConstraints::ring, and edm::second().
Referenced by addHit().
void CaloWindow::reset | ( | void | ) |
Definition at line 134 of file CaloWindow.cc.
References energies_.
Referenced by pftools::CandidateWrapper::CandidateWrapper(), pftools::CandidateWrapper::reset(), and pftools::Calibratable::reset().
vector< double > CaloWindow::stream | ( | double | normalisation = 1.0 | ) | const |
Collapses all energies in all CaloRings into one vector of doubles
normalisation | - divide each energy by this value |
Definition at line 95 of file CaloWindow.cc.
References EnergyCorrector::c, energies_, pftools::CaloRing::getEnergies(), and i.
|
friend |
|
private |
Definition at line 154 of file CaloWindow.h.
Referenced by init(), and relativePosition().
|
private |
Definition at line 144 of file CaloWindow.h.
Referenced by init(), and relativePosition().
|
private |
Definition at line 145 of file CaloWindow.h.
Referenced by init(), and relativePosition().
|
private |
Definition at line 149 of file CaloWindow.h.
Referenced by init(), and relativePosition().
|
private |
Definition at line 163 of file CaloWindow.h.
Referenced by addHit(), getRingDepositions(), getRingEnergySummations(), init(), printEnergies(), relativePosition(), reset(), and stream().
|
private |
Definition at line 151 of file CaloWindow.h.
Referenced by init().
|
private |
Definition at line 147 of file CaloWindow.h.
Referenced by addHit(), init(), and relativePosition().