30 #include <Math/VectorUtil.h>
81 m_barrelAlCa (iConfig.getParameter<edm::InputTag> (
"alcaBarrelHitCollection")) ,
82 m_endcapAlCa (iConfig.getParameter<edm::InputTag> (
"alcaEndcapHitCollection")) ,
83 m_outputFileName (iConfig.getUntrackedParameter<std::
string>
84 (
"HistOutFile",std::
string (
"AlCaElectronsTest.root")))
139 std::cout <<
"[AlCaElectronsTest] analysing event "
140 << iEvent.
id () << std::endl ;
146 if (!barrelRecHitsHandle.
isValid()) {
147 std::cerr <<
"[AlCaElectronsTest] caught std::exception "
157 barrelMaxId.ieta () ,
161 barrelMaxId.ieta () ,
162 barrelMaxId.iphi () ,
166 barrelHitsCollection,
175 if (!endcapRecHitsHandle.
isValid()) {
176 std::cerr <<
"[AlCaElectronsTest] caught std::exception "
195 endcapHitsCollection,
217 energy =
elem->energy () ;
268 elementId.
ix () -
ics ,
269 elementId.
iy () - ips
272 elementId.
ix () -
ics ,
273 elementId.
iy () - ips ,
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
void fillAroundBarrel(const EcalRecHitCollection *recHits, int eta, int phi)
TH2F * m_endcapGlobalCrystalsEnergyMap
ECAL EnergyMap.
std::vector< EcalRecHit >::const_iterator const_iterator
TH2F * m_endcapGlobalCrystalsEnergy
ECAL Energy.
edm::InputTag m_barrelAlCa
std::string m_outputFileName
int iphi() const
get the crystal iphi
TH2F * m_endcapLocalCrystalsEnergy
local Energy
const T & max(const T &a, const T &b)
TH2F * m_barrelGlobalCrystalsMap
ECAL map.
int ieta() const
get the crystal ieta
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TH2F * m_barrelLocalCrystalsMap
local map
void fillAroundEndcap(const EcalRecHitCollection *recHits, int ics, int ips)
const_iterator end() const
DetId id() const
get the id
T const * product() const
TH2F * m_endcapGlobalCrystalsMap
ECAL map.
return(e1-e2)*(e1-e2)+dp *dp
TH2F * m_barrelGlobalCrystalsEnergyMap
ECAL EnergyMap.
AlCaElectronsTest(const edm::ParameterSet &)
TH2F * m_barrelGlobalCrystalsEnergy
ECAL Energy.
edm::InputTag m_endcapAlCa
EcalRecHit getMaximum(const EcalRecHitCollection *recHits)
TH2F * m_barrelLocalCrystalsEnergy
local Energy
const_iterator begin() const
TH2F * m_endcapLocalCrystalsMap
local map