Skip to content

Commit

Permalink
added data members for new ES clustering (Ming)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Argiro committed Oct 22, 2012
1 parent cbcb5a8 commit b3c038d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
16 changes: 12 additions & 4 deletions DataFormats/EgammaReco/interface/SuperCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* \author Luca Lista, INFN
*
* \version $Id: SuperCluster.h,v 1.23 2011/02/17 22:42:03 argiro Exp $
* \version $Id: SuperCluster.h,v 1.24 2011/02/18 09:47:04 argiro Exp $
*
*/
#include "DataFormats/Math/interface/Point3D.h"
Expand All @@ -23,7 +23,7 @@ namespace reco {
typedef math::XYZPoint Point;

/// default constructor
SuperCluster() : CaloCluster(0., Point(0.,0.,0.)), preshowerEnergy_(0), rawEnergy_(-1.), phiWidth_(0), etaWidth_(0) {}
SuperCluster() : CaloCluster(0., Point(0.,0.,0.)), preshowerEnergy_(0), rawEnergy_(-1.), phiWidth_(0), etaWidth_(0), preshowerEnergy1_(0), preshowerEnergy2_(0) {}

/// constructor defined by CaloCluster - will have to use setSeed and add() separately
SuperCluster( double energy, const Point& position );
Expand All @@ -32,29 +32,35 @@ namespace reco {
const CaloClusterPtr & seed,
const CaloClusterPtrVector& clusters,
double Epreshower=0.,
double phiWidth=0., double etaWidth=0. );
double phiWidth=0., double etaWidth=0.,
double Epreshower1=0., double Epreshower2=0.);

// to be merged in the previous one? -- FIXME
SuperCluster( double energy, const Point& position,
const CaloClusterPtr & seed,
const CaloClusterPtrVector& clusters,
const CaloClusterPtrVector& preshowerClusters,
double Epreshower=0.,
double phiWidth=0., double etaWidth=0. );
double phiWidth=0., double etaWidth=0.,
double Epreshower1=0., double Epreshower2=0.);


/// raw uncorrected energy (sum of energies of component BasicClusters)
double rawEnergy() const { return rawEnergy_; }

/// energy deposited in preshower
double preshowerEnergy() const { return preshowerEnergy_; }
double preshowerEnergyPlane1() const {return preshowerEnergy1_; }
double preshowerEnergyPlane2() const {return preshowerEnergy2_; }

/// obtain phi and eta width of the Super Cluster
double phiWidth() const { return phiWidth_; }
double etaWidth() const { return etaWidth_; }

//Assign new variables to supercluster
void setPreshowerEnergy( double preshowerEnergy ) { preshowerEnergy_ = preshowerEnergy; };
void serPreshowerEnergyPlane1( double preshowerEnergy1 ) { preshowerEnergy1_ = preshowerEnergy1; };
void serPreshowerEnergyPlane2( double preshowerEnergy2 ) { preshowerEnergy2_ = preshowerEnergy2; };
void setPhiWidth( double pw ) { phiWidth_ = pw; }
void setEtaWidth( double ew ) { etaWidth_ = ew; }

Expand Down Expand Up @@ -134,6 +140,8 @@ namespace reco {
double phiWidth_;
double etaWidth_;

double preshowerEnergy1_;
double preshowerEnergy2_;
};

}
Expand Down
12 changes: 8 additions & 4 deletions DataFormats/EgammaReco/src/SuperCluster.cc
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
// $Id: SuperCluster.cc,v 1.16 2009/10/13 10:10:14 ferriff Exp $
// $Id: SuperCluster.cc,v 1.17 2011/02/17 22:42:03 argiro Exp $
#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "DataFormats/EgammaReco/interface/SuperCluster.h"
using namespace reco;

SuperCluster::SuperCluster( double energy, const math::XYZPoint& position ) :
CaloCluster( energy, position ), preshowerEnergy_(0), rawEnergy_(0), phiWidth_(0), etaWidth_(0) {
CaloCluster( energy, position ), preshowerEnergy_(0), rawEnergy_(0), phiWidth_(0), etaWidth_(0), preshowerEnergy1_(0), preshowerEnergy2_(0) {
}



SuperCluster::SuperCluster( double energy, const math::XYZPoint& position,
const CaloClusterPtr & seed,
const CaloClusterPtrVector& clusters,
double Epreshower, double phiWidth, double etaWidth) :
double Epreshower, double phiWidth, double etaWidth, double Epreshower1, double Epreshower2) :
CaloCluster(energy,position), rawEnergy_(0)
{
phiWidth_ = phiWidth;
etaWidth_ = etaWidth;
seed_ = seed;
preshowerEnergy_ = Epreshower;
preshowerEnergy1_ = Epreshower1;
preshowerEnergy2_ = Epreshower2;

// set references to constituent basic clusters and update list of rechits
for(CaloClusterPtrVector::const_iterator bcit = clusters.begin();
Expand All @@ -44,13 +46,15 @@ SuperCluster::SuperCluster( double energy, const math::XYZPoint& position,
const CaloClusterPtr & seed,
const CaloClusterPtrVector& clusters,
const CaloClusterPtrVector& preshowerClusters,
double Epreshower, double phiWidth, double etaWidth) :
double Epreshower, double phiWidth, double etaWidth, double Epreshower1, double Epreshower2) :
CaloCluster(energy,position), rawEnergy_(-1.)
{
phiWidth_ = phiWidth;
etaWidth_ = etaWidth;
seed_ = seed;
preshowerEnergy_ = Epreshower;
preshowerEnergy1_ = Epreshower1;
preshowerEnergy2_ = Epreshower2;

// set references to constituent basic clusters and update list of rechits
for(CaloClusterPtrVector::const_iterator bcit = clusters.begin();
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/EgammaReco/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<class name="edm::Wrapper<edm::RefVector<std::vector<reco::BasicCluster>,reco::BasicCluster,edm::refhelper::FindUsingAdvance<std::vector<reco::BasicCluster>,reco::BasicCluster> > >"/>
<class name="std::vector<edm::Ref<std::vector<reco::BasicCluster>,reco::BasicCluster,edm::refhelper::FindUsingAdvance<std::vector<reco::BasicCluster>,reco::BasicCluster> > >"/>

<class name="reco::SuperCluster" ClassVersion="10">
<version ClassVersion="10" checksum="3131732439"/>
<class name="reco::SuperCluster" ClassVersion="11">
<version ClassVersion="11" checksum="83023066"/>
<field name="rawEnergy_" iotype="Double32_t"/>
<field name="phiWidth_" iotype="Double32_t"/>
<field name="etaWidth_" iotype="Double32_t"/>
Expand Down

0 comments on commit b3c038d

Please sign in to comment.