53 : g4Label_(ps.getParameter<std::
string>(
"ModuleLabel")),
54 hitLab_(ps.getParameter<std::
string>(
"HCCollection")),
55 maxEvent_(ps.getParameter<int>(
"MaxEvent")),
56 testNumber_(ps.getParameter<bool>(
"TestNumber")),
69 desc.
add<
int>(
"MaxEvent", 10);
70 desc.
add<
bool>(
"TestNumber",
true);
71 descriptions.
add(
"hcalSimHitDump", desc);
80 std::vector<PCaloHit> hcHits;
85 std::vector<PCaloHit> caloHits;
86 caloHits.insert(caloHits.end(), hitsCalo->begin(), hitsCalo->end());
87 edm::LogVerbatim(
"HitStudy") <<
"HcalValidation: Hit buffer " << caloHits.size();
95 for (
unsigned int i = 0;
i < hits.size();
i++) {
96 double edep = hits[
i].energy();
97 double time = hits[
i].time();
98 unsigned int id_ = hits[
i].id();
113 int side = (z == 0) ? (-1) : (1);
114 edm::LogVerbatim(
"HitStudy") <<
"[" <<
i <<
"] (" << sub <<
" " << side * eta <<
"," << phi <<
"," << depth <<
","
115 << lay <<
") E " << edep <<
" T " << time;
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
const edm::EventSetup & c
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string g4Label_
#define DEFINE_FWK_MODULE(type)
maxEvent_(ps.getParameter< int >("MaxEvent"))
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string hitLab_
edm::EDGetTokenT< edm::PCaloHitContainer > toks_calo_
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
void analyzeHits(std::vector< PCaloHit > &)
~HcalSimHitDump() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
HcalSimHitDump(const edm::ParameterSet &ps)