REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestDetector.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef RestCore_TRestDetector
24#define RestCore_TRestDetector
25
26#include <Rtypes.h>
27#include <TVector3.h>
28#include <stdio.h>
29#include <stdlib.h>
30
31#include <cstdio>
32#include <cstring>
33#include <fstream>
34#include <iostream>
35#include <string>
36#include <vector>
37
38#include "TFile.h"
39#include "TRestMetadata.h"
40#include "TRestStringOutput.h"
41#include "TRestTools.h"
42
45 public:
47 std::string fDetectorName = "REST Detector";
48
50 Double_t fDriftVoltage = -1;
52 Double_t fDriftField = -1;
54 Double_t fDriftDistance = -1;
56 Double_t fAmplificationVoltage = -1;
60 Double_t fAmplificationGain = -1;
61
63 Double_t fMass = -1;
65 Double_t fHeight = -1;
67 Double_t fRadius = -1;
69 Double_t fLength = -1;
71 Double_t fWidth = -1;
73 Double_t fPressure = -1;
74
82 Double_t fElectronicsThreshold = -1;
83
85 std::string fElectronicsGain = "-1";
87 std::string fElectronicsClock = "-1";
89 std::string fElectronicsShaping = "-1";
90
92
93 void PrintMetadata() override;
94
95 void UpdateMetadataMembers() override;
96
97 // Constructors
98 TRestDetector() {}
99 // Destructor
100 ~TRestDetector() {}
101
102 ClassDefOverride(TRestDetector, 4);
103};
104
105#endif
An metadata class to store basic detector information.
Definition: TRestDetector.h:44
std::string fElectronicsClock
The electronics clock (sampling) in raw configuration format (hexadecimal)
Definition: TRestDetector.h:87
Double_t fElectronicsSamplingTime
The electronics sampling time in us.
Definition: TRestDetector.h:78
std::string fDetectorName
The detector name.
Definition: TRestDetector.h:47
Double_t fAmplificationDistance
The detector amplification distance in mm (also known as amplificationGap)
Definition: TRestDetector.h:58
void UpdateMetadataMembers() override
Method to allow implementation of specific metadata members updates at inherited classes.
Double_t fAmplificationGain
The detector amplification gain.
Definition: TRestDetector.h:60
Double_t fMass
The detector active mass in kg.
Definition: TRestDetector.h:63
Double_t fElectronicsThreshold
The electronics threshold in ADC units.
Definition: TRestDetector.h:82
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
Definition: TRestDetector.h:91
Double_t fWidth
The detector active volume width in mm.
Definition: TRestDetector.h:71
Double_t fLength
The detector active volume length in mm.
Definition: TRestDetector.h:69
Double_t fDriftDistance
The detector drift distance in mm.
Definition: TRestDetector.h:54
Double_t fElectronicsDynamicRange
The electronics dynamic range in V.
Definition: TRestDetector.h:80
Double_t fElectronicsShapingTime
The electronics shaping time in us.
Definition: TRestDetector.h:76
Double_t fDriftVoltage
The detector drift voltage in V.
Definition: TRestDetector.h:50
Double_t fHeight
The detector active volume height in mm.
Definition: TRestDetector.h:65
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
std::string fElectronicsGain
The electronics gain in raw configuration format (hexadecimal)
Definition: TRestDetector.h:85
Double_t fAmplificationVoltage
The detector amplification voltage in V.
Definition: TRestDetector.h:56
std::string fElectronicsShaping
The electronics shaping in raw configuration format (hexadecimal)
Definition: TRestDetector.h:89
Double_t fDriftField
The detector drift voltage in V/mm.
Definition: TRestDetector.h:52
Double_t fRadius
The detector active volume radius in mm.
Definition: TRestDetector.h:67
Double_t fPressure
The detector active volume pressure in atm.
Definition: TRestDetector.h:73
A base class for any REST metadata class.
Definition: TRestMetadata.h:70
void ReadAllParameters()
Reflection methods, Set value of a datamember in class according to TRestMetadata::fElement.