Changeset 12502 for fact/tools/rootmacros
- Timestamp:
- 11/12/11 01:34:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/fpeak_cfd.C
r12393 r12502 80 80 TObjArray hList; 81 81 82 void BookHistos( );82 void BookHistos( TString &title ); 83 83 void SaveHistograms(const char * ); 84 84 … … 91 91 // * find peaks (CFD and normal discriminator) 92 92 // * compute pulse height and pulse integral spektrum of the peaks 93 int fpeak (93 int fpeak_cfd( 94 94 char *datafilename = "data/20111016_013.fits.gz", 95 95 const char *drsfilename = "../../20111016_011.drs.fits.gz", … … 100 100 int npixel = -1, 101 101 bool spikeDebug = false, 102 int avg1 = 14,102 int avg1 = 8, 103 103 int avg2 = 8, 104 104 int verbosityLevel = 1, // different verbosity levels can be implemented here … … 108 108 gStyle->SetPalette(1,0); 109 109 gROOT->SetStyle("Plain"); 110 111 TString histogramtitle; 112 histogramtitle += datafilename; 113 histogramtitle += " "; 114 histogramtitle += drsfilename ; 115 histogramtitle += " "; 116 117 histogramtitle += avg1; 118 histogramtitle += " "; 119 histogramtitle += avg2; 120 // histogramtitle += " 3.0 100"; 121 cout << histogramtitle.Data() << endl; 122 110 123 111 124 TCanvas *cFiltered = NULL; … … 158 171 drs_n); 159 172 160 BookHistos( );173 BookHistos( histogramtitle ); 161 174 //----------------------------------------------------------------------------- 162 175 // Loops over Every Event and Pixel … … 197 210 EnlargeRegion( *zXings, 10, 10); 198 211 findAbsMaxInRegions( *zXings, Vslide); 199 removeMaximaBelow( *zXings, 3.0, 0); 200 removeRegionWithMaxOnEdge( *zXings, 2); 201 removeRegionOnFallingEdge( *zXings, 100); 202 212 // removeMaximaBelow( *zXings, 3.0, 0); 213 // removeRegionWithMaxOnEdge( *zXings, 2); 214 // removeRegionOnFallingEdge( *zXings, 100); 215 216 203 217 // fill maxima in Histogram 204 218 if (zXings->size() != 0 ){ … … 301 315 302 316 // booking and parameter settings for all histos 303 void BookHistos( ){317 void BookHistos( TString& title){ 304 318 // histograms for baseline extraction 305 319 306 hAmplSpek_cfd = new TH2F("hAmplSpek_cfd","amplitude spektrum - CFD",1440,-0.5,1439.5, 256, -27.5, 100.5); 320 321 322 hAmplSpek_cfd = new TH2F("hAmplSpek_cfd", title,1440,-0.5,1439.5, 256, -27.5, 100.5); 307 323 hAmplSpek_cfd->GetXaxis()->SetTitle( "pixel" ); 308 324 hAmplSpek_cfd->GetYaxis()->SetTitle( "amplitude in mV" ); … … 330 346 } 331 347 332 void SaveHistograms( const char * loc_fname 348 void SaveHistograms( const char * loc_fname){ 333 349 // create the histogram file (replace if already existing) 334 350 TFile tf( loc_fname, "RECREATE");
Note:
See TracChangeset
for help on using the changeset viewer.