Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Format dev #4

Merged
merged 4 commits into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/Hcal/Event/HcalHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace ldmx {
* from the HCAL, providing particular information for the HCAL,
* above and beyond what is available in the CalorimeterHit.
*/
class HcalHit : public CalorimeterHit {
class HcalHit : public ldmx::CalorimeterHit {
public:
/**
* Class constructor.
Expand Down Expand Up @@ -84,7 +84,6 @@ class HcalHit : public CalorimeterHit {
*/
ClassDef(HcalHit, 2);
};

} // namespace ldmx

#endif /* HCAL_EVENT_HCALHIT_H_ */
8 changes: 5 additions & 3 deletions include/Hcal/Event/HcalVetoResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class HcalVetoResult {
bool passesVeto() const { return passesVeto_; };

/** @return The maximum PE HcalHit. */
inline HcalHit getMaxPEHit() const { return maxPEHit_; }
inline ldmx::HcalHit getMaxPEHit() const { return maxPEHit_; }

/**
* Sets whether the Hcal veto was passed or not.
Expand All @@ -54,11 +54,13 @@ class HcalVetoResult {
*
* @param maxPEHit The maximum PE HcalHit
*/
inline void setMaxPEHit(const HcalHit maxPEHit) { maxPEHit_ = maxPEHit; }
inline void setMaxPEHit(const ldmx::HcalHit maxPEHit) {
maxPEHit_ = maxPEHit;
}

private:
/** Reference to max PE hit. */
HcalHit maxPEHit_;
ldmx::HcalHit maxPEHit_;

/** Flag indicating whether the event passes the Hcal veto. */
bool passesVeto_{false};
Expand Down
20 changes: 10 additions & 10 deletions include/Hcal/HcalDigiProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
#include "Framework/EventProcessor.h"
#include "Tools/NoiseGenerator.h"

namespace ldmx {
namespace hcal {

/**
* @class HcalDigiProducer
* @brief Performs digitization of simulated HCal data
*/
class HcalDigiProducer : public Producer {
class HcalDigiProducer : public framework::Producer {
public:
HcalDigiProducer(const std::string& name, Process& process);
HcalDigiProducer(const std::string& name, framework::Process& process);

virtual ~HcalDigiProducer() { ; }

Expand All @@ -36,19 +36,19 @@ class HcalDigiProducer : public Producer {
*
* @param parameters Set of parameters used to configure this processor.
*/
void configure(Parameters& parameters) final override;
void configure(framework::config::Parameters& parameters) final override;

virtual void produce(Event& event);
virtual void produce(framework::Event& event);

HcalID generateRandomID(HcalID::HcalSection sec);
void constructNoiseHit(std::vector<HcalHit>&, HcalID::HcalSection, double,
double, const std::map<unsigned int, float>&,
ldmx::HcalID generateRandomID(ldmx::HcalID::HcalSection sec);
void constructNoiseHit(std::vector<ldmx::HcalHit>&, ldmx::HcalID::HcalSection,
double, double, const std::map<unsigned int, float>&,
std::unordered_set<unsigned int>&);

private:
bool verbose_{false};
std::unique_ptr<TRandom3> random_{nullptr};
std::unique_ptr<NoiseGenerator> noiseGenerator_{nullptr};
std::unique_ptr<ldmx::NoiseGenerator> noiseGenerator_{nullptr};

double meanNoise_{0};
int nProcessed_{0};
Expand All @@ -67,6 +67,6 @@ class HcalDigiProducer : public Producer {
int SUPER_STRIP_SIZE_{1};
};

} // namespace ldmx
} // namespace hcal

#endif
12 changes: 6 additions & 6 deletions include/Hcal/HcalVetoProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include "Framework/Configure/Parameters.h"
#include "Framework/EventProcessor.h"

namespace ldmx {
namespace hcal {

class HcalVetoProcessor : public Producer {
class HcalVetoProcessor : public framework::Producer {
public:
/** Constructor */
HcalVetoProcessor(const std::string &name, Process &process);
HcalVetoProcessor(const std::string &name, framework::Process &process);

/** Destructor */
~HcalVetoProcessor();
Expand All @@ -35,15 +35,15 @@ class HcalVetoProcessor : public Producer {
*
* @param parameters Set of parameters used to configure this processor.
*/
void configure(Parameters &parameters) final override;
void configure(framework::config::Parameters &parameters) final override;

/**
* Run the processor and create a collection of results which
* indicate if the event passes/fails the Hcal veto.
*
* @param event The event to process.
*/
void produce(Event &event);
void produce(framework::Event &event);

private:
/** Total PE threshold. */
Expand All @@ -59,6 +59,6 @@ class HcalVetoProcessor : public Producer {
float minPE_{1};

}; // HcalVetoProcessor
} // namespace ldmx
} // namespace hcal

#endif // HCAL_HCALVETOPROCESSOR_H_
4 changes: 2 additions & 2 deletions python/hcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class HcalDigiProducer(ldmxcfg.Producer) :
"""

def __init__(self,name = 'hcalDigis') :
super().__init__(name,'ldmx::HcalDigiProducer','Hcal')
super().__init__(name,'hcal::HcalDigiProducer','Hcal')

self.meanNoise = 0.02
self.readoutThreshold= 1
Expand Down Expand Up @@ -43,7 +43,7 @@ class HcalVetoProcessor(ldmxcfg.Producer) :
"""

def __init__(self,name = 'hcalVeto') :
super().__init__(name,'ldmx::HcalVetoProcessor','Hcal')
super().__init__(name,'hcal::HcalVetoProcessor','Hcal')

self.pe_threshold = 5.0
self.max_time = 50.0
Expand Down
4 changes: 2 additions & 2 deletions src/Hcal/Event/HcalHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ClassImp(ldmx::HcalHit)

namespace ldmx {
void HcalHit::Clear() {
CalorimeterHit::Clear();
ldmx::CalorimeterHit::Clear();
pe_ = 0;
minpe_ = -99;
}
Expand All @@ -19,4 +19,4 @@ ClassImp(ldmx::HcalHit)
<< "ns, amplitude: " << getAmplitude() << ", pe: " << getPE()
<< "}" << std::endl;
}
}
} // namespace ldmx
9 changes: 1 addition & 8 deletions src/Hcal/Event/HcalVetoResult.cxx
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* @file HcalVetoResult.h
* @brief Class used to encapsulate the results obtained from
* HcalVetoProcessor.
* @author Omar Moreno, SLAC National Accelerator Laboratory
*/

#include "Hcal/Event/HcalVetoResult.h"

//----------------//
Expand All @@ -31,4 +24,4 @@ ClassImp(ldmx::HcalVetoResult)
<< " Passes veto: " << passesVeto_ << std::endl;
maxPEHit_.Print();
}
}
} // namespace ldmx
Loading