CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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, 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 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 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 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

Definition at line 20 of file PreshowerCluster.h.

Constructor & Destructor Documentation

reco::PreshowerCluster::PreshowerCluster ( )
inline

default constructor

Definition at line 23 of file PreshowerCluster.h.

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

Definition at line 8 of file PreshowerCluster.cc.

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

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

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

Constructor from cluster.

Definition at line 25 of file PreshowerCluster.cc.

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

25  : CaloCluster( b.energy(), b.position() )
26 {
28  plane_ = b.plane_;
29  bc_ref_=b.bc_ref_;
30 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:213
double energy() const
cluster energy
Definition: CaloCluster.h:120
CaloClusterPtr bc_ref_
Associated basic cluster;.
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:43

Member Function Documentation

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;.
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 eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:160
double energy() const
cluster energy
Definition: CaloCluster.h:120
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:213
bool PreshowerCluster::operator< ( const PreshowerCluster b) const

Definition at line 43 of file PreshowerCluster.cc.

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

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

Comparisons.

Definition at line 35 of file PreshowerCluster.cc.

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

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

Preshower plane.

Definition at line 39 of file PreshowerCluster.h.

References plane_.

Referenced by PreshowerCluster().

39 { return plane_; }
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_, and alignCSCRings::r.

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

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

Member Data Documentation

CaloClusterPtr reco::PreshowerCluster::bc_ref_
private

Associated basic cluster;.

Definition at line 60 of file PreshowerCluster.h.

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

int reco::PreshowerCluster::plane_
private

Definition at line 57 of file PreshowerCluster.h.

Referenced by plane(), and PreshowerCluster().