-
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 branch 'master' into lobis-ci-image
- Loading branch information
Showing
102 changed files
with
5,806 additions
and
1,332 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,88 @@ | ||
/************************************************************************* | ||
* 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_TRestDetectorHitmapAnalysisProcess | ||
#define RestCore_TRestDetectorHitmapAnalysisProcess | ||
|
||
#include <TRestDetectorHitsEvent.h> | ||
|
||
#include "TRestEventProcess.h" | ||
|
||
/// A structure to define a given hit transformation | ||
struct HitTransformation { | ||
/// The center of rotation or a point contained in the specular plane | ||
TVector3 position = {0, 0, 0}; | ||
|
||
/// The translation vector, the axis of rotation or the specular plane normal | ||
TVector3 vector = {0, 0, 1}; | ||
|
||
/// The angle of rotation | ||
Double_t angle = 0; | ||
|
||
/// The type of transformation (specular/rotation/translation) | ||
std::string type = ""; | ||
|
||
/// A given name that allows to place an order to the transformations | ||
std::string name = ""; | ||
}; | ||
|
||
//! An analysis process to apply rotation/translation/specular to mean hit positions | ||
class TRestDetectorHitmapAnalysisProcess : public TRestEventProcess { | ||
private: | ||
/// A pointer to the specific TRestDetectorHitsEvent input | ||
TRestDetectorHitsEvent* fHitsEvent; //! | ||
|
||
void InitFromConfigFile() override; | ||
|
||
void Initialize() override; | ||
|
||
protected: | ||
/// A list of transformations that can be applied to the mean positions | ||
std::vector<HitTransformation> fTransDefinitions; | ||
|
||
/// An ordered list with the names of transformations that will be applied | ||
std::vector<std::string> fTransformations; | ||
|
||
/// It returns the transformation with a given name | ||
HitTransformation GetTransformation(const std::string& name); | ||
|
||
TVector3 Specular(const TVector3& pos, const HitTransformation& tr); | ||
TVector3 Rotation(const TVector3& pos, const HitTransformation& tr); | ||
TVector3 Translation(const TVector3& pos, const HitTransformation& tr); | ||
|
||
public: | ||
RESTValue GetInputEvent() const override { return fHitsEvent; } | ||
RESTValue GetOutputEvent() const override { return fHitsEvent; } | ||
|
||
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override; | ||
|
||
void PrintMetadata() override; | ||
|
||
const char* GetProcessName() const override { return "hitsTransformation"; } | ||
|
||
TRestDetectorHitmapAnalysisProcess(); | ||
TRestDetectorHitmapAnalysisProcess(const char* configFilename); | ||
~TRestDetectorHitmapAnalysisProcess(); | ||
|
||
ClassDefOverride(TRestDetectorHitmapAnalysisProcess, 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
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.