30#ifndef MuSR_td_PSI_bin_H_
31#define MuSR_td_PSI_bin_H_
125 int Read(
const char* fileName);
126 int Write(
const char *fileName);
128 int ReadBin(
const char* fileName);
130 int ReadMdu(
const char* fileName);
145 double GetHisto(
int histo_num,
int j);
148 std::vector<double>
GetHistoArray(
int histo_num,
int binning);
187 int lower_bckgrd_plus,
188 int higher_bckgrd_plus,
189 int lower_bckgrd_minus,
190 int higher_bckgrd_minus,
192 double y_offset = 0.);
198 int lower_bckgrd_plus,
199 int higher_bckgrd_plus,
200 int lower_bckgrd_minus,
201 int higher_bckgrd_minus,
203 double y_offset = 0.);
209 int lower_bckgrd_plus,
210 int higher_bckgrd_plus,
211 int lower_bckgrd_minus,
212 int higher_bckgrd_minus,
219 int lower_bckgrd_plus,
220 int higher_bckgrd_plus,
221 int lower_bckgrd_minus,
222 int higher_bckgrd_minus,
229 int lower_bckgrd_plus,
230 int higher_bckgrd_plus,
231 int lower_bckgrd_minus,
232 int higher_bckgrd_minus);
238 int lower_bckgrd_plus,
239 int higher_bckgrd_plus,
240 int lower_bckgrd_minus,
241 int higher_bckgrd_minus);
247 int lower_bckgrd_plus,
248 int higher_bckgrd_plus,
249 int lower_bckgrd_minus,
250 int higher_bckgrd_minus);
256 int lower_bckgrd_plus,
257 int higher_bckgrd_plus,
258 int lower_bckgrd_minus,
259 int higher_bckgrd_minus);
347 int Tmax(
int x,
int y);
348 int Tmin(
int x,
int y);
int Write(const char *fileName)
Method to write a PSI-bin or an MDU file.
double GetBinWidthPicoSec()
Method returning a double representing the bin-width in picoseconds.
std::string GetOrient()
Method returning a string containing the orientation specified in the title.
std::vector< double > GetHistoArray(int histo_num, int binning)
Method to obtain an array of type double containing the values of the histogram <histo_num> with binn...
int GetT0Int(int i)
Method returning an integer representing the t0 point (from the "integer" t0 in the header) for a spe...
int PutDevTemperaturesVector(std::vector< double > &devTemps)
Method setting a vector of doubles containing standard deviations of the monitored values (usually te...
int PutNameHisto(std::string histoName, int i)
Method setting a string containing the name of the histogram <i>
int PutT0Vector(std::vector< int > &t0Data)
Method setting a vector of integer containing the t0 values of the histograms specified in the header...
int GetMinT0Int()
Method to determine the minimum value of the t0 bins.
double * GetAsymmetryArray(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus, int offset=0, double y_offset=0.)
Method to obtain an array of double containing the values of the asymmetry between 2 histograms.
int GetLastGoodInt(int i)
Method returning an integer representing the last good bin specified in the header for a specified hi...
std::vector< double > GetHistoFromT0MinusBkgVector(int histo_num, int lower_bckgdr, int higher_bckgdr, int binning, int offset=0)
Method to obtain a vector of double containing the values of the histogram <histo_num> with binning <...
std::vector< int > GetT0Vector()
Method returning a vector of integer containing the t0 values of the histograms specified in the head...
std::string GetNameHisto(int i)
Method returning a string containing the name of the histogram <i>
int PutNumberTemperatureInt(int noOfTemps)
Method setting an integer representing the number of temperatures.
std::vector< double > GetHistoGoodBinsVector(int histo_num, int binning)
Method to obtain a vector of double containing the values of the histogram <histo_num> with binning <...
int PutFirstGoodInt(int i, int j)
Method setting an integer representing the first good bin specified in the header for a specified his...
int PutTemp(std::string temp)
Method setting a string containing the fSample temperature.
bool WritingOK() const
Method to obtain if writing and processing of the data file was OK.
bool CheckDataConsistency(int tag=0)
Check if a given set of data is consistent with the PSI-BIN limitations. If false,...
int PutSample(std::string sample)
Method setting a string containing the fSample name.
std::vector< double > GetTemperaturesVector()
Method returning a vector of doubles containing monitored values (usually temperatures)
~MuSR_td_PSI_bin()
Simple Destructor clearing some pointers and variables.
std::vector< std::string > GetHistoNamesVector()
Method returning a vector of strings containing the names of the histograms.
std::vector< double > GetErrorAsymmetryVector(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus, int offset=0)
Method to obtain a vector of double containing the values of the error of the asymmetry between 2 his...
std::vector< int > GetLastGoodVector()
Method returning a vector of integer containing the last good bin values of the histograms specified ...
double * GetHistoGoodBinsMinusBkgArray(int histo_num, int lower_bckgrd, int higher_bckgrd, int binning)
Method to obtain an array of type double containing the values of the histogram <histo_num> with binn...
std::vector< int > GetHistoArrayInt(int histo_num)
Method to obtain an array of type integer containing the values of the histogram <histo_num>
int GetMax2T0Int(int k, int j)
Method to determine the maximum value of the last good bins of 2 histograms.
int PutT0Int(int histoNo, int t0)
Method setting an integer representing the t0 point (from the "integer" t0 in the header) for a speci...
char fLabelsScalers[MAXSCALER][MAXLABELSIZE]
long GetTotalEventsLong()
int PutScalersNamesVector(std::vector< std::string > scalersName)
Method setting a vector of strings containing the names of the scalers.
double GetT0Double(int i)
Method returning a double representing the t0 point (from the "real" t0 in the header) for a specifie...
std::string ConsistencyStatus() const
Method to obtain error/success information on data consistency check.
int Clear()
Method to clear member variables before using instance for next read.
char fLabelsHisto[MAXHISTO][MAXLABELSIZE]
std::string GetField()
Method returning a string containing the field specified in the title.
int GetNumberTemperatureInt()
std::vector< long > GetScalersVector()
Method providing a vector of long containing the values of the scalers.
double GetBinWidthMicroSec()
Method returning a double representing the bin-width in microseconds.
std::vector< std::vector< double > > fHistosVector
void PutNumberHistoInt(int val)
double * GetHistoFromT0Array(int histo_num, int binning, int offset=0)
Method to obtain an array of type double containing the values of the histogram <histo_num> with binn...
int PutField(std::string field)
Method setting a string containing the field.
int GetMin2T0Int(int k, int j)
Method to determine the minimum value of the last good bins of 2 histograms.
void PutBinWidthPicoSec(double binWidth)
Method setting a double representing the bin-width in picoseconds.
std::string Filename() const
Method to obtain the file name.
std::vector< double > GetAsymmetryVector(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus, int offset=0, double y_offset=0.)
Method to obtain a vector of double containing the values of the asymmetry between 2 histograms.
int PutComment(std::string comment)
Method setting a string containing the comment.
int ReadMdu(const char *fileName)
Method to read a MuSR MDU file.
int WriteBin(const char *fileName)
Method to write a PSI-bin file.
int GetMin2LastGoodInt(int k, int j)
Method to determine the minimum value of the last good bins of 2 histograms.
std::string GetTemp()
Method returning a string containing the temperature specified in the title.
int GetMinLastGoodInt()
Method providing the minimum value of the last good bins.
int Show() const
Method to show current values of member variables.
int ReadBin(const char *fileName)
Method to read a PSI-bin file.
std::vector< std::string > GetTimeStartVector()
Method returning a vector of strings containing 1) the date when the run was started and 2) the time ...
std::vector< double > GetHistoFromT0Vector(int histo_num, int binning, int offset=0)
Method to obtain a vector of double containing the values of the histogram <histo_num> with binning <...
int PutHistoArrayInt(std::vector< std::vector< int > > &histo, int tag=0)
Method to set the histograms which is a vector of vector of int's (histogram). There are two differen...
void PutBinWidthMicroSec(double binWidth)
Method setting a double representing the bin-width in microseconds.
std::vector< int > GetFirstGoodVector()
Method returning a vector of integer containing the first good bin values of the histograms specified...
double * GetHistoGoodBinsArray(int histo_num, int binning)
Method to obtain an array of type double containing the values of the histogram <histo_num> with binn...
int PutLastGoodInt(int i, int j)
Method to modify the last good bin (value <j>) of the histogram <i>
int PutScalersVector(std::vector< int > scalerData)
Method set a vector of long containing the values of the scalers.
long GetEventsHistoLong(int i)
Method returning a long representing the number of events in a specified histograms.
std::vector< std::string > GetScalersNamesVector()
Method returning a vector of strings containing the names of the scalers.
std::vector< std::string > GetTimeStopVector()
Method returning a vector of strings containing 1) the date when the run was stopped and 2) the time ...
void PutBinWidthNanoSec(double binWidth)
Method setting a double representing the bin-width in nanoseconds.
std::vector< double > GetDevTemperaturesVector()
Method returning a vector of doubles containing standard deviations of the monitored values (usually ...
int GetMax2LastGoodInt(int k, int j)
Method to determine the maximum value of the "last good bins" of 2 histograms.
std::string WriteStatus() const
Method to obtain error/success information after writing.
std::string fConsistencyStatus
int PutTimeStartVector(std::vector< std::string > timeStart)
Method setting a vector of strings containing 1) the date when the run was started and 2) the time wh...
double * GetErrorAsymmetryGoodBinsArray(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus)
Method to obtain an array of double containing the values of the error of the asymmetry between 2 his...
std::vector< double > GetHistoVectorNo0(int histo_num, int binning)
Method to obtain a vector of double containing the values of the histogram <histo_num> with binning <...
double GetBinWidthNanoSec()
Method returning a double representing the bin-width in nanoseconds.
int PutHistoNamesVector(std::vector< std::string > &histoNames)
Method setting a vector containing the names of all the histograms.
int PutRunNumberInt(int i)
Method to modify the run number (value <i>)
std::string ReadStatus() const
Method to obtain error/success information after reading.
std::vector< double > GetErrorAsymmetryGoodBinsVector(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus)
Method to obtain a vector of double containing the values of the error of the asymmetry between 2 his...
std::vector< double > GetHistoGoodBinsMinusBkgVector(int histo_num, int lower_bckgrd, int higher_bckgrd, int binning)
Method to obtain a vector of double containing the values of the histogram <histo_num> with binning <...
int Read(const char *fileName)
Method to read a PSI-bin or an MDU file.
int GetMaxT0Int()
Method to determine the maximum value of the t0 bins.
double * GetAsymmetryGoodBinsArray(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus)
Method to obtain an array of double containing the values of the asymmetry between 2 histograms.
int PutSetup(std::string setup)
Method setting a string containing the setup.
int GetNumberScalerInt()
Method returning an integer representing the number of histograms.
int PutNumberScalerInt(int val)
Method seting the number of scalers present.
double GetHisto(int histo_num, int j)
Method to return the value of a single bin as double.
int GetMaxLastGoodInt()
Method returning an integer containing the maximum value of the "last good bins" of all histograms.
bool ReadingOK() const
Method to obtain if reading and processing of the data file was OK.
std::string GetSample()
Method returning a string containing the fSample name.
int GetFirstGoodInt(int i)
Method returning an integer representing the first good bin specified in the header for a specified h...
int GetDefaultBinning()
Method returning an integer representing the default binning.
std::vector< std::vector< int > > fHisto
float fTempDeviation[MAXTEMPER]
int GetHistoInt(int histo_num, int j)
Method to return the value of a single bin as integer.
double * GetErrorAsymmetryArray(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus, int offset=0)
Method to obtain an array of double containing the values of the error of the asymmetry between 2 his...
double * GetHistoFromT0MinusBkgArray(int histo_num, int lower_bckgdr, int higher_bckgdr, int binning, int offset=0)
Method to obtain an array of type double containing the values of the histogram <histo_num> with binn...
void PutHistoLengthBin(int val)
std::vector< double > GetHistoVector(int histo_num, int binning)
Method to obtain a vector of double containing the values of the histogram <histo_num> with binning <...
std::string GetComment()
Method returning a string containing the comment specified in the title.
std::string GetSetup()
Method returning a string containing the setup.
int PutTemperaturesVector(std::vector< double > &temps)
Method setting a vector of doubles containing monitored values (usually temperatures)
std::vector< double > GetAsymmetryGoodBinsVector(int histo_num_plus, int histo_num_minus, double alpha_param, int binning, int lower_bckgrd_plus, int higher_bckgrd_plus, int lower_bckgrd_minus, int higher_bckgrd_minus)
Method to obtain a vector of double containing the values of the asymmetry between 2 histograms.
int PutOrient(std::string orientation)
Method setting a string containing the fSample orientation.
int WriteMdu(const char *fileName)
Method to write a MuSR MDU file.
int fEventsPerHisto[MAXHISTO]
std::vector< long > GetEventsHistoVector()
Method returning a vector of long containing the number of events in the histograms.
MuSR_td_PSI_bin()
Simple Constructor setting some pointers and variables.
int PutTimeStopVector(std::vector< std::string > timeStop)
Method setting a vector of strings containing 1) the date when the run was started and 2) the time wh...