Changeset 14063 for fact/tools/rootmacros/PulseTemplates/pixel.C
- Timestamp:
- 06/04/12 18:52:53 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/pixel.C
r13855 r14063 1 1 #include <iostream> 2 #include <TMath.h> 3 #include <TF1.h> 2 4 3 5 #include "rootfilehandler.h" … … 52 54 53 55 hList = new TList(); 56 57 if (mOptions.Contains("C") ) 58 { 59 hChi2EdgetoMax = new TH1F*[mMaxPulseOrder]; 60 } 61 54 62 if (options.Contains("L")) 55 63 { … … 60 68 BookPixelHistos(); 61 69 } 70 71 if (mOptions.Contains("C")) 72 { 73 BookDistributionHistos(); 74 } 75 62 76 BookTemplateHistos(); 63 77 BookEdgeTemplateHistos(); … … 227 241 { 228 242 pixelCanvas[pulse_order]->cd( histoFrameNr[0] ); 243 hMaxOverlay[pulse_order]->Draw("COLZ"); 244 245 pixelCanvas[pulse_order]->cd( histoFrameNr[1] ); 229 246 hPixelMax[pulse_order]->Draw(); 230 247 231 pixelCanvas[pulse_order]->cd( histoFrameNr[ 1] );248 pixelCanvas[pulse_order]->cd( histoFrameNr[2] ); 232 249 hPixelMedian[pulse_order]->Draw(); 233 250 234 pixelCanvas[pulse_order]->cd( histoFrameNr[ 2] );251 pixelCanvas[pulse_order]->cd( histoFrameNr[3] ); 235 252 hPixelMean[pulse_order]->Draw(); 253 // hPixelMax[pulse_order]->Draw("SAME"); 254 // hPixelMedian[pulse_order]->Draw("SAME"); 236 255 237 256 } … … 249 268 for (int pulse_order = 0; pulse_order < mMaxPulseOrder; pulse_order++) 250 269 { 251 pixelCanvas[pulse_order]->cd( histoFrameNr[0] ); 270 pixelCanvas[pulse_order]->cd( histoFrameNr[4] ); 271 hEdgeOverlay[pulse_order]->Draw("COLZ"); 272 273 pixelCanvas[pulse_order]->cd( histoFrameNr[5] ); 252 274 hPixelEdgeMax[pulse_order]->Draw(); 253 275 254 pixelCanvas[pulse_order]->cd( histoFrameNr[ 1] );276 pixelCanvas[pulse_order]->cd( histoFrameNr[6] ); 255 277 hPixelEdgeMedian[pulse_order]->Draw(); 256 278 257 pixelCanvas[pulse_order]->cd( histoFrameNr[ 2] );279 pixelCanvas[pulse_order]->cd( histoFrameNr[7] ); 258 280 hPixelEdgeMean[pulse_order]->Draw(); 281 // hPixelEdgeMax[pulse_order]->Draw("SAME"); 282 // hPixelEdgeMedian[pulse_order]->Draw("SAME"); 259 283 260 284 } … … 526 550 } 527 551 552 if (mOptions.Contains("C")) 553 { 554 if (mVerbosityLevel > 3) cout << "\t...booking " << HistoName("hSlopeRisingEdge", order) << endl; 555 hChi2EdgetoMax[order] = new TH1F ( 556 HistoName("hChi2EdgetoMax", order), 557 HistoTitle("Distribution of CHI2 comparison of Edge and Max", order), 558 600, 559 -299, 560 300 561 ); 562 hChi2EdgetoMax[order]->SetAxisRange( 563 -1, 564 7, 565 "X"); 566 hChi2EdgetoMax[order]->GetXaxis()->SetTitle( "p-Value" ); 567 hChi2EdgetoMax[order]->GetYaxis()->SetTitle( "counts" ); 568 hChi2EdgetoMax[order]->SetStats(mStats); 569 // hList->Add( hChi2EdgetoMax[order] ); 570 } 571 528 572 if (mVerbosityLevel > 2) cout << "...done" << endl; 529 573 } … … 1061 1105 1062 1106 1063 1107 void 1108 Pixel::ShiftHistoInY( 1109 TH1* histo, 1110 float shift 1111 ) 1112 { 1113 int min_bin = histo->GetXaxis()->GetFirst(); 1114 int max_bin = histo->GetXaxis()->GetLast(); 1115 1116 for (int bin = min_bin; bin <= max_bin; bin++) 1117 { 1118 histo->AddBinContent( bin, shift); 1119 } 1120 1121 } 1122 1123
Note:
See TracChangeset
for help on using the changeset viewer.