CMS 3D CMS Logo

reco::PreshowerCluster Class Reference

#include <DataFormats/EgammaReco/interface/PreshowerCluster.h>

Inheritance diagram for reco::PreshowerCluster:

reco::CaloCluster

List of all members.

Public Types

typedef math::XYZPoint Point

Public Member Functions

BasicClusterRef basicCluster () const
 Associated basic cluster;.
double et () const
std::vector< DetIdgetHitsByDetId () const
 DetIds of component RecHits.
int nhits () const
 Number of RecHits the cluster.
bool operator< (const PreshowerCluster &) const
bool operator== (const PreshowerCluster &) const
 Comparisons.
int plane () const
 Preshower plane.
 PreshowerCluster (const PreshowerCluster &)
 Constructor from cluster.
 PreshowerCluster (const double E, const Point &pos, const std::vector< DetId > usedHits, const int plane)
 Constructor from EcalRecHits.
 PreshowerCluster ()
 default constructor
void setBCRef (const BasicClusterRef &r)
virtual ~PreshowerCluster ()

Private Attributes

BasicClusterRef bc_ref_
 Associated basic cluster;.
int plane_
std::vector< DetIdusedHits_
 used hits by detId


Detailed Description

Definition at line 18 of file PreshowerCluster.h.


Member Typedef Documentation

typedef math::XYZPoint reco::PreshowerCluster::Point

Definition at line 21 of file PreshowerCluster.h.


Constructor & Destructor Documentation

reco::PreshowerCluster::PreshowerCluster (  )  [inline]

default constructor

Definition at line 24 of file PreshowerCluster.h.

00024 : CaloCluster(0., Point(0.,0.,0.)) { };

PreshowerCluster::~PreshowerCluster (  )  [virtual]

Definition at line 8 of file PreshowerCluster.cc.

00008 { }

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

Constructor from EcalRecHits.

Definition at line 11 of file PreshowerCluster.cc.

References plane_, and usedHits_.

00013                                                     : CaloCluster(E, pos)
00014 {
00015   usedHits_ = usedHits;
00016   plane_ = plane;
00017 
00018 //   std::cout << " PreshowerCluster::PreshowerCluster, E = " << energy() << std::endl;
00019 //   std::cout << " PreshowerCluster::PreshowerCluster, POS = " << "(" << x() <<","<< y() <<","<< z() <<")"<< std::endl;
00020 //   std::cout << " PreshowerCluster::PreshowerCluster, ETA = " << eta() << std::endl; 
00021 
00022 }

PreshowerCluster::PreshowerCluster ( const PreshowerCluster b  ) 

Constructor from cluster.

Definition at line 25 of file PreshowerCluster.cc.

References bc_ref_, plane_, and usedHits_.

00025                                                             : CaloCluster( b.energy(), b.position() ) 
00026 {
00027   usedHits_ = b.usedHits_;
00028   plane_ = b.plane_; 
00029   bc_ref_=b.bc_ref_;
00030 }


Member Function Documentation

BasicClusterRef reco::PreshowerCluster::basicCluster (  )  const [inline]

Associated basic cluster;.

Definition at line 49 of file PreshowerCluster.h.

References bc_ref_.

00049 {return bc_ref_;}

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

Definition at line 42 of file PreshowerCluster.h.

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

00042 { return energy()/cosh(eta()); }

std::vector<DetId> reco::PreshowerCluster::getHitsByDetId (  )  const [inline]

DetIds of component RecHits.

Definition at line 52 of file PreshowerCluster.h.

References usedHits_.

00052 { return usedHits_; }

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

Number of RecHits the cluster.

Definition at line 37 of file PreshowerCluster.h.

References usedHits_.

Referenced by PreshowerClusterAlgo::makeOneCluster().

00037 {return usedHits_.size();}

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.

00043                                                                 {
00044   return energy()*sin(position().theta()) < b.energy()*sin(position().theta()) ? true : false;
00045 }

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().

00035                                                                  {
00036   double EPS = 0.000001;
00037   float Tdiff = fabs(b.position().theta() - position().theta());
00038   float Pdiff = fabs(b.phi() - phi());
00039   if ( (Tdiff < EPS) && (Pdiff < EPS) ) return true;
00040   else return false;
00041 }

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

Preshower plane.

Definition at line 40 of file PreshowerCluster.h.

References plane_.

00040 { return plane_; }

void reco::PreshowerCluster::setBCRef ( const BasicClusterRef r  )  [inline]

Definition at line 54 of file PreshowerCluster.h.

References bc_ref_.

Referenced by PreshowerClusterProducer::produce().

00054 { bc_ref_ = r; }


Member Data Documentation

BasicClusterRef reco::PreshowerCluster::bc_ref_ [private]

Associated basic cluster;.

Definition at line 61 of file PreshowerCluster.h.

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

int reco::PreshowerCluster::plane_ [private]

Definition at line 58 of file PreshowerCluster.h.

Referenced by plane(), and PreshowerCluster().

std::vector<DetId> reco::PreshowerCluster::usedHits_ [private]

used hits by detId

Definition at line 64 of file PreshowerCluster.h.

Referenced by getHitsByDetId(), nhits(), and PreshowerCluster().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:51:31 2009 for CMSSW by  doxygen 1.5.4