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]>0)
+ 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()
{
- Bool_t pixelfound=false;
- for(int col=0;col<fcountPixelFakeHits;col++)
- {
- if(fPixelFakeHits[col]==processed->fFrameInfo.pixel[hiti])
- {
- pixelfound=true;
- }
- }
- if(pixelfound==true)
- {
- continue;//If pixel is a fake hit pixel with a rate >1e-5, do not count it
- }
- // if(pixelfound==false)
- // {
- // cout<<"Pixel"<<processed->fFrameInfo.pixel[hiti]<<" NOT found in array"<<endl;
- // }
+
histogramthreshold.numberofhits++;
histogramthreshold.Seed->Fill(processed->fFrameInfo.p[12][hiti]);
}
fPixelFakeHits = new Float_t [pixels]();
fcountPixelFakeHits=0;
- for(int col=0;col<pixels;col++)
+ Float_t fakehitrate=0.00001;
+ Float_t sourceIntensity=1;//Adjust it depending on the intensity of the used source
+ if(labbook.source.Contains("Fe"))
{
- Float_t fakehitrate=0.00001;
- Float_t sourceIntensity=1;//Adjust it depending on the intensity of the used source
- if(labbook.source.Contains("Fe"))
- {
- sourceIntensity=30;
- }
- else if(labbook.source.Contains("Sr"))
- {
- sourceIntensity=2;
+ sourceIntensity=30;
+ }
+ else if(labbook.source.Contains("Sr"))
+ {
+ sourceIntensity=2;
+ }
+ else if(labbook.source.Contains("Cd"))
+ {
+ sourceIntensity=2;
+ }
+ for(int ipixel=0;ipixel<pixels;ipixel++)
+ {
+ if(histoPixel->GetBinContent(ipixel)>fakehitrate*sourceIntensity*labbook.frames_foundDB)//show only pixels with a fake hit rate above 1e-5
+ {
+ fcountPixelFakeHits++;
+ fPixelFakeHits[ipixel]=0;//pixel is a fake hit pixel
+
+ // cout<<ipixel<<":"<<histoPixel->GetBinContent(ipixel)<<endl;
}
- else if(labbook.source.Contains("Cd"))
+ else
{
- sourceIntensity=2;
- }
- if(histoPixel->GetBinContent(col)>fakehitrate*sourceIntensity*labbook.frames_foundDB)//show only pixels with a fake hit rate above 1e-5
- {
- fPixelFakeHits[fcountPixelFakeHits]=col;
- fcountPixelFakeHits++;
- cout<<col<<":"<<histoPixel->GetBinContent(col)<<endl;
+ fPixelFakeHits[ipixel]=1;//pixel is NOT a fake hit pixel
}
+
}
+ cout<<"Number of masked pixel due to a fake hit rate above "<<fakehitrate<<"is: "<<fcountPixelFakeHits<<" of "<<pixels<<endl;
return;
}
#endif