CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Static Public Member Functions | Static Private Member Functions | Static Private Attributes
GainSwitchTools Class Reference

#include <GainSwitchTools.h>

Public Types

enum  ShowerShapeType { ShowerShapeType::Full5x5 =0, ShowerShapeType::Fractions }
 

Static Public Member Functions

static void correctHadem (reco::GsfElectron::ShowerShape &showerShape, float eNewOverEOld, const GainSwitchTools::ShowerShapeType ssType)
 
static void correctHadem (reco::Photon::ShowerShape &showerShape, float eNewOverEOld)
 
template<typename R , typename H , typename M >
static edm::Ref< typename
H::element_type > 
findNewRef (R const &, H const &, M const &)
 
static std::vector< DetIdgainSwitchedIdsIn5x5 (const DetId &id, const EcalRecHitCollection *recHits, const CaloTopology *topology)
 
static const std::vector< int > gainSwitchFlags ()
 
static bool hasEBGainSwitch (const reco::SuperCluster &superClus, const EcalRecHitCollection *recHits)
 
static bool hasEBGainSwitch (const EcalRecHitCollection *recHits)
 
static bool hasEBGainSwitchIn5x5 (const reco::SuperCluster &superClus, const EcalRecHitCollection *recHits, const CaloTopology *topology)
 
template<typename HANDLE >
static reco::SuperClusterRef matchSCBySeedCrys (const reco::SuperCluster &, HANDLE const &)
 
template<typename HANDLE >
static reco::SuperClusterRef matchSCBySeedCrys (const reco::SuperCluster &, HANDLE const &, int maxDEta, int maxDPhi)
 
static float newRawEnergyNoFracs (const reco::SuperCluster &superClus, const std::vector< DetId > gainSwitchedHitIds, const EcalRecHitCollection *oldRecHits, const EcalRecHitCollection *newRecHits)
 
static int nrCrysWithFlagsIn5x5 (const DetId &id, const std::vector< int > &flags, const EcalRecHitCollection *recHits, const CaloTopology *topology)
 
template<bool noZS>
static
reco::GsfElectron::ShowerShape 
redoEcalShowerShape (reco::GsfElectron::ShowerShape showerShape, const reco::SuperClusterRef &superClus, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry)
 
template<bool noZS>
static reco::Photon::ShowerShape redoEcalShowerShape (reco::Photon::ShowerShape showerShape, const reco::SuperClusterRef &superClus, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry)
 

Static Private Member Functions

static int calDIEta (int lhs, int rhs)
 
static int calDIPhi (int lhs, int rhs)
 

Static Private Attributes

static const std::vector< int > gainSwitchFlags_ ={EcalRecHit::kHasSwitchToGain6,EcalRecHit::kHasSwitchToGain1}
 

Detailed Description

Definition at line 21 of file GainSwitchTools.h.

Member Enumeration Documentation

Enumerator
Full5x5 
Fractions 

Definition at line 25 of file GainSwitchTools.h.

25  {
26  Full5x5=0,Fractions //Full 5x5 would be better known as "NoFractions", its not a full 5x5, fractions is the standard showershape
27  };

Member Function Documentation

int GainSwitchTools::calDIEta ( int  lhs,
int  rhs 
)
staticprivate

Definition at line 122 of file GainSwitchTools.cc.

Referenced by matchSCBySeedCrys().

123 {
124  int retVal = lhs - rhs;
125  if(lhs*rhs<0){ //crossing zero
126  if(retVal<0) retVal++;
127  else retVal--;
128  }
129  return retVal;
130 }
int GainSwitchTools::calDIPhi ( int  lhs,
int  rhs 
)
staticprivate

Definition at line 132 of file GainSwitchTools.cc.

Referenced by matchSCBySeedCrys().

133 {
134  int retVal = lhs-rhs;
135  while(retVal>180) retVal-=360;
136  while(retVal<-180) retVal+=360;
137  return retVal;
138 }
void GainSwitchTools::correctHadem ( reco::GsfElectron::ShowerShape showerShape,
float  eNewOverEOld,
const GainSwitchTools::ShowerShapeType  ssType 
)
static
void GainSwitchTools::correctHadem ( reco::Photon::ShowerShape showerShape,
float  eNewOverEOld 
)
static

