CMS 3D CMS Logo

pftools::Calibratable Class Reference

Wraps essential single particle calibration data ready for export to a Root file. More...

#include <RecoParticleFlow/PFClusterTools/interface/Calibratable.h>

List of all members.

Public Member Functions

 Calibratable ()
virtual CandidateWrapper computeMean (const std::vector< CandidateWrapper > &wrappers)
virtual CalibratableElement computeMean (const std::vector< CalibratableElement > &diets)
virtual void recompute ()
virtual void reset ()
virtual ~Calibratable ()

Public Attributes

std::vector
< CalibrationResultWrapper
calibrations_
double cand_energyEcal_
double cand_energyEvent_
double cand_energyHcal_
double cand_eta_
double cand_phi_
int cand_type_
std::vector< CandidateWrappercands_
CandidateWrapper cands_mean_
int cands_num_
std::vector< CalibratableElementcluster_ecal_
double cluster_energyEcal_
double cluster_energyEvent_
double cluster_energyHcal_
std::vector< CalibratableElementcluster_hcal_
CalibratableElement cluster_meanEcal_
CalibratableElement cluster_meanHcal_
int cluster_numEcal_
int cluster_numHcal_
double pfele_energyEcal_
double pfele_energyEvent_
double pfele_energyHcal_
int pfele_numEcal_
int pfele_numHcal_
std::vector< CalibratableElementrechits_ecal_
double rechits_energyEcal_
double rechits_energyEvent_
double rechits_energyHcal_
std::vector< CalibratableElementrechits_hcal_
CalibratableElement rechits_meanEcal_
CalibratableElement rechits_meanHcal_
int rechits_numEcal_
int rechits_numHcal_
double recotrk_charge_
double recotrk_deltaRWithSim_
double recotrk_etaEcal_
math::XYZTLorentzVector recotrk_momentum_
double recotrk_numHits_
double recotrk_phiEcal_
double recotrk_quality_
double sim_energyEvent_
double sim_eta_
double sim_etaEcal_
double sim_etaHcal_
bool sim_isMC_
int sim_numEvent_
double sim_phi_
double sim_phiEcal_
double sim_phiHcal_
bool tb_isTB_


Detailed Description

Wraps essential single particle calibration data ready for export to a Root file.

Note that a Reflex dictionary must be produced for this class, for the Root branching mechanisms to work.

Author:
Jamie Ballin
Date:
May 2008

Definition at line 88 of file Calibratable.h.


Constructor & Destructor Documentation

pftools::Calibratable::Calibratable (  )  [inline]

Definition at line 91 of file Calibratable.h.

References reset().

00091                        {
00092                 reset();
00093         }

virtual pftools::Calibratable::~Calibratable (  )  [inline, virtual]

Definition at line 95 of file Calibratable.h.

00095                                 {
00096         }


Member Function Documentation

CandidateWrapper Calibratable::computeMean ( const std::vector< CandidateWrapper > &  wrappers  )  [virtual]

Definition at line 58 of file Calibratable.cc.

References c, cands_, cw, pftools::CandidateWrapper::energy_, pftools::CandidateWrapper::energyEcal_, pftools::CandidateWrapper::energyHcal_, pftools::CandidateWrapper::eta_, it, pftools::CandidateWrapper::phi_, and pftools::CandidateWrapper::type_.

00059                                                              {
00060         CandidateWrapper cw;
00061 
00062         if (wrappers.size() == 0)
00063                 return cw;
00064         for (std::vector<CandidateWrapper>::const_iterator it = wrappers.begin(); it
00065                         != cands_.end(); ++it) {
00066                 const CandidateWrapper& c = *it;
00067                 cw.energy_ += c.energy_;
00068                 cw.phi_ += c.phi_;
00069                 cw.eta_ += c.eta_;
00070                 cw.energyEcal_ += c.energyEcal_;
00071                 cw.energyHcal_ += c.energyHcal_;
00072                 cw.type_ += c.type_;
00073         }
00074 
00075         cw.energy_ /= wrappers.size();
00076         cw.phi_ /= wrappers.size();
00077         cw.eta_ /= wrappers.size();
00078         cw.energyEcal_ /= wrappers.size();
00079         cw.energyHcal_ /= wrappers.size();
00080         cw.type_ /= wrappers.size();
00081 
00082         return cw;
00083 }

