#include <ClusterFillMap.h>
Public Member Functions | |
ClusterFillMap (int, int, std::map< int, int >, double, double, std::map< int, int >, EcalIntercalibConstantMap *, EcalIntercalibConstantMap *) | |
ctor | |
void | fillMap (const std::vector< std::pair< DetId, float > > &, const DetId, const EcalRecHitCollection *, const EcalRecHitCollection *, std::map< int, double > &xtlMap, double &) |
Fills the map. | |
~ClusterFillMap () | |
dtor |
Definition at line 7 of file ClusterFillMap.h.
ClusterFillMap::ClusterFillMap | ( | int | WindowX, |
int | WindowY, | ||
std::map< int, int > | xtalReg, | ||
double | minE, | ||
double | maxE, | ||
std::map< int, int > | IndexReg, | ||
EcalIntercalibConstantMap * | barrelMap, | ||
EcalIntercalibConstantMap * | endcapMap | ||
) |
ctor
Definition at line 5 of file ClusterFillMap.cc.
: VFillMap (WindowX,WindowY,xtalReg,minE, maxE, IndexReg, barrelMap,endcapMap) { }
ClusterFillMap::~ClusterFillMap | ( | ) |
void ClusterFillMap::fillMap | ( | const std::vector< std::pair< DetId, float > > & | v1, |
const DetId | Max, | ||
const EcalRecHitCollection * | barrelHitsCollection, | ||
const EcalRecHitCollection * | endcapHitsCollection, | ||
std::map< int, double > & | xtlMap, | ||
double & | pSubtract | ||
) | [virtual] |
Fills the map.
Implements VFillMap.
Definition at line 25 of file ClusterFillMap.cc.
References EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::find(), edm::detail::isnan(), VFillMap::m_IndexInRegion, VFillMap::m_maxEnergyPerCrystal, VFillMap::m_minEnergyPerCrystal, VFillMap::m_xtalRegionId, and DetId::rawId().
{ for (std::vector<std::pair<DetId,float> >::const_iterator idsIt = v1.begin(); idsIt != v1.end () ; ++idsIt) { int RegionNumber = m_xtalRegionId[Max.rawId()]; EcalRecHitCollection::const_iterator itrechit; double dummy=0.; if(idsIt->first.subdetId()==EcalBarrel) { itrechit=barrelHitsCollection->find(idsIt->first); dummy=itrechit->energy(); dummy*= (*m_barrelMap)[idsIt->first]; } if(idsIt->first.subdetId()==EcalEndcap){ itrechit=endcapHitsCollection->find(idsIt->first); dummy=itrechit->energy(); dummy*= (*m_endcapMap)[idsIt->first]; } int ID=idsIt->first.rawId(); if (std::isnan(dummy)) { dummy=0; } if ( dummy < m_minEnergyPerCrystal ) continue; //return 1; if ( dummy > m_maxEnergyPerCrystal ) { dummy=0; continue; } if (m_xtalRegionId[ID]==RegionNumber) xtlMap[m_IndexInRegion[ID]] += dummy; else pSubtract +=dummy; } }