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);
76 for (
auto const&
hit : *hitsCalo) {
77 double edep =
hit.energy();
79 unsigned int id =
hit.
id();
Log< level::Info, true > LogVerbatim
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::vector< int > types_
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 >
EcalSimHitDump(const edm::ParameterSet &ps)
const std::vector< edm::EDGetTokenT< edm::PCaloHitContainer > > toksCalo_
const std::string g4Label_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(edm::Event const &, edm::EventSetup const &) override
const std::vector< std::string > hitLab_