CalibratableElement Calibratable::computeMean ( const std::vector< CalibratableElement > &  diets  )  [virtual]

Definition at line 85 of file Calibratable.cc.

References d, pftools::CalibratableElement::energy_, pftools::CalibratableElement::eta_, and pftools::CalibratableElement::phi_.

Referenced by recompute().

00086                                                              {
00087         CalibratableElement dmean;
00088         if (diets.size() == 0)
00089                 return dmean;
00090         for (std::vector<CalibratableElement>::const_iterator cit = diets.begin(); cit
00091                         != diets.end(); ++cit) {
00092                 CalibratableElement d = *cit;
00093                 dmean.energy_ += d.energy_;
00094                 dmean.eta_ += d.eta_;
00095                 dmean.phi_ += d.phi_;
00096         }
00097         dmean.energy_ /= diets.size();
00098         dmean.eta_ /= diets.size();
00099         dmean.phi_ /= diets.size();
00100         return dmean;
00101 }

void Calibratable::recompute (  )  [virtual]

Definition at line 24 of file Calibratable.cc.

References cand_energyEcal_, cand_energyEvent_, cand_energyHcal_, cand_eta_, cand_phi_, cand_type_, cands_, cands_mean_, cands_num_, cluster_ecal_, cluster_energyEcal_, cluster_energyEvent_, cluster_energyHcal_, cluster_hcal_, cluster_meanEcal_, cluster_meanHcal_, cluster_numEcal_, cluster_numHcal_, computeMean(), pftools::CandidateWrapper::energy_, pftools::CalibratableElement::energy_, pftools::CandidateWrapper::energyEcal_, pftools::CandidateWrapper::energyHcal_, pftools::CandidateWrapper::eta_, pftools::CandidateWrapper::phi_, rechits_ecal_, rechits_energyEcal_, rechits_energyEvent_, rechits_energyHcal_, rechits_hcal_, rechits_meanEcal_, rechits_meanHcal_, rechits_numEcal_, rechits_numHcal_, and pftools::CandidateWrapper::type_.

void Calibratable::reset ( void   )  [virtual]

Definition at line 103 of file Calibratable.cc.

References calibrations_, cand_energyEcal_, cand_energyEvent_, cand_energyHcal_, cand_eta_, cand_phi_, cand_type_, cands_, cands_mean_, cands_num_, cluster_ecal_, cluster_energyEcal_, cluster_energyEvent_, cluster_energyHcal_, cluster_hcal_, cluster_meanEcal_, cluster_meanHcal_, cluster_numEcal_, cluster_numHcal_, pfele_energyEcal_, pfele_energyEvent_, pfele_energyHcal_, pfele_numEcal_, pfele_numHcal_, rechits_ecal_, rechits_energyEcal_, rechits_energyEvent_, rechits_energyHcal_, rechits_hcal_, rechits_meanEcal_, rechits_meanHcal_, recotrk_charge_, recotrk_deltaRWithSim_, recotrk_etaEcal_, recotrk_momentum_, recotrk_numHits_, recotrk_phiEcal_, recotrk_quality_, pftools::CalibratableElement::reset(), pftools::CandidateWrapper::reset(), sim_energyEvent_, sim_eta_, sim_etaEcal_, sim_etaHcal_, sim_isMC_, sim_numEvent_, sim_phi_, sim_phiEcal_, sim_phiHcal_, and tb_isTB_.

Referenced by Calibratable(), pftools::Exercises3::evaluateCalibrator(), and pftools::Exercises2::evaluateCalibrator().

