CMS 3D CMS Logo

PreshowerCluster.cc

Go to the documentation of this file.
00001 //
00002 // $Id: PreshowerCluster.cc,v 1.15 2008/04/28 19:46:15 meridian Exp $
00003 //
00004 #include "DataFormats/EgammaReco/interface/PreshowerCluster.h"
00005 
00006 using namespace reco;
00007 
00008 PreshowerCluster::~PreshowerCluster() { }
00009 
00010 
00011 PreshowerCluster::PreshowerCluster(const double E, const Point& pos,
00012                                    const std::vector<DetId> usedHits,
00013                                    const int plane) : CaloCluster(E, pos)
00014 {
00015   usedHits_ = usedHits;
00016   plane_ = plane;
00017 
00018 //   std::cout << " PreshowerCluster::PreshowerCluster, E = " << energy() << std::endl;
00019 //   std::cout << " PreshowerCluster::PreshowerCluster, POS = " << "(" << x() <<","<< y() <<","<< z() <<")"<< std::endl;
00020 //   std::cout << " PreshowerCluster::PreshowerCluster, ETA = " << eta() << std::endl; 
00021 
00022 }
00023 
00024 
00025 PreshowerCluster::PreshowerCluster(const PreshowerCluster &b) : CaloCluster( b.energy(), b.position() ) 
00026 {
00027   usedHits_ = b.usedHits_;
00028   plane_ = b.plane_; 
00029   bc_ref_=b.bc_ref_;
00030 }
00031 
00032 
00033 // Comparisons
00034 
00035 bool PreshowerCluster::operator==(const PreshowerCluster &b) const {
00036   double EPS = 0.000001;
00037   float Tdiff = fabs(b.position().theta() - position().theta());
00038   float Pdiff = fabs(b.phi() - phi());
00039   if ( (Tdiff < EPS) && (Pdiff < EPS) ) return true;
00040   else return false;
00041 }
00042 
00043 bool PreshowerCluster::operator<(const PreshowerCluster &b) const {
00044   return energy()*sin(position().theta()) < b.energy()*sin(position().theta()) ? true : false;
00045 }

Generated on Tue Jun 9 17:30:43 2009 for CMSSW by  doxygen 1.5.4