REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestTrackReconnectionProcess.h
1
11
12#ifndef RestCore_TRestTrackReconnectionProcess
13#define RestCore_TRestTrackReconnectionProcess
14
15#include <TRestEventProcess.h>
16
17#include "TRestTrackEvent.h"
18
20 private:
21#ifndef __CINT__
22 TRestTrackEvent* fInputTrackEvent;
23 TRestTrackEvent* fOutputTrackEvent;
24
25 Double_t fMeanDistance;
26 Double_t fSigma;
27#endif
28
29 Bool_t fSplitTrack;
30 Double_t fNSigmas;
31
32 void InitFromConfigFile() override;
33
34 void Initialize() override;
35
36 void SetDistanceMeanAndSigma(TRestHits* h);
37
38 protected:
39 public:
40 RESTValue GetInputEvent() const override { return fInputTrackEvent; }
41 RESTValue GetOutputEvent() const override { return fOutputTrackEvent; }
42
43 void InitProcess() override;
44 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
45 void EndProcess() override;
46 void LoadDefaultConfig();
47
48 void LoadConfig(const std::string& configFilename, const std::string& name = "");
49
50 void PrintMetadata() override {
52
53 RESTMetadata << "Split track : ";
54 if (fSplitTrack)
55 RESTMetadata << " enabled" << RESTendl;
56 else
57 RESTMetadata << " disabled" << RESTendl;
58
59 RESTMetadata << "Number of sigmas to defined a branch : " << fNSigmas << RESTendl;
60
61 EndPrintProcess();
62 }
63
64 const char* GetProcessName() const override { return "trackReconnection"; }
65
66 void BreakTracks(TRestVolumeHits* hits, std::vector<TRestVolumeHits>& hitSets, Double_t nSigma = 2.);
67 void ReconnectTracks(std::vector<TRestVolumeHits>& hitSets);
68 Int_t GetTrackBranches(TRestHits& h, Double_t nSigma);
69
70 // Constructor
72 TRestTrackReconnectionProcess(const char* configFilename);
73 // Destructor
75
76 ClassDefOverride(TRestTrackReconnectionProcess, 1);
77};
78#endif
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
Definition: TRestEvent.h:38
It saves a 3-coordinate position and an energy for each punctual deposition.
Definition: TRestHits.h:39
endl_t RESTendl
Termination flag object for TRestStringOutput.
void EndProcess() override
To be executed at the end of the run (outside event loop)
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
void BreakTracks(TRestVolumeHits *hits, std::vector< TRestVolumeHits > &hitSets, Double_t nSigma=2.)
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void Initialize() override
Making default settings.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.