Definition at line 113 of file GainSwitchTools.cc.

References reco::Photon::ShowerShape::hcalDepth1OverEcal, reco::Photon::ShowerShape::hcalDepth1OverEcalBc, reco::Photon::ShowerShape::hcalDepth2OverEcal, and reco::Photon::ShowerShape::hcalDepth2OverEcalBc.

114 {
115  showerShape.hcalDepth1OverEcal/=eNewOverEOld;
116  showerShape.hcalDepth2OverEcal/=eNewOverEOld;
117  showerShape.hcalDepth1OverEcalBc/=eNewOverEOld;
118  showerShape.hcalDepth2OverEcalBc/=eNewOverEOld;
119 }
template<typename R , typename H , typename M >
edm::Ref< typename H::element_type > GainSwitchTools::findNewRef ( R const &  _oldRef,
H const &  _newHandle,
M const &  _map 
)
static

Definition at line 80 of file GainSwitchTools.h.

Referenced by GEDPhotonCoreGSCrysFixer::produce(), ConversionGSCrysFixer::produce(), PFGSFixLinker::produce(), and GsfElectronCoreGSCrysFixer::produce().

81 {
82  for (unsigned iC(0); iC != _newHandle->size(); ++iC) {
83  edm::Ref<typename H::element_type> ref(_newHandle, iC);
84  auto&& mappedRef(_map[ref]);
85  if (mappedRef.id() == _oldRef.id() && mappedRef.key() == _oldRef.key())
86  return ref;
87  }
88  return edm::Ref<typename H::element_type>(_newHandle.id());
89 }
std::vector< DetId > GainSwitchTools::gainSwitchedIdsIn5x5 ( const DetId id,
const EcalRecHitCollection recHits,
const CaloTopology topology 
)
static

Definition at line 64 of file GainSwitchTools.cc.

References edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), gainSwitchFlags(), CaloTopology::getSubdetectorTopology(), CaloNavigator< T, TOPO >::home(), and CaloNavigator< T, TOPO >::offsetBy().

Referenced by PhotonGSCrysSimpleFixer::produce(), and GsfEleGSCrysSimpleFixer::produce().

65 {
66  std::vector<DetId> gsDetIds;
68 
69  for ( int eastNr = -2; eastNr <= 2; ++eastNr ) { //east is eta in barrel
70  for ( int northNr = -2; northNr <= 2; ++northNr ) { //north is phi in barrel
71  cursor.home();
72  cursor.offsetBy( eastNr, northNr);
73  DetId id = *cursor;
74  auto recHitIt = recHits->find(id);
75  if(recHitIt!=recHits->end() &&
76  recHitIt->checkFlags(gainSwitchFlags())){
77  gsDetIds.push_back(id);
78  }
79  }
80  }
81  return gsDetIds;
82 }
static const std::vector< int > gainSwitchFlags()
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
Definition: CaloNavigator.h:80
const_iterator end() const
void home() const
move the navigator back to the starting point
Definition: DetId.h:18
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:26
iterator find(key_type k)
static const std::vector<int> GainSwitchTools::gainSwitchFlags ( )
inlinestatic

Definition at line 37 of file GainSwitchTools.h.

References gainSwitchFlags_.

Referenced by gainSwitchedIdsIn5x5(), hasEBGainSwitch(), and hasEBGainSwitchIn5x5().

37 {return gainSwitchFlags_;}
static const std::vector< int > gainSwitchFlags_
bool GainSwitchTools::hasEBGainSwitch ( const reco::SuperCluster superClus,
const EcalRecHitCollection recHits 
)
static

Definition at line 33 of file GainSwitchTools.cc.

References reco::SuperCluster::clusters(), EcalBarrel, edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), gainSwitchFlags(), and reco::SuperCluster::seed().