00103                          {
00104 
00105         calibrations_.clear();
00106 
00107         sim_energyEvent_ = 0;
00108         sim_eta_ = 0;
00109         sim_phi_ = 0;
00110         sim_numEvent_ = 0;
00111         sim_isMC_ = false;
00112 
00113         tb_isTB_ = false;
00114 
00115         sim_etaEcal_ = 0;
00116         sim_etaHcal_ = 0;
00117         sim_phiEcal_ = 0;
00118         sim_phiHcal_ = 0;
00119 
00120         recotrk_numHits_ = 0;
00121         recotrk_quality_ = 0;
00122         recotrk_charge_ = 0;
00123         recotrk_etaEcal_ = 0;
00124         recotrk_phiEcal_ = 0;
00125         //TODO:: check this is sufficient
00126         recotrk_momentum_.SetPxPyPzE(0, 0, 0, 0);
00127         recotrk_deltaRWithSim_ = 0.0;
00128 
00129         cluster_energyEvent_ = 0;
00130         cluster_energyEcal_ = 0;
00131         cluster_energyHcal_ = 0;
00132         cluster_numEcal_ = 0;
00133         cluster_numHcal_ = 0;
00134         cluster_ecal_.clear();
00135         cluster_hcal_.clear();
00136         cluster_meanEcal_.reset();
00137         cluster_meanHcal_.reset();
00138 
00139         rechits_energyEvent_ = 0;
00140         rechits_ecal_.clear();
00141         rechits_hcal_.clear();
00142         rechits_energyEcal_ = 0;
00143         rechits_energyHcal_ = 0;
00144         rechits_meanEcal_.reset();
00145         rechits_meanHcal_.reset();
00146 
00147         cands_.clear();
00148         cands_num_ = 0;
00149         cands_mean_.reset();
00150         cand_energyEvent_ = 0;
00151         cand_energyEcal_ = 0;
00152         cand_energyHcal_ = 0;
00153         cand_eta_ = 0;
00154         cand_phi_ = 0;
00155         cand_type_ = -1;
00156 
00157         pfele_energyEvent_ = 0;
00158         pfele_energyEcal_ = 0;
00159         pfele_energyHcal_ = 0;
00160         pfele_numEcal_ = 0;
00161         pfele_numHcal_ = 0;
00162 
00163 }


Member Data Documentation

std::vector<CalibrationResultWrapper> pftools::Calibratable::calibrations_

Definition at line 146 of file Calibratable.h.

Referenced by pftools::PFClusterCalibration::calibrate(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), and reset().

double pftools::Calibratable::cand_energyEcal_

Definition at line 139 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::cand_energyEvent_

Definition at line 139 of file Calibratable.h.

Referenced by pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::cand_energyHcal_

Definition at line 139 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::cand_eta_

Definition at line 139 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::cand_phi_

Definition at line 139 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().

int pftools::Calibratable::cand_type_

Definition at line 141 of file Calibratable.h.

Referenced by recompute(), and reset().

std::vector<CandidateWrapper> pftools::Calibratable::cands_

Definition at line 135 of file Calibratable.h.

Referenced by computeMean(), recompute(), and reset().

CandidateWrapper pftools::Calibratable::cands_mean_

Definition at line 136 of file Calibratable.h.

Referenced by recompute(), and reset().

int pftools::Calibratable::cands_num_

Definition at line 137 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().

std::vector<CalibratableElement> pftools::Calibratable::cluster_ecal_

Definition at line 124 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().

double pftools::Calibratable::cluster_energyEcal_

Definition at line 123 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::PFClusterCalibration::getCalibrationResultWrapper(), pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::cluster_energyEvent_

Definition at line 123 of file Calibratable.h.

Referenced by pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::cluster_energyHcal_

Definition at line 123 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::PFClusterCalibration::getCalibrationResultWrapper(), pftools::operator<<(), recompute(), and reset().

std::vector<CalibratableElement> pftools::Calibratable::cluster_hcal_

Definition at line 124 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().

