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 }
reco::CaloCluster::phi
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
reco::PreshowerCluster::operator==
bool operator==(const PreshowerCluster &) const
Comparisons.
Definition: PreshowerCluster.cc:30
pos
Definition: PixelAliasList.h:18
PreshowerCluster.h
reco::PreshowerCluster
Definition: PreshowerCluster.h:17
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::PreshowerCluster::PreshowerCluster
PreshowerCluster()
default constructor
Definition: PreshowerCluster.h:22
reco::PreshowerCluster::operator<
bool operator<(const PreshowerCluster &) const
Definition: PreshowerCluster.cc:40
reco::CaloCluster::hitsAndFractions_
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:234
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
reco::CaloCluster
Definition: CaloCluster.h:31
EPS
#define EPS
Definition: GammaContinuedFraction.cc:6
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
b
double b
Definition: hdecay.h:118
funct::true
true
Definition: Factorize.h:173
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
reco::PreshowerCluster::bc_ref_
CaloClusterPtr bc_ref_
Associated basic cluster;.
Definition: PreshowerCluster.h:59
reco::CaloCluster::hitsAndFractions
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
reco::PreshowerCluster::plane_
int plane_
Definition: PreshowerCluster.h:56
reco::PreshowerCluster::plane
int plane() const
Preshower plane.
Definition: PreshowerCluster.h:39
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
reco::PreshowerCluster::~PreshowerCluster
~PreshowerCluster() override
Definition: PreshowerCluster.cc:7