added skeleton for some additional PLOT block commands. No functionality yet.
This commit is contained in:
parent
80d0579ec6
commit
f287ef666c
@ -120,5 +120,5 @@ $(OBJS): %.o: %.cpp
|
|||||||
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $<
|
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $<
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
cp -p $(EXEC) $(INSTALLPATH)
|
cp -fp $(EXEC) $(INSTALLPATH)
|
||||||
cp -p musrfit_startup.xml $(INSTALLPATH)
|
cp -fp musrfit_startup.xml $(INSTALLPATH)
|
||||||
|
@ -796,9 +796,9 @@ int PMsrHandler::WriteMsrLogFile(const bool messages)
|
|||||||
} else if (sstr.BeginsWith("range")) {
|
} else if (sstr.BeginsWith("range")) {
|
||||||
fout << "range ";
|
fout << "range ";
|
||||||
fout.precision(2);
|
fout.precision(2);
|
||||||
fout << fPlots[plotNo].fTmin << " " << fPlots[plotNo].fTmax;
|
fout << fPlots[plotNo].fTmin[0] << " " << fPlots[plotNo].fTmax[0];
|
||||||
if (fPlots[plotNo].fYmin != -999.0) {
|
if (fPlots[plotNo].fYmin.size() > 0) {
|
||||||
fout << " " << fPlots[plotNo].fYmin << " " << fPlots[plotNo].fYmax;
|
fout << " " << fPlots[plotNo].fYmin[0] << " " << fPlots[plotNo].fYmax[0];
|
||||||
}
|
}
|
||||||
fout << endl;
|
fout << endl;
|
||||||
} else {
|
} else {
|
||||||
@ -2234,10 +2234,10 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
|
|
||||||
// initialize param structure
|
// initialize param structure
|
||||||
param.fPlotType = -1;
|
param.fPlotType = -1;
|
||||||
param.fTmin = -999.0;
|
param.fUseFitRanges = false; // i.e. if not overwritten use the range info of the plot block
|
||||||
param.fTmax = -999.0;
|
param.fLogX = false; // i.e. if not overwritten use linear x-axis
|
||||||
param.fYmin = -999.0;
|
param.fLogY = false; // i.e. if not overwritten use linear y-axis
|
||||||
param.fYmax = -999.0;
|
param.fViewPacking = -1; // i.e. if not overwritten use the packing of the run blocks
|
||||||
|
|
||||||
// find next plot if any is present
|
// find next plot if any is present
|
||||||
iter2 = iter1;
|
iter2 = iter1;
|
||||||
@ -2272,9 +2272,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
delete tokens;
|
delete tokens;
|
||||||
tokens = 0;
|
tokens = 0;
|
||||||
}
|
}
|
||||||
}
|
} else if (iter1->fLine.Contains("runs", TString::kIgnoreCase)) { // handle plot runs
|
||||||
|
|
||||||
if (iter1->fLine.Contains("runs")) { // handle plot runs
|
|
||||||
TComplex run;
|
TComplex run;
|
||||||
switch (param.fPlotType) {
|
switch (param.fPlotType) {
|
||||||
case -1:
|
case -1:
|
||||||
@ -2353,9 +2351,13 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
error = true;
|
error = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
} else if (iter1->fLine.Contains("range ", TString::kIgnoreCase)) { // handle plot range
|
||||||
|
// remove previous entries
|
||||||
|
param.fTmin.clear();
|
||||||
|
param.fTmax.clear();
|
||||||
|
param.fYmin.clear();
|
||||||
|
param.fYmax.clear();
|
||||||
|
|
||||||
if (iter1->fLine.Contains("range")) { // handle plot range
|
|
||||||
tokens = iter1->fLine.Tokenize(" \t");
|
tokens = iter1->fLine.Tokenize(" \t");
|
||||||
if (!tokens) {
|
if (!tokens) {
|
||||||
cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||||
@ -2370,7 +2372,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
if (str.IsFloat())
|
if (str.IsFloat())
|
||||||
param.fTmin = (double)str.Atof();
|
param.fTmin.push_back((double)str.Atof());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
|
|
||||||
@ -2378,7 +2380,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
ostr = dynamic_cast<TObjString*>(tokens->At(2));
|
ostr = dynamic_cast<TObjString*>(tokens->At(2));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
if (str.IsFloat())
|
if (str.IsFloat())
|
||||||
param.fTmax = (double)str.Atof();
|
param.fTmax.push_back((double)str.Atof());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
|
|
||||||
@ -2388,7 +2390,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
ostr = dynamic_cast<TObjString*>(tokens->At(3));
|
ostr = dynamic_cast<TObjString*>(tokens->At(3));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
if (str.IsFloat())
|
if (str.IsFloat())
|
||||||
param.fYmin = (double)str.Atof();
|
param.fYmin.push_back((double)str.Atof());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
|
|
||||||
@ -2396,7 +2398,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
ostr = dynamic_cast<TObjString*>(tokens->At(4));
|
ostr = dynamic_cast<TObjString*>(tokens->At(4));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
if (str.IsFloat())
|
if (str.IsFloat())
|
||||||
param.fYmax = (double)str.Atof();
|
param.fYmax.push_back((double)str.Atof());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
@ -2406,6 +2408,117 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
delete tokens;
|
delete tokens;
|
||||||
tokens = 0;
|
tokens = 0;
|
||||||
}
|
}
|
||||||
|
} else if (iter1->fLine.Contains("sub_ranges", TString::kIgnoreCase)) {
|
||||||
|
// remove previous entries
|
||||||
|
param.fTmin.clear();
|
||||||
|
param.fTmax.clear();
|
||||||
|
param.fYmin.clear();
|
||||||
|
param.fYmax.clear();
|
||||||
|
|
||||||
|
tokens = iter1->fLine.Tokenize(" \t");
|
||||||
|
if (!tokens) {
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||||
|
cout << endl << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((tokens->GetEntries() != (int)(2*param.fRuns.size() + 1)) && (tokens->GetEntries() != (int)(2*param.fRuns.size() + 3))) {
|
||||||
|
error = true;
|
||||||
|
} else {
|
||||||
|
// get all the times
|
||||||
|
for (unsigned int i=0; i<param.fRuns.size(); i++) {
|
||||||
|
|
||||||
|
// handle t_min
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(2*i+1));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (str.IsFloat())
|
||||||
|
param.fTmin.push_back((double)str.Atof());
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
|
|
||||||
|
// handle t_max
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(2*i+2));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (str.IsFloat())
|
||||||
|
param.fTmax.push_back((double)str.Atof());
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get y-range if present
|
||||||
|
if (tokens->GetEntries() == (int)(2*param.fRuns.size() + 3)) {
|
||||||
|
|
||||||
|
// handle y_min
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(2*param.fRuns.size()+1));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (str.IsFloat())
|
||||||
|
param.fYmin.push_back((double)str.Atof());
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
|
|
||||||
|
// handle y_max
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(2*param.fRuns.size()+2));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (str.IsFloat())
|
||||||
|
param.fYmax.push_back((double)str.Atof());
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
if (tokens) {
|
||||||
|
delete tokens;
|
||||||
|
tokens = 0;
|
||||||
|
}
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry(): will eventually handle sub_ranges ..." << endl;
|
||||||
|
cout << endl << ">> time ranges: ";
|
||||||
|
for (unsigned int i=0; i<param.fTmin.size(); i++) {
|
||||||
|
cout << param.fTmin[i] << ", " << param.fTmax[i] << " / ";
|
||||||
|
}
|
||||||
|
if (param.fYmin.size() > 0) {
|
||||||
|
cout << endl << " >> y-range: " << param.fYmin[0] << ", " << param.fYmax[0];
|
||||||
|
}
|
||||||
|
cout << endl;
|
||||||
|
} else if (iter1->fLine.Contains("use_fit_ranges", TString::kIgnoreCase)) {
|
||||||
|
param.fUseFitRanges = true;
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry(): will eventually use fit ranges for plotting ..." << endl;
|
||||||
|
} else if (iter1->fLine.Contains("logx", TString::kIgnoreCase)) {
|
||||||
|
param.fLogX = true;
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry(): will eventually plot log x-axis ..." << endl;
|
||||||
|
} else if (iter1->fLine.Contains("logy", TString::kIgnoreCase)) {
|
||||||
|
param.fLogY = true;
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry(): will eventually plot log y-axis ..." << endl;
|
||||||
|
} else if (iter1->fLine.Contains("view_packing", TString::kIgnoreCase)) {
|
||||||
|
tokens = iter1->fLine.Tokenize(" \t");
|
||||||
|
if (!tokens) {
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||||
|
cout << endl << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (tokens->GetEntries() != 2) {
|
||||||
|
error = true;
|
||||||
|
} else {
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (str.IsDigit()) {
|
||||||
|
int val = str.Atoi();
|
||||||
|
if (val > 0)
|
||||||
|
param.fViewPacking = val;
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
|
} else {
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cout << endl << ">> PMsrHandler::HandlePlotEntry(): will eventually handle view_packing = " << param.fViewPacking << endl;
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
if (tokens) {
|
||||||
|
delete tokens;
|
||||||
|
tokens = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
++iter1;
|
++iter1;
|
||||||
@ -2413,23 +2526,28 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// analyze if the plot block is valid
|
// analyze if the plot block is valid
|
||||||
|
double keep;
|
||||||
if (!error) {
|
if (!error) {
|
||||||
if (param.fRuns.empty()) { // there was no run tag
|
if (param.fRuns.empty()) { // there was no run tag
|
||||||
error = true;
|
error = true;
|
||||||
} else { // everything ok
|
} else { // everything ok
|
||||||
if ((param.fTmin != -999.0) || (param.fTmax != -999.0)) { // if range is given, check that it is ordered properly
|
if ((param.fTmin.size() > 0) || (param.fTmax.size() > 0)) { // if range is given, check that it is ordered properly
|
||||||
if (param.fTmin > param.fTmax) {
|
for (unsigned int i=0; i<param.fTmin.size(); i++) {
|
||||||
double keep = param.fTmin;
|
if (param.fTmin[i] > param.fTmax[i]) {
|
||||||
param.fTmin = param.fTmax;
|
keep = param.fTmin[i];
|
||||||
param.fTmax = keep;
|
param.fTmin[i] = param.fTmax[i];
|
||||||
|
param.fTmax[i] = keep;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((param.fYmin != -999.0) || (param.fYmax != -999.0)) { // if range is given, check that it is ordered properly
|
if ((param.fYmin.size() > 0) || (param.fYmax.size() > 0)) { // if range is given, check that it is ordered properly
|
||||||
if (param.fYmin > param.fYmax) {
|
for (unsigned int i=0; i<param.fYmin.size(); i++) {
|
||||||
double keep = param.fYmin;
|
if (param.fYmin[i] > param.fYmax[i]) {
|
||||||
param.fYmin = param.fYmax;
|
keep = param.fYmin[i];
|
||||||
param.fYmax = keep;
|
param.fYmin[i] = param.fYmax[i];
|
||||||
|
param.fYmax[i] = keep;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2445,6 +2563,10 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
cout << endl << "PLOT <plot_type>";
|
cout << endl << "PLOT <plot_type>";
|
||||||
cout << endl << "runs <run_list>";
|
cout << endl << "runs <run_list>";
|
||||||
cout << endl << "[range tmin tmax [ymin ymax]]";
|
cout << endl << "[range tmin tmax [ymin ymax]]";
|
||||||
|
cout << endl << "[sub_ranges tmin1 tmax1 tmin2 tmax2 ... tminN tmaxN [ymin ymax]";
|
||||||
|
cout << endl << "[logx | logy]";
|
||||||
|
cout << endl << "[use_fit_ranges]";
|
||||||
|
cout << endl << "[view_packing n]";
|
||||||
cout << endl;
|
cout << endl;
|
||||||
cout << endl << "where <plot_type> is: 0=single histo asym,";
|
cout << endl << "where <plot_type> is: 0=single histo asym,";
|
||||||
cout << endl << " 2=forward-backward asym,";
|
cout << endl << " 2=forward-backward asym,";
|
||||||
@ -2457,6 +2579,11 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
cout << endl << " imaginary one is 1=real part or 2=imag part, e.g.";
|
cout << endl << " imaginary one is 1=real part or 2=imag part, e.g.";
|
||||||
cout << endl << " runs 1,1 1,2";
|
cout << endl << " runs 1,1 1,2";
|
||||||
cout << endl << "range is optional";
|
cout << endl << "range is optional";
|
||||||
|
cout << endl << "sub_ranges (if present) will plot the N given runs each on its own sub-range";
|
||||||
|
cout << endl << "logx, logy (if present) will present the x-, y-axis in log-scale";
|
||||||
|
cout << endl << "use_fit_ranges (if present) will plot each run on its fit-range";
|
||||||
|
cout << endl << "view_packing n (if present) will bin all data by n (> 0) rather than the binning of the fit";
|
||||||
|
cout << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
param.fRuns.clear();
|
param.fRuns.clear();
|
||||||
|
@ -2202,15 +2202,17 @@ void PMusrCanvas::PlotData()
|
|||||||
if (fPlotType != MSR_PLOT_NON_MUSR) {
|
if (fPlotType != MSR_PLOT_NON_MUSR) {
|
||||||
if (fData.size() > 0) {
|
if (fData.size() > 0) {
|
||||||
fData[0].data->Draw("pe");
|
fData[0].data->Draw("pe");
|
||||||
// set time range
|
// set time range if present
|
||||||
Double_t xmin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin;
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin.size() > 0) {
|
||||||
Double_t xmax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax;
|
Double_t xmin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[0];
|
||||||
fData[0].data->GetXaxis()->SetRangeUser(xmin, xmax);
|
Double_t xmax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax[0];
|
||||||
// check if it is necessary to set the y-axis range
|
fData[0].data->GetXaxis()->SetRangeUser(xmin, xmax);
|
||||||
Double_t ymin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmin;
|
// check if it is necessary to set the y-axis range
|
||||||
Double_t ymax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmax;
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmin.size() > 0) {
|
||||||
if ((ymin != -999.0) && (ymax != -999.0)) {
|
Double_t ymin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmin[0];
|
||||||
fData[0].data->GetYaxis()->SetRangeUser(ymin, ymax);
|
Double_t ymax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmax[0];
|
||||||
|
fData[0].data->GetYaxis()->SetRangeUser(ymin, ymax);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// set x-axis label
|
// set x-axis label
|
||||||
fData[0].data->GetXaxis()->SetTitle("time (#mus)");
|
fData[0].data->GetXaxis()->SetTitle("time (#mus)");
|
||||||
@ -2276,16 +2278,18 @@ void PMusrCanvas::PlotData()
|
|||||||
fMultiGraphData->Draw("a");
|
fMultiGraphData->Draw("a");
|
||||||
|
|
||||||
// set x-range
|
// set x-range
|
||||||
Double_t xmin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin;
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin.size() > 0) {
|
||||||
Double_t xmax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax;
|
Double_t xmin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[0];
|
||||||
fMultiGraphData->GetXaxis()->SetRangeUser(xmin, xmax);
|
Double_t xmax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax[0];
|
||||||
// check if it is necessary to set the y-axis range
|
fMultiGraphData->GetXaxis()->SetRangeUser(xmin, xmax);
|
||||||
Double_t ymin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmin;
|
// check if it is necessary to set the y-axis range
|
||||||
Double_t ymax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmax;
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmin.size() > 0) {
|
||||||
if ((ymin != -999.0) && (ymax != -999.0)) {
|
Double_t ymin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmin[0];
|
||||||
fMultiGraphData->GetYaxis()->SetRangeUser(ymin, ymax);
|
Double_t ymax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fYmax[0];
|
||||||
} else {
|
fMultiGraphData->GetYaxis()->SetRangeUser(ymin, ymax);
|
||||||
fMultiGraphData->GetYaxis()->UnZoom();
|
} else {
|
||||||
|
fMultiGraphData->GetYaxis()->UnZoom();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set x-, y-axis label only if there is just one data set
|
// set x-, y-axis label only if there is just one data set
|
||||||
|
@ -338,7 +338,7 @@ PRunData* PRunListCollection::GetAsymmetry(unsigned int index, EDataSwitch tag)
|
|||||||
PRunData *data = 0;
|
PRunData *data = 0;
|
||||||
|
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case kIndex:
|
case kIndex: // called from musrfit when dumping the data
|
||||||
if ((index < 0) || (index > fRunAsymmetryList.size())) {
|
if ((index < 0) || (index > fRunAsymmetryList.size())) {
|
||||||
cout << endl << "PRunListCollection::GetAsymmetry: index = " << index << " out of bounds";
|
cout << endl << "PRunListCollection::GetAsymmetry: index = " << index << " out of bounds";
|
||||||
return 0;
|
return 0;
|
||||||
@ -347,7 +347,7 @@ PRunData* PRunListCollection::GetAsymmetry(unsigned int index, EDataSwitch tag)
|
|||||||
fRunAsymmetryList[index]->CalcTheory();
|
fRunAsymmetryList[index]->CalcTheory();
|
||||||
data = fRunAsymmetryList[index]->GetData();
|
data = fRunAsymmetryList[index]->GetData();
|
||||||
break;
|
break;
|
||||||
case kRunNo:
|
case kRunNo: // called from PMusrCanvas
|
||||||
for (unsigned int i=0; i<fRunAsymmetryList.size(); i++) {
|
for (unsigned int i=0; i<fRunAsymmetryList.size(); i++) {
|
||||||
if (fRunAsymmetryList[i]->GetRunNo() == index) {
|
if (fRunAsymmetryList[i]->GetRunNo() == index) {
|
||||||
data = fRunAsymmetryList[i]->GetData();
|
data = fRunAsymmetryList[i]->GetData();
|
||||||
|
@ -317,15 +317,15 @@ bool PRunNonMusr::PrepareViewData()
|
|||||||
if (fRunNo == plotBlock.fRuns[j].Re()-1) { // run found
|
if (fRunNo == plotBlock.fRuns[j].Re()-1) { // run found
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
xMin = plotBlock.fTmin;
|
xMin = plotBlock.fTmin[0];
|
||||||
xMax = plotBlock.fTmax;
|
xMax = plotBlock.fTmax[0];
|
||||||
xAbsMin = xMin;
|
xAbsMin = xMin;
|
||||||
xAbsMax = xMax;
|
xAbsMax = xMax;
|
||||||
// cout << endl << ">> first: xMin=" << xMin << ", xMax=" << xMax << endl;
|
// cout << endl << ">> first: xMin=" << xMin << ", xMax=" << xMax << endl;
|
||||||
} else {
|
} else {
|
||||||
if (fabs(xMax-xMin) > fabs(plotBlock.fTmax-plotBlock.fTmin)) {
|
if (fabs(xMax-xMin) > fabs(plotBlock.fTmax[0]-plotBlock.fTmin[0])) {
|
||||||
xMin = plotBlock.fTmin;
|
xMin = plotBlock.fTmin[0];
|
||||||
xMax = plotBlock.fTmax;
|
xMax = plotBlock.fTmax[0];
|
||||||
}
|
}
|
||||||
if (xMin < xAbsMin)
|
if (xMin < xAbsMin)
|
||||||
xAbsMin = xMin;
|
xAbsMin = xMin;
|
||||||
|
@ -301,11 +301,15 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int fPlotType; ///< plot type
|
int fPlotType; ///< plot type
|
||||||
|
bool fUseFitRanges; ///< yes -> use the fit ranges to plot the data, no (default) -> use range information if present
|
||||||
|
bool fLogX; ///< yes -> x-axis in log-scale, no (default) -> x-axis in lin-scale
|
||||||
|
bool fLogY; ///< yes -> y-axis in log-scale, no (default) -> y-axis in lin-scale
|
||||||
|
int fViewPacking; ///< -1 -> use the run packing to generate the view, otherwise is fViewPacking for the binning of ALL runs.
|
||||||
PComplexVector fRuns; ///< list of runs to be plotted
|
PComplexVector fRuns; ///< list of runs to be plotted
|
||||||
double fTmin; ///< time minimum
|
PDoubleVector fTmin; ///< time minimum
|
||||||
double fTmax; ///< time maximum
|
PDoubleVector fTmax; ///< time maximum
|
||||||
double fYmin; ///< asymmetry/counts minimum
|
PDoubleVector fYmin; ///< asymmetry/counts minimum
|
||||||
double fYmax; ///< asymmetry/counts maximum
|
PDoubleVector fYmax; ///< asymmetry/counts maximum
|
||||||
} PMsrPlotStructure;
|
} PMsrPlotStructure;
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
@ -42,11 +42,11 @@ void skewedGaussian()
|
|||||||
char fln[256];
|
char fln[256];
|
||||||
|
|
||||||
const Double_t w = 1.0; // weight of the skewed Gaussian
|
const Double_t w = 1.0; // weight of the skewed Gaussian
|
||||||
const Double_t B0 = 30.0; // skewed Gaussian B0 (G)
|
const Double_t B0 = 1000.0; // skewed Gaussian B0 (G)
|
||||||
const Double_t sm = 2.0; // skewed Gaussian sigma- (G)
|
const Double_t sm = 5.0; // skewed Gaussian sigma- (G)
|
||||||
const Double_t sp = 2.0; // skewed Gaussian sigma+ (G)
|
const Double_t sp = 5.0; // skewed Gaussian sigma+ (G)
|
||||||
|
|
||||||
const Double_t B0ext = 30.0; // external field Gaussian B0 (G)
|
const Double_t B0ext = 1000.0; // external field Gaussian B0 (G)
|
||||||
const Double_t sext = 10; // external field Gaussian sigma (G)
|
const Double_t sext = 10; // external field Gaussian sigma (G)
|
||||||
|
|
||||||
sprintf(fln, "skewedGauss-B%0.2lf-sm%0.2lf-sp%0.2lf-w%0.1lf-Bext%0.2lf-sext%0.2lf.dat",
|
sprintf(fln, "skewedGauss-B%0.2lf-sm%0.2lf-sp%0.2lf-w%0.1lf-Bext%0.2lf-sext%0.2lf.dat",
|
||||||
@ -54,7 +54,7 @@ void skewedGaussian()
|
|||||||
|
|
||||||
const Int_t noOfPoints = 8000;
|
const Int_t noOfPoints = 8000;
|
||||||
|
|
||||||
const Double_t res = 0.1;
|
const Double_t res = 0.25;
|
||||||
|
|
||||||
fp = fopen(fln, "w");
|
fp = fopen(fln, "w");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user