Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRestDetectorHitsRotateAndTranslateProcess. Added legacy process #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
82 changes: 82 additions & 0 deletions inc/TRestDetectorHitsRotateAndTranslateProcess.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*************************************************************************
* 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 RestCore_TRestDetectorHitsRotateAndTranslateProcess
#define RestCore_TRestDetectorHitsRotateAndTranslateProcess

#include "TRestLegacyProcess.h"

//! A process to identify signal and remove baseline noise from a TRestRawSignalEvent.
class TRestDetectorHitsRotateAndTranslateProcess : public TRestLegacyProcess {
private:
/// Shift in X-axis
Double_t fDeltaX; //<

/// Shift in Y-axis
Double_t fDeltaY; //<

/// Shift in Z-axis
Double_t fDeltaZ; //<

/// Rotation angle around Z-axis
Double_t fAlpha; //<

/// Rotation angle around Y-axis
Double_t fBeta; //<

/// Rotation angle around X-axis
Double_t fGamma; //<

public:
inline Double_t GetDeltaX() const { return fDeltaX; }
inline Double_t GetDeltaY() const { return fDeltaY; }
inline Double_t GetDeltaZ() const { return fDeltaZ; }

inline Double_t GetAlpha() const { return fAlpha; }
inline Double_t GetBeta() const { return fBeta; }
inline Double_t GetGamma() const { return fGamma; }
/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() override {
BeginPrintProcess();

RESTMetadata << " Delta x : " << fDeltaX << RESTendl;
RESTMetadata << " Delta y : " << fDeltaY << RESTendl;
RESTMetadata << " Delta z : " << fDeltaZ << RESTendl;
RESTMetadata << " Alpha : " << fAlpha << RESTendl;
RESTMetadata << " Beta : " << fBeta << RESTendl;
RESTMetadata << " Gamma : " << fGamma << RESTendl;

EndPrintProcess();
}

TRestDetectorHitsRotateAndTranslateProcess() {
RESTWarning << "Creating legacy process TRestDetectorHitsRotateAndTranslateProcess" << RESTendl;
RESTWarning << "This process is now implemented under TRestRawToDetectorSignalProcess" << RESTendl;
}
TRestDetectorHitsRotateAndTranslateProcess(char* cfgFileName) {
RESTWarning << "Creating legacy process TRestDetectorHitsRotateAndTranslateProcess" << RESTendl;
RESTWarning << "This process is now implemented under TRestRawToDetectorSignalProcess" << RESTendl;
}

ClassDefOverride(TRestDetectorHitsRotateAndTranslateProcess, 4);
};
#endif
51 changes: 51 additions & 0 deletions src/TRestDetectorHitsRotateAndTranslateProcess.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*************************************************************************
* 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. *
*************************************************************************/

//////////////////////////////////////////////////////////////////////////
/// IMPORTANT TRestDetectorHitsRotateAndTranslateProcess is a legacy class, it is just
/// kept for backward compatibility of the code. Do not attempt to create
/// any instance to a legacy process. The information below is kept to
/// have a reference of previous implementations.
///
/// You may use TRestDetectorHitsRotationProcess, TRestDetectorHitsTranslationProcess
/// or TRestDetectorHitsSpecularProcess in any combination to achieve the
/// same results as this process.
///
///--------------------------------------------------------------------------
///
/// RESTsoft - Software for Rare Event Searches with TPCs
///
/// History of developments:
///
/// 2016-March: Conception and implementation of signal zero suppression
/// process.
/// Javier Gracia
///
/// \class TRestDetectorHitsRotateAndTranslateProcess
/// \author Javier Gracia
///
/// <hr>
///

#include "TRestDetectorHitsRotateAndTranslateProcess.h"

ClassImp(TRestDetectorHitsRotateAndTranslateProcess);