This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from LDMX-Software/iss644
Iss644 - Project structure changes.
- Loading branch information
Showing
9 changed files
with
251 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/** | ||
* @file HcalHit.h | ||
* @brief Class that stores Stores reconstructed hit information from the HCAL | ||
* @author Jeremy Mans, University of Minnesota | ||
*/ | ||
|
||
#ifndef HCAL_EVENT_HCALHIT_H_ | ||
#define HCAL_EVENT_HCALHIT_H_ | ||
|
||
// LDMX | ||
#include "Recon/Event/CalorimeterHit.h" | ||
|
||
namespace ldmx { | ||
|
||
/** | ||
* @class HcalHit | ||
* @brief Stores reconstructed hit information from the HCAL | ||
* | ||
* @note This class represents the reconstructed hit information | ||
* from the HCAL, providing particular information for the HCAL, | ||
* above and beyond what is available in the CalorimeterHit. | ||
*/ | ||
class HcalHit : public CalorimeterHit { | ||
|
||
public: | ||
|
||
/** | ||
* Class constructor. | ||
*/ | ||
HcalHit() { | ||
} | ||
|
||
/** | ||
* Class destructor. | ||
*/ | ||
virtual ~HcalHit() { | ||
} | ||
|
||
/** | ||
* Clear the data in the object. | ||
*/ | ||
void Clear(); | ||
|
||
/** | ||
* Print out the object. | ||
*/ | ||
void Print() const; | ||
|
||
/** | ||
* Get the number of photoelectrons estimated for this hit. | ||
* @return Number of photoelectrons, including noise which affects the estimate. | ||
*/ | ||
float getPE() const { | ||
return pe_; | ||
} | ||
|
||
/** | ||
* Get the minimum number of photoelectrons estimated for this hit if two sided readout. | ||
* @return Minimum number of photoelectrons, including noise which affects the estimate. | ||
*/ | ||
float getMinPE() const { | ||
return minpe_; | ||
} | ||
|
||
/** | ||
* Set the number of photoelectrons estimated for this hit. | ||
* @param pe Number of photoelectrons, including noise which affects the estimate. | ||
*/ | ||
void setPE(float pe) { | ||
pe_ = pe; | ||
} | ||
|
||
/** | ||
* Set the minimum number of photoelectrons estimated for this hit. | ||
* @param pe Minimum number of photoelectrons, including noise which affects the estimate. | ||
*/ | ||
void setMinPE(float minpe) { | ||
minpe_ = minpe; | ||
} | ||
|
||
private: | ||
|
||
/** The number of PE estimated for this hit. */ | ||
float pe_{0}; | ||
|
||
/** The minimum number of PE estimated for this hit, different from pe_ when you have two ended readout */ | ||
float minpe_{-99}; | ||
|
||
/** | ||
* The ROOT class definition. | ||
*/ | ||
ClassDef(HcalHit, 2); | ||
}; | ||
|
||
} | ||
|
||
#endif /* HCAL_EVENT_HCALHIT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* @file HcalVetoResult.h | ||
* @brief Class used to encapsulate the results obtained from | ||
* HcalVetoProcessor. | ||
* @author Omar Moreno, SLAC National Accelerator Laboratory | ||
*/ | ||
|
||
#ifndef HCAL_EVENT_HCALVETORESULT_H_ | ||
#define HCAL_EVENT_HCALVETORESULT_H_ | ||
|
||
//----------// | ||
// ROOT // | ||
//----------// | ||
#include "TObject.h" //For ClassDef | ||
|
||
//----------// | ||
// LDMX // | ||
//----------// | ||
#include "Hcal/Event/HcalHit.h" | ||
|
||
namespace ldmx { | ||
|
||
class HcalVetoResult { | ||
|
||
public: | ||
|
||
/** Constructor */ | ||
HcalVetoResult(); | ||
|
||
/** Destructor */ | ||
~HcalVetoResult(); | ||
|
||
/** Reset the object. */ | ||
void Clear(); | ||
|
||
/** Print out the object */ | ||
void Print() const; | ||
|
||
/** Checks if the event passes the Hcal veto. */ | ||
bool passesVeto() const { return passesVeto_; }; | ||
|
||
/** @return The maximum PE HcalHit. */ | ||
inline HcalHit getMaxPEHit() const { return maxPEHit_; } | ||
|
||
/** | ||
* Sets whether the Hcal veto was passed or not. | ||
* | ||
* @param passesVeto Veto result. | ||
*/ | ||
inline void setVetoResult(const bool& passesVeto = true) { passesVeto_ = passesVeto; } | ||
|
||
/** | ||
* Set the maximum PE hit. | ||
* | ||
* @param maxPEHit The maximum PE HcalHit | ||
*/ | ||
inline void setMaxPEHit(const HcalHit maxPEHit) { maxPEHit_ = maxPEHit; } | ||
|
||
private: | ||
|
||
/** Reference to max PE hit. */ | ||
HcalHit maxPEHit_; | ||
|
||
/** Flag indicating whether the event passes the Hcal veto. */ | ||
bool passesVeto_{false}; | ||
|
||
ClassDef(HcalVetoResult, 2); | ||
|
||
}; // HcalVetoResult | ||
} | ||
|
||
|
||
#endif // HCAL_EVENT_HCALVETORESULT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "Hcal/Event/HcalHit.h" | ||
|
||
// STL | ||
#include <iostream> | ||
|
||
ClassImp(ldmx::HcalHit) | ||
|
||
namespace ldmx { | ||
|
||
void HcalHit::Clear() { | ||
CalorimeterHit::Clear(); | ||
pe_ = 0; | ||
minpe_ = -99; | ||
} | ||
|
||
void HcalHit::Print() const { | ||
std::cout << "HcalHit { " << "id: " << std::hex << getID() << std::dec | ||
<< ", energy: " << getEnergy() << "MeV, time: " << getTime() | ||
<< "ns, amplitude: " << getAmplitude() << ", pe: " << getPE() << "}" << std::endl; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* @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" | ||
|
||
//----------------// | ||
// C++ StdLib // | ||
//----------------// | ||
#include <iostream> | ||
|
||
//-------------// | ||
// ldmx-sw // | ||
//-------------// | ||
#include "Hcal/Event/HcalHit.h" | ||
|
||
ClassImp(ldmx::HcalVetoResult) | ||
|
||
namespace ldmx { | ||
|
||
HcalVetoResult::HcalVetoResult() {} | ||
|
||
HcalVetoResult::~HcalVetoResult() {} | ||
|
||
void HcalVetoResult::Clear() { | ||
passesVeto_ = false; | ||
} | ||
|
||
void HcalVetoResult::Print() const { | ||
std::cout << "[ HcalVetoResult ]: Passes veto : " | ||
<< " Passes veto: " << passesVeto_ << std::endl; | ||
maxPEHit_.Print(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.