DRAGON Analyzer
|
Class to handle calculation of beam normalization. More...
#include <RootAnalysis.hxx>
Classes | |
struct | RunData |
Summarizes relevant normalization data for a run. More... | |
Public Member Functions | |
BeamNorm () | |
Default constructor. | |
BeamNorm (const char *name, const char *rossumFile) | |
Construct from rossum file. | |
void | ChangeRossumFile (const char *name) |
Switch to a new rossum file. | |
RossumData * | GetRossumFile () const |
Get a pointer to the rossum file. | |
void | BatchCalculate (TChain *chain, Int_t chargeBeam, Double_t pkLow0, Double_t pkHigh0, Double_t pkLow1, Double_t pkHigh1, const char *recoilGate=0, Double_t time=120, Double_t skipBegin=10, Double_t skipEnd=5) |
Batch calculate over a chain of files. | |
void | BatchCalculate (TChain *chain, Int_t chargeBeam, Double_t pkLow0, Double_t pkHigh0, Double_t pkLow1, Double_t pkHigh1, const TCut &recoilGate, Double_t time=120, Double_t skipBegin=10, Double_t skipEnd=5) |
BatchCalculate overloaded with non-null recoil gate. | |
void | CalculateRecoils (TFile *datafile, const char *tree, const char *gate) |
Calculate the number of recoils per run. | |
Int_t | ReadSbCounts (TFile *datafile, Double_t pkLow0, Double_t pkHigh0, Double_t pkLow1, Double_t pkHigh1, Double_t time=120.) |
void | ReadFC4 (Int_t runnum, Double_t skipBegin=10, Double_t skipEnd=5) |
Read rossum FC4 current. | |
void | CalculateNorm (Int_t run, Int_t chargeState) |
Calculate R and total beam particles. | |
RunData * | GetRunData (Int_t runnum) |
Return stored values of run data. | |
std::vector< Int_t > & | GetRuns () const |
Return a vector of run numbers used in the calculation. | |
TGraphAsymmErrors * | Plot (const char *param, Marker_t marker=20, Color_t markerColor=kBlack) |
TGraphErrors * | PlotVal (const TString &valstr, int which=0, Marker_t marker=20, Color_t markerColor=kBlack, Option_t *option="") |
TGraphErrors * | PlotNbeam (double sbnorm, int which=0, Marker_t marker=21, Color_t markerColor=kBlack) |
Plot number of beam particles with manual sbnorm specification. | |
Long64_t | Draw (const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) |
Draw run data information. | |
void | Draw (Option_t *option) |
UDouble_t | GetEfficiency (const char *name) const |
void | SetEfficiency (const char *name, UDouble_t value) |
void | SetEfficiency (const char *name, Double_t value) |
void | CorrectTransmission (Int_t reference) |
UDouble_t | CalculateEfficiency (Bool_t print=kTRUE) |
UDouble_t | CalculateYield (Int_t whichSb, Int_t type=kHiSingles, Bool_t print=kTRUE) |
Public Attributes | |
TTree | fRunDataTree |
Private Member Functions | |
RunData * | GetOrCreateRunData (Int_t runnum) |
Private GetRunData(), creates new if it's not made. | |
Bool_t | HaveRossumFile () |
UInt_t | GetParams (const char *param, std::vector< Double_t > *runnum, std::vector< UDouble_t > *parval) |
BeamNorm (const BeamNorm &) | |
BeamNorm & | operator= (const BeamNorm &) |
ClassDef (BeamNorm, 2) | |
Private Attributes | |
RunData * | fRunDataBranchAddr |
std::map< Int_t, RunData > | fRunData |
dragon::utils::AutoPtr< RossumData > | fRossum |
std::map< std::string, UDouble_t > | fEfficiencies |
Class to handle calculation of beam normalization.
Definition at line 295 of file RootAnalysis.hxx.
void dragon::BeamNorm::CorrectTransmission | ( | Int_t | reference | ) |
Correct for FC4->FC1 transmission changes relative to a single "good" run
Corrects the yield
and nbeam
values for each run such that the transmission matches the reference run.
reference | Run number of the reference run. |
nbeam
to nbeam_fc4
and nbeam_fc1
or something like that becuse now it's confusing to change both yield and nbeam and not explicit enough what's going on. Definition at line 1394 of file RootAnalysis.cxx.
References dragon::BeamNorm::RunData::fc1, dragon::BeamNorm::RunData::fc4, dragon::BeamNorm::RunData::nbeam, dragon::BeamNorm::RunData::trans_corr, and dragon::BeamNorm::RunData::yield.
TGraphAsymmErrors * dragon::BeamNorm::Plot | ( | const char * | param, |
Marker_t | marker = 20 , |
||
Color_t | markerColor = kBlack |
||
) |
Plot some parameter as a function of run number
param | String specifying the parameter to plot, should be a member of dragon::BeamNorm::RunData |
marker | Marker symbol |
markerColor | Marker color |
Also draws the returned TGraph in its own window.
Definition at line 1135 of file RootAnalysis.cxx.
TGraphErrors * dragon::BeamNorm::PlotVal | ( | const TString & | valstr, |
int | which = 0 , |
||
Marker_t | marker = 20 , |
||
Color_t | markerColor = kBlack , |
||
Option_t * | option = "" |
||
) |
Plot some parameter as a function of run number (alt. implementation)
valstr | String specifying the parameter to plot, should be a member of dragon::BeamNorm::RunData |
which | Specifies which array index to plot, ignored if valstr is not an array |
marker | Marker symbol |
markerColor | Marker color |
Also draws the returned TGraph in its own window.
Definition at line 1161 of file RootAnalysis.cxx.
References dragon::BeamNorm::RunData::fc1, dragon::BeamNorm::RunData::fc4, dragon::BeamNorm::RunData::live_time, dragon::BeamNorm::RunData::live_time_coinc, dragon::BeamNorm::RunData::live_time_head, dragon::BeamNorm::RunData::live_time_tail, dragon::BeamNorm::RunData::nbeam, dragon::BeamNorm::RunData::nrecoil, dragon::BeamNorm::RunData::pressure, dragon::BeamNorm::RunData::pressure_full, dragon::BeamNorm::RunData::runnum, dragon::BeamNorm::RunData::sb_counts, dragon::BeamNorm::RunData::sb_counts_full, dragon::BeamNorm::RunData::sbnorm, dragon::BeamNorm::RunData::trans_corr, and dragon::BeamNorm::RunData::yield.
Int_t dragon::BeamNorm::ReadSbCounts | ( | TFile * | datafile, |
Double_t | pkLow0, | ||
Double_t | pkHigh0, | ||
Double_t | pkLow1, | ||
Double_t | pkHigh1, | ||
Double_t | time = 120. |
||
) |
Integrate the surface barrier counts at the beginning and end of a run
Calculates the "R-value" to normalize SB readings to Faraday cup data. Stores the result in fRunData, they can be accessed by using GetRunData()
datafile | Pointer to the run's ROOT file |
pkLow0 | Low end of the SB0 good peak |
pkHigh0 | High end of the SB0 good peak |
pkLow1 | Low end of the SB1 good peak |
pkHigh1 | High end of the SB1 good peak |
time | Number of seconds at the beginning of the run to use for calculating the normalization |
Definition at line 859 of file RootAnalysis.cxx.
References dragon::LiveTimeCalculator::Calculate(), dragon::utils::calculate_mean(), dragon::utils::calculate_stddev(), dragon::LiveTimeCalculator::CalculateSub(), dragon::Epics::ch, dragon::LiveTimeCalculator::GetLivetime(), dragon::Tail::header, dragon::Epics::header, dragon::BeamNorm::RunData::live_time, dragon::BeamNorm::RunData::live_time_coinc, dragon::BeamNorm::RunData::live_time_head, dragon::BeamNorm::RunData::live_time_tail, dragon::BeamNorm::RunData::pressure, dragon::BeamNorm::RunData::pressure_full, midas::Database::ReadValue(), dragon::BeamNorm::RunData::sb_counts, dragon::BeamNorm::RunData::sb_counts_full, dragon::LiveTimeCalculator::SetFile(), dragon::BeamNorm::RunData::time, and dragon::Epics::val.