CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PreshowerCluster.cc
Go to the documentation of this file.
1 //
2 // $Id: PreshowerCluster.cc,v 1.16 2009/01/27 09:53:06 ferriff Exp $
3 //
5 
6 using namespace reco;
7 
9 
10 
12  const std::vector< std::pair<DetId, float> > hitsAndFractions,
13  const int plane) : 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 }
23 
24 
26 {
28  plane_ = b.plane_;
29  bc_ref_=b.bc_ref_;
30 }
31 
32 
33 // Comparisons
34 
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 }
42 
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
#define EPS
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
int plane() const
Preshower plane.
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:189
PreshowerCluster()
default constructor
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:213
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
double energy() const
cluster energy
Definition: CaloCluster.h:120
CaloClusterPtr bc_ref_
Associated basic cluster;.
double b
Definition: hdecay.h:120
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:163
bool operator<(const PreshowerCluster &) const
bool operator==(const PreshowerCluster &) const
Comparisons.