-
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 #123 from rest-for-physics/aquintana-BiPo
TRestRawBiPoAnalysisProcess first implementation
- Loading branch information
Showing
5 changed files
with
175 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef RESTProc_TRestRawBiPoAnalysisProcess | ||
#define RESTProc_TRestRawBiPoAnalysisProcess | ||
|
||
#include "TRestEventProcess.h" | ||
#include "TRestRawSignalEvent.h" | ||
|
||
class TRestRawBiPoAnalysisProcess : public TRestEventProcess { | ||
private: | ||
/// A pointer to the specific TRestRawSignalEvent input event | ||
TRestRawSignalEvent* fAnaEvent; //! | ||
|
||
void Initialize() override; | ||
|
||
public: | ||
RESTValue GetInputEvent() const override { return fAnaEvent; } | ||
RESTValue GetOutputEvent() const override { return fAnaEvent; } | ||
|
||
void InitProcess() override; | ||
|
||
const char* GetProcessName() const override { return "BiPoAnalysis"; } | ||
|
||
TRestEvent* ProcessEvent(TRestEvent* eventInput) override; | ||
|
||
void EndProcess() override; | ||
|
||
void PrintMetadata() override { | ||
BeginPrintProcess(); | ||
|
||
EndPrintProcess(); | ||
} | ||
|
||
TRestRawBiPoAnalysisProcess(); | ||
~TRestRawBiPoAnalysisProcess(); | ||
|
||
ClassDefOverride(TRestRawBiPoAnalysisProcess, 1); | ||
}; | ||
#endif |
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,104 @@ | ||
/************************************************************************* | ||
* This file is part of the REST software framework. * | ||
* * | ||
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * | ||
* For more information see http://gifna.unizar.es/trex * | ||
* * | ||
* REST is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* REST is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have a copy of the GNU General Public License along with * | ||
* REST in $REST_PATH/LICENSE. * | ||
* If not, see http://www.gnu.org/licenses/. * | ||
* For the list of contributors see $REST_PATH/CREDITS. * | ||
*************************************************************************/ | ||
|
||
//////////////////////////////////////////////////////////////////////// | ||
/// The TRestRawBiPoSignalAnalysisProcess is meant to add specific BiPo | ||
/// observables when doing the analysis. | ||
/// For the moment it gives the observable "t1t2" which is the time distance | ||
/// between the frist and second window in the BiPo analysis | ||
/// | ||
///-------------------------------------------------------------------------- | ||
/// | ||
/// RESTsoft - Software for Rare Event Searches with TPCs | ||
/// | ||
/// History of developments: | ||
/// | ||
/// 2023-Oct: First implementation | ||
/// Ana Quintana | ||
/// | ||
/// \class TRestRawBiPoSignalAnalysisProcess | ||
/// \author Ana Quintana | ||
/// | ||
/// <hr> | ||
/// | ||
|
||
#include "TRestRawBiPoAnalysisProcess.h" | ||
|
||
using namespace std; | ||
|
||
ClassImp(TRestRawBiPoAnalysisProcess); | ||
|
||
/////////////////////////////////////////////// | ||
/// \brief Default constructor | ||
/// | ||
TRestRawBiPoAnalysisProcess::TRestRawBiPoAnalysisProcess() { Initialize(); } | ||
|
||
/////////////////////////////////////////////// | ||
/// \brief Default destructor | ||
/// | ||
TRestRawBiPoAnalysisProcess::~TRestRawBiPoAnalysisProcess() {} | ||
|
||
/////////////////////////////////////////////// | ||
/// \brief Function to initialize input/output event members and define | ||
/// the section name | ||
/// | ||
void TRestRawBiPoAnalysisProcess::Initialize() { | ||
SetSectionName(this->ClassName()); | ||
SetLibraryVersion(LIBRARY_VERSION); | ||
fAnaEvent = NULL; | ||
|
||
// Initialize here the values of class data members if needed | ||
} | ||
|
||
/////////////////////////////////////////////// | ||
/// \brief Process initialization. Observable names can be re-interpreted | ||
/// here. Any action in the process required before starting event process | ||
/// might be added here. | ||
/// | ||
void TRestRawBiPoAnalysisProcess::InitProcess() { | ||
// TRestRawToSignalProcess::InitProcess(); | ||
|
||
// fEventCounter = 0; | ||
} | ||
|
||
/////////////////////////////////////////////// | ||
/// \brief The main processing event function | ||
/// | ||
TRestEvent* TRestRawBiPoAnalysisProcess::ProcessEvent(TRestEvent* evInput) { | ||
fAnaEvent = (TRestRawSignalEvent*)evInput; | ||
|
||
// Write here the main logic of process: TRestRawBiPoAnalysisProcess | ||
// Read data from input event, write data to output event, and save observables to tree | ||
|
||
Int_t t1t2_BiPo = fAnaEvent->GetAuxiliar(); | ||
SetObservableValue("t1t2", t1t2_BiPo); | ||
|
||
return fAnaEvent; | ||
} | ||
|
||
/////////////////////////////////////////////// | ||
/// \brief Function to include required actions after all events have been | ||
/// processed. | ||
/// | ||
void TRestRawBiPoAnalysisProcess::EndProcess() { | ||
// Write here the jobs to do when all the events are processed | ||
} |
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