|
BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
|
#include <BmnParticleEqualizer2D.h>
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 | |
| BmnParticleEqualizer2D (TString hist_file_name) | |
| Constructor with input histograms. | |
| BmnParticleEqualizer2D (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 | ~BmnParticleEqualizer2D () |
| 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 | SetSampleStatisticsCutRebin (Int_t factor) |
| Set how much the two dimensional sample histograms are rebinned for the filtering of the event particles by the sample statistics (see SetSampleStatisticsCut). | |
| 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). | |
| BmnParticleEqualizer2D (TString hist_file_name) | |
| Constructor with input histograms. | |
| BmnParticleEqualizer2D (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 | ~BmnParticleEqualizer2D () |
| 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 | SetSampleStatisticsCutRebin (Int_t factor) |
| Set how much the two dimensional sample histograms are rebinned for the filtering of the event particles by the sample statistics (see SetSampleStatisticsCut). | |
| 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 | ProduceAcceptanceMap (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 | ProduceAcceptanceMap (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 | BuildStatisticsCutHistograms () |
| Bool_t | ReadSampleHistograms (TString input_histo_file="$VMCWORKDIR/macro/recotools/particle_hists.root") |
| Bool_t | BuildStatisticsCutHistograms () |
Static Private Member Functions | |
| static Bool_t | CheckMomentumGrid (TFile *hist_file) |
| static Bool_t | GetConditionalRandomY (const TH2D *hist, Double_t x, Double_t &y) |
| 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 Bool_t | GetConditionalRandomY (const TH2D *hist, Double_t x, Double_t &y) |
| 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. | |
| Int_t | fSampleStatisticsCutRebin |
| Lower limit of the efficiency used for the correction. | |
| Bool_t | fIsEfficiencyMapRead |
| Rebin factor of the histograms used to filter the particles of an event. | |
| 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 |
Definition at line 39 of file BmnParticleEqualizer2D.h.
| 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 130 of file BmnParticleEqualizer2D.h.
| 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 130 of file BmnParticleEqualizer2D.h.
| BmnParticleEqualizer2D::BmnParticleEqualizer2D | ( | TString | hist_file_name | ) |
Definition at line 105 of file BmnParticleEqualizer2D.cxx.
References fIntervalCount, fIntervalStep, fIsEfficiencyMapRead, fMaxParticles, fMinEfficiency, fParticleInfos, fParticles, fPMax, fPMin, fSampleStatisticsCutRebin, fTargetPerInterval, fUseEfficiencyCorrection, fUseSampleStatisticsCut, isActive, kSampleStatisticsCutRebin, and ReadSampleHistograms().
Referenced by GetGlobalTrackPDG().
| BmnParticleEqualizer2D::BmnParticleEqualizer2D | ( | 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 ) |
| pdg_codes | Particles to be equalized (PDG codes) |
| min_p | Min value of momentum value |
| max_p | Max value of momentum value |
| intervals | Interval count for momentum values to equalize particles at all the intervals independently |
Definition at line 130 of file BmnParticleEqualizer2D.cxx.
References fIntervalCount, fIntervalStep, fIsEfficiencyMapRead, fMaxParticles, fMinEfficiency, fParticleInfos, fParticles, fPMax, fPMin, fSampleStatisticsCutRebin, fTargetPerInterval, fUseEfficiencyCorrection, fUseSampleStatisticsCut, isActive, kSampleStatisticsCutRebin, and ReadSampleHistograms().
|
inlinevirtual |
Definition at line 57 of file BmnParticleEqualizer2D.h.
| BmnParticleEqualizer2D::BmnParticleEqualizer2D | ( | TString | hist_file_name | ) |
| BmnParticleEqualizer2D::BmnParticleEqualizer2D | ( | 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 ) |
| pdg_codes | Particles to be equalized (PDG codes) |
| min_p | Min value of momentum value |
| max_p | Max value of momentum value |
| intervals | Interval count for momentum values to equalize particles at all the intervals independently |
|
inlinevirtual |
Definition at line 57 of file BmnParticleEqualizer2D.h.
|
private |
Definition at line 777 of file BmnParticleEqualizer2D.cxx.
References fIntervalCount, TString::Format(), fParticleInfos, fParticles, and fSampleStatisticsCutRebin.
Referenced by ReadSampleHistograms(), and SetSampleStatisticsCutRebin().
|
private |
Definition at line 826 of file BmnParticleEqualizer2D.cxx.
References TMath::AreEqualAbs(), fIntervalCount, TString::Format(), fPMax, fPMin, TDirectoryFile::Get(), TNamed::GetName(), TFile::IsOpen(), kMomentumGridName, kMomentumGridSize, and TMath::Nint().
Referenced by ProduceAcceptanceMap(), ProduceEfficiencyMap(), and ReadSampleHistograms().
|
static |
Definition at line 384 of file BmnParticleEqualizer2D.cxx.
References TString::Format(), ROOT::Fit::FitResult::IsValid(), TF1::SetParameter(), and TF1::SetParLimits().
|
static |
|
static |
Definition at line 270 of file BmnParticleEqualizer2D.cxx.
References FitMomentumFunction(), and TString::Format().
Referenced by ProduceSampleHistograms(), and ReadSampleHistograms().
|
static |
|
static |
Definition at line 287 of file BmnParticleEqualizer2D.cxx.
References TString::Format(), ROOT::Fit::FitResult::IsValid(), ROOT::Fit::FitResult::Parameter(), TF1::SetParameter(), and TF1::SetParLimits().
Referenced by ProduceSampleHistograms().
|
static |
|
static |
Definition at line 1651 of file BmnParticleEqualizer2D.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().
|
static |
|
static |
Definition at line 323 of file BmnParticleEqualizer2D.cxx.
References ROOT::Math::MinimizerOptions::DefaultMinimizerType(), TString::Format(), ROOT::Fit::FitResult::Index(), ROOT::Fit::FitResult::Parameter(), and ROOT::Math::MinimizerOptions::SetDefaultMinimizer().
Referenced by ProduceSampleHistograms().
|
static |
|
staticprivate |
Definition at line 1607 of file BmnParticleEqualizer2D.cxx.
References TAxis::FindBin(), TH2::GetBinContent(), TAxis::GetBinLowEdge(), TAxis::GetBinUpEdge(), TAxis::GetBinWidth(), TH1::GetNbinsX(), TH1::GetNbinsY(), TH1::GetXaxis(), TH1::GetYaxis(), TMath::Max(), TMath::Min(), x, and y.
Referenced by ReadEvent().
|
staticprivate |
Definition at line 1750 of file BmnParticleEqualizer2D.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().
|
staticprivate |
|
staticprivate |
Definition at line 1719 of file BmnParticleEqualizer2D.cxx.
References TMath::Abs(), TDatabasePDG::GetParticle(), TDatabasePDG::Instance(), TParticlePDG::Mass(), TDatabasePDG::ParticleList(), and TParticlePDG::PdgCode().
Referenced by GetGlobalTrackPDG().
|
staticprivate |
| Bool_t BmnParticleEqualizer2D::Init | ( | ) |
Definition at line 177 of file BmnParticleEqualizer2D.cxx.
| Bool_t BmnParticleEqualizer2D::Init | ( | ) |
|
static |
Definition at line 859 of file BmnParticleEqualizer2D.cxx.
References TChain::AddFile(), TMath::ATan2(), CheckMomentumGrid(), TString::Data(), fEtaMax, fEtaMin, fIntervalCount, TString::Format(), fParticles, fPhiMax, fPhiMin, fPMax, fPMin, fSampleTrackCut, TChain::GetBranch(), TChain::GetEntries(), TObjArray::GetEntriesFast(), TChain::GetEntry(), BmnMCInfoDst::GetMCTracks(), CbmMCTrack::GetMotherId(), CbmMCTrack::GetNPoints(), CbmMCTrack::GetP(), CbmMCTrack::GetPdgCode(), CbmMCTrack::GetPx(), CbmMCTrack::GetPy(), CbmMCTrack::GetPz(), kAcceptanceCutName, kEtaBinCount, kEtaPhiPhiBinCount, kGEM, kSILICON, kTOF, kTOF1, TMath::Log(), TFile::Open(), TChain::SetBranchAddress(), TChain::SetBranchStatus(), and TObjArray::UncheckedAt().
|
static |
|
static |
Definition at line 996 of file BmnParticleEqualizer2D.cxx.
References TMath::Abs(), TChain::AddFile(), CheckMomentumGrid(), TString::Data(), efficiency(), fIntervalCount, TString::Format(), fParticles, fPMax, fPMin, fSampleTrackCut, TChain::GetBranch(), TChain::GetEntries(), TObjArray::GetEntries(), TObjArray::GetEntriesFast(), TChain::GetEntry(), GetGlobalTrackPDG(), BmnMCInfoDst::GetMCTracks(), BmnTrack::GetParamFirst(), BmnGlobalTrack::GetTof1HitIndex(), BmnGlobalTrack::GetTof2HitIndex(), kEfficiencyNamePrefix, TMath::Max(), TFile::Open(), TChain::SetBranchAddress(), and TObjArray::UncheckedAt().
|
static |
|
static |
Definition at line 412 of file BmnParticleEqualizer2D.cxx.
References TMath::ACos(), TChain::AddFile(), TObjArray::At(), TMath::ATan2(), TString::Data(), fEtaMax, fEtaMin, fIntervalCount, FitPHistogram(), FitPtHistogram(), FitYHistogram(), TString::Format(), fParticles, fPhiMax, fPhiMin, fPMax, fPMin, fPtMax, fPtMin, fSampleTrackCut, fThetaMax, fThetaMin, fYMax, fYMin, TChain::GetBranch(), TChain::GetEntries(), TObjArray::GetEntries(), TChain::GetEntry(), BmnMCInfoDst::GetMCTracks(), CbmMCTrack::GetMotherId(), CbmMCTrack::GetNPoints(), CbmMCTrack::GetP(), TDatabasePDG::GetParticle(), CbmMCTrack::GetPdgCode(), CbmMCTrack::GetPt(), CbmMCTrack::GetPx(), CbmMCTrack::GetPy(), CbmMCTrack::GetPz(), CbmMCTrack::GetRapidity(), i, TDatabasePDG::Instance(), kEtaBinCount, kEtaPhiPhiBinCount, kGEM, kMomentumGridName, kMomentumGridSize, kPEtaPBinCount, kSILICON, kTOF, kTOF1, TMath::Log(), TParticlePDG::Mass(), TFile::Open(), TChain::SetBranchAddress(), and TChain::SetBranchStatus().
|
static |
|
virtual |
| primGen | pointer to the FairPrimaryGenerator |
CLEARING
FORM EVENT DISTRIBUTION FOR GENERATION PARTICLES TO EQUALIZE THEIR NUMBERS
Definition at line 1388 of file BmnParticleEqualizer2D.cxx.
References TObjArray::At(), TMath::ATan2(), TMath::Cos(), TMath::CosH(), TParticle::Eta(), TH1::FindBin(), TMath::Finite(), fIntervalCount, fIntervalStep, TMath::Floor(), fMaxParticles, fMinEfficiency, TString::Format(), fParticleInfos, fParticles, fPMax, fPMin, fTargetPerInterval, fUseEfficiencyCorrection, fUseSampleStatisticsCut, TH2::GetBinContent(), GetConditionalRandomY(), TObjArray::GetEntries(), TObjArray::GetEntriesFast(), CbmStack::GetListOfParticles(), TParticle::GetPdgCode(), TF1::GetRandom(), i, isActive, TParticle::IsPrimary(), kAddedParticleBit, BmnParticleEqualizer2D::stParticleInfo::kIntervalHist, BmnParticleEqualizer2D::stParticleInfo::kNone, TObjArray::Last(), TMath::Max(), TParticle::P(), TParticle::Px(), TParticle::Py(), TVector3::RotateUz(), TObject::SetBit(), TVector3::SetXYZ(), TMath::Sin(), TMath::SinH(), TMath::Tan(), TVector3::Unit(), TVector3::X(), TVector3::Y(), and TVector3::Z().
|
virtual |
| primGen | pointer to the FairPrimaryGenerator |
|
private |
Definition at line 1153 of file BmnParticleEqualizer2D.cxx.
References BuildStatisticsCutHistograms(), CheckMomentumGrid(), TFile::Close(), efficiency(), fIntervalCount, fIntervalStep, fIsEfficiencyMapRead, FitPHistogram(), TString::Format(), fParticleInfos, fParticles, fPMax, fPMin, TDirectoryFile::Get(), TF1::GetMaximum(), TF1::GetNpx(), TDatabasePDG::Instance(), TObject::IsZombie(), kEfficiencyNamePrefix, BmnParticleEqualizer2D::stParticleInfo::kFitFunction, BmnParticleEqualizer2D::stParticleInfo::kIntervalHist, BmnParticleEqualizer2D::stParticleInfo::kNone, TMath::Max(), TFile::Open(), and TF1::SetNpx().
Referenced by BmnParticleEqualizer2D(), and BmnParticleEqualizer2D().
|
private |
| Bool_t BmnParticleEqualizer2D::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 736 of file BmnParticleEqualizer2D.cxx.
References fIsEfficiencyMapRead, fMinEfficiency, and fUseEfficiencyCorrection.
| Bool_t BmnParticleEqualizer2D::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
|
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 171 of file BmnParticleEqualizer2D.h.
References fUseSampleStatisticsCut.
|
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 171 of file BmnParticleEqualizer2D.h.
References fUseSampleStatisticsCut.
The filtering asks whether the sample has at least one entry in the cell a particle of the event falls into, so with the fine binning needed for a good sampling it becomes the more severe the smaller the sample is: measured on a sample of 100 tracks per momentum interval it discards about a half of the particles. The rebinned copies decouple the granularity of the filtering from the one of the sampling: the particles are still sampled from the full histograms, only the filtering uses the coarse ones. The factor has to divide the number of the bins of both axes; 1 makes the filtering use the full binning. Returns kFALSE (and keeps the previous value) if the factor cannot be applied
Definition at line 756 of file BmnParticleEqualizer2D.cxx.
References BuildStatisticsCutHistograms(), and fSampleStatisticsCutRebin.
The filtering asks whether the sample has at least one entry in the cell a particle of the event falls into, so with the fine binning needed for a good sampling it becomes the more severe the smaller the sample is: measured on a sample of 100 tracks per momentum interval it discards about a half of the particles. The rebinned copies decouple the granularity of the filtering from the one of the sampling: the particles are still sampled from the full histograms, only the filtering uses the coarse ones. The factor has to divide the number of the bins of both axes; 1 makes the filtering use the full binning. Returns kFALSE (and keeps the previous value) if the factor cannot be applied
|
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 167 of file BmnParticleEqualizer2D.h.
References fSampleTrackCut.
|
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 167 of file BmnParticleEqualizer2D.h.
References fSampleTrackCut.
|
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 143 of file BmnParticleEqualizer2D.h.
References fTargetPerInterval.
|
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 143 of file BmnParticleEqualizer2D.h.
References fTargetPerInterval.
|
static |
Definition at line 1808 of file BmnParticleEqualizer2D.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().
|
static |
|
static |
Definition at line 1686 of file BmnParticleEqualizer2D.cxx.
References TF1::Draw(), TH1::Draw(), f, TString::Format(), fParticles, TH1::GetFunction(), and TFile::Open().
|
static |
|
staticprivate |
Definition at line 238 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), BuildStatisticsCutHistograms(), CheckMomentumGrid(), ProduceAcceptanceMap(), ProduceEfficiencyMap(), ProduceSampleHistograms(), ReadEvent(), ReadSampleHistograms(), and ShowResultDistributions().
|
private |
Definition at line 239 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), ReadSampleHistograms(), and ShowResultDistributions().
|
private |
Definition at line 232 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadSampleHistograms(), SetEfficiencyCorrection(), and ShowResultDistributions().
|
private |
Definition at line 249 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), and ShowResultDistributions().
|
private |
Definition at line 230 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), SetEfficiencyCorrection(), and ShowResultDistributions().
|
private |
Definition at line 247 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), BuildStatisticsCutHistograms(), ReadEvent(), ReadSampleHistograms(), and ShowResultDistributions().
|
staticprivate |
Definition at line 245 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), BuildStatisticsCutHistograms(), FitSampleHistograms(), GetGlobalTrackPDG(), ProduceAcceptanceMap(), ProduceEfficiencyMap(), ProduceSampleHistograms(), ReadEvent(), ReadSampleHistograms(), ShowResultDistributions(), and ShowSampleHistograms().
|
staticprivate |
Interval count for momentum to equalize particles at all the intervals
Definition at line 237 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), CheckMomentumGrid(), FitSampleHistograms(), ProduceAcceptanceMap(), ProduceEfficiencyMap(), ProduceSampleHistograms(), ReadEvent(), ReadSampleHistograms(), and ShowResultDistributions().
|
staticprivate |
Definition at line 236 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), CheckMomentumGrid(), FitSampleHistograms(), ProduceAcceptanceMap(), ProduceEfficiencyMap(), ProduceSampleHistograms(), ReadEvent(), ReadSampleHistograms(), and ShowResultDistributions().
|
private |
Definition at line 231 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), BuildStatisticsCutHistograms(), SetSampleStatisticsCutRebin(), and ShowResultDistributions().
|
staticprivate |
Definition at line 227 of file BmnParticleEqualizer2D.h.
Referenced by ProduceAcceptanceMap(), ProduceEfficiencyMap(), ProduceSampleHistograms(), SetSampleTrackCut(), and ShowResultDistributions().
|
private |
Definition at line 228 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), SetTargetPerInterval(), and ShowResultDistributions().
|
private |
Definition at line 229 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), SetEfficiencyCorrection(), and ShowResultDistributions().
|
private |
Whether the particles of the event are filtered by the sample statistics (see SetSampleStatisticsCut)
Definition at line 234 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), SetSampleStatisticsCut(), and ShowResultDistributions().
|
private |
Definition at line 243 of file BmnParticleEqualizer2D.h.
Referenced by BmnParticleEqualizer2D(), BmnParticleEqualizer2D(), ReadEvent(), and ShowResultDistributions().