CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
reco::PreshowerCluster Class Reference

#include <PreshowerCluster.h>

Inheritance diagram for reco::PreshowerCluster:
reco::CaloCluster

Public Types

typedef math::XYZPoint Point
 
- Public Types inherited from reco::CaloCluster
enum  AlgoId {
  island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3,
  multi5x5 = 4, particleFlow = 5, hgcal_em = 6, hgcal_had = 7,
  hfnose = 9, undefined = 1000
}
 
typedef AlgoId AlgoID
 
enum  HCalFlags { badHcalMarker = 1 }
 
enum  SCFlags { cleanOnly = 0, common = 100, uncleanOnly = 200 }
 

Public Member Functions

CaloClusterPtr basicCluster () const
 Associated basic cluster;. More...
 
double et () const
 
int nhits () const
 Number of RecHits the cluster. More...
 
bool operator< (const PreshowerCluster &) const
 
bool operator== (const PreshowerCluster &) const
 Comparisons. More...
 
int plane () const
 Preshower plane. More...
 
 PreshowerCluster ()
 default constructor More...
 
 PreshowerCluster (const double E, const Point &pos, const std::vector< std::pair< DetId, float > > &usedHits, const int plane)
 Constructor from EcalRecHits. More...
 
 PreshowerCluster (const PreshowerCluster &)
 Constructor from cluster. More...
 
void setBCRef (const CaloClusterPtr &r)
 DetIds of component RecHits – now inherited from CaloCluster. More...
 
 ~PreshowerCluster () override
 
- Public Member Functions inherited from reco::CaloCluster
void addHitAndFraction (DetId id, float fraction)
 
AlgoId algo () const
 algorithm identifier More...
 
AlgoID algoID () const
 
 CaloCluster ()
 default constructor. Sets energy and position to zero More...
 
 CaloCluster (AlgoID algoID)
 constructor with algoId, to be used in all child classes More...
 
 CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID)
 
 CaloCluster (double energy, const math::XYZPoint &position)
 constructor from values More...
 
 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)
 
 CaloCluster (double energy, const math::XYZPoint &position, float chi2, const std::vector< DetId > &usedHits, const AlgoId algoId, uint32_t flags=0)
 temporary compatibility constructor More...
 
const CaloIDcaloID () const
 
double correctedEnergy () const
 
float correctedEnergyUncertainty () const
 
double energy () const
 cluster energy More...
 
double eta () const
 pseudorapidity of cluster centroid More...
 
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 More...
 
bool operator<= (const CaloCluster &rhs) const
 comparison <= operator More...
 
bool operator== (const CaloCluster &rhs) const
 comparison == operator More...
 
bool operator> (const CaloCluster &rhs) const
 comparison > operator More...
 
bool operator>= (const CaloCluster &rhs) const
 comparison >= operator More...
 
double phi () const
 azimuthal angle of cluster centroid More...
 
const math::XYZPointposition () const
 cluster centroid position More...
 
std::string printHitAndFraction (unsigned i) const
 print hitAndFraction More...
 
void reset ()
 resets the CaloCluster (position, energy, hitsAndFractions) More...
 
DetId seed () const
 return DetId of seed More...
 
void setAlgoId (const AlgoId &id)
 
void setCaloId (const CaloID &id)
 
void setCorrectedEnergy (double cenergy)
 
void setCorrectedEnergyUncertainty (float energyerr)
 
void setEnergy (double energy)
 
void setFlags (uint32_t flags)
 
void setPosition (const math::XYZPoint &p)
 
void setSeed (const DetId &id)
 
size_t size () const
 size in number of hits (e.g. in crystals for ECAL) More...
 
double x () const
 x coordinate of cluster centroid More...
 
double y () const
 y coordinate of cluster centroid More...
 
double z () const
 z coordinate of cluster centroid More...
 
virtual ~CaloCluster ()
 destructor More...
 

Private Attributes

CaloClusterPtr bc_ref_
 Associated basic cluster;. More...
 
int plane_
 

Additional Inherited Members

- Protected Attributes inherited from reco::CaloCluster
AlgoID algoID_
 
CaloID caloID_
 bitmask for detector information More...
 
double correctedEnergy_
 
float correctedEnergyUncertainty_
 
double energy_
 cluster energy More...
 
uint32_t flags_
 
std::vector< std::pair< DetId, float > > hitsAndFractions_
 
math::XYZPoint position_
 cluster centroid position More...
 
DetId seedId_
 DetId of seed. More...
 
- Static Protected Attributes inherited from reco::CaloCluster
static const uint32_t flagsMask_ = 0x0FFFFFFF
 
static const uint32_t flagsOffset_ = 28
 

Detailed Description

Definition at line 17 of file PreshowerCluster.h.

Member Typedef Documentation

◆ Point

Definition at line 19 of file PreshowerCluster.h.

Constructor & Destructor Documentation

◆ PreshowerCluster() [1/3]

reco::PreshowerCluster::PreshowerCluster ( )
inline

default constructor

Definition at line 22 of file PreshowerCluster.h.

22 : CaloCluster(0., Point(0., 0., 0.)){};
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:56

