66 : maxEnergy_(iConfig.getParameter<double>(
"maxEnergy")), nBinsEnergy_(iConfig.getParameter<int>(
"nBinsEnergy")) {
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);
95 double totalEnergy = 0;
98 edm::PCaloHitContainer::const_iterator it = pCaloHits.
product()->begin();
99 edm::PCaloHitContainer::const_iterator itend = pCaloHits.
product()->end();
100 for (; it != itend; ++it) {
101 totalEnergy += (*it).energy();
108 edm::LogVerbatim(
"CherenkovAnalysis") <<
"CherenkovAnalysis::Total energy = " << totalEnergy;
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
~CherenkovAnalysis() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
CherenkovAnalysis(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::PCaloHitContainer > tok_calo_