1 #ifndef RecoEgamma_EGammaTools_GainSwitchTools_h
2 #define RecoEgamma_EGammaTools_GainSwitchTools_h
43 template<
typename HANDLE>
45 template<
typename HANDLE>
49 template<
typename R,
typename H,
typename M>
70 static int calDIEta(
int lhs,
int rhs);
71 static int calDIPhi(
int lhs,
int rhs);
78 template<
typename R,
typename H,
typename M>
82 for (
unsigned iC(0); iC != _newHandle->size(); ++iC) {
84 auto&& mappedRef(_map[ref]);
85 if (mappedRef.id() == _oldRef.id() && mappedRef.key() == _oldRef.key())
91 template<
typename HANDLE>
95 for(
size_t scNr=0;scNr<scColl->size();scNr++){
96 if(scColl->at(scNr).seed()->seed().rawId() ==sc.
seed()->seed().rawId())
102 template<
typename HANDLE>
108 int bestDIR2 = maxDEta*maxDEta+maxDPhi*maxDPhi+1;
113 for(
size_t scNr=0;scNr<scColl->size();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;
148 if( see_by_spp > 0 ) {
149 showerShape.
sigmaIetaIphi = localCovariances[1] / see_by_spp;
150 }
else if ( localCovariances[1] > 0 ) {
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);
CaloTopology const * topology(0)
std::vector< Variable::Flags > flags
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
ESHandle< TrackerGeometry > geometry
const CaloClusterPtr & seed() const
seed BasicCluster