33 #include <Math/VectorUtil.h> 79 iConfig.getUntrackedParameter<
std::
string>(
"HistOutFile",
std::
string(
"AlCaElectronsTest.root"))) {
88 fs->make<TH2F>(
"m_barrelGlobalCrystalsMap",
"m_barrelGlobalCrystalsMap", 171, -85, 86, 360, 0, 360);
90 fs->make<TH2F>(
"m_barrelLocalCrystalsMap",
"m_barrelLocalCrystalsMap", 20, -10, 10, 20, -10, 10);
92 fs->make<TH2F>(
"m_endcapGlobalCrystalsMap",
"m_endcapGlobalCrystalsMap", 100, 0, 100, 100, 0, 100);
94 fs->make<TH2F>(
"m_endcapLocalCrystalsMap",
"m_endcapLocalCrystalsMap", 20, -10, 10, 20, -10, 10);
96 fs->make<TH2F>(
"m_barrelGlobalCrystalsEnergy",
"m_barrelGlobalCrystalsEnergy", 171, -85, 86, 360, 0, 360);
98 fs->make<TH2F>(
"m_barrelLocalCrystalsEnergy",
"m_barrelLocalCrystalsEnergy", 20, -10, 10, 20, -10, 10);
100 fs->make<TH2F>(
"m_endcapGlobalCrystalsEnergy",
"m_endcapGlobalCrystalsEnergy", 100, 0, 100, 100, 0, 100);
102 fs->make<TH2F>(
"m_endcapLocalCrystalsEnergy",
"m_endcapLocalCrystalsEnergy", 20, -10, 10, 20, -10, 10);
104 fs->make<TH2F>(
"m_barrelGlobalCrystalsEnergyMap",
"m_barrelGlobalCrystalsEnergyMap", 171, -85, 86, 360, 0, 360);
106 fs->make<TH2F>(
"m_endcapGlobalCrystalsEnergyMap",
"m_endcapGlobalCrystalsEnergyMap", 100, 0, 100, 100, 0, 100);
119 if (!barrelRecHitsHandle.
isValid()) {
122 edm::LogError(
"ElectronsTest") <<
"[AlCaElectronsTest] caught std::exception in rertieving " <<
labels.module;
131 fillAroundBarrel(barrelHitsCollection, barrelMaxId.ieta(), barrelMaxId.iphi());
137 if (!endcapRecHitsHandle.
isValid()) {
140 edm::LogError(
"ElectronsTest") <<
"[AlCaElectronsTest] caught std::exception in rertieving " <<
labels.module;
159 if (elem->energy() >
energy) {
171 EBDetId elementId = elem->id();
183 EEDetId elementId = elem->id();
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
void fillAroundBarrel(const EcalRecHitCollection *recHits, int eta, int phi)
TH2F * m_endcapGlobalCrystalsEnergyMap
ECAL EnergyMap.
int iphi() const
get the crystal iphi
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
TH2F * m_endcapGlobalCrystalsEnergy
ECAL Energy.
~AlCaElectronsTest()=default
Log< level::Error, false > LogError
std::string m_outputFileName
int ieta() const
get the crystal ieta
TH2F * m_endcapLocalCrystalsEnergy
local Energy
TH2F * m_barrelGlobalCrystalsMap
ECAL map.
edm::EDGetTokenT< EERecHitCollection > m_endcapAlCa
TH2F * m_barrelLocalCrystalsMap
local map
void fillAroundEndcap(const EcalRecHitCollection *recHits, int ics, int ips)
DetId id() const
get the id
TH2F * m_endcapGlobalCrystalsMap
ECAL map.
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
TH2F * m_barrelGlobalCrystalsEnergyMap
ECAL EnergyMap.
AlCaElectronsTest(const edm::ParameterSet &)
TH2F * m_barrelGlobalCrystalsEnergy
ECAL Energy.
edm::EDGetTokenT< EBRecHitCollection > m_barrelAlCa
EcalRecHit getMaximum(const EcalRecHitCollection *recHits)
TH2F * m_barrelLocalCrystalsEnergy
local Energy
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
TH2F * m_endcapLocalCrystalsMap
local map