{
// gROOT->SetBatch(kTRUE);
// runs[runi]->plotSeed();
- runs[runi]->plotSeedThreshold();
+// runs[runi]->plotSeedThresholdCalibrated();
+// runs[runi]->plotSeedThreshold();
// runs[runi]->plotSeed();
// runs[runi]->plotSum();
// runs[runi]->plotVeto();
// runs[runi]->plotNoise();
if (!isBatch)
gROOT->SetBatch(kFALSE);
- // runs[runi]->plotAllHistograms();
- runs[runi]->plotAllHistogramsThresholdCluster();
+ // runs[runi]->plotAllHistograms();
+// runs[runi]->plotAllHistogramsThresholdCluster();
+// runs[runi]->plotAllHistogramsThresholdClusterCalibrated();
// runs[runi]->plotAllHistogramsCalibrated();
runs[runi]->writeAllHistogramsToFile();
}
}
}
// plotAllRuns("");
- plotAllRuns("threshold");
- writeObservableToFile("Seed");
+ plotAllRuns("threshold calibrated");
+// writeObservableToFile("seed threshold calibrated");
+ writeObservableToFile("seed threshold");
}
Int_t ReadRunList(std::vector<int>* runlist)
void writeObservableToFile(TString histogramtype)
{
- if (histogramtype.Contains("threshold")) {
- for(Int_t runi=0;runi<numberRuns;runi++)/* loop over runs read from file */ {
- runs[runi]->plothistogramstructpointer = &runs[runi]->histogramthreshold; } }
+ if (histogramtype.Contains("threshold"))
+ {
+ if (histogramtype.Contains("calibrated"))
+ {
+ for(Int_t runi=0;runi<numberRuns;runi++)/* loop over runs read from file */
+ runs[runi]->plothistogramstructpointer = &runs[runi]->histogramthresholdCalibrated;
+ }
+ else
+ {
+ for(Int_t runi=0;runi<numberRuns;runi++)/* loop over runs read from file */
+ runs[runi]->plothistogramstructpointer = &runs[runi]->histogramthreshold;
+ }
+
+ }
else if (histogramtype.Contains("calibrated") || histogramtype.Contains("electron")) {
for(Int_t runi=0;runi<numberRuns;runi++) /* loop over runs read from file */ {
runs[runi]->plothistogramstructpointer = &runs[runi]->histogramCalibrated; } }
void plotAllRuns(TString histogramtype)
{
- if (histogramtype.Contains("threshold")) {
- for(Int_t runi=0;runi<numberRuns;runi++)/* loop over runs read from file */ {
- runs[runi]->plothistogramstructpointer = &runs[runi]->histogramthreshold; } }
+ if (histogramtype.Contains("threshold"))
+ {
+ if (histogramtype.Contains("calibrated"))
+ {
+ for(Int_t runi=0;runi<numberRuns;runi++)/* loop over runs read from file */
+ runs[runi]->plothistogramstructpointer = &runs[runi]->histogramthresholdCalibrated;
+ }
+ else
+ {
+ for(Int_t runi=0;runi<numberRuns;runi++)/* loop over runs read from file */
+ runs[runi]->plothistogramstructpointer = &runs[runi]->histogramthreshold;
+ }
+
+ }
else if (histogramtype.Contains("calibrated") || histogramtype.Contains("electron")) {
for(Int_t runi=0;runi<numberRuns;runi++) /* loop over runs read from file */ {
runs[runi]->plothistogramstructpointer = &runs[runi]->histogramCalibrated; } }
- else {
- for(Int_t runi=0;runi<numberRuns;runi++) /* loop over runs read from file */ {
- runs[runi]->plothistogramstructpointer = &runs[runi]->histogram; } }
+ else {
+ for(Int_t runi=0;runi<numberRuns;runi++) /* loop over runs read from file */ {
+ runs[runi]->plothistogramstructpointer = &runs[runi]->histogram; } }
plotAllRuns();
}
binSeedSumVeto();
cout << colorwhite << "rescaleHistograms():" << endlr;
histogramCalibrated.calibrated = rescaleHistograms();
+ histogramthresholdCalibrated.calibrated = histogramCalibrated.calibrated;
cout << colorwhite << "calculateCCE():" << endlr;
calculteCCE();
cout << colorwhite << "updateDatabase():" << endlr;
histogramCalibrated.avgNoise = histogram.avgNoise * gain;
histogramCalibrated.avgNoisePlus = histogram.avgNoisePlus * gain;
histogramCalibrated.avgNoiseMinus = histogram.avgNoiseMinus * gain;
+
+ rescaleHistogram(histogramthresholdCalibrated.Seed, histogramthreshold.Seed);
+ rescaleHistogram(histogramthresholdCalibrated.Sum, histogramthreshold.Sum);
+ rescaleHistogram(histogramthresholdCalibrated.Veto, histogramthreshold.Veto);
+ rescaleHistogram(histogramthresholdCalibrated.Noise, histogramthreshold.Noise);
+
+ histogramthresholdCalibrated.posSeed = histogramthreshold.posSeed * gain;
+ histogramthresholdCalibrated.posSum = histogramthreshold.posSum * gain;
+ histogramthresholdCalibrated.posVeto = histogramthreshold.posVeto * gain;
+ histogramthresholdCalibrated.avgNoise = histogramthreshold.avgNoise * gain;
+ histogramthresholdCalibrated.avgNoisePlus = histogramthreshold.avgNoisePlus * gain;
+ histogramthresholdCalibrated.avgNoiseMinus = histogramthreshold.avgNoiseMinus * gain;
return 1;
}
return 1;
}
+Bool_t Run::plotSeedThresholdCalibrated()
+{
+ if (!error)
+ {
+ plot1DHistogram(histogramthresholdCalibrated.Seed, "landau");
+ return 0;
+ }
+ return 1;
+}
+
+
Bool_t Run::plotSum()
{
return 1;
}
+Bool_t Run::plotAllHistogramsThresholdClusterCalibrated()
+{
+ if (!error)
+ {
+ plotAllHistograms(&histogramthresholdCalibrated);
+ return 0;
+ }
+ return 1;
+}
+
Float_t Run::FitPerform(TH1F* histogrampointer, TString fitFuncType, Bool_t verbose)
{
Float_t posMax = 0;
/** @brief Plot all histograms from #histogramthreshold into one canvas */
Bool_t plotAllHistogramsThresholdCluster();
+ /** @brief Plot all histograms from #histogramthreshold into one canvas */
+ Bool_t plotAllHistogramsThresholdClusterCalibrated();
+
/** @brief Writes a given histogram into a file */
Bool_t writeHistogramToFile(TH1F* onehistogram);
Bool_t plotNoise();
Bool_t plotSeed();
Bool_t plotSeedThreshold();
+ Bool_t plotSeedThresholdCalibrated();
Bool_t plotSum();
Bool_t plotVeto();
histogramstruct histogram;
histogramstruct histogramCalibrated;
histogramstruct histogramthreshold;
+ histogramstruct histogramthresholdCalibrated;
histogramstruct* plothistogramstructpointer;
TH1F** plothistogrampointer;