BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnParticleEqualizer1D Class Reference

#include <BmnParticleEqualizer1D.h>

Inheritance diagram for BmnParticleEqualizer1D:
Collaboration diagram for BmnParticleEqualizer1D:

Classes

struct  stParticleInfo

Public Types

enum  { kAddedParticleBit = BIT(14) }
 Status bit the generator sets on every particle it adds. More...
enum  { kAddedParticleBit = BIT(14) }
 Status bit the generator sets on every particle it adds. More...

Public Member Functions

 BmnParticleEqualizer1D (TString hist_file_name)
 Constructor with input histograms.
 BmnParticleEqualizer1D (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)
 Constructor with given PDG codes for particles to be equalized.
virtual ~BmnParticleEqualizer1D ()
 Destructor.
Bool_t Init ()
 Initializer.
virtual Bool_t ReadEvent (FairPrimaryGenerator *primGen)
 Creates an event with equal number of particles at all momentum intervals.
void SetTargetPerInterval (Double_t target)
 Set the target number of the particles of every type to be reached in every momentum interval of an event.
Bool_t SetEfficiencyCorrection (Bool_t is_used, Double_t min_efficiency=0.05)
 Switch on the correction of the number of the added particles by the reconstruction efficiency (off by default).
void SetSampleStatisticsCut (Bool_t is_used)
 Switch the filtering of the event particles by the sample statistics on or off (on by default).
 BmnParticleEqualizer1D (TString hist_file_name)
 Constructor with input histograms.
 BmnParticleEqualizer1D (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)
 Constructor with given PDG codes for particles to be equalized.
virtual ~BmnParticleEqualizer1D ()
 Destructor.
Bool_t Init ()
 Initializer.
virtual Bool_t ReadEvent (FairPrimaryGenerator *primGen)
 Creates an event with equal number of particles at all momentum intervals.
void SetTargetPerInterval (Double_t target)
 Set the target number of the particles of every type to be reached in every momentum interval of an event.
Bool_t SetEfficiencyCorrection (Bool_t is_used, Double_t min_efficiency=0.05)
 Switch on the correction of the number of the added particles by the reconstruction efficiency (off by default).
void SetSampleStatisticsCut (Bool_t is_used)
 Switch the filtering of the event particles by the sample statistics on or off (on by default).

Static Public Member Functions

static void SetSampleTrackCut (Int_t track_cut)
 Set the cut applied to the tracks of the sample while producing the sample histograms (and while drawing the resulting distributions by ShowResultDistributions): 0 - all the primary particles are taken, 1 - the tracks without points in Silicon and GEM detectors are excluded, 2 (default) - the tracks without points in Silicon, GEM and ToF detectors are excluded.
