runs[runi]->setResultsPath("./results/");
runs[runi]->setPlotStyle(runi);
runs[runi]->useDynamicalNoise(true);
- runs[runi]->analyzeRun(true); // creates or opens .root file, can analyze the RAW data
+// runs[runi]->analyzeRun(true); // creates or opens .root file, can analyze the RAW data
+ runs[runi]->analyzeFrame(422);
// gROOT->SetBatch(kTRUE);
// runs[runi]->plotSeed();
// runs[runi]->plotSum();
Bool_t bordercluster=false;
Float_t noisesumincluster=0;
Float_t chargesumincluster=0;
-
+
for(Int_t i=0; i<fPixels; i++)
{
fHittedPixel[i] = 0;
HITNR++;
HITS.Set(HITNR);
HITS.AddAt(i,(HITNR-1));
-// cout << "Frame: " << fFrameNumber << " Candidate at pixel: " << i << " with ADC: " << (1.*fCdsmatrix[i]-fPedestals[i]) << endl;
+ // cout << "Frame: " << fFrameNumber << " Candidate at pixel: " << i << " with ADC: " << (1.*fCdsmatrix[i]-fPedestals[i]) << endl;
if(fSave) {
hint2->Fill(i%fColumns+0.1, (int)(i/fColumns)+0.1); // counts up in 2dimensional pixel matrix
// cout << coloryellow << "Noise für Cluster: " << noisesumincluster << endlr;
// cout << coloryellow << "ChargeSum für Cluster: " << chargesumincluster << endlr;
// debug
-// for(Int_t row=0; row<5; row++)
-// {
-// for(Int_t column=0; column<5; column++)
-// {
-// std::cout.width(10);
-// std::cout << std::fixed;
-// std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column];
-// }
-// cout << endl;
-// }
-// cout << endl;
+ // for(Int_t row=0; row<5; row++)
+ // {
+ // for(Int_t column=0; column<5; column++)
+ // {
+ // std::cout.width(10);
+ // std::cout << std::fixed;
+ // std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column];
+ // }
+ // cout << endl;
+ // }
+ // cout << endl;
//Check seeds (whether highest entry in cluster):
for(Int_t i=6; i<19; i++) // why not over full cluster? (I=0 i<25 TODO
fFrameInfo.pixel[fHits] = Hitlist[hit];
for(int clupos=0; clupos<25; clupos++)
{
+
fFrameInfo.p [clupos][fHits] = pixelchargeincluster[clupos];
}
// if cluster charge > clusternoise * const
- if (1.0*chargesumincluster > noisesumincluster*3.0)
- fFrameInfo.pixelthreshold[fHits] = Hitlist[hit];
+ // cout<<"ClusterSum"<<chargesumincluster<<"Noisesum"<<noisesumincluster<<"3*mal"<<noisesumincluster*3.0<<endl;
+ if (1.0*chargesumincluster > noisesumincluster*1.0)
+ {
+
+ fFrameInfo.pixelthreshold[fHits] = Hitlist[hit];
+
+ }
else
- fFrameInfo.pixelthreshold[fHits] = 0;
-
+ {
+ fFrameInfo.pixelthreshold[fHits] = 0;
+ }
if(fSave) {
hint1->Fill( Hitlist[hit]%fColumns, (int)(Hitlist[hit]/fColumns) );
}
cout<<"Hitted pixel discriminator matrix:"<<endl;
debugStream<>(fHittedPixel, fPixels, fColumns, 1, 1);
-
+ cout<<"CDS of PIXEL 233 is:::"<<fCdsmatrix[233]<<endl;
+ cout<<"CDS of 5 PIXEL around 233 is:::"<<","<<fCdsmatrix[230]<<","<<fCdsmatrix[231]<<","<<fCdsmatrix[232]<<","<<fCdsmatrix[233]<<","<<fCdsmatrix[234]<<","<<fCdsmatrix[235]<<endl;
TCanvas* cm1;
cm1 = new TCanvas("cm1","Matrix",50,100,1200,800);
cm1->Divide(2,3);
fstream* fout = new fstream(filename,ios::out);
TString header = Form("#bin [ADU]\tbin [e]\tSeed\tSum\tVeto\tSeed thrsh\tSum thrsh\tbin noise [ADU]\tbin noise [e]\tnoise\n");
- header += Form("#posVeto, run: %.1f, DB: %.1f, Fe55 DB (%d, %.1f): %.1f\n", histogram.posVeto, labbook.posVetoDB, Fe55run.posVetorunnumber, Fe55run.temperature, Fe55run.posVeto);
- header += Form("#posSeed, run: %.1f, DB: %.1f\n", histogram.posSeed, labbook.posSeedDB);
- header += Form("#posSum, run: %.1f, DB: %.1f\n", histogram.posSum, labbook.posSumDB);
- header += Form("#Noise [ADU]: %.2f +%.2f -%.2f\n", histogram.avgNoise, histogram.avgNoisePlus, histogram.avgNoiseMinus );
+ //header += Form("#posVeto, run: %.1f, DB: %.1f, Fe55 DB (%d, %.1f): %.1f\n", histogram.posVeto, labbook.posVetoDB, Fe55run.posVetorunnumber, Fe55run.temperature, Fe55run.posVeto);
+ //header += Form("#posSeed, run: %.1f, DB: %.1f\n", histogram.posSeed, labbook.posSeedDB);
+ //header += Form("#posSum, run: %.1f, DB: %.1f\n", histogram.posSum, labbook.posSumDB);
+ //header += Form("#Noise [ADU]: %.2f +%.2f -%.2f\n", histogram.avgNoise, histogram.avgNoisePlus, histogram.avgNoiseMinus );
if (histogramCalibrated.calibrated)
- header += Form("#Noise [e]: %.2f +%.2f -%.2f",histogramCalibrated.avgNoise, histogramCalibrated.avgNoisePlus, histogramCalibrated.avgNoiseMinus );
+ // header += Form("#Noise [e]: %.2f +%.2f -%.2f",histogramCalibrated.avgNoise, histogramCalibrated.avgNoisePlus, histogramCalibrated.avgNoiseMinus );
*fout << header << endl;
TString outline;