|
| 1 | +/************************************************************************* |
| 2 | + * This file is part of the REST software framework. * |
| 3 | + * * |
| 4 | + * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) * |
| 5 | + * For more information see http://gifna.unizar.es/trex * |
| 6 | + * * |
| 7 | + * REST is free software: you can redistribute it and/or modify * |
| 8 | + * it under the terms of the GNU General Public License as published by * |
| 9 | + * the Free Software Foundation, either version 3 of the License, or * |
| 10 | + * (at your option) any later version. * |
| 11 | + * * |
| 12 | + * REST is distributed in the hope that it will be useful, * |
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 15 | + * GNU General Public License for more details. * |
| 16 | + * * |
| 17 | + * You should have a copy of the GNU General Public License along with * |
| 18 | + * REST in $REST_PATH/LICENSE. * |
| 19 | + * If not, see http://www.gnu.org/licenses/. * |
| 20 | + * For the list of contributors see $REST_PATH/CREDITS. * |
| 21 | + *************************************************************************/ |
| 22 | + |
| 23 | +//////////////////////////////////////////////////////////////////////// |
| 24 | +/// The TRestRawBiPoSignalAnalysisProcess is meant to add specific BiPo |
| 25 | +/// observables when doing the analysis. |
| 26 | +/// For the moment it gives the observable "t1t2" which is the time distance |
| 27 | +/// between the frist and second window in the BiPo analysis |
| 28 | +/// |
| 29 | +///-------------------------------------------------------------------------- |
| 30 | +/// |
| 31 | +/// RESTsoft - Software for Rare Event Searches with TPCs |
| 32 | +/// |
| 33 | +/// History of developments: |
| 34 | +/// |
| 35 | +/// 2023-Oct: First implementation |
| 36 | +/// Ana Quintana |
| 37 | +/// |
| 38 | +/// \class TRestRawBiPoSignalAnalysisProcess |
| 39 | +/// \author Ana Quintana |
| 40 | +/// |
| 41 | +/// <hr> |
| 42 | +/// |
| 43 | + |
| 44 | +#include "TRestRawBiPoAnalysisProcess.h" |
| 45 | + |
| 46 | +using namespace std; |
| 47 | + |
| 48 | +ClassImp(TRestRawBiPoAnalysisProcess); |
| 49 | + |
| 50 | +/////////////////////////////////////////////// |
| 51 | +/// \brief Default constructor |
| 52 | +/// |
| 53 | +TRestRawBiPoAnalysisProcess::TRestRawBiPoAnalysisProcess() { Initialize(); } |
| 54 | + |
| 55 | +/////////////////////////////////////////////// |
| 56 | +/// \brief Default destructor |
| 57 | +/// |
| 58 | +TRestRawBiPoAnalysisProcess::~TRestRawBiPoAnalysisProcess() {} |
| 59 | + |
| 60 | +/////////////////////////////////////////////// |
| 61 | +/// \brief Function to initialize input/output event members and define |
| 62 | +/// the section name |
| 63 | +/// |
| 64 | +void TRestRawBiPoAnalysisProcess::Initialize() { |
| 65 | + SetSectionName(this->ClassName()); |
| 66 | + SetLibraryVersion(LIBRARY_VERSION); |
| 67 | + fAnaEvent = NULL; |
| 68 | + |
| 69 | + // Initialize here the values of class data members if needed |
| 70 | +} |
| 71 | + |
| 72 | +/////////////////////////////////////////////// |
| 73 | +/// \brief Process initialization. Observable names can be re-interpreted |
| 74 | +/// here. Any action in the process required before starting event process |
| 75 | +/// might be added here. |
| 76 | +/// |
| 77 | +void TRestRawBiPoAnalysisProcess::InitProcess() { |
| 78 | + // TRestRawToSignalProcess::InitProcess(); |
| 79 | + |
| 80 | + // fEventCounter = 0; |
| 81 | +} |
| 82 | + |
| 83 | +/////////////////////////////////////////////// |
| 84 | +/// \brief The main processing event function |
| 85 | +/// |
| 86 | +TRestEvent* TRestRawBiPoAnalysisProcess::ProcessEvent(TRestEvent* evInput) { |
| 87 | + fAnaEvent = (TRestRawSignalEvent*)evInput; |
| 88 | + |
| 89 | + // Write here the main logic of process: TRestRawBiPoAnalysisProcess |
| 90 | + // Read data from input event, write data to output event, and save observables to tree |
| 91 | + |
| 92 | + Int_t t1t2_BiPo = fAnaEvent->GetAuxiliar(); |
| 93 | + SetObservableValue("t1t2", t1t2_BiPo); |
| 94 | + |
| 95 | + return fAnaEvent; |
| 96 | +} |
| 97 | + |
| 98 | +/////////////////////////////////////////////// |
| 99 | +/// \brief Function to include required actions after all events have been |
| 100 | +/// processed. |
| 101 | +/// |
| 102 | +void TRestRawBiPoAnalysisProcess::EndProcess() { |
| 103 | + // Write here the jobs to do when all the events are processed |
| 104 | +} |
0 commit comments