Skip to content

Commit

Permalink
Code check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Jul 13, 2021
1 parent 38264be commit e4a97f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 4 additions & 6 deletions SimG4CMS/CherenkovAnalysis/plugins/CherenkovAnalysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CherenkovAnalysis : public edm::one::EDAnalyzer<edm::one::SharedResources>
explicit CherenkovAnalysis(const edm::ParameterSet &);
~CherenkovAnalysis() override {}

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);

private:
const double maxEnergy_;
Expand All @@ -61,9 +61,7 @@ class CherenkovAnalysis : public edm::one::EDAnalyzer<edm::one::SharedResources>

//__________________________________________________________________________________________________
CherenkovAnalysis::CherenkovAnalysis(const edm::ParameterSet &iConfig)
: maxEnergy_(iConfig.getParameter<double>("maxEnergy")),
nBinsEnergy_(iConfig.getParameter<int>("nBinsEnergy")) {

: maxEnergy_(iConfig.getParameter<double>("maxEnergy")), nBinsEnergy_(iConfig.getParameter<int>("nBinsEnergy")) {
usesResource(TFileService::kSharedResource);

tok_calo_ = consumes<edm::PCaloHitContainer>(iConfig.getParameter<edm::InputTag>("caloHitSource"));
Expand All @@ -79,9 +77,9 @@ CherenkovAnalysis::CherenkovAnalysis(const edm::ParameterSet &iConfig)
hTimeStructure_ = tfile->make<TH1F>("hTimeStructure", "Time structure [ns]", 100, 0, 0.3);
}

void CherenkovAnalysis::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void CherenkovAnalysis::fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("caloHitSource", edm::InputTag("g4SimHits","EcalHitsEB"));
desc.add<edm::InputTag>("caloHitSource", edm::InputTag("g4SimHits", "EcalHitsEB"));
desc.add<double>("maxEnergy", 2.0);
desc.add<int>("nBinsEnergy", 50);
descriptions.add("cherenkovAnalysis", desc);
Expand Down
9 changes: 5 additions & 4 deletions SimG4CMS/CherenkovAnalysis/plugins/XtalDedxAnalysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class XtalDedxAnalysis : public edm::one::EDAnalyzer<edm::one::SharedResources>
explicit XtalDedxAnalysis(const edm::ParameterSet &);
~XtalDedxAnalysis() override {}

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);

protected:
void beginJob() override {}
Expand Down Expand Up @@ -66,7 +66,8 @@ XtalDedxAnalysis::XtalDedxAnalysis(const edm::ParameterSet &ps) {
caloHitSource_ = ps.getParameter<edm::InputTag>("caloHitSource");
simTkLabel_ = ps.getParameter<std::string>("moduleLabelTk");
double energyMax = ps.getParameter<double>("energyMax");
edm::LogVerbatim("CherenkovAnalysis") << "XtalDedxAnalysis::Source " << caloHitSource_ << " Track Label " << simTkLabel_ << " Energy Max " << energyMax;
edm::LogVerbatim("CherenkovAnalysis") << "XtalDedxAnalysis::Source " << caloHitSource_ << " Track Label "
<< simTkLabel_ << " Energy Max " << energyMax;
// register for data access
tok_calo_ = consumes<edm::PCaloHitContainer>(caloHitSource_);
tok_tk_ = consumes<edm::SimTrackContainer>(edm::InputTag(simTkLabel_));
Expand Down Expand Up @@ -115,9 +116,9 @@ XtalDedxAnalysis::XtalDedxAnalysis(const edm::ParameterSet &ps) {
mType_->GetYaxis()->SetTitle("Tracks");
}

void XtalDedxAnalysis::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void XtalDedxAnalysis::fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("caloHitSource", edm::InputTag("g4SimHits","EcalHitsEB"));
desc.add<edm::InputTag>("caloHitSource", edm::InputTag("g4SimHits", "EcalHitsEB"));
desc.add<std::string>("moduleLabelTk", "g4SimHits");
desc.add<double>("energyMax", 2.0);
descriptions.add("xtalDedxAnalysis", desc);
Expand Down

0 comments on commit e4a97f8

Please sign in to comment.