Skip to content

Commit

Permalink
Changed the names of the files to reflect these are testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Aug 21, 2022
1 parent abbaf45 commit 5729689
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
#include <string>
#include <vector>

class HGCalHitPartial : public edm::one::EDAnalyzer<> {
class HGCalTestPartialWaferHits : public edm::one::EDAnalyzer<> {
public:
HGCalHitPartial(const edm::ParameterSet& ps);
~HGCalHitPartial() override = default;
HGCalTestPartialWaferHits(const edm::ParameterSet& ps);
~HGCalTestPartialWaferHits() override = default;
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

protected:
Expand All @@ -46,7 +46,7 @@ class HGCalHitPartial : public edm::one::EDAnalyzer<> {
std::vector<int> wafers_;
};

HGCalHitPartial::HGCalHitPartial(const edm::ParameterSet& ps)
HGCalTestPartialWaferHits::HGCalTestPartialWaferHits(const edm::ParameterSet& ps)
: g4Label_(ps.getParameter<std::string>("moduleLabel")),
caloHitSource_(ps.getParameter<std::string>("caloHitSource")),
nameSense_(ps.getParameter<std::string>("nameSense")),
Expand Down Expand Up @@ -78,7 +78,7 @@ HGCalHitPartial::HGCalHitPartial(const edm::ParameterSet& ps)
}
}

void HGCalHitPartial::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void HGCalTestPartialWaferHits::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::string>("moduleLabel", "g4SimHits");
desc.add<std::string>("caloHitSource", "HGCHitsEE");
Expand All @@ -87,7 +87,7 @@ void HGCalHitPartial::fillDescriptions(edm::ConfigurationDescriptions& descripti
descriptions.add("hgcalHitPartialEE", desc);
}

void HGCalHitPartial::analyze(const edm::Event& e, const edm::EventSetup& iS) {
void HGCalTestPartialWaferHits::analyze(const edm::Event& e, const edm::EventSetup& iS) {
// get hcalGeometry
const HGCalGeometry* geom = &iS.getData(geomToken_);
const HGCalDDDConstants& hgc = geom->topology().dddConstants();
Expand All @@ -97,7 +97,7 @@ void HGCalHitPartial::analyze(const edm::Event& e, const edm::EventSetup& iS) {
bool getHits = (hitsCalo.isValid());
uint32_t nhits = (getHits) ? hitsCalo->size() : 0;
uint32_t good(0), allSi(0), all(0);
edm::LogVerbatim("HGCalSim") << "HGCalHitPartial: Input flags Hits " << getHits << " with " << nhits
edm::LogVerbatim("HGCalSim") << "HGCalTestPartialWaferHits: Input flags Hits " << getHits << " with " << nhits
<< " hits first Layer " << firstLayer;

if (getHits) {
Expand Down Expand Up @@ -139,4 +139,4 @@ void HGCalHitPartial::analyze(const edm::Event& e, const edm::EventSetup& iS) {
}

//define this as a plug-in
DEFINE_FWK_MODULE(HGCalHitPartial);
DEFINE_FWK_MODULE(HGCalTestPartialWaferHits);
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include <string>
#include <vector>

class HGCalHitScint : public edm::one::EDAnalyzer<> {
class HGCalTestScintHits : public edm::one::EDAnalyzer<> {
public:
HGCalHitScint(const edm::ParameterSet& ps);
~HGCalHitScint() override = default;
HGCalTestScintHits(const edm::ParameterSet& ps);
~HGCalTestScintHits() override = default;
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

protected:
Expand All @@ -45,7 +45,7 @@ class HGCalHitScint : public edm::one::EDAnalyzer<> {
std::vector<int> tiles_;
};

HGCalHitScint::HGCalHitScint(const edm::ParameterSet& ps)
HGCalTestScintHits::HGCalTestScintHits(const edm::ParameterSet& ps)
: g4Label_(ps.getParameter<std::string>("moduleLabel")),
caloHitSource_(ps.getParameter<std::string>("caloHitSource")),
nameSense_(ps.getParameter<std::string>("nameSense")),
Expand Down Expand Up @@ -77,7 +77,7 @@ HGCalHitScint::HGCalHitScint(const edm::ParameterSet& ps)
}
}

void HGCalHitScint::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void HGCalTestScintHits::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::string>("moduleLabel", "g4SimHits");
desc.add<std::string>("caloHitSource", "HGCHitsHEback");
Expand All @@ -86,7 +86,7 @@ void HGCalHitScint::fillDescriptions(edm::ConfigurationDescriptions& description
descriptions.add("hgcalHitScintillator", desc);
}

void HGCalHitScint::analyze(const edm::Event& e, const edm::EventSetup& iS) {
void HGCalTestScintHits::analyze(const edm::Event& e, const edm::EventSetup& iS) {
// get hcalGeometry
const HGCalGeometry* geom = &iS.getData(geomToken_);
const HGCalDDDConstants& hgc = geom->topology().dddConstants();
Expand All @@ -96,7 +96,7 @@ void HGCalHitScint::analyze(const edm::Event& e, const edm::EventSetup& iS) {
bool getHits = (hitsCalo.isValid());
uint32_t nhits = (getHits) ? hitsCalo->size() : 0;
uint32_t good(0), all(0);
edm::LogVerbatim("HGCalSim") << "HGCalHitScint: Input flags Hits " << getHits << " with " << nhits
edm::LogVerbatim("HGCalSim") << "HGCalTestScintHits: Input flags Hits " << getHits << " with " << nhits
<< " hits first Layer " << firstLayer;

if (getHits) {
Expand Down Expand Up @@ -136,4 +136,4 @@ void HGCalHitScint::analyze(const edm::Event& e, const edm::EventSetup& iS) {
}

//define this as a plug-in
DEFINE_FWK_MODULE(HGCalHitScint);
DEFINE_FWK_MODULE(HGCalTestScintHits);

0 comments on commit 5729689

Please sign in to comment.