return 0;
}
+void Run::setSystemSpecificParameters()
+{
+ if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("Mi34") )
+ systemparamcur = systemparamUSB;
+ else if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("FSBB") )
+ systemparamcur = systemparamUSB;
+ else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
+ systemparamcur = systemparamPXI;
+ else if (labbook.system.EqualTo("Pegasus")) // && labbook.chipGen.EqualTo("34") )
+ systemparamcur = systemparamPegasus;
+
+ setSensorInSystemParam();
+}
+
+void Run::setSensorInSystemParam()
+{
+ sensorinfostruct sensorinfoMi34USB( 8, 64 );
+ sensorinfostruct sensorinfoMi34PXI( 16, /* rows */ 64 /* columns */ );
+ sensorinfostruct sensorinfoPegasus( 8, 56 );
+ sensorinfostruct sensorinfoFSBB( 4, 416 );
+
+ if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("Mi34") )
+ sensorinfocur=sensorinfoMi34USB;
+ else if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("FSBB") )
+ sensorinfocur=sensorinfoFSBB;
+ else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
+ sensorinfocur=sensorinfoMi34PXI;
+ else if (labbook.system.EqualTo("Pegasus")) // && labbook.chipGen.EqualTo("34") )
+ sensorinfocur=sensorinfoPegasus;
+}
+
+void Run::setMatrixSpecificParameters()
+{
+ submatrix_x_start = 0;
+ submatrix_x_end = sensorinfocur.columns;
+ submatrix_y_start = 0;
+ submatrix_y_end = sensorinfocur.rows;
+}
+
Bool_t Run::useDynamicalNoise(Bool_t var)
{
cout<<" Dynamical Noise calc. : " << colorwhite << (var?"1":"0") << colorreset << " <-- only used if RAW files are analyzed, force analysis to make sure" << endl;
return 1;
}
-
Bool_t Run::analyzeRun(Bool_t force)
{
if (!error)
return 1;
}
-// generateSeedSpectrum()
-// {
-// /// pointer to the TTree of "hit"
-// TTree* hitNtuple = (TTree*) f->Get("hit");
-// }
-
Bool_t Run::runAllreadyAnalyzed()
{
return (checkFileExists(storepathRAWLinux + "/rootfilecreated") && checkFileExists(storepathOutLinux + Form("/RUN_%i_i.root",labbook.runnumber)));
Bool_t Run::generateReadableRunCode()
{
+ humanreadablestr = Form("%s, %s, chip %s, %s, %sT=%.1f", labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
+
runcode = Form("%i_", labbook.runnumber);
if (labbook.chip.Length() < 2)
runcode+= "0" + labbook.chip;
return x;
}
-
template <typename T>
string Run::numberToString ( T number )
{
return ss >> result ? result : 0;
}
-
-void Run::setSystemSpecificParameters()
-{
- if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("Mi34") )
- systemparamcur = systemparamUSB;
- else if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("FSBB") )
- systemparamcur = systemparamUSB;
- else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
- systemparamcur = systemparamPXI;
- else if (labbook.system.EqualTo("Pegasus")) // && labbook.chipGen.EqualTo("34") )
- systemparamcur = systemparamPegasus;
-
- setSensorInSystemParam();
-}
-
-void Run::setSensorInSystemParam()
-{
- sensorinfostruct sensorinfoMi34USB( 8, 64 );
- sensorinfostruct sensorinfoMi34PXI( 16, /* rows */ 64 /* columns */ );
- sensorinfostruct sensorinfoPegasus( 8, 56 );
- sensorinfostruct sensorinfoFSBB( 4, 416 );
-
- if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("Mi34") )
- sensorinfocur=sensorinfoMi34USB;
- else if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("FSBB") )
- sensorinfocur=sensorinfoFSBB;
- else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
- sensorinfocur=sensorinfoMi34PXI;
- else if (labbook.system.EqualTo("Pegasus")) // && labbook.chipGen.EqualTo("34") )
- sensorinfocur=sensorinfoPegasus;
-}
-
-void Run::setMatrixSpecificParameters()
-{
- submatrix_x_start = 0;
- submatrix_x_end = sensorinfocur.columns;
- submatrix_y_start = 0;
- submatrix_y_end = sensorinfocur.rows;
-}
-
-
void Run::setSubMatrixBorders(u_int x_start, u_int x_end, u_int y_start, u_int y_end, Bool_t addtoruncodesuffix)
{
submatrix_x_start = x_start;
runcodesuffix += Form("_row%u-%u_colu%u-%u_", x_start, x_end, y_start, y_end);
humanreadablesuffix += Form("Row: %u - %u, Column: %u - %u, ", x_start, x_end, y_start, y_end);
}
+ generateReadableRunCode();
}
void Run::selectSubMatrixFSBB(TString matrixname)
return 1;
}
-// Int_t findMaxBin(TH1F* th1fpointer) {
-// Int_t maxbinval = th1fpointer->GetM
-//
-// }
-
Bool_t Run::plotCompareHistograms()
{
return 1;
}
-
Bool_t Run::plotAllHistograms(histogramstruct* histogramstructpointer)
{
if (!error)
+ .25*par[1]*par[1]);
}
-
void Run::plotVerticalLine(TH1F* histogrampointer, Float_t xVal) {
if (xVal > 0)
{
TString prefix = "Noise " + suffix;
- TString humanreadablestr = Form("%s, %s spectrum, %s, chip %s, %s, %sT=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
if (suffix.Contains("threshold"))
{
histogramstructpointer->thresholdcluster = 1;
}
else
{
- histogramstructpointer->Noise=new TH1F(prefix.Data(), humanreadablestr.Data(), systemparamcur.nbinsnoise, 0, systemparamcur.maxbinnoise);
+ histogramstructpointer->Noise=new TH1F(prefix.Data(), Form("%s, %s", prefix.Data(), humanreadablestr.Data()), systemparamcur.nbinsnoise, 0, systemparamcur.maxbinnoise);
histogramstructpointer->Noise->SetLineStyle(rootlinestyle[plotStyle]);
histogramstructpointer->Noise->SetLineColor(rootcolors[plotStyle]);
histogramstructpointer->Noise->SetLineWidth(3);
void Run::initHistogram(TH1F* &histogrampointer, TString prefix)
{
- TString humanreadablestr = Form("%s, %s spectrum, %s, chip %s, %s, %sT=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
- histogrampointer=new TH1F(prefix.Data(), humanreadablestr.Data(), systemparamcur.nbins, 0, systemparamcur.maxbin);
+ histogrampointer=new TH1F(prefix.Data(), Form("%s, %s", prefix.Data(), humanreadablestr.Data()), systemparamcur.nbins, 0, systemparamcur.maxbin);
histogrampointer->SetLineStyle(rootlinestyle[plotStyle]);
histogrampointer->SetLineColor(rootcolors[plotStyle]);
histogrampointer->SetStats(kTRUE);
void Run::initCluster(histogramstruct* histogramstructpointer, TString suffix, Float_t xcoord_min_step, Float_t xcoord_abs_min, Float_t xcoord_abs_max, Float_t ycoord_min_step, Float_t ycoord_abs_min, Float_t ycoord_abs_max)
{
TString prefix = "Cluster" + suffix;
- TString humanreadablestr = Form("%s, %s cluster, %s, chip %s, %s %sT=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
Int_t sizearrrotx= (int)((xcoord_abs_max-xcoord_abs_min)/xcoord_min_step+0.5);
Int_t sizearrroty = (int)((ycoord_abs_max-ycoord_abs_min)/ycoord_min_step+0.5);
// cout << "xcoord_abs_min: " << xcoord_abs_min << ", xcoord_abs_max: " << xcoord_abs_max << ", xcoord_min_step: " << xcoord_min_step << endl;
// cout << "ycoord_abs_min: " << ycoord_abs_min << ", ycoord_abs_max: " << ycoord_abs_max << ", ycoord_min_step: " << ycoord_min_step << endl;
- histogramstructpointer->histAvgCluster = new TH2F(prefix.Data(), Form("Avg. cluster distribution; x; y %s", humanreadablestr.Data()),sizearrrotx, xcoord_abs_min,xcoord_abs_max,sizearrroty,ycoord_abs_min,ycoord_abs_max);
+ histogramstructpointer->histAvgCluster = new TH2F(prefix.Data(), Form("Avg. cluster distribution; x; y %s", Form("%s, %s", prefix.Data(), humanreadablestr.Data())),sizearrrotx, xcoord_abs_min,xcoord_abs_max,sizearrroty,ycoord_abs_min,ycoord_abs_max);
// you can increase the resolution, especially usefull if you observe an rotated (originally staggered) pixel cluster
// histogramstructpointer->histAvgCluster = new TH2F(prefix.Data(), Form("Avg. cluster distribution; x; y %s", humanreadablestr.Data()),2*sizearrrotx, xcoord_abs_min,xcoord_abs_max,sizearrroty*2,ycoord_abs_min,ycoord_abs_max);
}