41 class ecalRecHitLess :
public std::binary_function<EcalRecHit, EcalRecHit, bool>
59 esClusterCollectionX_ = consumes<reco::PreshowerClusterCollection>(ps.
getParameter<
edm::InputTag>(
"ClusterCollectionX_ES"));
60 esClusterCollectionY_ = consumes<reco::PreshowerClusterCollection>(ps.
getParameter<
edm::InputTag>(
"ClusterCollectionY_ES"));
62 superClusterCollection_EE_ = consumes<reco::SuperClusterCollection>(ps.
getParameter<
edm::InputTag>(
"superClusterCollection_EE"));
73 h_recHits_ES_energyMax = iBooker.
book1D(
"recHits_ES_energyMax",
"recHits_ES_energyMax",200,0.,0.01);
74 h_recHits_ES_time = iBooker.
book1D(
"recHits_ES_time",
"recHits_ES_time",200,-100.,100.);
76 h_esClusters_energy_plane1 = iBooker.
book1D(
"esClusters_energy_plane1",
"esClusters_energy_plane1",200,0.,0.01);
77 h_esClusters_energy_plane2 = iBooker.
book1D(
"esClusters_energy_plane2",
"esClusters_energy_plane2",200,0.,0.01);
78 h_esClusters_energy_ratio = iBooker.
book1D(
"esClusters_energy_ratio",
"esClusters_energy_ratio",200,0.,20.);
90 ev.
getByToken (esRecHitCollection_, recHitsES) ;
94 std::cerr <<
"ESRecoSummary::analyze --> recHitsES not found" << std::endl;
97 float maxRecHitEnergyES = -999.;
102 h_recHits_ES_time ->
Fill(esItr->time());
103 if (esItr -> energy() > maxRecHitEnergyES ) maxRecHitEnergyES = esItr -> energy() ;
107 h_recHits_ES_energyMax ->
Fill(maxRecHitEnergyES );
111 ev.
getByToken( esClusterCollectionX_, esClustersX);
116 ev.
getByToken( esClusterCollectionY_, esClustersY);
122 ev.
getByToken( superClusterCollection_EE_, superClusters_EE_h );
124 if ( ! superClusters_EE_h.
isValid() ) {
125 std::cerr <<
"EcalRecHitSummary::analyze --> superClusters_EE_h not found" << std::endl;
129 for (reco::SuperClusterCollection::const_iterator itSC = theEndcapSuperClusters->begin();
130 itSC != theEndcapSuperClusters->end(); ++itSC ) {
132 if ( fabs(itSC->eta()) < 1.65 || fabs(itSC->eta()) > 2.6 )
continue;
134 float ESenergyPlane1 = 0.;
135 float ESenergyPlane2 = 0.;
140 ecalBasicCluster++) {
143 for (reco::PreshowerClusterCollection::const_iterator iESClus = ESclustersX->begin(); iESClus != ESclustersX->end();
147 if (preshBasicCluster == ecalBasicClusterPtr) {
148 ESenergyPlane1 += esCluster->
energy();
152 for (reco::PreshowerClusterCollection::const_iterator iESClus = ESclustersY->begin(); iESClus != ESclustersY->end();
156 if (preshBasicCluster == ecalBasicClusterPtr) {
157 ESenergyPlane2 += esCluster->
energy();
163 h_esClusters_energy_plane1->Fill(ESenergyPlane1);
164 h_esClusters_energy_plane2->Fill(ESenergyPlane2);
165 if (ESenergyPlane1 > 0 && ESenergyPlane2 > 0) h_esClusters_energy_ratio ->
Fill(ESenergyPlane1/ESenergyPlane2);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
ESRecoSummary(const edm::ParameterSet &)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
double energy() const
cluster energy
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const_iterator end() const
void setCurrentFolder(const std::string &fullpath)
T const * product() const
void analyze(const edm::Event &, const edm::EventSetup &) override
bool operator()(EcalRecHit x, EcalRecHit y)
const_iterator begin() const