1 #ifndef DataFormats_CaloRecHit_CaloCluster_h
2 #define DataFormats_CaloRecHit_CaloCluster_h
29 std::ostream&
operator<<(std::ostream&
out,
const CaloCluster& cluster);
99 const std::vector<std::pair<DetId, float> >& usedHitsAndFractions,
119 const std::vector<DetId>& usedHits,
128 for (
size_t i = 0;
i < usedHits.size();
i++)
const math::XYZPoint & position() const
cluster centroid position
math::XYZPoint position_
cluster centroid position
static const uint32_t flagsOffset_
CaloID caloID_
bitmask for detector information
double correctedEnergy() const
void addHitAndFraction(DetId id, float fraction)
double energy_
cluster energy
uint16_t *__restrict__ id
friend std::ostream & operator<<(std::ostream &out, const CaloCluster &cluster)
print me
void setPosition(const math::XYZPoint &p)
void setEnergy(double energy)
float correctedEnergyUncertainty_
double z() const
z coordinate of cluster centroid
bool operator>(const CaloCluster &rhs) const
comparison > operator
double eta() const
pseudorapidity of cluster centroid
void setSeed(const DetId &id)
bool operator<(const CaloCluster &rhs) const
comparison < operator
AlgoId algo() const
algorithm identifier
void setCaloId(const CaloID &id)
void setFlags(uint32_t flags)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
std::ostream & operator<<(std::ostream &, BeamSpot beam)
const CaloID & caloID() const
void setCorrectedEnergy(double cenergy)
DetId seedId_
DetId of seed.
double x() const
x coordinate of cluster centroid
double energy() const
cluster energy
std::vector< std::pair< DetId, float > > hitsAndFractions_
bool operator>=(const CaloCluster &rhs) const
comparison >= operator
std::string printHitAndFraction(unsigned i) const
print hitAndFraction
CaloCluster(double energy, const math::XYZPoint &position)
constructor from values
CaloCluster(double energy, const math::XYZPoint &position, const CaloID &caloID, const AlgoID &algoID, uint32_t flags=0)
DetId seed() const
return DetId of seed
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
size_t size() const
size in number of hits (e.g. in crystals for ECAL)
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_
float correctedEnergyUncertainty() const
double y() const
y coordinate of cluster centroid
virtual ~CaloCluster()
destructor
double phi() const
azimuthal angle of cluster centroid
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)
bool operator==(const CaloCluster &rhs) const
comparison == operator