CMS 3D CMS Logo

PreshowerCluster.cc
Go to the documentation of this file.
1 //
2 //
4 
5 using namespace reco;
6 
8 
10  const Point &pos,
11  const std::vector<std::pair<DetId, float> > &hitsAndFractions,
12  const int plane)
13  : CaloCluster(E, pos) {
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 
23  hitsAndFractions_ = b.hitsAndFractions_;
24  plane_ = b.plane_;
25  bc_ref_ = b.bc_ref_;
26 }
27 
28 // Comparisons
29 
31  double EPS = 0.000001;
32  float Tdiff = fabs(b.position().theta() - position().theta());
33  float Pdiff = fabs(b.phi() - phi());
34  if ((Tdiff < EPS) && (Pdiff < EPS))
35  return true;
36  else
37  return false;
38 }
39 
41  return energy() * sin(position().theta()) < b.energy() * sin(position().theta()) ? true : false;
42 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
#define EPS
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PreshowerCluster()
default constructor
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
bool operator==(const PreshowerCluster &) const
Comparisons.
int plane() const
Preshower plane.
bool operator<(const PreshowerCluster &) const
CaloClusterPtr bc_ref_
Associated basic cluster;.
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:234
double energy() const
cluster energy
Definition: CaloCluster.h:149
double b
Definition: hdecay.h:120
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
static int position[264][3]
Definition: ReadPGInfo.cc:289
Geom::Theta< T > theta() const