KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVIsoscaling.h
Go to the documentation of this file.
1 #ifndef __KVISOSCALING_H
2 #define __KVISOSCALING_H
3 
5 #include <vector>
6 #include <utility>
7 
9 #include "KVNumberList.h"
10 #include "KVList.h"
11 #include "KVHashList.h"
12 
14 #include "TMultiGraph.h"
15 
145 class KVIsoscaling : public TObject {
146 public:
147 
149  {
159 
160  ftol_ = 2.5;
161 
162  fdebug_ = kFALSE;
163  }
164 
165  Bool_t ReadYieldsFile(Int_t system, const Char_t* file_path);
166 
167  void TestGaussianApprox(Int_t system1, Int_t system2, Int_t zz, Double_t tol); //use to test the effect of the rms tolerance for the given system combination and charge, return reduced chisquare
168  void BuildLnR21vsNPlots(Int_t system1, Int_t system2);
169 
170  void FitLnR21vsNPlots(Int_t system1, Int_t system2, Option_t* option = "MNVR", Option_t* gooption = "goff");
171 
172  void DrawAlphavsNFits(Int_t system1, Int_t system2);
173  void DrawLnR21vsNFits(Int_t system1, Int_t system2);
174  void BuildAlphaPlot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw = kFALSE);
175  void BuildDeltaZA2Plot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw = kFALSE);
176  void BuildCsymOverTPlot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw = kFALSE);
177  void BuildAlphavsDeltaPlot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw = kFALSE);
179  void SaveResultsROOT(const Char_t* file_name = "./isoscaling_output_file.root");
180  void SaveResultsASCII(const Char_t* file_name = "./isoscaling_output_file.txt");
181 
184  {
185  return int(fvec_sys_.size());
186  }
187  Bool_t GetAMean(Int_t system, Int_t zz, Float_t& meanA, Float_t& meanA_err);
188  Bool_t GetAlpha(Int_t system1, Int_t system2, Int_t zz, Float_t& alpha, Float_t& alpha_err);
189  Bool_t GetDeltaZA2(Int_t system1, Int_t system2, Int_t zz, Float_t& denum, Float_t& denum_err, Bool_t debug);
190  Bool_t GetCsymOverT(Int_t system1, Int_t system2, Int_t zz, Float_t& csymT, Float_t& csymT_err, Bool_t debug);
191  Int_t FindZFromAmean(Int_t system, Int_t aa);
193  {
194  return ftol_;
195  }
196 
198  std::vector<Int_t> GetZVector(Int_t system)
199  {
200  return fvec_sys_z_.at(GetSystemPos(system));
201  }
202  std::vector<Int_t> GetAVector(Int_t system, Int_t zz); //return the vector of A for a given (system, Z) combination
203  std::vector<Float_t> GetYieldVector(Int_t system, Int_t zz); //return the vector of yields for a given (system, Z) combination
204  std::vector<Float_t> GetYieldErrVector(Int_t system, Int_t zz); //return the vector of A for a given (system, Z) combination
205  std::vector<Float_t> GetAMeanVector(Int_t system)
206  {
207  return fvec_sys_z_meanA_.at(GetSystemPos(system));
208  }
209  std::vector<Float_t> GetAMeanErrVector(Int_t system)
210  {
211  return fvec_sys_z_meanerrA_.at(GetSystemPos(system));
212  }
213 
216  {
217  return &fhlist_lnR21N_;
218  }
220  {
221  return &fhlist_fit_;
222  }
224  {
225  return &fhlist_alpha_;
226  }
228  {
229  return &fhlist_delta_;
230  }
232  {
233  return &fhlist_alpha_delta_;
234  }
236  {
237  return &fhlist_csymT_;
238  }
239 
241  {
242  return (KVNumberList*)(flist_z_.At(GetSystemPos(system)));
243  }
244  KVNumberList* GetANumberList(Int_t system, Int_t zz);
245  KVNumberList GetSharedZNumberList(Int_t system1, Int_t system2);
246  KVNumberList GetSharedANumberList(Int_t system1, Int_t system2, Int_t zz);
248  {
249  return &flist_a_;
250  }
251 
253  void PrintYieldsList();
254  void PrintSystemsList();
255 
257  inline void SetVerbose(Bool_t debug)
258  {
259  fdebug_ = debug;
260  }
261 
262  inline void SetRMSTolerance(Double_t tol)
263  {
264  ftol_ = tol;
265  }
266 
267 protected:
270 
271  void BuildGaussianPlots(Int_t system);
272 
274  std::vector<Int_t> fvec_sys_;
275  std::vector< std::vector<Int_t> > fvec_sys_z_;
276  std::vector< std::vector< std::vector<Int_t> > > fvec_sys_z_a_;
277  std::vector< std::vector< std::vector<Float_t> > > fvec_sys_z_yields_;
278  std::vector< std::vector< std::vector<Float_t> > > fvec_sys_z_yields_err_;
279 
281  std::vector< std::vector<Float_t> > fvec_sys_z_meanA_;
282  std::vector< std::vector<Float_t> > fvec_sys_z_meanerrA_;
283 
285  std::vector< std::pair<Int_t, Int_t> > fvec_iso_pairs_;
286 
299 
301  Int_t GetSystemPos(Int_t system); // returns the system position in fvec_sys_
302  Int_t GetZPos(Int_t system, Int_t zz); // returns the position of the charge Z (for the provided system) in the vector
303  Int_t GetAPos(Int_t system, Int_t zz, Int_t aa);
304 
305  std::vector<Int_t> GetAVectorFromPos(Int_t pos_system, Int_t pos_zz); //return the vector of A from (system, zz) positions in corresponding vectors
306  std::vector<Float_t> GetYieldVectorFromPos(Int_t pos_system, Int_t pos_zz); //return the vector of yields from (system, zz) positions in corresponding vectors
307  std::vector<Float_t> GetYieldErrVectorFromPos(Int_t pos_system, Int_t pos_zz); //return the vector of A from (system, zz) positions in corresponding vectors
308 
309  ClassDef(KVIsoscaling, 1) //KVClass
310 };
311 
312 #endif
int Int_t
char Char_t
const Bool_t kFALSE
bool Bool_t
double Double_t
float Float_t
const Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
Extended version of ROOT THashList.
Definition: KVHashList.h:28
Isoscaling class.
Definition: KVIsoscaling.h:145
void DrawAlphavsNFits(Int_t system1, Int_t system2)
void BuildAlphaPlot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw=kFALSE)
KVHashList * GetLnR21vsNGraphList()
— Lists —
Definition: KVIsoscaling.h:215
std::vector< std::vector< Int_t > > fvec_sys_z_
vectors of charge Z (one vector per system)
Definition: KVIsoscaling.h:275
Int_t GetAPos(Int_t system, Int_t zz, Int_t aa)
Bool_t GetAlpha(Int_t system1, Int_t system2, Int_t zz, Float_t &alpha, Float_t &alpha_err)
— Find the corresponding alpha parameter in fit function list —
KVHashList fhlist_alpha_delta_
contains all Alpha vs Delta graphs
Definition: KVIsoscaling.h:297
void DrawLnR21vsNFits(Int_t system1, Int_t system2)
Bool_t ReadYieldsFile(Int_t system, const Char_t *file_path)
std::vector< Float_t > GetAMeanVector(Int_t system)
Definition: KVIsoscaling.h:205
Int_t GetZPos(Int_t system, Int_t zz)
Returns the position of the charge 'ZZ' in the vector corresponding to 'system' in fvec_sys_z_.
std::vector< std::vector< Float_t > > fvec_sys_z_meanA_
— (system, Z, <A(Z)>, <A(Z)>_err) vectors for Isoscaling —
Definition: KVIsoscaling.h:281
void FitLnR21vsNPlots(Int_t system1, Int_t system2, Option_t *option="MNVR", Option_t *gooption="goff")
void BuildGaussianPlots(Int_t system)
void PrintYieldsList()
— Printers —
std::vector< std::vector< std::vector< Float_t > > > fvec_sys_z_yields_err_
vector of yields uncertainties (one vector per (system, Z) combination - same order than fvec_sys_z_a...
Definition: KVIsoscaling.h:278
std::vector< Int_t > GetAVectorFromPos(Int_t pos_system, Int_t pos_zz)
void SetVerbose(Bool_t debug)
— inline methods —
Definition: KVIsoscaling.h:257
std::vector< Float_t > GetYieldErrVectorFromPos(Int_t pos_system, Int_t pos_zz)
KVNumberList fnl_sys_
— Lists —
Definition: KVIsoscaling.h:288
KVHashList fhlist_delta_
contains all Delta vs Z graphs
Definition: KVIsoscaling.h:295
Double_t GetRMSTolerance()
Definition: KVIsoscaling.h:192
Bool_t fdebug_
verbose mode for debugging
Definition: KVIsoscaling.h:268
Double_t ftol_
tolerance for the gaussian approximation (in sigma)
Definition: KVIsoscaling.h:269
std::vector< Float_t > GetYieldVector(Int_t system, Int_t zz)
void SetRMSTolerance(Double_t tol)
Definition: KVIsoscaling.h:262
Int_t FindZFromAmean(Int_t system, Int_t aa)
Returns the charge ZZ associated to the provided mass AA such as <A(ZZ)> == AA.
KVHashList * GetCsymOverTPlots()
Definition: KVIsoscaling.h:235
KVNumberList * GetANumberList(Int_t system, Int_t zz)
KVList flist_a_
contains all lists of masses A (one list of KVNumberList per (system, Z) combination)
Definition: KVIsoscaling.h:290
std::vector< Float_t > GetAMeanErrVector(Int_t system)
Definition: KVIsoscaling.h:209
void PrintSystemsList()
Bool_t GetCsymOverT(Int_t system1, Int_t system2, Int_t zz, Float_t &csymT, Float_t &csymT_err, Bool_t debug)
KVHashList fhlist_lnR21N_all_
contains all graphs of lnR21 vs N (without tolerance applied)
Definition: KVIsoscaling.h:292
void BuildDeltaZA2Plot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw=kFALSE)
KVNumberList GetSharedANumberList(Int_t system1, Int_t system2, Int_t zz)
Returns the number list of all A shared between the 2 systems.
std::vector< Int_t > fvec_sys_
— (system, Z, A, yields, yields_err) vectors for Isoscaling —
Definition: KVIsoscaling.h:274
std::vector< Float_t > GetYieldVectorFromPos(Int_t pos_system, Int_t pos_zz)
KVHashList fhlist_yields_
contains all yield plots vs N
Definition: KVIsoscaling.h:294
KVHashList * GetAlphaPlots()
Definition: KVIsoscaling.h:223
std::vector< std::pair< Int_t, Int_t > > fvec_iso_pairs_
— list of isoscaling systems —
Definition: KVIsoscaling.h:285
KVHashList fhlist_alpha_
contains all Aplha vs Z graphs
Definition: KVIsoscaling.h:296
KVHashList fhlist_fit_
contains all linear fits attempted from lnR21_vs_N graphs
Definition: KVIsoscaling.h:293
void BuildLnR21vsNPlots(Int_t system1, Int_t system2)
KVHashList * GetLnR21vsNFitList()
Definition: KVIsoscaling.h:219
Int_t GetSystemPos(Int_t system)
— Getters —
Bool_t GetDeltaZA2(Int_t system1, Int_t system2, Int_t zz, Float_t &denum, Float_t &denum_err, Bool_t debug)
Return the value of the denumerator (Z/<A1>)**2-(Z/<A2>)**2 for Csym/T estimation.
KVNumberList GetSharedZNumberList(Int_t system1, Int_t system2)
Returns the number list of all Z shared between the 2 systems.
std::vector< Float_t > GetYieldErrVector(Int_t system, Int_t zz)
void TestGaussianApprox(Int_t system1, Int_t system2, Int_t zz, Double_t tol)
void SaveResultsROOT(const Char_t *file_name="./isoscaling_output_file.root")
void BuildAlphavsDeltaPlot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw=kFALSE)
KVList * GetAList()
Definition: KVIsoscaling.h:247
KVNumberList * GetZNumberList(Int_t system)
Definition: KVIsoscaling.h:240
KVHashList fhlist_csymT_
contains all Csym/T vs Z graphs
Definition: KVIsoscaling.h:298
std::vector< std::vector< std::vector< Float_t > > > fvec_sys_z_yields_
vector of yields (one vector per (system, Z) combination - same order than fvec_sys_z_a_)
Definition: KVIsoscaling.h:277
std::vector< std::vector< Float_t > > fvec_sys_z_meanerrA_
vectors of <A(Z)> uncertainties (one vector per system)
Definition: KVIsoscaling.h:282
Bool_t GetAMean(Int_t system, Int_t zz, Float_t &meanA, Float_t &meanA_err)
return the <A(Z)> for the given system
void CreateCsymOverTMultiGraph(TMultiGraph *mgr)
void BuildCsymOverTPlot(Int_t system1, Int_t system2, Int_t mcolor, Int_t mstyle, Bool_t draw=kFALSE)
Int_t GetNSystems()
— Getters —
Definition: KVIsoscaling.h:183
std::vector< Int_t > GetZVector(Int_t system)
— Vectors getters —
Definition: KVIsoscaling.h:198
void SaveResultsASCII(const Char_t *file_name="./isoscaling_output_file.txt")
KVList flist_z_
contains all lists of charges Z (one KVNumberList per system, in system order)
Definition: KVIsoscaling.h:289
std::vector< Int_t > GetAVector(Int_t system, Int_t zz)
std::vector< std::vector< std::vector< Int_t > > > fvec_sys_z_a_
vectors of A(Z) (one vector per (system, Z) combination)
Definition: KVIsoscaling.h:276
KVHashList * GetAlphavsDeltaPlots()
Definition: KVIsoscaling.h:231
KVHashList * GetDeltaZA2Plots()
Definition: KVIsoscaling.h:227
KVHashList fhlist_lnR21N_
contains all graphs of lnR21 vs N (with tolerance applied)
Definition: KVIsoscaling.h:291
Extended TList class which owns its objects by default.
Definition: KVList.h:27
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
virtual void SetOwner(Bool_t enable=kTRUE)
virtual TObject * At(Int_t idx) const