datainput3 =new TNtupleO("ntuple3", "data", "x:y:xerr:yerr");
TNtupleO *prop2ndpixelfire;
prop2ndpixelfire =new TNtupleO("Prop. 2nd pixel", "data", "x:y:xerr:yerr");
+ TNtupleO *averageChargeCollectedSeed;
+ averageChargeCollectedSeed =new TNtupleO("Average charge collected by Seed", "data", "x:y:xerr:yerr");
+ TNtupleO *averageChargeCollectedSum;
+ averageChargeCollectedSum =new TNtupleO("Average charge collected by Sum", "data", "x:y:xerr:yerr");
for(Int_t runi=0; runi<numberRuns; runi++) // loop over runs read from file or given as aparameters
{
if (runList[runi]>0)
//runs[runi]->setNoisethresholdborderE(220);
// runs[runi]->analyzeFrame(680);
// continue;
+ runs[runi]->setFixedThresholdValueADU(30);
// creates or opens .root file, can analyze the RAW data
compareHistogramClassVector.push_back(runs[runi]->histogram->normalized);
}
- if (analysisis.Contains("fixthresh") || analysisis.Contains("fixedthresh")) { // fixed threshold analysis
+ if (analysisis.Contains("dynthresh") || analysisis.Contains("dynamicalthresh")) { // fixed threshold analysis
compareHistogramClassVector4.push_back(runs[runi]->histogram);
- compareHistogramClassVector4.push_back(runs[runi]->histogramfixedthreshold);
+ compareHistogramClassVector4.push_back(runs[runi]->histogramdynamicalthreshold);
plotAllRuns(&compareHistogramClassVector4);
compareHistogramClassVector4.clear();
}
}
if (analysisis.Contains("depl")) { // depletion analysis
- compareHistogramVector.push_back(runs[runi]->histogramfixedthreshold->SeedPerc);
+ compareHistogramVector.push_back(runs[runi]->histogramdynamicalthreshold->normalized->SeedPerc);
- datainputPosVeto->itsHistogramType = runs[runi]->histogramfixedthreshold;
+ datainputPosVeto->itsHistogramType = runs[runi]->histogramdynamicalthreshold;
datainputPosVeto->xaxisTitle = "Voltage";
datainputPosVeto->yaxisTitle = "Position Veto";
- datainputPosVeto->Fill(runs[runi]->labbook.depletionV,runs[runi]->histogramfixedthreshold->posVeto,0,0);
+ datainputPosVeto->Fill(runs[runi]->labbook.depletionV,runs[runi]->histogramdynamicalthreshold->posVeto,0,0);
if (runi+1 == runnumber)
ntupleVector.push_back(datainputPosVeto);
-
- prop2ndpixelfire->itsHistogramType = runs[runi]->histogramfixedthreshold;
+
+ prop2ndpixelfire->itsHistogramType = runs[runi]->histogramdynamicalthreshold;
prop2ndpixelfire->xaxisTitle = "Voltage";
prop2ndpixelfire->yaxisTitle = "Propability for second pixel to fire";
- prop2ndpixelfire->Fill(runs[runi]->labbook.depletionV,runs[runi]->histogramfixedthreshold->clustermultiplicity->GetBinContent(2),0,0);
- cout << colorcyan << " Cluster Mult.:" << runs[runi]->histogramfixedthreshold->clustermultiplicity << endlr;
+ prop2ndpixelfire->Fill(runs[runi]->labbook.depletionV,runs[runi]->histogramdynamicalthreshold->clustermultiplicity->GetBinContent(2),0,0);
+ cout << colorcyan << " Cluster Mult.:" << runs[runi]->histogramdynamicalthreshold->clustermultiplicity << endlr;
if (runi+1 == runnumber)
ntupleVector3.push_back(prop2ndpixelfire);
for (UInt_t sumi = 0; sumi < 9; sumi++) {
AverageCharge[sumi] = 0;
TotalHits[sumi] = 0;
- for (Int_t bini = 1; bini <= (*runs[runi]->histogramfixedthreshold->a_Sum)[sumi]->GetXaxis()->GetNbins();++bini) {
- AverageCharge[sumi] += (*runs[runi]->histogramfixedthreshold->a_Sum)[sumi]->GetBinContent(bini)*(*runs[runi]->histogramfixedthreshold->a_Sum)[sumi]->GetBinCenter(bini);
- TotalHits[sumi] += (*runs[runi]->histogramfixedthreshold->a_Sum)[sumi]->GetBinContent(bini);
+ for (Int_t bini = 1; bini <= (*runs[runi]->histogramdynamicalthreshold->a_Sum)[sumi]->GetXaxis()->GetNbins();++bini) {
+ AverageCharge[sumi] += (*runs[runi]->histogramdynamicalthreshold->a_Sum)[sumi]->GetBinContent(bini)*(*runs[runi]->histogramdynamicalthreshold->a_Sum)[sumi]->GetBinCenter(bini);
+ TotalHits[sumi] += (*runs[runi]->histogramdynamicalthreshold->a_Sum)[sumi]->GetBinContent(bini);
}
- AverageCharge[sumi] /= TotalHits[sumi]/runs[runi]->histogramfixedthreshold->gain;
+ AverageCharge[sumi] /= TotalHits[sumi]/runs[runi]->histogramdynamicalthreshold->gain;
}
TNtupleO *numpixelincl;
compareHistogramVector2.push_back((*runs[runi]->histogram->normalized->a_Sum)[sumi]);
numpixelincl->Fill(sumi+1,AverageCharge[sumi],0,0);
}
- ntupleVector2.push_back(numpixelincl);
+ ntupleVector2.push_back(numpixelincl);
}
if (analysisis.Contains("rts")) { // rts studies
if (analysisis.Contains("seedf")) { // seedfit: seed integral anaylsis
runs[runi]->plot1DHistogram( runs[runi]->histogram->normalized->Seed, "gaus", true, false, false, runs[runi]->histogram->fixedThresholdValue);
- runs[runi]->plot1DHistogram( runs[runi]->histogramfixedthreshold->normalized->Seed, "gaus", true, false, false, runs[runi]->histogram->fixedThresholdValue);
+ runs[runi]->plot1DHistogram( runs[runi]->histogramdynamicalthreshold->normalized->Seed, "gaus", true, false, false, runs[runi]->histogram->fixedThresholdValue);
compareHistogramVector6.push_back(runs[runi]->histogram->Seed);
- compareHistogramVector6.push_back(runs[runi]->histogramfixedthreshold->Seed);
+ compareHistogramVector6.push_back(runs[runi]->histogramdynamicalthreshold->Seed);
CompareHistograms(&compareHistogramVector6);
compareHistogramVector6.clear();
for (UInt_t sumi = 0; sumi < 25; sumi++) {
AverageCharge25[sumi] = 0;
TotalHits25[sumi] = 0;
- for (Int_t bini = 1; bini <= runs[runi]->histogramfixedthreshold->a_Sum25[sumi]->GetXaxis()->GetNbins();++bini) {
- AverageCharge25[sumi] += runs[runi]->histogramfixedthreshold->a_Sum25[sumi]->GetBinContent(bini)*runs[runi]->histogramfixedthreshold->a_Sum25[sumi]->GetBinCenter(bini);
- TotalHits25[sumi] += runs[runi]->histogramfixedthreshold->a_Sum25[sumi]->GetBinContent(bini);
+ for (Int_t bini = 1; bini <= runs[runi]->histogramdynamicalthreshold->a_Sum25[sumi]->GetXaxis()->GetNbins();++bini) {
+ AverageCharge25[sumi] += runs[runi]->histogramdynamicalthreshold->a_Sum25[sumi]->GetBinContent(bini)*runs[runi]->histogramdynamicalthreshold->a_Sum25[sumi]->GetBinCenter(bini);
+ TotalHits25[sumi] += runs[runi]->histogramdynamicalthreshold->a_Sum25[sumi]->GetBinContent(bini);
}
-// AverageCharge25[sumi] /= TotalHits25[sumi]/runs[runi]->histogramfixedthreshold->gain;
+// AverageCharge25[sumi] /= TotalHits25[sumi]/runs[runi]->histogramdynamicalthreshold->gain;
}
TNtupleO *numpixelincl2;
for (UInt_t sumi = 0; sumi < 9; sumi++) {
AverageCharge9[sumi] = 0;
TotalHits9[sumi] = 0;
- for (Int_t bini = 1; bini <= runs[runi]->histogramfixedthreshold->a_Sum9[sumi]->GetXaxis()->GetNbins();++bini) {
- AverageCharge9[sumi] += runs[runi]->histogramfixedthreshold->a_Sum9[sumi]->GetBinContent(bini)*runs[runi]->histogramfixedthreshold->a_Sum9[sumi]->GetBinCenter(bini);
- TotalHits9[sumi] += runs[runi]->histogramfixedthreshold->a_Sum9[sumi]->GetBinContent(bini);
+ for (Int_t bini = 1; bini <= runs[runi]->histogramdynamicalthreshold->a_Sum9[sumi]->GetXaxis()->GetNbins();++bini) {
+ AverageCharge9[sumi] += runs[runi]->histogramdynamicalthreshold->a_Sum9[sumi]->GetBinContent(bini)*runs[runi]->histogramdynamicalthreshold->a_Sum9[sumi]->GetBinCenter(bini);
+ TotalHits9[sumi] += runs[runi]->histogramdynamicalthreshold->a_Sum9[sumi]->GetBinContent(bini);
}
-// AverageCharge9[sumi] /= TotalHits9[sumi]/runs[runi]->histogramfixedthreshold->gain;
+// AverageCharge9[sumi] /= TotalHits9[sumi]/runs[runi]->histogramdynamicalthreshold->gain;
}
TNtupleO *numpixelincl;
}
+ if (analysisis.Contains("temp")) { // analyze cluster formation
+ compareHistogramClassVector5.push_back(runs[runi]->histogramfixedthreshold->normalized);
+
+ Double_t AverageChargeTempSeed = 0;
+ Double_t AverageChargeTempSum = 0;
+ Double_t TotalHitsTemp = 0;
+ for (Int_t bini = 1; bini <= runs[runi]->histogramfixedthreshold->normalized->Seed->GetXaxis()->GetNbins();++bini) {
+ AverageChargeTempSeed += runs[runi]->histogramfixedthreshold->normalized->Seed->GetBinContent(bini)*runs[runi]->histogramfixedthreshold->normalized->Seed->GetBinCenter(bini);
+ TotalHitsTemp += runs[runi]->histogramfixedthreshold->normalized->Seed->GetBinContent(bini);
+ }
+ AverageChargeTempSeed /= TotalHitsTemp;
+ for (Int_t bini = 1; bini <= (*runs[runi]->histogramfixedthreshold->normalized->Sum)->GetXaxis()->GetNbins();++bini) {
+ AverageChargeTempSum += (*runs[runi]->histogramfixedthreshold->normalized->Sum)->GetBinContent(bini)*(*runs[runi]->histogramfixedthreshold->normalized->Sum)->GetBinCenter(bini);
+ }
+ AverageChargeTempSum /= TotalHitsTemp;
+
+ averageChargeCollectedSeed->itsHistogramType = runs[runi]->histogramfixedthreshold->normalized;
+ averageChargeCollectedSeed->xaxisTitle = "Temperature [°C]";
+ averageChargeCollectedSeed->yaxisTitle = "Average charge collected [ADU]";
+
+ averageChargeCollectedSum->itsHistogramType = runs[runi]->histogramfixedthreshold->normalized;
+ averageChargeCollectedSum->xaxisTitle = "Temperature [°C]";
+ averageChargeCollectedSum->yaxisTitle = "Average charge collected [ADU]";
+
+ averageChargeCollectedSeed->Fill(runs[runi]->labbook.tempSens,AverageChargeTempSeed,2,0);
+ averageChargeCollectedSum->Fill(runs[runi]->labbook.tempSens,AverageChargeTempSum,2,0);
+
+ }
+
}
}
} // loop over all runs end
+ ntupleVector6.push_back(averageChargeCollectedSeed);
+ ntupleVector6.push_back(averageChargeCollectedSum);
printSummaryTable(&compareHistogramClassVector);
printSummaryTable(&compareHistogramClassVector2);
plot1DData(&ntupleVector7);
plot1DData(&ntupleVector8);
plot1DData(&ntupleVector9);
-CompareLeageCurrent(&compareHistogramClassVector4);
-CompareLeageCurrent(&compareHistogramClassVector5);
+CompareLeageCurrent(&compareHistogramClassVector8);
+CompareLeageCurrent(&compareHistogramClassVector9);
writeObservableToFile();
writeOneHistogramTypeToFile(&compareHistogramClassVector);
initHistogram(Veto, "Veto" + histogramdescription, color, style);
initHistogram(Noise, "Noise" + histogramdescription, color, style);
initHistogram(NoiseEnd, "Noise at end" + histogramdescription, 16, style);
- initHistogramCustom(SeedPerc, "Seed Percentage" + histogramdescription, color, style, 0, 120, 121, Form("Entries [1/%%]"), "Q_coll [%]");
+ initHistogramCustom(SeedPerc, "Seed Percentage" + histogramdescription, color, style, 0, 120, 121, Form("Entries"), "Q_coll [%]");
initHistogramCustom(clustermultiplicity, "Cluster multiplicity" + histogramdescription, color, style, 0.5, 6.5, 6, Form("Entries"), "Number of pixel fired");
initHistogramCustom(pixeltimefired, "Pixel fired, used for " + histogramdescription, color, style, 0, cursensorinfo->columns*cursensorinfo->rows, cursensorinfo->columns*cursensorinfo->rows, "Pixel index", "Counts");
initHistogramCustom(pixeltimefiredDistrib, "Fire counter" + histogramdescription, color, style, 0, labbook->frames_foundDB/100, labbook->frames_foundDB/100, "times fired", "Counts");
// dynamical cluster threshold cut
histogramthreshold = new HistogramType(" Threshold", &cursystemparam, &cursensorinfo, humanreadablestr, &labbook, this, rootcolors[plotStyle], rootlinestyle[plotStyle] );
HistogramClassVector.push_back(histogramthreshold);
- // fixed threshold cut
+ // dynamical threshold cut
+ histogramdynamicalthreshold = new HistogramType(" dynamical Threshold", &cursystemparam, &cursensorinfo, humanreadablestr, &labbook, this, rootcolors[plotStyle], rootlinestyle[plotStyle]);
+ HistogramClassVector.push_back(histogramdynamicalthreshold);
+ // fixed threshold cut
histogramfixedthreshold = new HistogramType(" fixed Threshold", &cursystemparam, &cursensorinfo, humanreadablestr, &labbook, this, rootcolors[plotStyle], rootlinestyle[plotStyle]);
HistogramClassVector.push_back(histogramfixedthreshold);
// RTS pixel removed histograms
cout << colorwhite << "integrateSr90Spectra():" << endlr;
histogramthreshold->integrateSr90Spectra(histogramthreshold->Seed, frames_found, -1, true);
histogramthreshold->integrateSr90Spectras(frames_found, -1, false);
- if (histogramfixedthreshold != 0) {
- histogramfixedthreshold->integrateSr90Spectra(histogramfixedthreshold->Seed, frames_found, 0);
- histogramfixedthreshold->integrateSr90Spectras(frames_found, -1, false);
+ if (histogramdynamicalthreshold != 0) {
+ histogramdynamicalthreshold->integrateSr90Spectra(histogramdynamicalthreshold->Seed, frames_found, 0);
+ histogramdynamicalthreshold->integrateSr90Spectras(frames_found, -1, false);
}
}
cout << colorwhite << "normalizeHistogramClasses():" << endlr;
// Add code to set the pointer histogramclassToUseForDB to class to use for database values
// histogramclassToUseForDB = histogramthreshold;
if (labbook.chipGen.EqualTo("Pipper2")) {
- histogramclassToUseForDB = histogramfixedthreshold;
+ histogramclassToUseForDB = histogramdynamicalthreshold;
} else {
histogramclassToUseForDB = histogramwoRTSthreshold;
}
}
} else if (filli == 1) { // second fill round, some histograms are allready filled
- // histogramfixedthreshold relies on "histogram", therefore 'histogram' has to be completly filled before a threshold can be Set
+ // histogramdynamicalthreshold relies on "histogram", therefore 'histogram' has to be completly filled before a threshold can be Set
// bin the fixed threshold for charge histogram class
- if (histogramfixedthreshold != 0 && histogram != 0) {
- if (histogramfixedthreshold->fixedThresholdValue <= 0) {
+ if (histogramdynamicalthreshold != 0 && histogram != 0) {
+ if (histogramdynamicalthreshold->fixedThresholdValue <= 0) {
Float_t highestval = histogram->Seed->GetMaximum();
float_t cutval = (*histogram->Sum)->GetBinCenter((*histogram->Sum)->FindLastBinAbove(highestval/4,1));
- setFixedThresholdValueADU(cutval*0.6); // change back to *0.8
+ setFixedThresholdValueADU(histogramdynamicalthreshold, cutval*0.6); // change back to *0.8
+ }
+ if (pixelSum > histogramdynamicalthreshold->fixedThresholdValue) // charge is more then histogramdynamicalthreshold->fixedThresholdValue in whole cluster
+ {
+ histogramdynamicalthreshold->numberofhits++;
+ fillAHistogramsinclass(histogramdynamicalthreshold, hiti, completeclustersize, pixelSum, notSeedSum, &a_pixelSum[0], &a_notSeedSum[0], pixelSum25, notSeedSum25, &a_pixelSum25[0], &a_notSeedSum25[0], pixelSum9, notSeedSum9, &a_pixelSum9[0], &a_notSeedSum9[0]);
+ }
+ }
+
+ // histogramfixedthreshold relies on "histogram", therefore 'histogram' has to be completly filled before a threshold can be Set
+ // bin the fixed threshold for charge histogram class
+ if (histogramfixedthreshold != 0 && histogram != 0) {
+ if (histogramfixedthreshold->fixedThresholdValue <= 0) {
+ setFixedThresholdValueADU(histogramfixedthreshold, 30); // change back to *0.8
}
if (pixelSum > histogramfixedthreshold->fixedThresholdValue) // charge is more then histogramfixedthreshold->fixedThresholdValue in whole cluster
{
(*curHistogramClass)->sigmaSeedPerc = parameters[2];
for (Int_t bini=1; bini <= 100; bini++) {
- (*curHistogramClass)->SeedPerc->SetBinContent(bini,(*curHistogramClass)->SeedPerc->GetBinContent(bini));//((*curHistogramClass)->SeedPerc->GetEntries()));
+ (*curHistogramClass)->SeedPerc->SetBinContent(bini,(*curHistogramClass)->SeedPerc->GetBinContent(bini));///((*curHistogramClass)->SeedPerc->GetEntries()));
}
}
- if (histogramfixedthreshold != 0) {
- histogramfixedthreshold->noisethresholdborder=0;
+ if (histogramdynamicalthreshold != 0) {
+ histogramdynamicalthreshold->noisethresholdborder=0;
}
// gROOT->SetBatch(kFALSE);
return 0;
histogram->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
if (processed->fFrameInfo.pixelthreshold[hiti]>0)
histogramthreshold->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
- if (histogramfixedthreshold != 0)
+ if (histogramdynamicalthreshold != 0)
if (processed->fFrameInfo.pixelfixedthreshold[hiti]>0)
- histogramfixedthreshold->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
+ histogramdynamicalthreshold->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
}
}
else // Diode sitzt unten im SeedPixel, da nach PitchY angeordnet
histogram->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
if (processed->fFrameInfo.pixelthreshold[hiti]>0)
histogramthreshold->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
- if (histogramfixedthreshold != 0)
+ if (histogramdynamicalthreshold != 0)
if (processed->fFrameInfo.pixelfixedthreshold[hiti]>0)
- histogramfixedthreshold->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
+ histogramdynamicalthreshold->histAvgCluster->Fill(xcoord,ycoord,processed->fFrameInfo.p[clusteri][hiti]);
}
}
}
for (Int_t clustery = 1; clustery <=histogram->histAvgCluster->GetYaxis()->GetNbins();clustery++) {
histogram->histAvgCluster->SetBinContent(clusterx,clustery,histogram->histAvgCluster->GetBinContent(clusterx,clustery)/histogram->numberofhits);
histogramthreshold->histAvgCluster->SetBinContent(clusterx,clustery,histogramthreshold->histAvgCluster->GetBinContent(clusterx,clustery)/histogramthreshold->numberofhits);
- if (histogramfixedthreshold != 0)
- histogramfixedthreshold->histAvgCluster->SetBinContent(clusterx,clustery,histogramfixedthreshold->histAvgCluster->GetBinContent(clusterx,clustery)/histogramfixedthreshold->numberofhits);
+ if (histogramdynamicalthreshold != 0)
+ histogramdynamicalthreshold->histAvgCluster->SetBinContent(clusterx,clustery,histogramdynamicalthreshold->histAvgCluster->GetBinContent(clusterx,clustery)/histogramdynamicalthreshold->numberofhits);
}
}
HistogramType* histogram = 0;
HistogramType* histogramthreshold = 0;
HistogramType* histogramfixedthreshold = 0;
+ HistogramType* histogramdynamicalthreshold = 0;
HistogramType* histogramwoRTS = 0;
HistogramType* histogramwoRTSthreshold = 0;