11#include "TRestDetectorHitsShuffleProcess.h"
17TRestDetectorHitsShuffleProcess::TRestDetectorHitsShuffleProcess() {
Initialize(); }
19TRestDetectorHitsShuffleProcess::TRestDetectorHitsShuffleProcess(
const char* configFilename) {
27TRestDetectorHitsShuffleProcess::~TRestDetectorHitsShuffleProcess() {
31void TRestDetectorHitsShuffleProcess::LoadDefaultConfig() {
32 SetName(
"hitsShuffleProcess");
33 SetTitle(
"Default config");
47void TRestDetectorHitsShuffleProcess::LoadConfig(
const string& configFilename,
const string& name) {
58 Int_t nHits = hits->GetNumberOfHits();
60 for (
int n = 0; n < fIterations; n++) {
61 Int_t hit1 = (Int_t)(nHits * fRandom->Uniform(0, 1));
62 Int_t hit2 = (Int_t)(nHits * fRandom->Uniform(0, 1));
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void EndProcess() override
To be executed at the end of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
void Initialize() override
Making default settings.
A base class for any REST event.
It saves a 3-coordinate position and an energy for each punctual deposition.
virtual void SwapHits(Int_t i, Int_t j)
It exchanges hits n and m affecting to the ordering of the hits inside the list of hits.
Double_t StringToDouble(std::string in)
Gets a double from a string.
Int_t StringToInteger(std::string in)
Gets an integer from a string.