#include <CaloCluster.h>
Public Types | |
enum | AlgoId { island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3, multi5x5 = 4, particleFlow = 5, undefined = 1000 } |
typedef AlgoId | AlgoID |
enum | SCFlags { cleanOnly = 0, common = 100, uncleanOnly = 200 } |
Public Member Functions | |
void | addHitAndFraction (DetId id, float fraction) |
AlgoId | algo () const |
algorithm identifier | |
AlgoID | algoID () const |
CaloCluster () | |
default constructor. Sets energy and position to zero | |
CaloCluster (double energy, const math::XYZPoint &position, float chi2, const std::vector< DetId > &usedHits, const AlgoId algoId, uint32_t flags=0) | |
temporary compatibility constructor | |
CaloCluster (AlgoID algoID) | |
constructor with algoId, to be used in all child classes | |
CaloCluster (double energy, const math::XYZPoint &position) | |
constructor from values | |
CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID) | |
CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID, const AlgoID &algoID, uint32_t flags=0) | |
CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID, const std::vector< std::pair< DetId, float > > &usedHitsAndFractions, const AlgoId algoId, const DetId seedId=DetId(0), uint32_t flags=0) | |
const CaloID & | caloID () const |
double | energy () const |
cluster energy | |
double | eta () const |
pseudorapidity of cluster centroid | |
uint32_t | flags () const |
const std::vector< std::pair < DetId, float > > & | hitsAndFractions () const |
bool | isInClean () const |
bool | isInUnclean () const |
bool | operator< (const CaloCluster &rhs) const |
comparison < operator | |
bool | operator<= (const CaloCluster &rhs) const |
comparison <= operator | |
bool | operator== (const CaloCluster &rhs) const |
comparison == operator | |
bool | operator> (const CaloCluster &rhs) const |
comparison > operator | |
bool | operator>= (const CaloCluster &rhs) const |
comparison >= operator | |
double | phi () const |
azimuthal angle of cluster centroid | |
const math::XYZPoint & | position () const |
cluster centroid position | |
std::string | printHitAndFraction (unsigned i) const |
print hitAndFraction | |
void | reset () |
resets the CaloCluster (position, energy, hitsAndFractions) | |
DetId | seed () const |
return DetId of seed | |
void | setFlags (uint32_t flags) |
size_t | size () const |
size in number of hits (e.g. in crystals for ECAL) | |
double | x () const |
x coordinate of cluster centroid | |
double | y () const |
y coordinate of cluster centroid | |
double | z () const |
z coordinate of cluster centroid | |
virtual | ~CaloCluster () |
destructor | |
Protected Attributes | |
AlgoID | algoID_ |
CaloID | caloID_ |
bitmask for detector information | |
double | energy_ |
cluster energy | |
uint32_t | flags_ |
std::vector< std::pair< DetId, float > > | hitsAndFractions_ |
math::XYZPoint | position_ |
cluster centroid position | |
DetId | seedId_ |
DetId of seed. | |
Static Protected Attributes | |
static const uint32_t | flagsMask_ = 0x0FFFFFFF |
static const uint32_t | flagsOffset_ = 28 |
Friends | |
std::ostream & | operator<< (std::ostream &out, const CaloCluster &cluster) |
print me |
Base class for all types calorimeter clusters
Comments: modified AlgoId enumeration to include cleaning status flags In summary: algoID_ < 200 object is in clean collection algoID_ >=100 object is in unclean collection
Definition at line 30 of file CaloCluster.h.
typedef AlgoId reco::CaloCluster::AlgoID |
Definition at line 40 of file CaloCluster.h.
Definition at line 33 of file CaloCluster.h.
{ island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3, multi5x5 = 4, particleFlow = 5, undefined = 1000};
Definition at line 36 of file CaloCluster.h.
{ cleanOnly = 0, common = 100, uncleanOnly = 200 };
reco::CaloCluster::CaloCluster | ( | ) | [inline] |
reco::CaloCluster::CaloCluster | ( | AlgoID | algoID | ) | [inline] |
reco::CaloCluster::CaloCluster | ( | double | energy, |
const math::XYZPoint & | position, | ||
const CaloID & | caloID | ||
) | [inline] |
reco::CaloCluster::CaloCluster | ( | double | energy, |
const math::XYZPoint & | position | ||
) | [inline] |
reco::CaloCluster::CaloCluster | ( | double | energy, |
const math::XYZPoint & | position, | ||
const CaloID & | caloID, | ||
const AlgoID & | algoID, | ||
uint32_t | flags = 0 |
||
) | [inline] |
reco::CaloCluster::CaloCluster | ( | double | energy, |
const math::XYZPoint & | position, | ||
const CaloID & | caloID, | ||
const std::vector< std::pair< DetId, float > > & | usedHitsAndFractions, | ||
const AlgoId | algoId, | ||
const DetId | seedId = DetId(0) , |
||
uint32_t | flags = 0 |
||
) | [inline] |
Definition at line 77 of file CaloCluster.h.
References flags(), flags_, and flagsMask_.
reco::CaloCluster::CaloCluster | ( | double | energy, |
const math::XYZPoint & | position, | ||
float | chi2, | ||
const std::vector< DetId > & | usedHits, | ||
const AlgoId | algoId, | ||
uint32_t | flags = 0 |
||
) | [inline] |
temporary compatibility constructor
Definition at line 91 of file CaloCluster.h.
References flags(), flags_, flagsMask_, hitsAndFractions_, and i.
: energy_ (energy), position_ (position), algoID_(algoId) { hitsAndFractions_.reserve(usedHits.size()); for(size_t i = 0; i < usedHits.size(); i++) hitsAndFractions_.push_back(std::pair< DetId, float > ( usedHits[i],1.)); flags_=flags&flagsMask_; }
virtual reco::CaloCluster::~CaloCluster | ( | ) | [inline, virtual] |
void reco::CaloCluster::addHitAndFraction | ( | DetId | id, |
float | fraction | ||
) | [inline] |
Definition at line 171 of file CaloCluster.h.
References hitsAndFractions_.
Referenced by reco::PFCluster::addRecHitFraction(), and PFElectronTranslator::createSuperClusters().
{ hitsAndFractions_.push_back( std::pair<DetId, float>(id, fraction) ); }
AlgoId reco::CaloCluster::algo | ( | ) | const [inline] |
algorithm identifier
Definition at line 158 of file CaloCluster.h.
References algoID_.
Referenced by algoID(), and PFElectronTranslator::createBasicCluster().
{ return algoID_; }
AlgoID reco::CaloCluster::algoID | ( | ) | const [inline] |
const CaloID& reco::CaloCluster::caloID | ( | ) | const [inline] |
Definition at line 169 of file CaloCluster.h.
References caloID_.
Referenced by PFElectronTranslator::createBasicCluster(), and reco::PFCluster::layer().
{return caloID_;}
double reco::CaloCluster::energy | ( | ) | const [inline] |
cluster energy
Reimplemented in reco::PFCluster.
Definition at line 109 of file CaloCluster.h.
References energy_.
Referenced by ErsatzMEt::analyze(), GenPurposeSkimmerData::analyze(), HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), EgammaSCEnergyCorrectionAlgo::applyCorrection(), ConversionTrackCandidateProducer::buildCollections(), ConvertedPhotonProducer::buildCollections(), SuperClusterShapeAlgo::Calculate_Covariances(), converter::SuperClusterToCandidate::convert(), HFRecoEcalCandidateAlgo::correctEPosition(), GsfElectronAlgo::createElectron(), DetectorVector(), reco::PreshowerCluster::et(), fBremScCorr(), ZeeCalibration::fillEleInfo(), FastElectronSeedProducer::filterClusters(), ElectronSeedProducer::filterClusters(), EcalClusterSeverityLevelAlgo::fractionAroundClosestProblematic(), EcalClusterEnergyUncertainty::getValue(), EcalClusterEnergyCorrection::getValue(), EcalClusterCrackCorrection::getValue(), EcalClusterSeverityLevelAlgo::goodFraction(), PreshowerClusterAlgo::makeOneCluster(), HybridClusterAlgo::makeSuperClusters(), SuperClusterEt::operator()(), HoECalculator::operator()(), ClusterEtLess::operator()(), reco::PreshowerCluster::operator<(), PhysicsVector(), EcalDigiSelector::produce(), UnifiedSCCollectionProducer::produce(), EgammaSCCorrectionMaker::produce(), ElectronRecalibSuperClusterAssociator::produce(), PreshowerClusterProducer::produce(), HiEgammaSCCorrectionMaker::produce(), HFRecoEcalCandidateAlgo::produce(), UncleanSCRecoveryProducer::produce(), and SiStripElectronProducer::produce().
{ return energy_; }
double reco::CaloCluster::eta | ( | ) | const [inline] |
pseudorapidity of cluster centroid
Definition at line 149 of file CaloCluster.h.
References position_.
Referenced by ErsatzMEt::analyze(), GenPurposeSkimmerData::analyze(), HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), EgammaSuperClusters::closestMCParticle(), EcalClusterTools::cluster2ndMoments(), HFRecoEcalCandidateAlgo::correctEPosition(), DetectorVector(), reco::PreshowerCluster::et(), fBremScCorr(), fEtaScCorr(), fEtEtaCorr(), FastElectronSeedProducer::filterClusters(), EgammaTowerIsolation::getTowerESum(), EgammaTowerIsolation::getTowerEtSum(), EcalClusterEnergyUncertainty::getValue(), EcalClusterEnergyCorrection::getValue(), EcalClusterCrackCorrection::getValue(), EgammaHLTEcalIsolation::isolPtSum(), PreshowerClusterAlgo::makeOneCluster(), superClsterEtaLess::operator()(), EcalDigiSelector::produce(), UnifiedSCCollectionProducer::produce(), HFRecoEcalCandidateAlgo::produce(), UncleanSCRecoveryProducer::produce(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterLegoProxyBuilder::sharedBuild(), and FWECALDetailViewBuilder::superClusterEtaLess().
{ return position_.eta(); }
uint32_t reco::CaloCluster::flags | ( | ) | const [inline] |
Definition at line 161 of file CaloCluster.h.
References flags_, and flagsMask_.
Referenced by HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), EgammaSCEnergyCorrectionAlgo::applyCorrection(), CaloCluster(), isInClean(), isInUnclean(), and reco::SuperCluster::setPreshowerPlanesStatus().
{ return flags_&flagsMask_; }
const std::vector< std::pair<DetId, float> >& reco::CaloCluster::hitsAndFractions | ( | ) | const [inline] |
replace getHitsByDetId() : return hits by DetId and their corresponding fraction of energy considered to compute the total cluster energy
Definition at line 178 of file CaloCluster.h.
References hitsAndFractions_.
Referenced by FWCaloClusterProxyBuilder::build(), SuperClusterShapeAlgo::Calculate_Covariances(), PhotonIsolationCalculator::classify(), PFElectronTranslator::createBasicCluster(), GsfElectronAlgo::createElectron(), EcalClusterSeverityLevelAlgo::fractionAroundClosestProblematic(), EcalClusterCrackCorrection::getValue(), EcalClusterSeverityLevelAlgo::goodFraction(), ClusterClusterMapping::overlap(), reco::PreshowerCluster::PreshowerCluster(), AlCaElectronsProducer::produce(), EcalClusterTools::roundnessBarrelSuperClusters(), EcalClusterTools::roundnessBarrelSuperClustersUserExtended(), EcalClusterTools::scLocalCovariances(), GsfElectronAlgo::setCutBasedPreselectionFlag(), EgAmbiguityTools::sharedEnergy(), and FWECALDetailViewBuilder::showSuperCluster().
{ return hitsAndFractions_; }
bool reco::CaloCluster::isInClean | ( | ) | const [inline] |
Definition at line 166 of file CaloCluster.h.
References flags(), and uncleanOnly.
Referenced by UnifiedSCCollectionProducer::produce(), and UncleanSCRecoveryProducer::produce().
{ return flags() < uncleanOnly; }
bool reco::CaloCluster::isInUnclean | ( | ) | const [inline] |
Definition at line 167 of file CaloCluster.h.
References common, and flags().
Referenced by UnifiedSCCollectionProducer::produce(), and UncleanSCRecoveryProducer::produce().
bool reco::CaloCluster::operator< | ( | const CaloCluster & | rhs | ) | const [inline] |
comparison < operator
Definition at line 130 of file CaloCluster.h.
References energy_.
{ return (energy_< rhs.energy_); }
bool reco::CaloCluster::operator<= | ( | const CaloCluster & | rhs | ) | const [inline] |
comparison <= operator
Definition at line 125 of file CaloCluster.h.
References energy_.
{ return (energy_<=rhs.energy_); }
bool reco::CaloCluster::operator== | ( | const CaloCluster & | rhs | ) | const [inline] |
comparison == operator
Definition at line 135 of file CaloCluster.h.
References energy_.
{ return (energy_ == rhs.energy_); };
bool reco::CaloCluster::operator> | ( | const CaloCluster & | rhs | ) | const [inline] |
comparison > operator
Definition at line 120 of file CaloCluster.h.
References energy_.
{ return (energy_> rhs.energy_); }
bool reco::CaloCluster::operator>= | ( | const CaloCluster & | rhs | ) | const [inline] |
comparison >= operator
Definition at line 115 of file CaloCluster.h.
References energy_.
{ return (energy_>=rhs.energy_); }
double reco::CaloCluster::phi | ( | ) | const [inline] |
azimuthal angle of cluster centroid
Definition at line 152 of file CaloCluster.h.
References position_.
Referenced by ErsatzMEt::analyze(), GenPurposeSkimmerData::analyze(), EgammaSuperClusters::closestMCParticle(), HFRecoEcalCandidateAlgo::correctEPosition(), DetectorVector(), EgammaTowerIsolation::getTowerESum(), EgammaTowerIsolation::getTowerEtSum(), EgammaHLTEcalIsolation::isolPtSum(), PreshowerClusterAlgo::makeOneCluster(), reco::PreshowerCluster::operator==(), HFRecoEcalCandidateAlgo::produce(), FWPFBlockProxyBuilder::setupClusterElement(), and FWPFClusterLegoProxyBuilder::sharedBuild().
{ return position_.phi(); }
const math::XYZPoint& reco::CaloCluster::position | ( | ) | const [inline] |
cluster centroid position
Definition at line 112 of file CaloCluster.h.
References position_.
Referenced by ContainmentCorrectionAnalyzer::analyze(), HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), EgammaSCEnergyCorrectionAlgo::applyCorrection(), ConversionTrackCandidateProducer::buildCollections(), SuperClusterShapeAlgo::Calculate_Covariances(), converter::SuperClusterToCandidate::convert(), PFElectronTranslator::createBasicCluster(), GsfElectronAlgo::createElectron(), DisplayManager::createGCluster(), egammaisolation::EgammaEcalExtractor::deposit(), fBremScCorr(), fEAddScCorr(), fEtaScCorr(), fEtEtaCorr(), ZeeCalibration::fillEleInfo(), ElectronSeedProducer::filterClusters(), InOutConversionSeedFinder::findSeeds(), EgammaEcalIsolation::getEcalEtSum(), EgammaHcalIsolation::getHcalESum(), EgammaHcalIsolation::getHcalESumDepth1(), EgammaHcalIsolation::getHcalESumDepth2(), EgammaHcalIsolation::getHcalEtSum(), EgammaHcalIsolation::getHcalEtSumDepth1(), EgammaHcalIsolation::getHcalEtSumDepth2(), EgammaTowerIsolation::getTowerESum(), EgammaTowerIsolation::getTowerEtSum(), EcalClusterCrackCorrection::getValue(), PreshowerClusterAlgo::makeOneCluster(), SuperClusterEt::operator()(), ClusterEtLess::operator()(), reco::PreshowerCluster::operator<(), reco::PreshowerCluster::operator==(), PhysicsVector(), PhysicsVectorRaw(), PFRootEventManager::printCluster(), EgammaSCCorrectionMaker::produce(), ElectronRecalibSuperClusterAssociator::produce(), HiEgammaSCCorrectionMaker::produce(), UncleanSCRecoveryProducer::produce(), PFAlgo::reconstructCluster(), InOutConversionSeedFinder::startSeed(), LinkByRecHit::testECALAndPSByRecHit(), LinkByRecHit::testHFEMAndHFHADByRecHit(), PFBlockAlgo::testPS1AndPS2(), LinkByRecHit::testTrackAndClusterByRecHit(), and PFBlockAlgo::testTrackAndPS().
{ return position_; }
string CaloCluster::printHitAndFraction | ( | unsigned | i | ) | const |
print hitAndFraction
Definition at line 17 of file CaloCluster.cc.
References i, dbtoconf::out, and findQualityFiles::size.
{ ostringstream out; if( i>=hitsAndFractions().size() ) // i >= 0, since i is unsigned out<<"out of range "<<i; else out<<"( "<<hitsAndFractions()[i].first <<", "<<hitsAndFractions()[i].second <<" )"; return out.str(); }
void CaloCluster::reset | ( | void | ) |
resets the CaloCluster (position, energy, hitsAndFractions)
Reimplemented in reco::PFCluster.
Definition at line 11 of file CaloCluster.cc.
{ position_ = math::XYZPoint(); energy_ = 0; hitsAndFractions_.clear(); }
DetId reco::CaloCluster::seed | ( | ) | const [inline] |
return DetId of seed
Reimplemented in reco::SuperCluster.
Definition at line 188 of file CaloCluster.h.
References seedId_.
Referenced by PFElectronTranslator::createBasicCluster(), and FourVectorHLTOffline::selectElectrons().
{ return seedId_; }
void reco::CaloCluster::setFlags | ( | uint32_t | flags | ) | [inline] |
Definition at line 162 of file CaloCluster.h.
References flags_, and flagsMask_.
Referenced by HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), EgammaSCEnergyCorrectionAlgo::applyCorrection(), UnifiedSCCollectionProducer::produce(), and UncleanSCRecoveryProducer::produce().
{ uint32_t reserved = (flags_ & ~flagsMask_); flags_ = (reserved ) | (flags & flagsMask_); }
size_t reco::CaloCluster::size | ( | void | ) | const [inline] |
size in number of hits (e.g. in crystals for ECAL)
Definition at line 155 of file CaloCluster.h.
References hitsAndFractions_.
Referenced by HiEgammaSCEnergyCorrectionAlgo::applyCorrection().
{ return hitsAndFractions_.size(); }
double reco::CaloCluster::x | ( | ) | const [inline] |
x coordinate of cluster centroid
Definition at line 140 of file CaloCluster.h.
References position_.
Referenced by FWPFClusterRPZUtils::buildRhoPhiClusterLineSet(), FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFClusterRPZUtils::calculateEt(), FWPFClusterLegoProxyBuilder::calculateEt(), PreshowerClusterAlgo::makeOneCluster(), HoECalculator::operator()(), and FWPFBlockProxyBuilder::setupClusterElement().
{ return position_.x(); }
double reco::CaloCluster::y | ( | ) | const [inline] |
y coordinate of cluster centroid
Definition at line 143 of file CaloCluster.h.
References position_.
Referenced by FWPFClusterRPZUtils::buildRhoPhiClusterLineSet(), FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFClusterRPZUtils::calculateEt(), FWPFClusterLegoProxyBuilder::calculateEt(), PreshowerClusterAlgo::makeOneCluster(), HoECalculator::operator()(), and FWPFBlockProxyBuilder::setupClusterElement().
{ return position_.y(); }
double reco::CaloCluster::z | ( | ) | const [inline] |
z coordinate of cluster centroid
Definition at line 146 of file CaloCluster.h.
References position_.
Referenced by FWPFClusterRPZUtils::buildRhoPhiClusterLineSet(), FWPFClusterRPZUtils::buildRhoZClusterLineSet(), FWPFClusterRPZUtils::calculateEt(), FWPFClusterLegoProxyBuilder::calculateEt(), DisplayManager::createGCluster(), PreshowerClusterAlgo::makeOneCluster(), HoECalculator::operator()(), and FWPFBlockProxyBuilder::setupClusterElement().
{ return position_.z(); }
std::ostream& operator<< | ( | std::ostream & | out, |
const CaloCluster & | cluster | ||
) | [friend] |
print me
AlgoID reco::CaloCluster::algoID_ [protected] |
Definition at line 205 of file CaloCluster.h.
Referenced by algo().
CaloID reco::CaloCluster::caloID_ [protected] |
bitmask for detector information
Definition at line 199 of file CaloCluster.h.
Referenced by caloID(), and reco::PFCluster::setLayer().
double reco::CaloCluster::energy_ [protected] |
cluster energy
Definition at line 193 of file CaloCluster.h.
Referenced by PFClusterAlgo::calculateClusterPosition(), reco::PFCluster::energy(), energy(), operator<(), operator<=(), reco::PFCluster::operator=(), operator==(), operator>(), operator>=(), and reco::PFCluster::reset().
uint32_t reco::CaloCluster::flags_ [protected] |
flags (e.g. for handling of cleaned/uncleaned SC) 4 most significant bits reserved 28 bits for handling of cleaned/uncleaned
Definition at line 213 of file CaloCluster.h.
Referenced by CaloCluster(), flags(), reco::SuperCluster::getPreshowerPlanesStatus(), setFlags(), and reco::SuperCluster::setPreshowerPlanesStatus().
const uint32_t reco::CaloCluster::flagsMask_ = 0x0FFFFFFF [static, protected] |
Definition at line 215 of file CaloCluster.h.
Referenced by CaloCluster(), flags(), setFlags(), and reco::SuperCluster::setPreshowerPlanesStatus().
const uint32_t reco::CaloCluster::flagsOffset_ = 28 [static, protected] |
Definition at line 216 of file CaloCluster.h.
Referenced by reco::SuperCluster::getPreshowerPlanesStatus(), and reco::SuperCluster::setPreshowerPlanesStatus().
std::vector< std::pair<DetId, float> > reco::CaloCluster::hitsAndFractions_ [protected] |
Definition at line 202 of file CaloCluster.h.
Referenced by addHitAndFraction(), CaloCluster(), hitsAndFractions(), reco::PreshowerCluster::nhits(), reco::PreshowerCluster::PreshowerCluster(), size(), and reco::SuperCluster::SuperCluster().
math::XYZPoint reco::CaloCluster::position_ [protected] |
cluster centroid position
Definition at line 196 of file CaloCluster.h.
Referenced by PFClusterAlgo::calculateClusterPosition(), reco::PFCluster::calculatePositionREP(), eta(), reco::PFCluster::operator=(), phi(), position(), reco::PFCluster::reset(), x(), y(), and z().
DetId reco::CaloCluster::seedId_ [protected] |