}
//-----------------------------------------------
//Check and open Data Files
- int MaxFiles = TMath::Ceil((Float_t) FileTotalEvNbInConfig/FileEvNbInConfig);
- if( checkDataFiles(MaxFiles) )
- {
+ //int MaxFiles = TMath::Ceil((Float_t) FileTotalEvNbInConfig/FileEvNbInConfig);
+ //if( checkDataFiles(MaxFiles) )
+ //{
fOutputFile = new TFile(fRootFile,"READ");
if (fOutputFile->IsZombie())
{
cout<<"-----------------------"<<endl;
cout<<fRootFile<<" opened!"<<endl;
cout<<"-----------------------"<<endl;
- }
+ //}
return 0;
}
//####################################################################
{
if( (float)(1.*fCdsmatrix[i]-fPedestals[i]) > (5.*fNoise[i]) )
{
+ //cout<<fCdsmatrix[i]<<"Ped:"<<fPedestals[i]<<"CDS-Ped"<<1.*fCdsmatrix[i]-fPedestals[i]<<"5timesNoise"<<5.*fNoise[i]<<endl;
HITNR++;
HITS.Set(HITNR);
HITS.AddAt(i,(HITNR-1));
Float_t chargesumincluster4=0;
Float_t noisesumincluster4=0;
Float_t noisesumincluster4Square=0;
- for(Int_t iClusterLauf=0;iClusterLauf<4;iClusterLauf++)
+ for(Int_t iClusterLauf=0;iClusterLauf<20;iClusterLauf++)
{
+ //cout<<iClusterLauf<<"."<<noiseincluster[index[iClusterLauf]]<<endl;
chargesumincluster4+=pixelchargeincluster[index[iClusterLauf]];
//noisesumincluster4+=noiseincluster[index[iClusterLauf]];
noisesumincluster4Square+=TMath::Power(noiseincluster[index[iClusterLauf]],2);
}
noisesumincluster=TMath::Sqrt(noisesumincluster);
noisesumincluster4=TMath::Sqrt(noisesumincluster4Square);
- // cout<<"Chargesumme"<<chargesumincluster4<<","<<noisesumincluster4<<","<<noisesumincluster4Square<<endl;
+ //cout<<"Chargesumme"<<chargesumincluster4<<","<<noisesumincluster4<<","<<noisesumincluster4Square<<endl;
// Float_t cdsMatrixMinusPedestal[fPixels];
// Float_t cdsMatrixSum=0;
// for(Int_t i=0; i<fPixels; i++)
// if cluster charge > clusternoise * const
if(fOrderCode=="FSBB")
{
+ // cout<<"Chargesumme"<<chargesumincluster4<<","<<noisesumincluster4<<","<<noisesumincluster4*5.0<<endl;
if (1.0*chargesumincluster4 > noisesumincluster4*5.0)
+ {
+
fFrameInfo.pixelthreshold[fHits] = Hitlist[hit];
+ }
else
fFrameInfo.pixelthreshold[fHits] = 0;
}
cout <<endl <<endl << colorwhite << "---------------- FRAME " << fFrameNumber << " ----------------" << colorreset << endl << endl;
cout<<"CDS matrix:"<<endl;
debugStream<>(fCdsmatrix, fPixels, fColumns, 0, 39);
-
+ debugStream<>(fPedestals, fPixels, fColumns, 0, 39);
Float_t cdsmatrixCorrPed[fPixels];
for(Int_t i=0; i<fPixels; i++)
{
cout << "Skipped analysis of run " << labbook.runnumber << ", I think the root file for this run allready exists." << endl;
cout << colorwhite << "initOldRootFile():" << endlr;
}
- if (processed->initOldRootFile()) return 1;
+ if (processed->initOldRootFile()) return 1;
cout << colorwhite << "binNoise():" << endlr;
binNoise();
cout << colorwhite << "binSeedSumVeto():" << endlr;
// processed->filterCommonMode();
processed->hitana();
processed->plotFrame(frame);
+ processed->plotPixSignal(0,300,795);
// delete processed;
// return 0;
// }
if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("Mi34") )
systemparamcur = systemparamUSB;
else if (labbook.system.EqualTo("USB") && labbook.chipGen.EqualTo("FSBB") )
- systemparamcur = systemparamUSB;
+ systemparamcur = systemparamFSBB;
else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
systemparamcur = systemparamPXI;
else if (labbook.system.EqualTo("Pegasus")) // && labbook.chipGen.EqualTo("34") )
// UInt_t seedPixel[10000];
// /// Array of processed->clustersize * processed->clustersize clusters, seed pixel in the middle
// Float_t pixelcluster[processed->clustersize*processed->clustersize][10000];
-
+ Int_t pixels=sensorinfocur.columns*sensorinfocur.rows;
+ histoPixelDiodeDiff = new TH1F("histoPixelDiodeDiff","histoPixelDiodeDiff",pixels,0,pixels);
/// collected charge in cluster
Float_t pixelSum = 0;
Float_t notSeedSum = 0;
+ fPixelFakeHits = new Float_t [pixels]();
+ for(int iPixel=0;iPixel<pixels;iPixel++)
+ fPixelFakeHits[iPixel]=1; //Initiate fPixelFakeHits so that all pixel are accepted (=1), will be overwritten, if getPixelWithFakehits is executed
getPixelWithFakehits();
// for (Int_t framei=0; framei<10000; framei++) // loop over all frames
if (TMath::Abs(notSeedSum) < systemparamcur.vetothreshold && (labbook.source.Contains("Fe")||labbook.source.Contains("Cd")))
histogram.Veto->Fill(processed->fFrameInfo.p[12][hiti]); // histogram with the single pixel
- if (processed->fFrameInfo.pixelthreshold[hiti]*fPixelFakeHits[processed->fFrameInfo.pixel[hiti]]>0)//If clustercharge is above threshold AND pixel is NOT a fake hit pixel according getPixelWithFakehits()
+ if (processed->fFrameInfo.pixelthreshold[hiti]*fPixelFakeHits[processed->fFrameInfo.pixel[hiti]+1]>0)//If clustercharge is above threshold AND pixel is NOT a fake hit pixel according getPixelWithFakehits() WARUM +1? WARUM GEHT fPixelFakeHits NICHT NORMAL??? ICH HABE GERADE KEINE AHNUNG
{
histogramthreshold.numberofhits++;
-
- histogramthreshold.Seed->Fill(processed->fFrameInfo.p[12][hiti]);
+ if(processed->fFrameInfo.p[12][hiti]>30)
+ {
+ // cout<<framei<<"\t"<<hiti<<"\t"<<processed->fFrameInfo.pixel[hiti]<<"\t"<<fPixelFakeHits[processed->fFrameInfo.pixel[hiti]]<<endl;
+ histoPixelDiodeDiff->Fill(processed->fFrameInfo.pixel[hiti]);
+ }
+ histogramthreshold.Seed->Fill(processed->fFrameInfo.p[12][hiti]);
// cout<<"Hitnummer"<<framei<<":"<<hiti<<": "<<"Threshold: "<<processed->fFrameInfo.pixelthreshold[hiti]<<":";
// for(int col=0;col<25;col++)
// cout<<processed->fFrameInfo.p[col][hiti]<<",";
}
}
}
-
+
+// for(int iPixel=0;iPixel<pixels;iPixel++)
+// cout<<iPixel<<":"<<histoPixelDiodeDiff->GetBinContent(iPixel)<<"\t";
+// for(int iPixel=0;iPixel<pixels;iPixel++)
+// cout<<histoPixelDiodeDiff->GetBinContent(iPixel)<<"\t";
+ //cout<<iPixel<<":"<<histoPixelDiodeDiff->GetBinContent(iPixel)<<"-----";
+// cout<<endl;
// gROOT->SetBatch(kTRUE);
if (labbook.source.Contains("Fe")||labbook.source.Contains("Cd"))
histogram.posVeto=FitPerform(histogram.Veto, "gaus", true);
}
fPixelFakeHits = new Float_t [pixels]();
fcountPixelFakeHits=0;
- Float_t fakehitrate=0.00001;
+ Float_t fakehitrate=0.0001;
Float_t sourceIntensity=1;//Adjust it depending on the intensity of the used source
if(labbook.source.Contains("Fe"))
{
// cout<<ipixel<<":"<<histoPixel->GetBinContent(ipixel)<<endl;
}
else
- {
+ {
+ // cout<<ipixel<<":"<<histoPixel->GetBinContent(ipixel)<<"\t";
fPixelFakeHits[ipixel]=1;//pixel is NOT a fake hit pixel
}