◆ ~PreshowerCluster()

PreshowerCluster::~PreshowerCluster ( )
override

Definition at line 7 of file PreshowerCluster.cc.

7 {}

◆ PreshowerCluster() [2/3]

PreshowerCluster::PreshowerCluster ( const double  E,
const Point pos,
const std::vector< std::pair< DetId, float > > &  usedHits,
const int  plane 
)

Constructor from EcalRecHits.

Definition at line 9 of file PreshowerCluster.cc.

References reco::CaloCluster::hitsAndFractions(), reco::CaloCluster::hitsAndFractions_, plane(), and plane_.

13  : CaloCluster(E, pos) {
15  plane_ = plane;
16 
17  // std::cout << " PreshowerCluster::PreshowerCluster, E = " << energy() << std::endl;
18  // std::cout << " PreshowerCluster::PreshowerCluster, POS = " << "(" << x() <<","<< y() <<","<< z() <<")"<< std::endl;
19  // std::cout << " PreshowerCluster::PreshowerCluster, ETA = " << eta() << std::endl;
20 }
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:209
int plane() const
Preshower plane.
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:233
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:56

◆ PreshowerCluster() [3/3]

PreshowerCluster::PreshowerCluster ( const PreshowerCluster b)

Constructor from cluster.

Definition at line 22 of file PreshowerCluster.cc.

References b, bc_ref_, reco::CaloCluster::hitsAndFractions_, and plane_.

22  : CaloCluster(b.energy(), b.position()) {
23  hitsAndFractions_ = b.hitsAndFractions_;
24  plane_ = b.plane_;
25  bc_ref_ = b.bc_ref_;
26 }
CaloClusterPtr bc_ref_
Associated basic cluster;.
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:233
double b
Definition: hdecay.h:120
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:56

Member Function Documentation

◆ basicCluster()

CaloClusterPtr reco::PreshowerCluster::basicCluster ( ) const
inline

Associated basic cluster;.

Definition at line 48 of file PreshowerCluster.h.

References bc_ref_.

48 { return bc_ref_; }
CaloClusterPtr bc_ref_
Associated basic cluster;.

◆ et()

double reco::PreshowerCluster::et ( ) const
inline

Definition at line 41 of file PreshowerCluster.h.

References reco::CaloCluster::energy(), and reco::CaloCluster::eta().

41 { return energy() / cosh(eta()); }
double energy() const
cluster energy
Definition: CaloCluster.h:148
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:180

◆ nhits()

int reco::PreshowerCluster::nhits ( ) const
inline

Number of RecHits the cluster.

Definition at line 36 of file PreshowerCluster.h.

References reco::CaloCluster::hitsAndFractions_.

Referenced by PreshowerClusterAlgo::makeOneCluster().

36 { return hitsAndFractions_.size(); }
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:233

◆ operator<()

bool PreshowerCluster::operator< ( const PreshowerCluster b) const

Definition at line 40 of file PreshowerCluster.cc.

References b, reco::CaloCluster::energy(), reco::CaloCluster::position(), funct::sin(), theta(), and funct::true.

40  {
41  return energy() * sin(position().theta()) < b.energy() * sin(position().theta()) ? true : false;
42 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double energy() const
cluster energy
Definition: CaloCluster.h:148
double b
Definition: hdecay.h:120
Geom::Theta< T > theta() const

◆ operator==()

bool PreshowerCluster::operator== ( const PreshowerCluster b) const

Comparisons.

Definition at line 30 of file PreshowerCluster.cc.

References b, EPS, reco::CaloCluster::phi(), and reco::CaloCluster::position().

30  {
31  double EPS = 0.000001;
32  float Tdiff = fabs(b.position().theta() - position().theta());
33  float Pdiff = fabs(b.phi() - phi());
34  if ((Tdiff < EPS) && (Pdiff < EPS))
35  return true;
36  else
37  return false;
38 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
#define EPS
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:183
double b
Definition: hdecay.h:120

◆ plane()

int reco::PreshowerCluster::plane ( ) const
inline

Preshower plane.

Definition at line 39 of file PreshowerCluster.h.

References plane_.

Referenced by PreshowerCluster().

39 { return plane_; }

◆ setBCRef()

void reco::PreshowerCluster::setBCRef ( const CaloClusterPtr r)
inline

DetIds of component RecHits – now inherited from CaloCluster.

Definition at line 53 of file PreshowerCluster.h.

References bc_ref_.

Referenced by PreshowerPhiClusterProducer::produce(), and PreshowerClusterProducer::produce().

53 { bc_ref_ = r; }
CaloClusterPtr bc_ref_
Associated basic cluster;.

Member Data Documentation

◆ bc_ref_

CaloClusterPtr reco::PreshowerCluster::bc_ref_
private

Associated basic cluster;.

Definition at line 59 of file PreshowerCluster.h.

Referenced by basicCluster(), PreshowerCluster(), and setBCRef().

◆ plane_

int reco::PreshowerCluster::plane_
private

Definition at line 56 of file PreshowerCluster.h.

Referenced by plane(), and PreshowerCluster().