REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestTrackReductionProcess.h
1
11
12#ifndef RestCore_TRestTrackReductionProcess
13#define RestCore_TRestTrackReductionProcess
14
15#include <TRestEventProcess.h>
16
17#include "TRestTrackEvent.h"
18
20 private:
21#ifndef __CINT__
22 TRestTrackEvent* fInputTrackEvent;
23 TRestTrackEvent* fOutputTrackEvent;
24#endif
25
26 void Initialize() override;
27
28 protected:
29 Double_t fStartingDistance = 0.5;
30 Double_t fMinimumDistance = 3;
31 Double_t fDistanceStepFactor = 1.5;
32 Double_t fMaxNodes = 30;
33 Int_t fMaxIt = 100;
34 Bool_t fKmeans = false;
35
36 public:
37 RESTValue GetInputEvent() const override { return fInputTrackEvent; }
38 RESTValue GetOutputEvent() const override { return fOutputTrackEvent; }
39
40 void InitProcess() override;
41 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
42 void getHitsMerged(TRestVolumeHits& hits);
43 void EndProcess() override;
44
45 void PrintMetadata() override {
47
48 RESTMetadata << " Starting distance : " << fStartingDistance << RESTendl;
49 RESTMetadata << " Minimum distance : " << fMinimumDistance << RESTendl;
50 RESTMetadata << " Distance step factor : " << fDistanceStepFactor << RESTendl;
51 RESTMetadata << " Maximum number of nodes : " << fMaxNodes << RESTendl;
52 RESTMetadata << " Perform kMeans clustering : " << fKmeans << RESTendl;
53 if (fKmeans) RESTMetadata << " Maximum iterations : " << fMaxIt << RESTendl;
54
55 EndPrintProcess();
56 }
57
58 const char* GetProcessName() const override { return "trackReduction"; }
59
60 // Constructor
62 // Destructor
64
65 ClassDefOverride(TRestTrackReductionProcess, 2); // Template for a REST "event process" class inherited
66 // from TRestEventProcess
67};
68#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
endl_t RESTendl
Termination flag object for TRestStringOutput.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void EndProcess() override
To be executed at the end of the run (outside event loop)
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
void Initialize() override
Making default settings.
void InitProcess() override
To be executed at the beginning of the run (outside event loop)