12#ifndef BMNPARTICLEEQUALIZER_H
13#define BMNPARTICLEEQUALIZER_H
15#include "FairGenerator.h"
16#include "FairPrimaryGenerator.h"
36 vector<Int_t> pdg_codes,
39 Int_t intervals = 20);
49 virtual Bool_t
ReadEvent(FairPrimaryGenerator* primGen);
54 stParticleInfo(
int pdg_key, Double_t min_p, Double_t max_p, Int_t interval_count);
67 vector<unique_ptr<TH1D>>
69 vector<unique_ptr<TH1D>>
79 TString output_histo_file =
"$VMCWORKDIR/macro/recotools/particle_hists.root");
82 static int FitPHistogram(unique_ptr<TH1D>& hP,
int pdg_key, Double_t p_min, Double_t p_max);
89 static int FitYHistogram(unique_ptr<TH1D>& hY,
int pdg_key, Double_t& y0_output, Double_t& sigma_putput);
90 static int FitEtaHistogram(unique_ptr<TH1D>& hEta,
int pdg_key, Double_t eta_min, Double_t eta_max);
94 static void FitSampleHistograms(TString input_histo_file =
"$VMCWORKDIR/macro/recotools/particle_hists.root");
97 static int ShowSampleHistograms(TString input_histo_file =
"$VMCWORKDIR/macro/recotools/particle_hists.root");
104 static Double_t fPMin;
105 static Double_t fPMax;
106 static Int_t fIntervalCount;
107 Double_t fIntervalStep;
112 static vector<Int_t> fParticles;
114 map<Int_t, unique_ptr<stParticleInfo>> fParticleInfos;
116 vector<int> fMaxParticles;
120 Bool_t ReadSampleHistograms(TString input_histo_file =
"$VMCWORKDIR/macro/recotools/particle_hists.root");
126 static Int_t GetPDGCodeByMass(Double_t mass, Double_t tolerance = 1.e-6,
const vector<int>& vecParticlePDG = {});
virtual ~BmnParticleEqualizer()
static int ProduceSampleHistograms(TString input_list_file, TString output_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
static int FitEtaHistogram(unique_ptr< TH1D > &hEta, int pdg_key, Double_t eta_min, Double_t eta_max)
BmnParticleEqualizer(TString hist_file_name)
static int FitPtHistogram(unique_ptr< TH1D > &hPt, int pdg_key, Double_t pdg_mass, Double_t pt_min, Double_t pt_max, Double_t &t_output)
static int ShowSampleHistograms(TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
static int FitPHistogram(unique_ptr< TH1D > &hP, int pdg_key, Double_t p_min, Double_t p_max)
static void FitSampleHistograms(TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
BmnParticleEqualizer(TString hist_file_name, vector< Int_t > pdg_codes, Double_t min_p=0.0, Double_t max_p=4.0, Int_t intervals=20)
static int FitYHistogram(unique_ptr< TH1D > &hY, int pdg_key, Double_t &y0_output, Double_t &sigma_putput)
static int ShowResultDistributions(TString input_list_file)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
stParticleInfo(int pdg_key, Double_t min_p, Double_t max_p, Int_t interval_count)
vector< unique_ptr< TH1D > > fEtaHistVector
Eta histograms for the particle type (divided by momentum intervals -> vector)
unique_ptr< TH1D > fPHist
PDG -> P histogram (TH1D) for the particle type.
Double_t fY0
Mean rapidity.
Double_t fT
Temperature in the P distribution.
vector< unique_ptr< TH1D > > fPHistVector
P histograms for the particle type (divided by momentum intervals -> vector)
unique_ptr< TH1D > fPhiHist
PDG -> Phi (azimuth angle) histogram (TH1D) for the particle type.
unique_ptr< TH1D > fEtaHist
PDG -> Eta (pseudorapidity) histogram (TH1D) for the particle type.
unique_ptr< TH1D > fPtHist
PDG -> Pt histogram (TH1D) for the particle type.
unique_ptr< TH1D > fYHist
PDG -> Y (rapidity) histogram (TH1D) for the particle type.
Double_t fSigma
Sigma in the rapidity distribution.
unique_ptr< TH1D > fThetaHist
PDG -> Theta (polar angle) histogram (TH1D) for the particle type.
vector< Int_t > fParticleNumber
PDG -> Particle Count (divided by momentum intervals -> vector)