15#ifndef RestCore_TRestDetectorGarfieldDriftProcess
16#define RestCore_TRestDetectorGarfieldDriftProcess
18#include "TRestDetectorGas.h"
20#if defined USE_Garfield_OLD
21#include "AvalancheMC.hh"
22#include "ComponentBase.hh"
24typedef AvalancheMC DRIFT_METHOD;
26#include "AvalancheMC.hh"
27#include "Component.hh"
29typedef AvalancheMC DRIFT_METHOD;
35#include "TRestDetectorGeometry.h"
36#include "TRestDetectorHitsEvent.h"
37#include "TRestDetectorReadout.h"
38#include "TRestDetectorSignalEvent.h"
39#include "TRestEventProcess.h"
50#if defined USE_Garfield
55 Garfield::Sensor* fGfSensor;
56 DRIFT_METHOD* fGfDriftMethod;
60 void LoadDefaultConfig();
62 Int_t FindModule(Int_t readoutPlane, Double_t x, Double_t y);
63 Int_t FindChannel(Int_t module, Double_t x, Double_t y);
66#if defined USE_Garfield
67 Double_t fGasPressure = -1;
69 Double_t fDriftPotential;
70 Double_t fPEReduction;
73 TString fGDML_Filename;
82#if defined USE_Garfield
86 void LoadConfig(
const std::string& configFilename,
const std::string& name =
"");
93 RESTMetadata <<
"Drift electrode potential : " << fDriftPotential <<
" V" <<
RESTendl;
94 RESTMetadata <<
"Gas pressure : " << fGasPressure <<
" atm" <<
RESTendl;
95 RESTMetadata <<
"Electron reduction factor : " << fPEReduction <<
RESTendl;
96 RESTMetadata <<
"Drift stop distance : " << fStopDistance <<
" mm" <<
RESTendl;
101 TRestMetadata* GetProcessMetadata()
const {
return fReadout; }
103 const char* GetProcessName()
const override {
return "garfieldDrift"; }
105 Garfield::Sensor* GetGfSensor() {
return fGfSensor; }
void Initialize() override
Making default settings.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
A metadata class to generate/store a readout description.
A base class for any REST event process.
virtual void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
virtual void EndProcess()
To be executed at the end of the run (outside event loop)
void BeginPrintProcess()
[name, cut range]
virtual void InitProcess()
To be executed at the beginning of the run (outside event loop)
A base class for any REST event.