static int ProduceEfficiencyMap (TString input_list_file, TString histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
static int ProduceSampleHistograms (TString input_list_file, TString output_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 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 FitYHistogram (unique_ptr< TH1D > &hY, int pdg_key, Double_t &y0_output, Double_t &sigma_putput)
static int FitEtaHistogram (unique_ptr< TH1D > &hEta, int pdg_key, Double_t eta_min, Double_t eta_max)
static void FitSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
 additional functions to check results of fitting and particle equalizing
static int ShowSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
static int ShowResultDistributions (TString input_list_file)
static void SetSampleTrackCut (Int_t track_cut)
 Set the cut applied to the tracks of the sample while producing the sample histograms (and while drawing the resulting distributions by ShowResultDistributions): 0 - all the primary particles are taken, 1 - the tracks without points in Silicon and GEM detectors are excluded, 2 (default) - the tracks without points in Silicon, GEM and ToF detectors are excluded.
static int ProduceEfficiencyMap (TString input_list_file, TString histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
static int ProduceSampleHistograms (TString input_list_file, TString output_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 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 FitYHistogram (unique_ptr< TH1D > &hY, int pdg_key, Double_t &y0_output, Double_t &sigma_putput)
static int FitEtaHistogram (unique_ptr< TH1D > &hEta, int pdg_key, Double_t eta_min, Double_t eta_max)
static void FitSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
 additional functions to check results of fitting and particle equalizing
static int ShowSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
static int ShowResultDistributions (TString input_list_file)

Private Member Functions

Bool_t ReadSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")
Bool_t ReadSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root")

Static Private Member Functions

static Bool_t CheckMomentumGrid (TFile *hist_file)
static void DefineNearestFilledIntervals (const vector< unique_ptr< TH1D > > &hist_vector, vector< Int_t > &index_vector)
static Int_t GetPDGCodeByMass (Double_t mass, Double_t tolerance=1.e-6, const vector< int > &vecParticlePDG={})
static Int_t GetGlobalTrackPDG (BmnGlobalTrack *global_track, BmnTrackMatch *global_match, TClonesArray *mc_tracks, Double_t &tof_mass)
static Bool_t CheckMomentumGrid (TFile *hist_file)
static void DefineNearestFilledIntervals (const vector< unique_ptr< TH1D > > &hist_vector, vector< Int_t > &index_vector)
static Int_t GetPDGCodeByMass (Double_t mass, Double_t tolerance=1.e-6, const vector< int > &vecParticlePDG={})
static Int_t GetGlobalTrackPDG (BmnGlobalTrack *global_track, BmnTrackMatch *global_match, TClonesArray *mc_tracks, Double_t &tof_mass)

Private Attributes

Double_t fTargetPerInterval
Bool_t fUseEfficiencyCorrection
 Target particle number per interval, 0 = maximum of the event (see the setter).
Double_t fMinEfficiency
 Whether the added particle number is corrected by the efficiency.
Bool_t fIsEfficiencyMapRead
 Lower limit of the efficiency used for the correction.
Bool_t fUseSampleStatisticsCut
 Whether the efficiency map has been found in the sample histogram file.
Double_t fIntervalStep
Bool_t isActive
 Interval step.
map< Int_t, unique_ptr< stParticleInfo > > fParticleInfos
vector< int > fMaxParticles

Static Private Attributes

static Int_t fSampleTrackCut = 2
 Cut applied to the tracks of the sample (see SetSampleTrackCut).
static Double_t fPMin = 0.4
 Min value of momentum.
static Double_t fPMax = 5.4
 Max value of momentum.
static Int_t fIntervalCount = 25
 Interval count for momentum to equalize particles at all the intervals.
static vector< Int_t > fParticles

Detailed Description

Definition at line 45 of file BmnParticleEqualizer1D.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

TObject keeps the bits 0-13 of fBits for itself, so 14 is the first one free for the user. CbmMCTrack copies these bits from TParticle, so the mark reaches the reconstructed (DST) data and the added particles can be told there from the ones of the physics generators: mc_track->TestBit(kAddedParticleBit)

Enumerator
kAddedParticleBit BIT(14) 

Definition at line 126 of file BmnParticleEqualizer1D.h.

◆ anonymous enum

anonymous enum

TObject keeps the bits 0-13 of fBits for itself, so 14 is the first one free for the user. CbmMCTrack copies these bits from TParticle, so the mark reaches the reconstructed (DST) data and the added particles can be told there from the ones of the physics generators: mc_track->TestBit(kAddedParticleBit)

Enumerator
kAddedParticleBit BIT(14) 

Definition at line 126 of file BmnParticleEqualizer1D.h.

Constructor & Destructor Documentation

◆ BmnParticleEqualizer1D() [1/4]

BmnParticleEqualizer1D::BmnParticleEqualizer1D ( TString hist_file_name)

Definition at line 92 of file BmnParticleEqualizer1D.cxx.

References fIntervalCount, fIntervalStep, fIsEfficiencyMapRead, fMaxParticles, fMinEfficiency, fParticleInfos, fParticles, fPMax, fPMin, fTargetPerInterval, fUseEfficiencyCorrection, fUseSampleStatisticsCut, isActive, and ReadSampleHistograms().

Referenced by GetGlobalTrackPDG().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BmnParticleEqualizer1D() [2/4]

BmnParticleEqualizer1D::BmnParticleEqualizer1D ( 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 )
Parameters
pdg_codesParticles to be equalized (PDG codes)
min_pMin value of momentum value
max_pMax value of momentum value
intervalsInterval count for momentum values to equalize particles at all the intervals independently

Definition at line 116 of file BmnParticleEqualizer1D.cxx.

References fIntervalCount, fIntervalStep, fIsEfficiencyMapRead, fMaxParticles, fMinEfficiency, fParticleInfos, fParticles, fPMax, fPMin, fTargetPerInterval, fUseEfficiencyCorrection, fUseSampleStatisticsCut, isActive, and ReadSampleHistograms().

Here is the call graph for this function:

◆ ~BmnParticleEqualizer1D() [1/2]

virtual BmnParticleEqualizer1D::~BmnParticleEqualizer1D ( )
inlinevirtual

Definition at line 63 of file BmnParticleEqualizer1D.h.

◆ BmnParticleEqualizer1D() [3/4]

BmnParticleEqualizer1D::BmnParticleEqualizer1D ( TString hist_file_name)

◆ BmnParticleEqualizer1D() [4/4]

BmnParticleEqualizer1D::BmnParticleEqualizer1D ( 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 )
Parameters
pdg_codesParticles to be equalized (PDG codes)
min_pMin value of momentum value
max_pMax value of momentum value
intervalsInterval count for momentum values to equalize particles at all the intervals independently

◆ ~BmnParticleEqualizer1D() [2/2]

virtual BmnParticleEqualizer1D::~BmnParticleEqualizer1D ( )
inlinevirtual

Definition at line 63 of file BmnParticleEqualizer1D.h.

Member Function Documentation

◆ CheckMomentumGrid() [1/2]

Bool_t BmnParticleEqualizer1D::CheckMomentumGrid ( TFile * hist_file)
staticprivate

Definition at line 695 of file BmnParticleEqualizer1D.cxx.

References TMath::AreEqualAbs(), fIntervalCount, TString::Format(), fPMax, fPMin, TDirectoryFile::Get(), TNamed::GetName(), TFile::IsOpen(), kMomentumGridName, kMomentumGridSize, and TMath::Nint().

Referenced by ProduceEfficiencyMap(), and ReadSampleHistograms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckMomentumGrid() [2/2]

Bool_t BmnParticleEqualizer1D::CheckMomentumGrid ( TFile * hist_file)
staticprivate

◆ DefineNearestFilledIntervals() [1/2]

void BmnParticleEqualizer1D::DefineNearestFilledIntervals ( const vector< unique_ptr< TH1D > > & hist_vector,
vector< Int_t > & index_vector )
staticprivate

Definition at line 1314 of file BmnParticleEqualizer1D.cxx.

Referenced by ReadSampleHistograms().

Here is the caller graph for this function:

◆ DefineNearestFilledIntervals() [2/2]

void BmnParticleEqualizer1D::DefineNearestFilledIntervals ( const vector< unique_ptr< TH1D > > & hist_vector,
vector< Int_t > & index_vector )
staticprivate

◆ FitEtaHistogram() [1/2]

int BmnParticleEqualizer1D::FitEtaHistogram ( unique_ptr< TH1D > & hEta,
int pdg_key,
Double_t eta_min,
Double_t eta_max )
static

Definition at line 369 of file BmnParticleEqualizer1D.cxx.

References TString::Format(), ROOT::Fit::FitResult::IsValid(), TF1::SetParameter(), and TF1::SetParLimits().

Here is the call graph for this function:

◆ FitEtaHistogram() [2/2]

int BmnParticleEqualizer1D::FitEtaHistogram ( unique_ptr< TH1D > & hEta,
int pdg_key,
Double_t eta_min,
Double_t eta_max )
static

◆ FitPHistogram() [1/2]

int BmnParticleEqualizer1D::FitPHistogram ( unique_ptr< TH1D > & hP,
int pdg_key,
Double_t p_min,
Double_t p_max )
static

Definition at line 255 of file BmnParticleEqualizer1D.cxx.

References FitMomentumFunction(), and TString::Format().

Referenced by ProduceSampleHistograms(), and ReadSampleHistograms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FitPHistogram() [2/2]

int BmnParticleEqualizer1D::FitPHistogram ( unique_ptr< TH1D > & hP,
int pdg_key,
Double_t p_min,
Double_t p_max )
static

◆ FitPtHistogram() [1/2]

int BmnParticleEqualizer1D::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

Definition at line 272 of file BmnParticleEqualizer1D.cxx.

References TString::Format(), ROOT::Fit::FitResult::IsValid(), ROOT::Fit::FitResult::Parameter(), TF1::SetParameter(), and TF1::SetParLimits().

Referenced by ProduceSampleHistograms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FitPtHistogram() [2/2]

int BmnParticleEqualizer1D::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

◆ FitSampleHistograms() [1/2]

void BmnParticleEqualizer1D::FitSampleHistograms ( TString input_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root")
static

Definition at line 1342 of file BmnParticleEqualizer1D.cxx.

References TH1::Draw(), f, FitMomentumFunction(), TString::Format(), fParticles, fPMax, fPMin, TAxis::GetBinCenter(), TH1::GetBinContent(), TH1::GetFunction(), TH1::GetMaximumBin(), TH1::GetXaxis(), TF1::kNotDraw, TFile::Open(), and TObject::ResetBit().

Here is the call graph for this function:

◆ FitSampleHistograms() [2/2]

void BmnParticleEqualizer1D::FitSampleHistograms ( TString input_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root")
static

◆ FitYHistogram() [1/2]

int BmnParticleEqualizer1D::FitYHistogram ( unique_ptr< TH1D > & hY,
int pdg_key,
Double_t & y0_output,
Double_t & sigma_putput )
static

Definition at line 308 of file BmnParticleEqualizer1D.cxx.

References ROOT::Math::MinimizerOptions::DefaultMinimizerType(), TString::Format(), ROOT::Fit::FitResult::Index(), ROOT::Fit::FitResult::Parameter(), and ROOT::Math::MinimizerOptions::SetDefaultMinimizer().

Referenced by ProduceSampleHistograms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FitYHistogram() [2/2]

int BmnParticleEqualizer1D::FitYHistogram ( unique_ptr< TH1D > & hY,
int pdg_key,
Double_t & y0_output,
Double_t & sigma_putput )
static

◆ GetGlobalTrackPDG() [1/2]

Int_t BmnParticleEqualizer1D::GetGlobalTrackPDG ( BmnGlobalTrack * global_track,
BmnTrackMatch * global_match,
TClonesArray * mc_tracks,
Double_t & tof_mass )
staticprivate

Definition at line 1441 of file BmnParticleEqualizer1D.cxx.

References TParticlePDG::Charge(), fParticles, TObjArray::GetEntriesFast(), BmnLink::GetIndex(), BmnGlobalTrack::GetMass2(), BmnMatch::GetMatchedLink(), BmnMatch::GetNofLinks(), BmnTrack::GetParamFirst(), TDatabasePDG::GetParticle(), CbmMCTrack::GetPdgCode(), GetPDGCodeByMass(), BmnGlobalTrack::GetRefIndex(), TDatabasePDG::Instance(), TMath::Sqrt(), and TObjArray::UncheckedAt().

Referenced by ProduceEfficiencyMap(), and ShowResultDistributions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetGlobalTrackPDG() [2/2]

Int_t BmnParticleEqualizer1D::GetGlobalTrackPDG ( BmnGlobalTrack * global_track,
BmnTrackMatch * global_match,
TClonesArray * mc_tracks,
Double_t & tof_mass )
staticprivate

References BmnParticleEqualizer1D().

Here is the call graph for this function:

◆ GetPDGCodeByMass() [1/2]

Int_t BmnParticleEqualizer1D::GetPDGCodeByMass ( Double_t mass,
Double_t tolerance = 1.e-6,
const vector< int > & vecParticlePDG = {} )
staticprivate

Definition at line 1410 of file BmnParticleEqualizer1D.cxx.

References TMath::Abs(), TDatabasePDG::GetParticle(), TDatabasePDG::Instance(), TParticlePDG::Mass(), TDatabasePDG::ParticleList(), and TParticlePDG::PdgCode().

Referenced by GetGlobalTrackPDG().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPDGCodeByMass() [2/2]

Int_t BmnParticleEqualizer1D::GetPDGCodeByMass ( Double_t mass,
Double_t tolerance = 1.e-6,
const vector< int > & vecParticlePDG = {} )
staticprivate

◆ Init() [1/2]

Bool_t BmnParticleEqualizer1D::Init ( )

Definition at line 162 of file BmnParticleEqualizer1D.cxx.

◆ Init() [2/2]

Bool_t BmnParticleEqualizer1D::Init ( )

◆ ProduceEfficiencyMap() [1/2]

int BmnParticleEqualizer1D::ProduceEfficiencyMap ( TString input_list_file,
TString histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root" )
static

◆ ProduceEfficiencyMap() [2/2]

int BmnParticleEqualizer1D::ProduceEfficiencyMap ( TString input_list_file,
TString histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root" )
static

◆ ProduceSampleHistograms() [1/2]

◆ ProduceSampleHistograms() [2/2]

int BmnParticleEqualizer1D::ProduceSampleHistograms ( TString input_list_file,
TString output_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root" )
static

◆ ReadEvent() [1/2]

◆ ReadEvent() [2/2]

virtual Bool_t BmnParticleEqualizer1D::ReadEvent ( FairPrimaryGenerator * primGen)
virtual
Parameters
primGenpointer to the FairPrimaryGenerator

◆ ReadSampleHistograms() [1/2]

Bool_t BmnParticleEqualizer1D::ReadSampleHistograms ( TString input_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root")
private

Definition at line 883 of file BmnParticleEqualizer1D.cxx.

References CheckMomentumGrid(), TFile::Close(), DefineNearestFilledIntervals(), efficiency(), fIntervalCount, fIntervalStep, fIsEfficiencyMapRead, FitPHistogram(), TString::Format(), fParticleInfos, fParticles, fPMax, fPMin, TDirectoryFile::Get(), TF1::GetMaximum(), TF1::GetNpx(), TDatabasePDG::Instance(), TObject::IsZombie(), kEfficiencyNamePrefix, BmnParticleEqualizer1D::stParticleInfo::kFitFunction, BmnParticleEqualizer1D::stParticleInfo::kIntervalHist, BmnParticleEqualizer1D::stParticleInfo::kNone, TMath::Max(), TFile::Open(), and TF1::SetNpx().

Referenced by BmnParticleEqualizer1D(), and BmnParticleEqualizer1D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSampleHistograms() [2/2]

Bool_t BmnParticleEqualizer1D::ReadSampleHistograms ( TString input_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root")
private

◆ SetEfficiencyCorrection() [1/2]

Bool_t BmnParticleEqualizer1D::SetEfficiencyCorrection ( Bool_t is_used,
Double_t min_efficiency = 0.05 )

The efficiency map has to be present in the file with the sample histograms, see ProduceEfficiencyMap. When it is on, the number of the particles added to an interval is divided by the relative efficiency of that interval, compensating for the added particles lost at the reconstruction. 'min_efficiency' limits the resulting factor: the intervals with a lower efficiency are corrected as if it were equal to it

Definition at line 675 of file BmnParticleEqualizer1D.cxx.

References fIsEfficiencyMapRead, fMinEfficiency, and fUseEfficiencyCorrection.

◆ SetEfficiencyCorrection() [2/2]

Bool_t BmnParticleEqualizer1D::SetEfficiencyCorrection ( Bool_t is_used,
Double_t min_efficiency = 0.05 )

The efficiency map has to be present in the file with the sample histograms, see ProduceEfficiencyMap. When it is on, the number of the particles added to an interval is divided by the relative efficiency of that interval, compensating for the added particles lost at the reconstruction. 'min_efficiency' limits the resulting factor: the intervals with a lower efficiency are corrected as if it were equal to it

◆ SetSampleStatisticsCut() [1/2]

void BmnParticleEqualizer1D::SetSampleStatisticsCut ( Bool_t is_used)
inline

When it is on, the particles of the event lying in the phase space regions where the sample histograms are empty are not counted: the generator cannot add such particles back, so counting them would leave the numbers unequalized

Definition at line 158 of file BmnParticleEqualizer1D.h.

References fUseSampleStatisticsCut.

◆ SetSampleStatisticsCut() [2/2]

void BmnParticleEqualizer1D::SetSampleStatisticsCut ( Bool_t is_used)
inline

When it is on, the particles of the event lying in the phase space regions where the sample histograms are empty are not counted: the generator cannot add such particles back, so counting them would leave the numbers unequalized

Definition at line 158 of file BmnParticleEqualizer1D.h.

References fUseSampleStatisticsCut.

◆ SetSampleTrackCut() [1/2]

void BmnParticleEqualizer1D::SetSampleTrackCut ( Int_t track_cut)
inlinestatic

It defines the acceptance the sample histograms correspond to, so it has to be set before ProduceSampleHistograms() and cannot be changed for an already produced file. The reconstructed tracks counted by ShowResultDistributions and ProduceEfficiencyMap are selected in the same acceptance: the cut 2 requires a ToF hit matched to the track

Definition at line 154 of file BmnParticleEqualizer1D.h.

References fSampleTrackCut.

◆ SetSampleTrackCut() [2/2]

void BmnParticleEqualizer1D::SetSampleTrackCut ( Int_t track_cut)
inlinestatic

It defines the acceptance the sample histograms correspond to, so it has to be set before ProduceSampleHistograms() and cannot be changed for an already produced file. The reconstructed tracks counted by ShowResultDistributions and ProduceEfficiencyMap are selected in the same acceptance: the cut 2 requires a ToF hit matched to the track

Definition at line 154 of file BmnParticleEqualizer1D.h.

References fSampleTrackCut.

◆ SetTargetPerInterval() [1/2]

void BmnParticleEqualizer1D::SetTargetPerInterval ( Double_t target)
inline

Zero (default) keeps the original behaviour: the target of an interval is the maximum number among the particle types found in that interval of that event, so the numbers are equalized between the types but the momentum spectrum stays the one of the input events. A positive value makes the target the same for all the intervals and all the types, which gives a flat distribution both in the particle type and in the momentum - what is usually needed to train a PID. The value may be fractional (and normally is: it is the number of particles per event per interval, i.e. the wanted sample size divided by the number of events and by the number of intervals), the parts below one particle are accumulated between the events

Definition at line 139 of file BmnParticleEqualizer1D.h.

References fTargetPerInterval.

◆ SetTargetPerInterval() [2/2]

void BmnParticleEqualizer1D::SetTargetPerInterval ( Double_t target)
inline

Zero (default) keeps the original behaviour: the target of an interval is the maximum number among the particle types found in that interval of that event, so the numbers are equalized between the types but the momentum spectrum stays the one of the input events. A positive value makes the target the same for all the intervals and all the types, which gives a flat distribution both in the particle type and in the momentum - what is usually needed to train a PID. The value may be fractional (and normally is: it is the number of particles per event per interval, i.e. the wanted sample size divided by the number of events and by the number of intervals), the parts below one particle are accumulated between the events

Definition at line 139 of file BmnParticleEqualizer1D.h.

References fTargetPerInterval.

◆ ShowResultDistributions() [1/2]

int BmnParticleEqualizer1D::ShowResultDistributions ( TString input_list_file)
static

Definition at line 1499 of file BmnParticleEqualizer1D.cxx.

References TMath::Abs(), TChain::Add(), TLegend::AddEntry(), TObjArray::At(), TMath::ATan(), TMath::ATan2(), TCanvas::cd(), TAxis::CenterTitle(), TString::Data(), TPad::Divide(), TLegend::Draw(), TVirtualPad::Draw(), fEtaMax, fEtaMin, fIntervalCount, TString::Format(), fParticles, fPhiMax, fPhiMin, fPMax, fPMin, fPtMax, fPtMin, fSampleTrackCut, fThetaMax, fThetaMin, fYMax, fYMin, TChain::GetBranch(), TChain::GetEntries(), TObjArray::GetEntries(), TChain::GetEntry(), GetGlobalTrackPDG(), BmnMCInfoDst::GetMCTracks(), CbmMCTrack::GetMotherId(), CbmMCTrack::GetNPoints(), CbmMCTrack::GetP(), BmnTrack::GetParamFirst(), TDatabasePDG::GetParticle(), CbmMCTrack::GetPdgCode(), CbmMCTrack::GetPt(), CbmMCTrack::GetPx(), CbmMCTrack::GetPy(), CbmMCTrack::GetPz(), CbmMCTrack::GetRapidity(), BmnGlobalTrack::GetTof1HitIndex(), BmnGlobalTrack::GetTof2HitIndex(), TH1::GetXaxis(), TH1::GetYaxis(), TDatabasePDG::Instance(), kGEM, kSILICON, kTOF, kTOF1, TH1::LabelsDeflate(), TMath::Log(), TParticlePDG::Mass(), TH1::SetBarOffset(), TH1::SetBarWidth(), TChain::SetBranchAddress(), TAttFill::SetFillColor(), TH1::SetLabelFont(), TAttAxis::SetLabelSize(), TAttMarker::SetMarkerSize(), TAttAxis::SetNdivisions(), TH1::SetStats(), TH1::SetTitle(), TNamed::SetTitle(), TAttAxis::SetTitleSize(), TMath::Sqrt(), TVector3::x(), TVector3::y(), and TVector3::z().

Here is the call graph for this function:

◆ ShowResultDistributions() [2/2]

◆ ShowSampleHistograms() [1/2]

int BmnParticleEqualizer1D::ShowSampleHistograms ( TString input_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root")
static

Definition at line 1377 of file BmnParticleEqualizer1D.cxx.

References TF1::Draw(), TH1::Draw(), f, TString::Format(), fParticles, TH1::GetFunction(), and TFile::Open().

Here is the call graph for this function:

◆ ShowSampleHistograms() [2/2]

int BmnParticleEqualizer1D::ShowSampleHistograms ( TString input_histo_file = "$VMCWORKDIR/macro/recotools/particle_hists.root")
static

Member Data Documentation

◆ fIntervalCount

◆ fIntervalStep

Double_t BmnParticleEqualizer1D::fIntervalStep
private

◆ fIsEfficiencyMapRead

Bool_t BmnParticleEqualizer1D::fIsEfficiencyMapRead
private

◆ fMaxParticles

vector< int > BmnParticleEqualizer1D::fMaxParticles
private

◆ fMinEfficiency

Double_t BmnParticleEqualizer1D::fMinEfficiency
private

◆ fParticleInfos

map< Int_t, unique_ptr< stParticleInfo > > BmnParticleEqualizer1D::fParticleInfos
private

◆ fParticles

◆ fPMax

Double_t BmnParticleEqualizer1D::fPMax = 5.4
staticprivate

◆ fPMin

◆ fSampleTrackCut

Int_t BmnParticleEqualizer1D::fSampleTrackCut = 2
staticprivate

◆ fTargetPerInterval

Double_t BmnParticleEqualizer1D::fTargetPerInterval
private

◆ fUseEfficiencyCorrection

Bool_t BmnParticleEqualizer1D::fUseEfficiencyCorrection
private

◆ fUseSampleStatisticsCut

Bool_t BmnParticleEqualizer1D::fUseSampleStatisticsCut
private

Whether the particles of the event are filtered by the sample statistics (see SetSampleStatisticsCut)

Definition at line 209 of file BmnParticleEqualizer1D.h.

Referenced by BmnParticleEqualizer1D(), BmnParticleEqualizer1D(), ReadEvent(), SetSampleStatisticsCut(), and ShowResultDistributions().

◆ isActive

Bool_t BmnParticleEqualizer1D::isActive
private

The documentation for this class was generated from the following files: