1 #ifndef DataFormats_CaloRecHit_CaloCluster_h
2 #define DataFormats_CaloRecHit_CaloCluster_h
79 const std::vector< std::pair< DetId, float > > &usedHitsAndFractions,
93 const std::vector<DetId > &usedHits,
99 for(
size_t i = 0;
i < usedHits.size();
i++)
hitsAndFractions_.push_back(std::pair< DetId, float > ( usedHits[
i],1.));
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
friend std::ostream & operator<<(std::ostream &out, const CaloCluster &cluster)
print me
void setPosition(const math::XYZPoint &p)
void setEnergy(double energy)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
float correctedEnergyUncertainty_
std::vector< std::pair< DetId, float > > hitsAndFractions_
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 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
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