Go to the documentation of this file.
33 const std::vector<edm::EDGetTokenT<edm::PCaloHitContainer>>
toksCalo_;
40 : g4Label_(ps.getParameter<
std::
string>(
"ModuleLabel")),
46 types_(ps.getParameter<std::vector<int>>(
"CollectionTypes")),
47 maxEvent_(ps.getParameter<
int>(
"MaxEvent")),
49 edm::LogVerbatim(
"HitStudy") <<
"Module Label: " << g4Label_ <<
" with " << hitLab_.size()
50 <<
" collections and maxEvent = " << maxEvent_;
51 for (
unsigned int k = 0;
k < hitLab_.size(); ++
k)
52 edm::LogVerbatim(
"HitStudy") <<
"[" <<
k <<
"] Type " << types_[
k] <<
" Label " << hitLab_[
k];
57 std::vector<std::string> coll = {
"EcalHitsEB",
"EcalHitsEE",
"EcalHitsES"};
58 std::vector<int>
type = {0, 1, 2};
60 desc.add<std::vector<std::string>>(
"HitCollections", coll);
61 desc.add<std::vector<int>>(
"CollectionTypes",
type);
62 desc.add<
int>(
"MaxEvent", 10);
63 descriptions.
add(
"ecalSimHitDump",
desc);
77 for (
auto const&
hit : *hitsCalo) {
78 double edep =
hit.energy();
80 unsigned int id =
hit.
id();
EcalSimHitDump(const edm::ParameterSet &ps)
const std::vector< std::string > hitLab_
const std::vector< int > types_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::vector< edm::EDGetTokenT< edm::PCaloHitContainer > > toksCalo_
const std::string g4Label_
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Log< level::Info, true > LogVerbatim
void analyze(edm::Event const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)