34 {
35  if(!recHits || superClus.seed()->seed().subdetId()!=EcalBarrel) return false;
36  for(const auto & clus : superClus.clusters()){
37  for(const auto& hit : clus->hitsAndFractions()){
38  auto recHitIt = recHits->find(hit.first);
39  if(recHitIt!=recHits->end() &&
40  recHitIt->checkFlags(gainSwitchFlags())){
41  return true;
42  }
43  }
44  }
45  return false;
46 }
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:69
static const std::vector< int > gainSwitchFlags()
const_iterator end() const
iterator find(key_type k)
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
bool GainSwitchTools::hasEBGainSwitch ( const EcalRecHitCollection recHits)
static

Definition at line 54 of file GainSwitchTools.cc.

References EcalBarrel, gainSwitchFlags(), and hit::id.

55 {
56  if(!recHits) return false;
57  for(auto hit : *recHits){
58  if(hit.id().subdetId()==EcalBarrel && hit.checkFlags(gainSwitchFlags())) return true;
59  }
60  return false;
61 }
static const std::vector< int > gainSwitchFlags()
unsigned int id
bool GainSwitchTools::hasEBGainSwitchIn5x5 ( const reco::SuperCluster superClus,
const EcalRecHitCollection recHits,
const CaloTopology topology 
)
static

Definition at line 48 of file GainSwitchTools.cc.

References EcalBarrel, gainSwitchFlags(), nrCrysWithFlagsIn5x5(), HLT_25ns10e33_v2_cff::recHits, reco::SuperCluster::seed(), and ecaldqm::topology().

Referenced by GEDPhotonGSCrysFixer::produce(), PhotonGSCrysSimpleFixer::produce(), GsfEleGSCrysSimpleFixer::produce(), GsfElectronGSCrysFixer::produce(), and EGGainSwitchFlagProducer< C >::produce().

49 {
50  if(recHits || superClus.seed()->seed().subdetId()!=EcalBarrel) return nrCrysWithFlagsIn5x5(superClus.seed()->seed(),gainSwitchFlags(),recHits,topology)!=0;
51  else return false;
52 }
CaloTopology const * topology(0)
static const std::vector< int > gainSwitchFlags()
static int nrCrysWithFlagsIn5x5(const DetId &id, const std::vector< int > &flags, const EcalRecHitCollection *recHits, const CaloTopology *topology)
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
template<typename HANDLE >
reco::SuperClusterRef GainSwitchTools::matchSCBySeedCrys ( const reco::SuperCluster sc,
HANDLE const &  scColl 
)
static

Definition at line 93 of file GainSwitchTools.h.

References reco::SuperCluster::seed().

Referenced by EGRefinedSCFixer::produce().

94 {
95  for(size_t scNr=0;scNr<scColl->size();scNr++){
96  if(scColl->at(scNr).seed()->seed().rawId() ==sc.seed()->seed().rawId())
97  return reco::SuperClusterRef(scColl,scNr);
98  }
99  return reco::SuperClusterRef(nullptr,0);
100 }
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
template<typename HANDLE >
reco::SuperClusterRef GainSwitchTools::matchSCBySeedCrys ( const reco::SuperCluster sc,
HANDLE const &  scColl,
int  maxDEta,
int  maxDPhi 
)
static

Definition at line 104 of file GainSwitchTools.h.

References calDIEta(), calDIPhi(), EcalBarrel, and reco::SuperCluster::seed().

105 {
106  reco::SuperClusterRef bestRef(scColl.id());
107 
108  int bestDIR2 = maxDEta*maxDEta+maxDPhi*maxDPhi+1; //+1 is to make it slightly bigger than max allowed
109 
110  if(sc.seed()->seed().subdetId()==EcalBarrel){
111  EBDetId scDetId(sc.seed()->seed());
112 
113  for(size_t scNr=0;scNr<scColl->size();scNr++){
114  reco::SuperClusterRef matchRef(scColl,scNr);
115  if(matchRef->seed()->seed().subdetId()==EcalBarrel){
116  EBDetId matchDetId(matchRef->seed()->seed());
117  int dIEta = calDIEta(scDetId.ieta(),matchDetId.ieta());
118  int dIPhi = calDIPhi(scDetId.iphi(),matchDetId.iphi());
119  int dIR2 = dIEta*dIEta+dIPhi*dIPhi;
120  if(dIR2<bestDIR2){
121  bestDIR2=dIR2;
122  bestRef = reco::SuperClusterRef(scColl,scNr);
123  }
124  }
125  }
126 
127 
128  }
129  return bestRef;
130 }
static int calDIEta(int lhs, int rhs)
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
static int calDIPhi(int lhs, int rhs)
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
float GainSwitchTools::newRawEnergyNoFracs ( const reco::SuperCluster superClus,
const std::vector< DetId gainSwitchedHitIds,
const EcalRecHitCollection oldRecHits,
const EcalRecHitCollection newRecHits 
)
static

