CMS 3D CMS Logo

List of all members | Public Member Functions
ClusterFillMap Class Reference

#include <ClusterFillMap.h>

Inheritance diagram for ClusterFillMap:
VFillMap

Public Member Functions

 ClusterFillMap (int, int, const std::map< int, int > &, double, double, const std::map< int, int > &, EcalIntercalibConstantMap *, EcalIntercalibConstantMap *)
 ctor More...
 
void fillMap (const std::vector< std::pair< DetId, float > > &, const DetId, const EcalRecHitCollection *, const EcalRecHitCollection *, std::map< int, double > &xtlMap, double &) override
 Fills the map. More...
 
 ~ClusterFillMap () override
 dtor More...
 
- Public Member Functions inherited from VFillMap
 VFillMap (int, int, const std::map< int, int > &, double, double, const std::map< int, int > &, EcalIntercalibConstantMap *, EcalIntercalibConstantMap *)
 ctor More...
 
virtual ~VFillMap ()
 dtor More...
 

Additional Inherited Members

- Public Attributes inherited from VFillMap
EcalIntercalibConstantMapm_barrelMap
 
EcalIntercalibConstantMapm_endcapMap
 
std::map< int, int > m_IndexInRegion
 
double m_maxEnergyPerCrystal
 
double m_minEnergyPerCrystal
 
int m_recoWindowSidex
 
int m_recoWindowSidey
 
std::map< int, int > m_xtalRegionId
 

Detailed Description

Definition at line 7 of file ClusterFillMap.h.

Constructor & Destructor Documentation

◆ ClusterFillMap()

ClusterFillMap::ClusterFillMap ( int  WindowX,
int  WindowY,
const std::map< int, int > &  xtalReg,
double  minE,
double  maxE,
const std::map< int, int > &  IndexReg,
EcalIntercalibConstantMap barrelMap,
EcalIntercalibConstantMap endcapMap 
)

ctor

Definition at line 6 of file ClusterFillMap.cc.

14  : VFillMap(WindowX, WindowY, xtalReg, minE, maxE, IndexReg, barrelMap, endcapMap)
15 
16 {}

◆ ~ClusterFillMap()

ClusterFillMap::~ClusterFillMap ( )
override

dtor

Definition at line 18 of file ClusterFillMap.cc.

18 {}

Member Function Documentation

◆ fillMap()

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 
)
overridevirtual

Fills the map.

Implements VFillMap.

Definition at line 20 of file ClusterFillMap.cc.

25  {
26  for (std::vector<std::pair<DetId, float> >::const_iterator idsIt = v1.begin(); idsIt != v1.end(); ++idsIt) {
27  int RegionNumber = m_xtalRegionId[Max.rawId()];
29  double dummy = 0.;
30  if (idsIt->first.subdetId() == EcalBarrel) {
31  itrechit = barrelHitsCollection->find(idsIt->first);
32  dummy = itrechit->energy();
33  dummy *= (*m_barrelMap)[idsIt->first];
34  } else if (idsIt->first.subdetId() == EcalEndcap) {
35  itrechit = endcapHitsCollection->find(idsIt->first);
36  dummy = itrechit->energy();
37  dummy *= (*m_endcapMap)[idsIt->first];
38  }
39  if (edm::isNotFinite(dummy)) {
40  dummy = 0;
41  }
43  continue; //return 1;
45  continue;
46  }
47  int ID = idsIt->first.rawId();
48  if (m_xtalRegionId[ID] == RegionNumber)
49  xtlMap[m_IndexInRegion[ID]] += dummy;
50  else
51  pSubtract += dummy;
52  }
53 }

References EcalBarrel, EcalEndcap, edm::SortedCollection< T, SORT >::find(), edm::isNotFinite(), VFillMap::m_IndexInRegion, VFillMap::m_maxEnergyPerCrystal, VFillMap::m_minEnergyPerCrystal, VFillMap::m_xtalRegionId, Max(), and trackerHitRTTI::vector.

HLT_FULL_cff.maxE
maxE
Definition: HLT_FULL_cff.py:13661
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
VFillMap::m_minEnergyPerCrystal
double m_minEnergyPerCrystal
Definition: VFillMap.h:37
VFillMap::m_xtalRegionId
std::map< int, int > m_xtalRegionId
Definition: VFillMap.h:36
EcalBarrel
Definition: EcalSubdetector.h:10
VFillMap::m_IndexInRegion
std::map< int, int > m_IndexInRegion
Definition: VFillMap.h:39
EcalEndcap
Definition: EcalSubdetector.h:10
align::ID
uint32_t ID
Definition: Definitions.h:24
VFillMap::VFillMap
VFillMap(int, int, const std::map< int, int > &, double, double, const std::map< int, int > &, EcalIntercalibConstantMap *, EcalIntercalibConstantMap *)
ctor
Definition: VFillMap.cc:3
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
Max
T Max(T a, T b)
Definition: MathUtil.h:44
edm::SortedCollection::find
iterator find(key_type k)
Definition: SortedCollection.h:240
VFillMap::m_maxEnergyPerCrystal
double m_maxEnergyPerCrystal
Definition: VFillMap.h:38
dummy
Definition: DummySelector.h:38