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,
  hgcal_mixed = 8, undefined = 1000
}
 
typedef AlgoId AlgoID
 
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...
 
virtual ~PreshowerCluster ()
 
- 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 16 of file PreshowerCluster.h.

Member Typedef Documentation

Definition at line 19 of file PreshowerCluster.h.

Constructor & Destructor Documentation

reco::PreshowerCluster::PreshowerCluster ( )
inline

default constructor

Definition at line 22 of file PreshowerCluster.h.

References plane(), and ~PreshowerCluster().

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

Definition at line 7 of file PreshowerCluster.cc.

Referenced by PreshowerCluster().

7 { }
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 10 of file PreshowerCluster.cc.

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

12  : CaloCluster(E, pos)
13 {
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 
21 }
int plane() const
Preshower plane.
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:195
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:221
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:45
PreshowerCluster::PreshowerCluster ( const PreshowerCluster b)

Constructor from cluster.

Definition at line 24 of file PreshowerCluster.cc.

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

24  : CaloCluster( b.energy(), b.position() )
25 {
27  plane_ = b.plane_;
28  bc_ref_=b.bc_ref_;
29 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:129
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:221
double energy() const
cluster energy
Definition: CaloCluster.h:124
CaloClusterPtr bc_ref_
Associated basic cluster;.
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:45

Member Function Documentation

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

Associated basic cluster;.

Definition at line 47 of file PreshowerCluster.h.

References bc_ref_.

47 {return bc_ref_;}
CaloClusterPtr bc_ref_
Associated basic cluster;.
double reco::PreshowerCluster::et ( ) const
inline

Definition at line 40 of file PreshowerCluster.h.

References reco::CaloCluster::energy(), reco::CaloCluster::eta(), operator<(), and operator==().

40 { return energy()/cosh(eta()); }
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:166
double energy() const
cluster energy
Definition: CaloCluster.h:124
int reco::PreshowerCluster::nhits ( ) const
inline

Number of RecHits the cluster.

Definition at line 35 of file PreshowerCluster.h.

References reco::CaloCluster::hitsAndFractions_.

Referenced by PreshowerClusterAlgo::makeOneCluster().

35 {return hitsAndFractions_.size();}
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:221
bool PreshowerCluster::operator< ( const PreshowerCluster b) const

Definition at line 42 of file PreshowerCluster.cc.

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

Referenced by et().

42  {
43  return energy()*sin(position().theta()) < b.energy()*sin(position().theta()) ? true : false;
44 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:129
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
double energy() const
cluster energy
Definition: CaloCluster.h:124
bool PreshowerCluster::operator== ( const PreshowerCluster b) const

Comparisons.

Definition at line 34 of file PreshowerCluster.cc.

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

Referenced by et().

34  {
35  double EPS = 0.000001;
36  float Tdiff = fabs(b.position().theta() - position().theta());
37  float Pdiff = fabs(b.phi() - phi());
38  if ( (Tdiff < EPS) && (Pdiff < EPS) ) return true;
39  else return false;
40 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:129
#define EPS
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:169
int reco::PreshowerCluster::plane ( ) const
inline

Preshower plane.

Definition at line 38 of file PreshowerCluster.h.

References plane_.

Referenced by PreshowerCluster().

38 { return plane_; }
void reco::PreshowerCluster::setBCRef ( const CaloClusterPtr r)
inline

DetIds of component RecHits – now inherited from CaloCluster.

Definition at line 52 of file PreshowerCluster.h.

References bc_ref_, and alignCSCRings::r.

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

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

Member Data Documentation

CaloClusterPtr reco::PreshowerCluster::bc_ref_
private

Associated basic cluster;.

Definition at line 59 of file PreshowerCluster.h.

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

int reco::PreshowerCluster::plane_
private

Definition at line 56 of file PreshowerCluster.h.

Referenced by plane(), and PreshowerCluster().