Definition at line 86 of file GainSwitchTools.cc.

References edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), and reco::SuperCluster::rawEnergy().

Referenced by PhotonGSCrysSimpleFixer::produce(), and GsfEleGSCrysSimpleFixer::produce().

87 {
88  double oldEnergy=0.;
89  double newEnergy=0.;
90  for(auto& id : gainSwitchedHitIds){
91  auto oldRecHitIt = oldRecHits->find(id);
92  if(oldRecHitIt!=oldRecHits->end()) oldEnergy+=oldRecHitIt->energy();
93  auto newRecHitIt = newRecHits->find(id);
94  if(newRecHitIt!=newRecHits->end()) newEnergy+=newRecHitIt->energy();
95  }
96 
97  float newRawEnergy = superClus.rawEnergy() - oldEnergy + newEnergy;
98 
99  return newRawEnergy;
100 }
const_iterator end() const
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
iterator find(key_type k)
int GainSwitchTools::nrCrysWithFlagsIn5x5 ( const DetId id,
const std::vector< int > &  flags,
const EcalRecHitCollection recHits,
const CaloTopology topology 
)
static

Definition at line 11 of file GainSwitchTools.cc.

References edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), CaloTopology::getSubdetectorTopology(), CaloNavigator< T, TOPO >::home(), and CaloNavigator< T, TOPO >::offsetBy().

Referenced by hasEBGainSwitchIn5x5().

12 {
13  int nrFound=0;
15 
16  for ( int eastNr = -2; eastNr <= 2; ++eastNr ) { //east is eta in barrel
17  for ( int northNr = -2; northNr <= 2; ++northNr ) { //north is phi in barrel
18  cursor.home();
19  cursor.offsetBy( eastNr, northNr);
20  DetId id = *cursor;
21  if (recHits != nullptr) {
22  auto recHitIt = recHits->find(id);
23  if(recHitIt!=recHits->end() &&
24  recHitIt->checkFlags(flags)){
25  nrFound++;
26  }
27  }
28  }
29  }
30  return nrFound;
31 }
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
Definition: CaloNavigator.h:80
const_iterator end() const
void home() const
move the navigator back to the starting point
Definition: DetId.h:18
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:26
iterator find(key_type k)
template<bool noZS>
reco::GsfElectron::ShowerShape GainSwitchTools::redoEcalShowerShape ( reco::GsfElectron::ShowerShape  showerShape,
const reco::SuperClusterRef superClus,
const EcalRecHitCollection recHits,
const CaloTopology topology,
const CaloGeometry geometry 
)
static

Definition at line 134 of file GainSwitchTools.h.

References EcalClusterToolsT< noZS >::covariances(), EcalClusterToolsT< noZS >::e1x5(), reco::GsfElectron::ShowerShape::e1x5, reco::GsfElectron::ShowerShape::e2nd, EcalClusterToolsT< noZS >::e2x5Max(), reco::GsfElectron::ShowerShape::e2x5Max, EcalClusterToolsT< noZS >::e3x3(), EcalClusterToolsT< noZS >::e5x5(), reco::GsfElectron::ShowerShape::e5x5, reco::GsfElectron::ShowerShape::eBottom, reco::GsfElectron::ShowerShape::eLeft, reco::GsfElectron::ShowerShape::eMax, reco::GsfElectron::ShowerShape::eRight, reco::GsfElectron::ShowerShape::eTop, edm::isNotFinite(), EcalClusterToolsT< noZS >::localCovariances(), reco::GsfElectron::ShowerShape::r9, reco::GsfElectron::ShowerShape::sigmaEtaEta, reco::GsfElectron::ShowerShape::sigmaIetaIeta, reco::GsfElectron::ShowerShape::sigmaIetaIphi, reco::GsfElectron::ShowerShape::sigmaIphiIphi, and mathSSE::sqrt().

