From: Dennis Doering Date: Thu, 7 May 2015 10:07:49 +0000 (+0200) Subject: clusterCut fertig X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=512b2bf74d4ec6ac2cb1fc9c863735969a08077f;p=radhard.git clusterCut fertig --- diff --git a/MABS_run_analyzer/Run.c b/MABS_run_analyzer/Run.c index acf8e06..51dab68 100644 --- a/MABS_run_analyzer/Run.c +++ b/MABS_run_analyzer/Run.c @@ -597,8 +597,8 @@ Bool_t Run::binSeedSumVeto() Float_t pixelSum = 0; Float_t notSeedSum = 0; - //for (Int_t framei=0; frameifHitTree->GetEntries(); framei++) // loop over all frames - for (Int_t framei=0; framei<100; framei++) // loop over all frames + for (Int_t framei=0; frameifHitTree->GetEntries(); framei++) // loop over all frames +// for (Int_t framei=0; framei<10000; framei++) // loop over all frames { processed->fHitTree->GetEntry(framei); // account only frames with less then 10 hits @@ -608,81 +608,55 @@ Bool_t Run::binSeedSumVeto() { //------------------------------------------------------------------------------------ - cout<<"hit"<fFrameInfo.p[6][hiti]<<","<< processed->fFrameInfo.p[7][hiti]<<","<< processed->fFrameInfo.p[8][hiti]<<","<< processed->fFrameInfo.p[8][hiti]<<","<< processed->fFrameInfo.p[10][hiti]<fFrameInfo.p[10][hiti]<<","<< processed->fFrameInfo.p[11][hiti]<<","<< processed->fFrameInfo.p[12][hiti]<<","<< processed->fFrameInfo.p[13][hiti]<<","<< processed->fFrameInfo.p[14][hiti]<fFrameInfo.p[15][hiti]<<","<< processed->fFrameInfo.p[16][hiti]<<","<< processed->fFrameInfo.p[17][hiti]<<","<< processed->fFrameInfo.p[18][hiti]<<","<< processed->fFrameInfo.p[19][hiti]<clustersize*processed->clustersize]; Int_t arraySort[processed->clustersize*processed->clustersize]; for (Int_t clusteri=0; clustericlustersize*processed->clustersize; clusteri++) { array[clusteri]=processed->fFrameInfo.p[clusteri][hiti]; } - for (Int_t clusteri=0; clustericlustersize*processed->clustersize; clusteri++) - { - cout<clustersize*processed->clustersize; clusteri++) - { - cout<clustersize*processed->clustersize; clusteri++) - { - cout<fNoiseTree->SetBranchAddress("noise", &noise, &noiseBranch); - cout<<"Pixelnr"<fFrameInfo.pixel[hiti]<fNoiseTree->GetEntry(processed->fFrameInfo.pixel[hiti]);//Set &noise to the index of the seed pixel - Double_t cutValue=3*noise*TMath::Sqrt(clusterSizeForCut);//Calculate cutvalue, 3=3*sigma, Sqrt(clusterSizeForCut) counts for the noise of the summed pixel, in ideal case: Sqrt(noise_Pixel1^2+noise_Pixel2^2+noise_Pixel3^2+noise_Pixel4^2), so far simplified to the noise of seed pixel and assume the others have the same noise, therefore Sqrt(4) - cout<<"Cutwert"<cutValue) - cout<<"Yes"<cutValue)//Fill in only hits which fulfill the clustercutcondition + { + - for (Int_t clusteri=244; clusteri<245; clusteri++) - { - processed->fNoiseTree->GetEntry(clusteri); - cout<Fill(processed->fFrameInfo.p[12][hiti]); - - // sum histogram - pixelSum = 0; - notSeedSum = 0; - for (Int_t clusteri=0; clustericlustersize*processed->clustersize; clusteri++) - { - pixelSum += processed->fFrameInfo.p[clusteri][hiti]; - if (clusteri != 12) - notSeedSum += processed->fFrameInfo.p[clusteri][hiti]; - } - histogram.Sum->Fill(pixelSum); - - // veto spectrum - if (TMath::Abs(notSeedSum) < systemparamcur.vetothreshold && labbook.source.Contains("Fe")) - histogram.Veto->Fill(processed->fFrameInfo.p[12][hiti]); // histogram with the single pixel + // histogram with the single pixel + histogram.Seed->Fill(processed->fFrameInfo.p[12][hiti]); + + // sum histogram + pixelSum = 0; + notSeedSum = 0; + for (Int_t clusteri=0; clustericlustersize*processed->clustersize; clusteri++) + { + pixelSum += processed->fFrameInfo.p[clusteri][hiti]; + if (clusteri != 12) + notSeedSum += processed->fFrameInfo.p[clusteri][hiti]; + } + histogram.Sum->Fill(pixelSum); + + // veto spectrum + if (TMath::Abs(notSeedSum) < systemparamcur.vetothreshold && labbook.source.Contains("Fe")) + histogram.Veto->Fill(processed->fFrameInfo.p[12][hiti]); // histogram with the single pixel + } } } }