REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestWimpSensitivity.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_TRestWimpSensitivity
24 #define RestCore_TRestWimpSensitivity
25 
26 #include <TRestMetadata.h>
27 #include <TRestWimpNucleus.h>
28 
29 #include <TH1D.h>
30 
34  private:
36  std::vector<TRestWimpNucleus> fNuclei;
38  Double_t fWimpDensity = 0.3;
40  Double_t fLabVelocity = 232;
42  Double_t fEscapeVelocity = 544;
44  Double_t fRmsVelocity = 220;
46  Double_t fExposure = 365. * 0.32;
48  Double_t fBackground = 1;
49  // TODO add option to use a histogram for the spectra
51  TVector2 fEnergySpectra = TVector2(0, 2);
53  Double_t fEnergySpectraStep = 0.01;
55  TVector2 fEnergyRange = TVector2(0.1, 1.1);
57  Bool_t fUseQuenchingFactor = true;
58 
60  std::map<std::string, TH1D*> quenchingFactor;
61 
62  public:
63  TRestWimpSensitivity(const char* configFilename, const std::string& name = "");
64 
66 
67  void Initialize() override;
68  void InitFromConfigFile() override;
69  void PrintMetadata() override;
70 
71  void ReadNuclei();
72  const Double_t GetSensitivity(const double wimpMass);
74  const std::string BuildOutputFileName(const std::string& extension = ".txt");
75 
76  std::map<std::string, TH1D*> GetRecoilSpectra(const double wimpMass, const double crossSection);
77  std::map<std::string, TH1D*> GetFormFactor();
78  inline auto GetQuenchingFactor() { return quenchingFactor; }
79 
80  ClassDefOverride(TRestWimpSensitivity, 1);
81 };
82 
83 #endif
A base class for any REST metadata class.
Definition: TRestMetadata.h:74
void Initialize() override
Initialization of TRestWimpSensitivity members.
Double_t fExposure
Detector exposure in kg*day.
~TRestWimpSensitivity()
Default destructor.
void InitFromConfigFile() override
Initialization of TRestWimpSensitivity members through a RML file.
std::map< std::string, TH1D * > GetRecoilSpectra(const double wimpMass, const double crossSection)
Get recoil spectra for a given WIMP mass and cross section.
Double_t fEscapeVelocity
WIMP escape velocity (km/s)
TVector2 fEnergySpectra
Energy range for the recoil spectra in keV.
Double_t fEnergySpectraStep
Energy step for the recoil spectra in keV.
void PrintMetadata() override
Prints on screen the details about WIMP parameters, stored in TRestWimpSensitivity.
const Double_t GetSensitivity(const double wimpMass)
Get sensitivity for a give WIMP mass.
TVector2 fEnergyRange
Energy range for the sensitivity prospects in keV.
Double_t fBackground
Detector background level in c/keV/day.
std::map< std::string, TH1D * > quenchingFactor
Map containing quenching factor for a nucleus.
void CalculateQuenchingFactor()
Calculate Quenching factor and stores in a map.
Bool_t fUseQuenchingFactor
Use or not quenching factor.
Double_t fRmsVelocity
WIMP RMS velocity (km/s)
Double_t fWimpDensity
WIMP density in GeV/cm3.
Double_t fLabVelocity
WIMP velocity in the lab (Earth) frame reference in km/s.
void ReadNuclei()
Initialization of TRestWimpSensitivity members through a RML file.
TRestWimpSensitivity(const char *configFilename, const std::string &name="")
Constructor loading data from a config file.
std::map< std::string, TH1D * > GetFormFactor()
Return a map of histograms with the Form Factor of the different elements.
const std::string BuildOutputFileName(const std::string &extension=".txt")
Return output file format with different parameters used in the calculation.
std::vector< TRestWimpNucleus > fNuclei
A vector containing TRestWimpNucleus with different nucleus parameters.