66 : maxEnergy_(iConfig.getParameter<double>(
"maxEnergy")),
67 nBinsEnergy_(iConfig.getParameter<
int>(
"nBinsEnergy")),
74 if (!
tfile.isAvailable())
76 <<
"please add it to config file";
85 desc.add<
double>(
"maxEnergy", 2.0);
86 desc.add<
int>(
"nBinsEnergy", 50);
87 descriptions.
add(
"cherenkovAnalysis",
desc);
94 double totalEnergy = 0;
97 edm::PCaloHitContainer::const_iterator it = pCaloHits.
product()->begin();
98 edm::PCaloHitContainer::const_iterator itend = pCaloHits.
product()->end();
99 for (; it != itend; ++it) {
100 totalEnergy += (*it).energy();
107 edm::LogVerbatim(
"CherenkovAnalysis") <<
"CherenkovAnalysis::Total energy = " << totalEnergy;
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
std::vector< PCaloHit > PCaloHitContainer
~CherenkovAnalysis() override
T const * product() const
CherenkovAnalysis(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_calo_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(const edm::Event &, const edm::EventSetup &) override