|
|
Go to the documentation of this file.
45 void analyzeDigi(
const T&,
double const&,
bool const&,
int const&,
unsigned int&);
64 : g4Label_(ps.getParameter<
std::
string>(
"ModuleLabel")),
65 hits_((ps.getParameter<
std::
string>(
"HitCollection"))),
66 digis_(ps.getParameter<
edm::
InputTag>(
"DigiCollection")),
67 iSample_(ps.getParameter<
int>(
"Sample")),
68 threshold_(ps.getParameter<double>(
"Threshold")),
75 <<
" Digits:" <<
digis_ <<
" Sample: " <<
iSample_ <<
" Threshold "
84 desc.add<
int>(
"Sample", 5);
85 desc.add<
double>(
"Threshold", 15.0);
86 descriptions.
add(
"hgcalBHAnalysis",
desc);
90 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation::Maximum Number of"
91 <<
" eta sectors:" <<
etaMax_ <<
"\nHitsValidationHcal::Booking the Histograms";
94 hsimE1_ =
fs_->
make<TH1D>(
"SimHitEn1",
"Sim Hit Energy", 1000, 0.0, 1.0);
95 hsimE2_ =
fs_->
make<TH1D>(
"SimHitEn2",
"Sim Hit Energy", 1000, 0.0, 1.0);
96 hsimTm_ =
fs_->
make<TH1D>(
"SimHitTime",
"Sim Hit Time", 1000, 0.0, 500.0);
97 hsimLn_ =
fs_->
make<TH1D>(
"SimHitLong",
"Sim Hit Long. Profile", 50, 0.0, 25.0);
102 hdigEn_ =
fs_->
make<TH1D>(
"DigiEnergy",
"Digi ADC Sample", 1000, 0.0, 1000.0);
103 hdigLn_ =
fs_->
make<TH1D>(
"DigiLong",
"Digi Long. Profile", 50, 0.0, 25.0);
110 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation:Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
115 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation.: PCaloHitContainer"
116 <<
" obtained with flag " << hitsHE.
isValid();
118 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation: PCaloHit buffer " << hitsHE->size();
120 std::map<unsigned int, double> map_try;
121 for (edm::PCaloHitContainer::const_iterator it = hitsHE->begin(); it != hitsHE->end(); ++it) {
122 double energy = it->energy();
123 double time = it->time();
124 unsigned int id = it->id();
125 int eta(0),
phi(0), lay(0);
141 if (map_try.count(
id) != 0)
150 for (std::map<unsigned int, double>::iterator itr = map_try.begin(); itr != map_try.end(); ++itr) {
156 unsigned int kount(0);
160 <<
"HGCalDigiCollection obtained with"
161 <<
" flag " << hecoll.
isValid();
164 <<
"buffer " << hecoll->
size();
171 int depth = cell.layer();
180 const T& cell,
double const&
energy,
bool const& bh,
int const&
depth,
unsigned int& kount) {
182 int eta = cell.ieta();
183 int phi = cell.iphi();
const edm::InputTag digis_
std::vector< T >::const_iterator const_iterator
int iphi() const
get the phi index
const edm::EDGetToken tok_digi_
constexpr Detector det() const
get the detector field from this detid
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string g4Label_
~HGCalBHValidation() override
int layer() const
get the layer #
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const_iterator begin() const
edm::Service< TFileService > fs_
void analyze(edm::Event const &, edm::EventSetup const &) override
const_iterator end() const
HGCalBHValidation(const edm::ParameterSet &ps)
T * make(const Args &...args) const
make new ROOT object
void beginRun(edm::Run const &, edm::EventSetup const &) override
Log< level::Info, true > LogVerbatim
static const std::string kSharedResource
std::vector< PCaloHit > PCaloHitContainer
void analyzeDigi(const T &, double const &, bool const &, int const &, unsigned int &)
void endRun(edm::Run const &, edm::EventSetup const &) override