KaliVeda
Toolkit for HIC analysis
KVIDZAFromZGridBatchMassCorrector.h
1 #pragma once
2 #include "KVBase.h"
3 #include "KVIDGridManager.h"
4 #include "KVIDZAFromZGrid.h"
5 
47 {
48  KVIDGridManager reference_grids;
49  KVIDGridManager grids_to_correct;
50  TFile reference_id_maps;
51  bool apply_corrections = false;
52  void RefitReferenceGridToData(const TString& ref_grid_name, const KVNameValueList& mass_fit_params);
53 
54  public:
55  KVIDZAFromZGridBatchMassCorrector(const TString& ref_grids_file,
56  const TString& bad_grids_file,
57  const TString& bad_grids_id_map_file);
58  KVIDZAFromZGridBatchMassCorrector(const TString& ref_grids_file,
59  const TString& ref_id_map_file);
60 
61  void SetApplyCorrections(bool yes=true){ apply_corrections=yes; }
62  void CorrectGrid(const TString& bad_grid_name, std::function<KVString (const KVString&)> deduce_ref_grid_name_from_bad_grid_name,
63  const KVNameValueList& mass_fit_parameters,
64  double min_yield_cutoff = 0.8,
65  std::function<KVString(const KVString&)> deduce_bad_histo_name = [](const KVString& n){ return n; });
66  void CorrectGrid(KVIDZAFromZGrid* bad_grid, std::function<KVString (const KVString&)> deduce_ref_grid_name_from_bad_grid_name,
67  const KVNameValueList& mass_fit_parameters,
68  double min_yield_cutoff = 0.8,
69  std::function<KVString(const KVString&)> deduce_bad_histo_name = [](const KVString& n){ return n; });
70  void CorrectGridToReference(KVIDZAFromZGrid* bad_grid, KVIDZAFromZGrid* ref_grid,
71  const KVNameValueList& mass_fit_parameters,
72  double min_yield_cutoff = 0.8,
73  std::function<KVString(const KVString&)> deduce_bad_histo_name = [](const KVString& n){ return n; });
74  void CorrectGridToReference(const TString& bad_grid_name, const TString& ref_grid_name,
75  const KVNameValueList& mass_fit_parameters,
76  double min_yield_cutoff = 0.8,
77  std::function<KVString(const KVString&)> deduce_bad_histo_name = [](const KVString& n){ return n; });
78  void CorrectGrids(std::function<KVString (const KVString&)> deduce_ref_grid_name_from_bad_grid_name,
79  const KVNameValueList& mass_fit_parameters,
80  double min_yield_cutoff = 0.8,
81  std::function<KVString(const KVString&)> deduce_bad_histo_name = [](const KVString& n){ return n; }
82  );
83 
84  void SaveCorrectedGrids(const TString& filename);
85 
86  void RefitAllReferenceGridsToData(const KVNameValueList& mass_fit_params);
87  void SaveReferenceGrids(const TString& filename);
88 
89  void DrawReferenceFit(const TString& grid_name, Int_t Z) const;
90  void DrawOtherFit(const TString& grid_name, Int_t Z) const;
91 
93  {
94  reference_grids.StartViewer();
95  }
97  {
98  grids_to_correct.StartViewer();
99  }
100 
102 };
103 
int Int_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:140
Handles a stock of identification grids to be used by one or more identification telescopes.
void StartViewer() const
Opens GUI for managing grids.
Modify/refit all multi-gauss fits in all grids in a file.
void CorrectGrids(std::function< KVString(const KVString &)> deduce_ref_grid_name_from_bad_grid_name, const KVNameValueList &mass_fit_parameters, double min_yield_cutoff=0.8, std::function< KVString(const KVString &)> deduce_bad_histo_name=[](const KVString &n){ return n;})
loop over all grids to correct
void CorrectGrid(const TString &bad_grid_name, std::function< KVString(const KVString &)> deduce_ref_grid_name_from_bad_grid_name, const KVNameValueList &mass_fit_parameters, double min_yield_cutoff=0.8, std::function< KVString(const KVString &)> deduce_bad_histo_name=[](const KVString &n){ return n;})
void RefitAllReferenceGridsToData(const KVNameValueList &mass_fit_params)
void DrawReferenceFit(const TString &grid_name, Int_t Z) const
void DrawOtherFit(const TString &grid_name, Int_t Z) const
KVIDZAFromZGridBatchMassCorrector(const TString &ref_grids_file, const TString &bad_grids_file, const TString &bad_grids_id_map_file)
void CorrectGridToReference(KVIDZAFromZGrid *bad_grid, KVIDZAFromZGrid *ref_grid, const KVNameValueList &mass_fit_parameters, double min_yield_cutoff=0.8, std::function< KVString(const KVString &)> deduce_bad_histo_name=[](const KVString &n){ return n;})
determine & apply corrections for grid
Hybrid charge & mass identification grid.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
const Int_t n