CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

reco::PreshowerCluster Class Reference

#include <PreshowerCluster.h>

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

List of all members.

Public Types

typedef math::XYZPoint Point

Public Member Functions

CaloClusterPtr basicCluster () const
 Associated basic cluster;.
double et () const
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 ()
 default constructor
 PreshowerCluster (const PreshowerCluster &)
 Constructor from cluster.
 PreshowerCluster (const double E, const Point &pos, const std::vector< std::pair< DetId, float > > usedHits, const int plane)
 Constructor from EcalRecHits.
void setBCRef (const CaloClusterPtr &r)
 DetIds of component RecHits -- now inherited from CaloCluster.
virtual ~PreshowerCluster ()

Private Attributes

CaloClusterPtr bc_ref_
 Associated basic cluster;.
int plane_

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.

: CaloCluster(0., Point(0.,0.,0.)) { };
PreshowerCluster::~PreshowerCluster ( ) [virtual]

Definition at line 8 of file PreshowerCluster.cc.

{ }
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_.

                                                    : CaloCluster(E, pos)
{
  hitsAndFractions_ = hitsAndFractions;
  plane_ = plane;

//   std::cout << " PreshowerCluster::PreshowerCluster, E = " << energy() << std::endl;
//   std::cout << " PreshowerCluster::PreshowerCluster, POS = " << "(" << x() <<","<< y() <<","<< z() <<")"<< std::endl;
//   std::cout << " PreshowerCluster::PreshowerCluster, ETA = " << eta() << std::endl; 

}
PreshowerCluster::PreshowerCluster ( const PreshowerCluster b)

Constructor from cluster.

Definition at line 25 of file PreshowerCluster.cc.

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


Member Function Documentation

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

Associated basic cluster;.

Definition at line 48 of file PreshowerCluster.h.

References bc_ref_.

{return bc_ref_;}
double reco::PreshowerCluster::et ( ) const [inline]

Definition at line 41 of file PreshowerCluster.h.

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

{ return energy()/cosh(eta()); }
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().

{return hitsAndFractions_.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().

                                                                {
  return energy()*sin(position().theta()) < b.energy()*sin(position().theta()) ? true : false;
}
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().

                                                                 {
  double EPS = 0.000001;
  float Tdiff = fabs(b.position().theta() - position().theta());
  float Pdiff = fabs(b.phi() - phi());
  if ( (Tdiff < EPS) && (Pdiff < EPS) ) return true;
  else return false;
}
int reco::PreshowerCluster::plane ( ) const [inline]

Preshower plane.

Definition at line 39 of file PreshowerCluster.h.

References plane_.

Referenced by PreshowerCluster().

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

{ bc_ref_ = r; }

Member Data Documentation

Associated basic cluster;.

Definition at line 60 of file PreshowerCluster.h.

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

Definition at line 57 of file PreshowerCluster.h.

Referenced by plane(), and PreshowerCluster().