CalibratableElement pftools::Calibratable::cluster_meanEcal_

Definition at line 126 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::PFClusterCalibration::getCalibrationResultWrapper(), recompute(), and reset().

CalibratableElement pftools::Calibratable::cluster_meanHcal_

Definition at line 126 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().

int pftools::Calibratable::cluster_numEcal_

Definition at line 125 of file Calibratable.h.

Referenced by recompute(), and reset().

int pftools::Calibratable::cluster_numHcal_

Definition at line 125 of file Calibratable.h.

Referenced by recompute(), and reset().

double pftools::Calibratable::pfele_energyEcal_

Definition at line 143 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::pfele_energyEvent_

Definition at line 143 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::pfele_energyHcal_

Definition at line 143 of file Calibratable.h.

Referenced by reset().

int pftools::Calibratable::pfele_numEcal_

Definition at line 144 of file Calibratable.h.

Referenced by reset().

int pftools::Calibratable::pfele_numHcal_

Definition at line 144 of file Calibratable.h.

Referenced by reset().

std::vector<CalibratableElement> pftools::Calibratable::rechits_ecal_

Definition at line 130 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().

double pftools::Calibratable::rechits_energyEcal_

Definition at line 129 of file Calibratable.h.

Referenced by pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::rechits_energyEvent_

Definition at line 129 of file Calibratable.h.

Referenced by pftools::operator<<(), recompute(), and reset().

double pftools::Calibratable::rechits_energyHcal_

Definition at line 129 of file Calibratable.h.

Referenced by pftools::operator<<(), recompute(), and reset().

std::vector<CalibratableElement> pftools::Calibratable::rechits_hcal_

Definition at line 130 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().

CalibratableElement pftools::Calibratable::rechits_meanEcal_

Definition at line 132 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), recompute(), and reset().

CalibratableElement pftools::Calibratable::rechits_meanHcal_

Definition at line 132 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), recompute(), and reset().

int pftools::Calibratable::rechits_numEcal_

Definition at line 131 of file Calibratable.h.

Referenced by recompute().

int pftools::Calibratable::rechits_numHcal_

Definition at line 131 of file Calibratable.h.

Referenced by recompute().

double pftools::Calibratable::recotrk_charge_

Definition at line 117 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::recotrk_deltaRWithSim_

Definition at line 120 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::recotrk_etaEcal_

Definition at line 118 of file Calibratable.h.

Referenced by reset().

math::XYZTLorentzVector pftools::Calibratable::recotrk_momentum_

Definition at line 121 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::recotrk_numHits_

Definition at line 117 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::recotrk_phiEcal_

Definition at line 118 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::recotrk_quality_

Definition at line 117 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::sim_energyEvent_

Definition at line 109 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), pftools::PFClusterCalibration::getCalibrationResultWrapper(), pftools::operator<<(), and reset().

double pftools::Calibratable::sim_eta_

Definition at line 109 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), and reset().

double pftools::Calibratable::sim_etaEcal_

Definition at line 110 of file Calibratable.h.

Referenced by pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), pftools::operator<<(), and reset().

double pftools::Calibratable::sim_etaHcal_

Definition at line 110 of file Calibratable.h.

Referenced by reset().

bool pftools::Calibratable::sim_isMC_

Definition at line 113 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), and reset().

int pftools::Calibratable::sim_numEvent_

Definition at line 111 of file Calibratable.h.

Referenced by reset().

double pftools::Calibratable::sim_phi_

Definition at line 109 of file Calibratable.h.

Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), and reset().

double pftools::Calibratable::sim_phiEcal_

Definition at line 110 of file Calibratable.h.

Referenced by pftools::operator<<(), and reset().

double pftools::Calibratable::sim_phiHcal_

Definition at line 110 of file Calibratable.h.

Referenced by reset().

bool pftools::Calibratable::tb_isTB_

Definition at line 115 of file Calibratable.h.

Referenced by reset().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:50:05 2009 for CMSSW by  doxygen 1.5.4