Changeset 12754 for fact/tools/rootmacros/gainfit2.C
- Timestamp:
- 01/24/12 05:17:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/gainfit2.C
r12721 r12754 44 44 //----------------------------------------------------------------------------- 45 45 UInt_t NumberOfPixels; 46 46 #define MAX_SIGMA 4 47 47 typedef struct{ 48 48 UInt_t PID; … … 101 101 const char * OutTextFileName = "../analysis/fpeak/20111110_005/20111110_005_gainfit.txt", 102 102 const char * RootOutFileName = "../analysis/fpeak/20111110_005/20111110_005_gainfit.root", 103 bool showHistos = true,104 bool debug = true,105 int verbosityLevel = 2)103 bool showHistos = false, 104 bool debug = false, 105 int verbosityLevel = 4) 106 106 { 107 107 … … 274 274 hPixelAmplSpek[ pixel ]->Fit(fspek_fit2,verbos[fitverb]+"R+"); 275 275 channel[ pixel ].ampl_fspek_fit2 = fspek_fit2->GetParameter(1); 276 276 277 277 if( showHistos ){ 278 278 hPixelAmplSpek[ pixel ]->Draw(); … … 325 325 gr2->SetPoint(pixel, channel[pixel].PID, channel[pixel].ampl_fspek_fit2); 326 326 327 328 327 if( showHistos ){ 329 328 if (pixel%60==0){ … … 379 378 cGraphs->cd(2); 380 379 gr1->Draw("APL"); 380 hList.Add(gr1); 381 hList.Add(gr2); 381 382 cGraphs->Modified(); 382 383 cGraphs->Update(); … … 416 417 417 418 //check if pixel gain is compareable to gain of the others and save result to logfile 418 channel[ pixel ].crazy = SearchAnormal(pixel, 4, verbosityLevel);419 channel[ pixel ].crazy = SearchAnormal(pixel, MAX_SIGMA, verbosityLevel); 419 420 if (channel[ pixel ].crazy) hListCrazy.Add(hPixelAmplSpek[ pixel ]); 420 421 out << channel[ pixel ].crazy << "\t" ; … … 540 541 bool SearchAnormal(UInt_t pixel, Double_t distance, int verbosityLevel){ 541 542 Double_t check = channel[ pixel ].ampl_fspek_fit; 542 check = TMath::Sqrt(check*check); 543 if (check < (distance * distribution.sigma + distribution.mean)){ 543 // check = TMath::Sqrt(check*check); 544 if ( check > ( distribution.mean - distance * distribution.sigma ) 545 && check < ( distribution.mean + distance * distribution.sigma )){ 544 546 return false; 545 547 } 546 548 else{ 547 if (verbosityLevel > 2) cout << "Not normal behaviour in Pixel: " << pixel +1<< endl;549 if (verbosityLevel > 2) cout << "Not normal behaviour in Pixel: " << pixel << endl; 548 550 return true; 549 551 }
Note:
See TracChangeset
for help on using the changeset viewer.