135 {
136  const reco::CaloCluster & seedClus = *(superClus->seed());
137 
138  std::vector<float> covariances = EcalClusterToolsT<noZS>::covariances(seedClus,recHits,topology,geometry);
139  std::vector<float> localCovariances = EcalClusterToolsT<noZS>::localCovariances(seedClus,recHits,topology);
140  showerShape.sigmaEtaEta = sqrt(covariances[0]);
141  showerShape.sigmaIetaIeta = sqrt(localCovariances[0]);
142  showerShape.sigmaIphiIphi =!edm::isNotFinite(localCovariances[2]) ? sqrt(localCovariances[2]) : 0;
143  showerShape.e1x5 = EcalClusterToolsT<noZS>::e1x5(seedClus,recHits,topology);
144  showerShape.e2x5Max = EcalClusterToolsT<noZS>::e2x5Max(seedClus,recHits,topology);
145  showerShape.e5x5 = EcalClusterToolsT<noZS>::e5x5(seedClus,recHits,topology);
146  showerShape.r9 = EcalClusterToolsT<noZS>::e3x3(seedClus,recHits,topology)/superClus->rawEnergy();
147  const float see_by_spp = showerShape.sigmaIetaIeta*showerShape.sigmaIphiIphi;
148  if( see_by_spp > 0 ) {
149  showerShape.sigmaIetaIphi = localCovariances[1] / see_by_spp;
150  } else if ( localCovariances[1] > 0 ) {
151  showerShape.sigmaIetaIphi = 1.f;
152  } else {
153  showerShape.sigmaIetaIphi = -1.f;
154  }
155  showerShape.eMax = EcalClusterTools::eMax(seedClus,recHits);
156  showerShape.e2nd = EcalClusterTools::e2nd(seedClus,recHits);
157  showerShape.eTop = EcalClusterTools::eTop(seedClus,recHits,topology);
158  showerShape.eLeft = EcalClusterTools::eLeft(seedClus,recHits,topology);
159  showerShape.eRight = EcalClusterTools::eRight(seedClus,recHits,topology);
160  showerShape.eBottom = EcalClusterTools::eBottom(seedClus,recHits,topology);
161  return showerShape;
162 }
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
bool isNotFinite(T x)
Definition: isFinite.h:10
T sqrt(T t)
Definition: SSEVec.h:18
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
template<bool noZS>
reco::Photon::ShowerShape GainSwitchTools::redoEcalShowerShape ( reco::Photon::ShowerShape  showerShape,
const reco::SuperClusterRef superClus,
const EcalRecHitCollection recHits,
const CaloTopology topology,
const CaloGeometry geometry 
)
static

Definition at line 166 of file GainSwitchTools.h.

References EcalClusterToolsT< noZS >::covariances(), EcalClusterToolsT< noZS >::e1x3(), reco::Photon::ShowerShape::e1x3, EcalClusterToolsT< noZS >::e1x5(), reco::Photon::ShowerShape::e1x5, EcalClusterToolsT< noZS >::e2nd(), reco::Photon::ShowerShape::e2nd, EcalClusterToolsT< noZS >::e2x2(), reco::Photon::ShowerShape::e2x2, reco::Photon::ShowerShape::e2x5, EcalClusterToolsT< noZS >::e2x5Bottom(), reco::Photon::ShowerShape::e2x5Bottom, EcalClusterToolsT< noZS >::e2x5Left(), reco::Photon::ShowerShape::e2x5Left, EcalClusterToolsT< noZS >::e2x5Max(), reco::Photon::ShowerShape::e2x5Max, EcalClusterToolsT< noZS >::e2x5Right(), reco::Photon::ShowerShape::e2x5Right, EcalClusterToolsT< noZS >::e2x5Top(), reco::Photon::ShowerShape::e2x5Top, EcalClusterToolsT< noZS >::e3x3(), reco::Photon::ShowerShape::e3x3, EcalClusterToolsT< noZS >::e5x5(), reco::Photon::ShowerShape::e5x5, EcalClusterToolsT< noZS >::eBottom(), reco::Photon::ShowerShape::eBottom, EcalClusterToolsT< noZS >::eLeft(), reco::Photon::ShowerShape::eLeft, EcalClusterToolsT< noZS >::eMax(), EcalClusterToolsT< noZS >::eRight(), reco::Photon::ShowerShape::eRight, EcalClusterToolsT< noZS >::eTop(), reco::Photon::ShowerShape::eTop, edm::isNotFinite(), EcalClusterToolsT< noZS >::localCovariances(), reco::Photon::ShowerShape::maxEnergyXtal, reco::Photon::ShowerShape::sigmaEtaEta, reco::Photon::ShowerShape::sigmaIetaIeta, reco::Photon::ShowerShape::sigmaIphiIphi, and mathSSE::sqrt().

