|
|
Go to the documentation of this file.
74 : topFolderName_(iConfig.getParameter<
std::
string>(
"topFolderName")),
75 verbosity_(iConfig.getUntrackedParameter<
int>(
"verbosity", 0)),
77 preRecHitHBHE_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"preRecHitHBHE",
edm::
InputTag(
"hbheprereco"))),
78 doHE_(iConfig.getUntrackedParameter<
bool>(
"doHE",
true)),
79 doHB_(iConfig.getUntrackedParameter<
bool>(
"doHB",
false)),
80 hcalTopologyToken_{esConsumes<HcalTopology, HcalRecNumberingRecord>()} {
82 tok_hbhe_ = consumes<HBHERecHitCollection>(recHitHBHE_);
83 tok_prehbhe_ = consumes<HBHERecHitCollection>(preRecHitHBHE_);
85 edm::LogVerbatim(
"Collapse") <<
"Verbosity " << verbosity_ <<
" with tags " << recHitHBHE_ <<
" and "
86 << preRecHitHBHE_ <<
" and Do " << doHB_ <<
":" << doHE_;
92 desc.addUntracked<
int>(
"verbosity", 0);
95 desc.addUntracked<
bool>(
"doHE",
true);
96 desc.addUntracked<
bool>(
"doHB",
false);
97 descriptions.
add(
"hcalCollapseAnalyzer",
desc);
103 <<
" starts ==============";
120 <<
" and hbheprereco: " << prerecohbhe->
size();
121 double sfrac = (prerecohbhe->
empty()) ? 1 : ((
double)(recohbhe->
size())) / ((double)(prerecohbhe->
size()));
124 for (
const auto &
hit : (*recohbhe)) {
128 std::vector<HcalDetId> ids;
131 edm::LogVerbatim(
"Collapse") <<
id <<
" is derived from " << ids.size() <<
" components";
132 for (
unsigned int k = 0;
k < ids.size(); ++
k)
139 for (
const auto phit : (*prerecohbhe)) {
140 if (
std::find(ids.begin(), ids.end(), phit.id()) != ids.end()) {
141 etot += phit.energy();
161 h_merge = ibooker.
book1D(
"h_merge",
"Number of hits merged", 10, 0.0, 10.0);
162 h_size = ibooker.
book1D(
"h_size",
"Size of the RecHit collection", 100, 500.0, 1500.0);
163 h_depth = ibooker.
book1D(
"h_depth",
"Depth of the Id's used", 10, 0.0, 10.0);
164 h_sfrac = ibooker.
book1D(
"h_sfrac",
"Ratio of sizes of preRecHit and RecHit collections", 150, 0.0, 1.5);
165 h_frac = ibooker.
book1D(
"h_frac",
"Fraction of energy before collapse", 150, 0.0, 1.5);
166 h_balance = ibooker.
book1D(
"h_balance",
"Balance of energy between pre- and post-collapse", 100, 0.5, 1.5);
MonitorElement * h_balance
virtual void setCurrentFolder(std::string const &fullpath)
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcalTopologyToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const edm::InputTag recHitHBHE_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~HcalCollapseAnalyzer() override
void analyze(edm::Event const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::InputTag preRecHitHBHE_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const std::string topFolderName_
bool getData(T &iHolder) const
const HcalTopology * theHBHETopology
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< HBHERecHitCollection > tok_prehbhe_
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
HcalCollapseAnalyzer(const edm::ParameterSet &)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())