|
|
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)),
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", 40, 0.0, 20.0);
124 hdigEn_ =
fs_->
make<TH1D>(
"DigiEnergy",
"Digi ADC Sample", 1000, 0.0, 1000.0);
125 hdigLn_ =
fs_->
make<TH1D>(
"DigiLong",
"Digi Long. Profile", 40, 0.0, 20.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();
154 bh = (subdet == static_cast<int>(
HcalEndcap));
172 if (map_try.count(
id) != 0)
178 <<
"HGCalBHHit[" <<
i <<
"] ID " << std::hex <<
" " <<
id <<
std::dec <<
" SubDet " << subdet <<
" depth "
179 <<
depth <<
" Eta " <<
eta <<
" Phi " <<
phi <<
" layer " << lay <<
" E " <<
energy <<
" time " <<
time;
182 for (std::map<unsigned int, double>::iterator
itr = map_try.begin();
itr != map_try.end(); ++
itr) {
188 unsigned int kount(0);
193 <<
"HBHEQIE11DigiCollection obtained "
194 <<
"with flag " << hbhecoll.
isValid();
197 <<
"buffer " << hbhecoll->
size();
202 ((cell.subdetId() == static_cast<int>(
HcalEndcap)) || (cell.subdetId() == static_cast<int>(
HcalBarrel)));
204 bool bh = (cell.subdetId() == static_cast<int>(
HcalEndcap));
205 int depth = cell.depth();
215 <<
"HGCalDigiCollection obtained with"
216 <<
" flag " << hbhecoll.
isValid();
219 <<
"buffer " << hbhecoll->
size();
226 ((cell.subdetId() == static_cast<int>(
HcalEndcap)) || (cell.subdetId() == static_cast<int>(
HcalBarrel)));
228 bool bh = (cell.subdetId() == static_cast<int>(
HcalEndcap));
229 int depth = cell.depth();
236 int depth = cell.layer();
247 const T& cell,
double const&
energy,
bool const& bh,
int const&
depth,
unsigned int& kount) {
249 int eta = cell.ieta();
250 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_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void analyze(edm::Event const &, edm::EventSetup const &) override
const_iterator end() const
edm::EDGetToken tok_hbhe_
constexpr edm::DataFrame::id_type id() const
HGCalBHValidation(const edm::ParameterSet &ps)
const_iterator begin() const
The iterator returned can not safely be used across threads.
std::vector< std::pair< float, float > >::iterator itr
const edm::InputTag hcalDigis_
void beginRun(edm::Run const &, edm::EventSetup const &) override
const std::vector< S > & data() const
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 D & id() const
det id
const_iterator end() const
void endRun(edm::Run const &, edm::EventSetup const &) override
T * make(const Args &... args) const
make new ROOT object