- Timestamp:
- 06/04/12 18:52:53 (12 years ago)
- Location:
- fact/tools/rootmacros/PulseTemplates
- Files:
-
- 2 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 -
fact/tools/rootmacros/PulseTemplates/pixel.h
r13857 r14063 23 23 #include <TString.h> 24 24 #include <TFile.h> 25 25 26 #include "TCanvas.h" 26 27 #include "TObjArray.h" … … 107 108 void DeleteEdgeTemplateHistos(); 108 109 110 //Histogram appeareance 109 111 void 110 112 MakeTH1Pretty( … … 161 163 virtual TString CsvFileName(TString, TString, int ); 162 164 165 //fit funcitons 166 // void FitFallingEdge( 167 // TString histoType, //Max or Edge 168 // double , 169 // double , 170 // TH1F* hMaximumTemp 171 // ); 172 173 // double 174 // PolExp(double* x, double* par); 175 176 //shifting 177 void ShiftHistoInY(TH1*, float); 163 178 // ACCESS 164 179 // INQUIRY … … 183 198 TH1I** hRisingEdgeToMax; 184 199 TH1I** hPosOfMax; 200 TH1F** hChi2EdgetoMax; 185 201 186 202 //Max Overlay Template Histos
Note:
See TracChangeset
for help on using the changeset viewer.