-
Notifications
You must be signed in to change notification settings - Fork 4
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 #98 from rest-for-physics/lobis-working-on-veto-re…
…adout Making veto readouts work
- Loading branch information
Showing
37 changed files
with
3,070 additions
and
3,336 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
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,54 @@ | ||
// | ||
// Created by lobis on 03-Sep-23. | ||
// | ||
|
||
#ifndef REST_TRESTDETECTORHITSREADOUTANALYSISPROCESS_H | ||
#define REST_TRESTDETECTORHITSREADOUTANALYSISPROCESS_H | ||
|
||
#include <TCanvas.h> | ||
#include <TH1D.h> | ||
#include <TRestDetectorGas.h> | ||
#include <TRestDetectorHitsEvent.h> | ||
#include <TRestDetectorReadout.h> | ||
#include <TRestDetectorSignalEvent.h> | ||
#include <TRestEventProcess.h> | ||
|
||
//! An analysis REST process to extract valuable information from Hits type of data. | ||
class TRestDetectorHitsReadoutAnalysisProcess : public TRestEventProcess { | ||
private: | ||
TRestDetectorHitsEvent* fInputHitsEvent; //! | ||
TRestDetectorHitsEvent* fOutputHitsEvent; //! | ||
|
||
void InitFromConfigFile() override; | ||
void Initialize() override; | ||
void LoadDefaultConfig(){}; | ||
|
||
/// \brief This process will only work on hits corresponding to this channel type (using readout) | ||
std::string fChannelType; | ||
TVector3 fFiducialPosition; | ||
Double_t fFiducialDiameter = 0; | ||
bool fRemoveZeroEnergyEvents = false; | ||
|
||
TRestDetectorReadout* fReadout = nullptr; //! | ||
|
||
public: | ||
RESTValue GetInputEvent() const override { return fInputHitsEvent; } | ||
RESTValue GetOutputEvent() const override { return fOutputHitsEvent; } | ||
|
||
void InitProcess() override; | ||
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override; | ||
void EndProcess() override; | ||
|
||
void PrintMetadata() override; | ||
|
||
const char* GetProcessName() const override { return "readoutHitsAnalysis"; } | ||
|
||
TRestDetectorHitsReadoutAnalysisProcess() = default; | ||
TRestDetectorHitsReadoutAnalysisProcess(const char* configFilename) {} | ||
|
||
~TRestDetectorHitsReadoutAnalysisProcess() override = default; | ||
|
||
ClassDefOverride(TRestDetectorHitsReadoutAnalysisProcess, 2); | ||
}; | ||
|
||
#endif // REST_TRESTDETECTORHITSREADOUTANALYSISPROCESS_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// Created by lobis on 25-Aug-23. | ||
// | ||
|
||
#ifndef REST_TRESTDETECTORLIGHTATTENUATIONPROCESS_H | ||
#define REST_TRESTDETECTORLIGHTATTENUATIONPROCESS_H | ||
|
||
#include <TRandom3.h> | ||
#include <TRestEventProcess.h> | ||
|
||
#include "TRestDetectorHitsEvent.h" | ||
#include "TRestDetectorReadout.h" | ||
|
||
/// A process to include detector energy resolution in a TRestDetectorHitsEvent | ||
class TRestDetectorLightAttenuationProcess : public TRestEventProcess { | ||
private: | ||
TRestDetectorHitsEvent* fInputEvent; //! | ||
TRestDetectorHitsEvent* fOutputEvent; //! | ||
|
||
TRestDetectorReadout* fReadout; //! | ||
|
||
/// Length of the light attenuation in the veto. One length reduces the signal amplitude to 1/e of the | ||
/// original | ||
Double_t fVetoLightAttenuationLength = 0.0; // mm | ||
/// Effective light speed for veto signals. Used to compute travel time from the interaction point to the | ||
/// veto readout. | ||
Double_t fVetoEffectiveLightSpeed = REST_Physics::lightSpeed; // mm/us | ||
|
||
void Initialize() override {} | ||
void LoadDefaultConfig() {} | ||
|
||
public: | ||
RESTValue GetInputEvent() const override { return fInputEvent; } | ||
RESTValue GetOutputEvent() const override { return fOutputEvent; } | ||
|
||
void InitProcess() override; | ||
void EndProcess() override {} | ||
|
||
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override; | ||
|
||
void PrintMetadata() override; | ||
|
||
TRestDetectorLightAttenuationProcess() = default; | ||
explicit TRestDetectorLightAttenuationProcess(const char* configFilename){}; | ||
|
||
const char* GetProcessName() const override { return "lightAttenuation"; } | ||
|
||
~TRestDetectorLightAttenuationProcess() override = default; | ||
|
||
ClassDefOverride(TRestDetectorLightAttenuationProcess, 1); | ||
}; | ||
|
||
#endif // REST_TRESTDETECTORLIGHTATTENUATIONPROCESS_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
Oops, something went wrong.