167 {
168  const reco::CaloCluster & seedClus = *(superClus->seed());
169 
170  std::vector<float> covariances = EcalClusterToolsT<noZS>::covariances(seedClus,recHits,topology,geometry);
171  std::vector<float> localCovariances = EcalClusterToolsT<noZS>::localCovariances(seedClus,recHits,topology);
172  showerShape.sigmaEtaEta = sqrt(covariances[0]);
173  showerShape.e1x5 = EcalClusterToolsT<noZS>::e1x5(seedClus,recHits,topology);
174  showerShape.e2x5 = EcalClusterToolsT<noZS>::e2x5Max(seedClus,recHits,topology);
175  showerShape.e3x3 = EcalClusterToolsT<noZS>::e3x3(seedClus,recHits,topology);
176  showerShape.e5x5 = EcalClusterToolsT<noZS>::e5x5(seedClus,recHits,topology);
177  showerShape.maxEnergyXtal = EcalClusterToolsT<noZS>::eMax(seedClus,recHits);
178  //showerShape.effSigmaRR fine as its preshower, this only does ECAL shapes
179  showerShape.sigmaIetaIeta = sqrt(localCovariances[0]);
180  showerShape.sigmaIphiIphi =!edm::isNotFinite(localCovariances[2]) ? sqrt(localCovariances[2]) : 0;
181  showerShape.e2nd = EcalClusterToolsT<noZS>::e2nd(seedClus,recHits);
182  showerShape.eTop = EcalClusterToolsT<noZS>::eTop(seedClus,recHits,topology);
183  showerShape.eLeft = EcalClusterToolsT<noZS>::eLeft(seedClus,recHits,topology);
184  showerShape.eRight = EcalClusterToolsT<noZS>::eRight(seedClus,recHits,topology);
185  showerShape.eBottom = EcalClusterToolsT<noZS>::eBottom(seedClus,recHits,topology);
186  showerShape.e1x3 = EcalClusterToolsT<noZS>::e1x3(seedClus,recHits,topology);
187  showerShape.e2x2 = EcalClusterToolsT<noZS>::e2x2(seedClus,recHits,topology);
188  showerShape.e2x5Max = EcalClusterToolsT<noZS>::e2x5Max(seedClus,recHits,topology);
189  showerShape.e2x5Left = EcalClusterToolsT<noZS>::e2x5Left(seedClus,recHits,topology);
190  showerShape.e2x5Right = EcalClusterToolsT<noZS>::e2x5Right(seedClus,recHits,topology);
191  showerShape.e2x5Top = EcalClusterToolsT<noZS>::e2x5Top(seedClus,recHits,topology);
192  showerShape.e2x5Bottom = EcalClusterToolsT<noZS>::e2x5Bottom(seedClus,recHits,topology);
193 
194  return showerShape;
195 }
static float e2x5Bottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
static float e2x5Top(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
bool isNotFinite(T x)
Definition: isFinite.h:10
static float e2x2(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
T sqrt(T t)
Definition: SSEVec.h:18
static float e2nd(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float eBottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e2x5Right(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float eTop(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e2x5Left(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float eRight(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e1x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float eLeft(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)

Member Data Documentation

const std::vector< int > GainSwitchTools::gainSwitchFlags_ ={EcalRecHit::kHasSwitchToGain6,EcalRecHit::kHasSwitchToGain1}
staticprivate

Definition at line 73 of file GainSwitchTools.h.

Referenced by gainSwitchFlags().