|
|
Go to the documentation of this file.
51 void analyzeDigi(
const T&,
double const&,
bool const&,
int const&,
unsigned int&);
71 : g4Label_(ps.getUntrackedParameter<
std::
string>(
"ModuleLabel",
"g4SimHits")),
72 hcalHits_((ps.getUntrackedParameter<
std::
string>(
"HitCollection",
"HcalHits"))),
73 hcalDigis_(ps.getUntrackedParameter<
edm::
InputTag>(
"DigiCollection")),
74 iSample_(ps.getUntrackedParameter<
int>(
"Sample", 5)),
75 geomType_(ps.getUntrackedParameter<
int>(
"GeometryType", 0)),
76 threshold_(ps.getUntrackedParameter<double>(
"Threshold", 12.0)),
77 ifHCAL_(ps.getUntrackedParameter<
bool>(
"ifHCAL",
false)),
96 desc.addUntracked<
int>(
"Sample", 5);
97 desc.addUntracked<
int>(
"GeometryType", 1);
98 desc.addUntracked<
double>(
"Threshold", 15.0);
99 desc.addUntracked<
bool>(
"ifHCAL",
false);
100 descriptions.
add(
"hgcalBHAnalysis",
desc);
109 const std::vector<int> etaM = hpar->
etaMax;
112 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation::Maximum Number of"
113 <<
" eta sectors:" <<
etaMax_ <<
"\nHitsValidationHcal::Booking the Histograms";
116 hsimE1_ =
fs_->
make<TH1D>(
"SimHitEn1",
"Sim Hit Energy", 1000, 0.0, 1.0);
117 hsimE2_ =
fs_->
make<TH1D>(
"SimHitEn2",
"Sim Hit Energy", 1000, 0.0, 1.0);
118 hsimTm_ =
fs_->
make<TH1D>(
"SimHitTime",
"Sim Hit Time", 1000, 0.0, 500.0);
119 hsimLn_ =
fs_->
make<TH1D>(
"SimHitLong",
"Sim Hit Long. Profile", 50, 0.0, 25.0);
124 hdigEn_ =
fs_->
make<TH1D>(
"DigiEnergy",
"Digi ADC Sample", 1000, 0.0, 1000.0);
125 hdigLn_ =
fs_->
make<TH1D>(
"DigiLong",
"Digi Long. Profile", 50, 0.0, 25.0);
132 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation:Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
137 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation.: PCaloHitContainer"
138 <<
" obtained with flag " << hitsHcal.
isValid();
140 edm::LogVerbatim(
"HGCalValidation") <<
"HGCalBHValidation: PCaloHit buffer " << hitsHcal->size();
142 std::map<unsigned int, double> map_try;
143 for (edm::PCaloHitContainer::const_iterator it = hitsHcal->begin(); it != hitsHcal->end(); ++it) {
144 double energy = it->energy();
145 double time = it->time();
146 unsigned int id = it->id();
148 bool hbhe(
false), bh(
false);
154 bh = (subdet == static_cast<int>(
HcalEndcap));
173 if (map_try.count(
id) != 0)
179 <<
"HGCalBHHit[" <<
i <<
"] ID " << std::hex <<
" " <<
id <<
std::dec <<
" SubDet " << subdet <<
" depth "
180 <<
depth <<
" Eta " <<
eta <<
" Phi " <<
phi <<
" layer " << lay <<
" E " <<
energy <<
" time " <<
time;
183 for (std::map<unsigned int, double>::iterator itr = map_try.begin(); itr != map_try.end(); ++itr) {
189 unsigned int kount(0);
194 <<
"HBHEQIE11DigiCollection obtained "
195 <<
"with flag " << hbhecoll.
isValid();
198 <<
"buffer " << hbhecoll->
size();
203 ((cell.subdetId() == static_cast<int>(
HcalEndcap)) || (cell.subdetId() == static_cast<int>(
HcalBarrel)));
205 bool bh = (cell.subdetId() == static_cast<int>(
HcalEndcap));
206 int depth = cell.depth();
216 <<
"HGCalDigiCollection obtained with"
217 <<
" flag " << hbhecoll.
isValid();
220 <<
"buffer " << hbhecoll->
size();
227 ((cell.subdetId() == static_cast<int>(
HcalEndcap)) || (cell.subdetId() == static_cast<int>(
HcalBarrel)));
229 bool bh = (cell.subdetId() == static_cast<int>(
HcalEndcap));
230 int depth = cell.depth();
237 int depth = cell.layer();
248 const T& cell,
double const&
energy,
bool const& bh,
int const&
depth,
unsigned int& kount) {
250 int eta = cell.ieta();
251 int phi = cell.iphi();
std::vector< T >::const_iterator const_iterator
int iphi() const
get the phi index
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
constexpr Detector det() const
get the detector field from this detid
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string g4Label_
~HGCalBHValidation() override
std::vector< int > etaMax
int layer() const
get the layer #
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
#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
edm::EDGetToken tok_hbhe_
HGCalBHValidation(const edm::ParameterSet &ps)
const_iterator begin() const
The iterator returned can not safely be used across threads.
const edm::InputTag hcalDigis_
void beginRun(edm::Run const &, edm::EventSetup const &) override
Log< level::Info, true > LogVerbatim
static const std::string kSharedResource
const std::string hcalHits_
void analyzeDigi(const T &, double const &, bool const &, int const &, unsigned int &)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
const_iterator end() const
void endRun(edm::Run const &, edm::EventSetup const &) override
T * make(const Args &... args) const
make new ROOT object