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 //
4 
5 using namespace reco;
6 
8 
9 
10 PreshowerCluster::PreshowerCluster(const double E, const Point& pos,
11  const std::vector< std::pair<DetId, float> >& hitsAndFractions,
12  const int plane) : 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 }
22 
23 
25 {
27  plane_ = b.plane_;
28  bc_ref_=b.bc_ref_;
29 }
30 
31 
32 // Comparisons
33 
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 }
41 
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:124
#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:190
PreshowerCluster()
default constructor
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:215
double energy() const
cluster energy
Definition: CaloCluster.h:120
CaloClusterPtr bc_ref_
Associated basic cluster;.
double b
Definition: hdecay.h:120
static int position[264][3]
Definition: ReadPGInfo.cc:509
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:164
bool operator<(const PreshowerCluster &) const
bool operator==(const PreshowerCluster &) const
Comparisons.