This is the analysis class generated by default by KaliVedaGUI for E789 reconstructed data analysis.
#include "ExampleE789ReconAnalysis.h"
#include "KVReconstructedNucleus.h"
#include "KVBatchSystem.h"
#include "KVINDRA.h"
#include "KVFAZIA.h"
void ExampleE789ReconAnalysis::InitAnalysis(void)
{
AddHisto<TH1F>("all_idcodes_fazia", "ID codes in FAZIA", 10, 0, 10);
AddHisto<TH1F>("all_idcodes_indra", "ID codes in INDRA", 10, 0, 10);
AddHisto<TH1F>("all_ecodes_fazia", "E codes in FAZIA", 5, 0, 5);
AddHisto<TH1F>("all_ecodes_indra", "E codes in INDRA", 5, 0, 5);
AddHisto<TH1F>("mtot_ch", "Total charged multiplicity", 50, -.5, 49.5);
add_idcode_histos("mtot_ch");
AddHisto<TH1F>("zdist", "Charge distribution", 50, -.5, 49.5);
add_idcode_histos("zdist");
AddHisto<TH2F>("a_vs_z", "A vs. Z", 35, -.5, 34.5, 65, -.5, 64.5);
add_idcode_histos("a_vs_z");
AddHisto<TH2F>("vper_proton", "Inv. velocity plot (protons) [cm/ns]", 500, 0, 15, 500, -10, 10);
AddHisto<TH2F>("vper_alpha", "Inv. velocity plot (alphas) [cm/ns]", 500, 0, 15, 500, -10, 10);
AddHisto<TH2F>("Z_vpar", "Z vs. parallel velocity [cm/ns]", 500, 0, 15, 35, .5, 35.5);
AddHisto<TH1F>("calibrated_ecodes_fazia", "E codes for calibrated particles in FAZIA", 5, 0, 5);
AddHisto<TH1F>("calibrated_ecodes_indra", "E codes for calibrated particles in INDRA", 5, 0, 5);
SetJobOutputFileName("ExampleE789ReconAnalysis_results.root");
}
void ExampleE789ReconAnalysis::add_idcode_histos(
const TString& histo_name)
{
AddHisto<TH1F>(
Form(
"%s_idcodes_fazia", histo_name.
Data()),
Form(
"%s : ID codes in FAZIA", GetHisto(histo_name)->GetTitle()), 10, 0, 10);
AddHisto<TH1F>(
Form(
"%s_idcodes_indra", histo_name.
Data()),
Form(
"%s : ID codes in INDRA", GetHisto(histo_name)->GetTitle()), 10, 0, 10);
}
void ExampleE789ReconAnalysis::InitRun(void)
{
SetTriggerConditionsForRun(GetCurrentRun()->GetNumber());
}
{
else
Fatal(
"fill_idcode_histos",
"Particle not in INDRA and not in FAZIA!!! array=%s",
}
{
else
Fatal(
"fill_ecode_histos",
"Particle not in INDRA and not in FAZIA!!! array=%s",
}
Bool_t ExampleE789ReconAnalysis::Analysis(
void)
{
int mtot_ch = 0;
fill_idcode_histos("all", rn);
fill_ecode_histos("all", rn);
fill_idcode_histos("mtot_ch", rn);
++mtot_ch;
}
FillHisto(
"zdist", rn.
GetZ());
fill_idcode_histos("zdist", rn);
FillHisto(
"a_vs_z", rn.
GetZ(), rn.
GetA());
fill_idcode_histos("a_vs_z", rn);
}
}
fill_ecode_histos("calibrated", rn);
}
}
}
FillHisto("mtot_ch", mtot_ch);
}
char * Form(const char *fmt,...)
TString GetIDCodeMeaning(Int_t idc) const
TString GetECodeMeaning(Int_t ec) const
TString GetIDCodeMeaning(Int_t idc) const
TString GetECodeMeaning(Int_t ec) const
virtual void AcceptAllECodes()
virtual void AcceptAllIDCodes()
Bool_t IsIsotope(Int_t Z, Int_t A) const
Int_t GetZ() const
Return the number of proton / atomic number.
Double_t GetVperp() const
virtual Bool_t IsZMeasured() const
Bool_t InArray(const TString &) const
Returns kTRUE if particle was detected in array with given name.
virtual Int_t GetECode() const
Bool_t IsCalibrated() const
Bool_t IsIdentified() const
virtual Int_t GetIDCode() const
TString GetArrayName() const
Returns name of array particle was detected in (if known)
virtual Bool_t IsAMeasured() const
Wrapper class for iterating over nuclei in KVReconstructedEvent accessed through base pointer or refe...
const char * Data() const