#include <RecoParticleFlow/PFClusterTools/interface/Calibratable.h>
Note that a Reflex dictionary must be produced for this class, for the Root branching mechanisms to work.
Definition at line 88 of file Calibratable.h.
pftools::Calibratable::Calibratable | ( | ) | [inline] |
virtual pftools::Calibratable::~Calibratable | ( | ) | [inline, virtual] |
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_.
00024 { 00025 00026 cluster_meanEcal_ = computeMean(cluster_ecal_); 00027 cluster_meanHcal_ = computeMean(cluster_hcal_); 00028 rechits_meanEcal_ = computeMean(rechits_ecal_); 00029 rechits_meanHcal_ = computeMean(rechits_hcal_); 00030 00031 cluster_numEcal_ = cluster_ecal_.size(); 00032 cluster_numHcal_ = cluster_hcal_.size(); 00033 rechits_numEcal_ = rechits_ecal_.size(); 00034 rechits_numHcal_ = rechits_hcal_.size(); 00035 00036 cluster_energyEvent_ = cluster_meanEcal_.energy_* cluster_ecal_.size() 00037 + cluster_meanHcal_.energy_* cluster_hcal_.size(); 00038 cluster_energyEcal_ = cluster_meanEcal_.energy_* cluster_ecal_.size(); 00039 cluster_energyHcal_ = cluster_meanHcal_.energy_* cluster_hcal_.size(); 00040 00041 rechits_energyEvent_ = rechits_meanEcal_.energy_* rechits_ecal_.size() 00042 + rechits_meanHcal_.energy_* rechits_hcal_.size(); 00043 rechits_energyEcal_ = rechits_meanEcal_.energy_* rechits_ecal_.size(); 00044 rechits_energyHcal_ = rechits_meanHcal_.energy_* rechits_hcal_.size(); 00045 00046 cands_num_ = cands_.size(); 00047 cands_mean_ = computeMean(cands_); 00048 00049 cand_energyEvent_ = cands_mean_.energy_ * cands_num_; 00050 cand_energyEcal_ = cands_mean_.energyEcal_ * cands_num_; 00051 cand_energyHcal_ = cands_mean_.energyHcal_ * cands_num_; 00052 cand_eta_ = cands_mean_.eta_; 00053 cand_phi_ = cands_mean_.phi_; 00054 cand_type_ = cands_mean_.type_ * cands_num_; 00055 00056 }
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 }
Definition at line 146 of file Calibratable.h.
Referenced by pftools::PFClusterCalibration::calibrate(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), and reset().
Definition at line 139 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().
Definition at line 139 of file Calibratable.h.
Referenced by pftools::operator<<(), recompute(), and reset().
Definition at line 139 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().
Definition at line 139 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().
Definition at line 139 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::operator<<(), recompute(), and reset().
std::vector<CandidateWrapper> pftools::Calibratable::cands_ |
Definition at line 135 of file Calibratable.h.
Referenced by computeMean(), recompute(), and reset().
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().
Definition at line 123 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::PFClusterCalibration::getCalibrationResultWrapper(), pftools::operator<<(), recompute(), and reset().
Definition at line 123 of file Calibratable.h.
Referenced by pftools::operator<<(), recompute(), and reset().
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().
Definition at line 126 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::PFClusterCalibration::getCalibrationResultWrapper(), recompute(), and reset().
Definition at line 126 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().
std::vector<CalibratableElement> pftools::Calibratable::rechits_ecal_ |
Definition at line 130 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), recompute(), and reset().
Definition at line 129 of file Calibratable.h.
Referenced by pftools::operator<<(), recompute(), and reset().
Definition at line 129 of file Calibratable.h.
Referenced by pftools::operator<<(), recompute(), and reset().
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().
Definition at line 132 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), recompute(), and reset().
Definition at line 132 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), recompute(), and reset().
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().
Definition at line 109 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), and reset().
Definition at line 110 of file Calibratable.h.
Referenced by pftools::Exercises3::evaluateCalibrator(), pftools::Exercises2::evaluateCalibrator(), pftools::operator<<(), and reset().
Definition at line 113 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), and reset().
Definition at line 109 of file Calibratable.h.
Referenced by pftools::TreeUtility::convertCalibratablesToParticleDeposits(), and reset().