1 #ifndef DataFormats_CaloRecHit_CaloCluster_h 2 #define DataFormats_CaloRecHit_CaloCluster_h 29 std::ostream&
operator<<(std::ostream&
out,
const CaloCluster& cluster);
98 const std::vector<std::pair<DetId, float> >& usedHitsAndFractions,
118 const std::vector<DetId>& usedHits,
127 for (
size_t i = 0;
i < usedHits.size();
i++)
const math::XYZPoint & position() const
cluster centroid position
bool operator==(const CaloCluster &rhs) const
comparison == operator
math::XYZPoint position_
cluster centroid position
static const uint32_t flagsOffset_
CaloID caloID_
bitmask for detector information
std::string printHitAndFraction(unsigned i) const
print hitAndFraction
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
float correctedEnergyUncertainty() const
bool operator<=(const CaloCluster &rhs) const
comparison <= operator
void addHitAndFraction(DetId id, float fraction)
AlgoId algo() const
algorithm identifier
double energy_
cluster energy
friend std::ostream & operator<<(std::ostream &out, const CaloCluster &cluster)
print me
void setPosition(const math::XYZPoint &p)
DetId seed() const
return DetId of seed
void setEnergy(double energy)
float correctedEnergyUncertainty_
double x() const
x coordinate of cluster centroid
const CaloID & caloID() const
double phi() const
azimuthal angle of cluster centroid
void setSeed(const DetId &id)
double correctedEnergy() const
bool operator<(const CaloCluster &rhs) const
comparison < operator
void setCaloId(const CaloID &id)
void setFlags(uint32_t flags)
std::ostream & operator<<(std::ostream &, BeamSpot beam)
void setCorrectedEnergy(double cenergy)
bool operator>(const CaloCluster &rhs) const
comparison > operator
DetId seedId_
DetId of seed.
double z() const
z coordinate of cluster centroid
double y() const
y coordinate of cluster centroid
size_t size() const
size in number of hits (e.g. in crystals for ECAL)
std::vector< std::pair< DetId, float > > hitsAndFractions_
CaloCluster(double energy, const math::XYZPoint &position)
constructor from values
double energy() const
cluster energy
CaloCluster(double energy, const math::XYZPoint &position, const CaloID &caloID, const AlgoID &algoID, uint32_t flags=0)
XYZPointD XYZPoint
point in space with cartesian internal representation
void setAlgoId(const AlgoId &id)
CaloCluster()
default constructor. Sets energy and position to zero
bool operator>=(const CaloCluster &rhs) const
comparison >= operator
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)
static const uint32_t flagsMask_
double eta() const
pseudorapidity of cluster centroid
virtual ~CaloCluster()
destructor
void setCorrectedEnergyUncertainty(float energyerr)
CaloCluster(AlgoID algoID)
constructor with algoId, to be used in all child classes
CaloCluster(double energy, const math::XYZPoint &position, float chi2, const std::vector< DetId > &usedHits, const AlgoId algoId, uint32_t flags=0)
temporary compatibility constructor
void reset()
resets the CaloCluster (position, energy, hitsAndFractions)
CaloCluster(double energy, const math::XYZPoint &position, const CaloID &caloID)