Changeset 19951 for trunk/Mars/hawc/fit_singles.C
- Timestamp:
- 04/29/20 21:48:05 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/hawc/fit_singles.C
r19875 r19951 93 93 94 94 // Print function parameters 95 void PrintFunc(TF1 &f, float integration_window= 30)95 void PrintFunc(TF1 &f, float integration_window=40) 96 96 { 97 97 //cout << "--------------------" << endl; … … 113 113 // The parameters for the function are the filenam from the gain extraction 114 114 // and the output filename 115 int fit_singles(const char *filename = " 20191027_006_006.root",116 const char *outfile = " 20190227_006_006-fit.root",115 int fit_singles(const char *filename = "/home/giangdo/Documents/Master/MA/pulse/data_single_pe/extracted/20191027_006_006.root", 116 const char *outfile = "/home/giangdo/Documents/Master/MA/pulse/data_single_pe/extracted/20191027_006_006_fit.root", 117 117 bool fixednoise=false) 118 118 { 119 119 // Read the mapping between bias channels and hardware channels 120 120 PixelMap pmap; 121 if (!pmap.Read(" ../hawc/FAMOUSmap171218.txt"))122 { 123 cout << " FAMOUSmap171218.txt not found." << endl;121 if (!pmap.Read("/home/giangdo/Documents/Master/MA/Software/Mars/hawc/HAWCsEyemap181214.txt")) 122 { 123 cout << "HAWCsEyemap181214.txt not found." << endl; 124 124 return 1; 125 125 } 126 126 127 127 // It is more correct to fit the integral, but this is super 128 // slow , especially for 1440 pixel. To get that, one would have128 // slow. To get that, one would have 129 129 // to analytically integrate and fit this function. 130 // (Currently the integral is switched off for the 1440 individual131 // spectra in all cases)132 130 bool fast = false; // Switch off using integral 133 131 134 132 // Values which should be read from the file but not available atm 135 Int_t integration_window = 30;133 Int_t integration_window = 40; 136 134 137 135 // Map for which pixel shall be plotted and which not … … 266 264 TH1F hCoeffR2 ("CoeffR2", "Coefficient R", 90, -1, 2); 267 265 268 // Hist igram for the sum of all spectrums269 TH1F hSum("Sum1", "Signal spectrum of all pixels ",266 // Histogram for the sum of all spectrums 267 TH1F hSum("Sum1", "Signal spectrum of all pixels (excl. blind pixels)", 270 268 hsignal->GetNbinsY(), hsignal->GetYaxis()->GetXmin(), hsignal->GetYaxis()->GetXmax()); 271 269 hSum.SetXTitle("pulse integral [mV sample]"); … … 275 273 276 274 // Histogram for the sum of all pixels excluding the ones with faulty fits 277 TH1F hSumClear1("SumC1", "Signal spectrum of all pixels ( incl TM)",275 TH1F hSumClear1("SumC1", "Signal spectrum of all pixels (excl. faulty and blind pixels)", 278 276 hsignal->GetNbinsY(), hsignal->GetYaxis()->GetXmin(), hsignal->GetYaxis()->GetXmax()); 279 277 hSumClear1.SetXTitle("pulse integral [mV sample]"); … … 303 301 hPulse.SetStats(false); 304 302 305 // Spe ktrum for the normalized individual spectra306 TH1F hSumScale1("SumScale1", "Signal spectrum of all pixels ( incl TM)", 120, 0.05, 12.05);303 // Spectrum for the normalized individual spectra 304 TH1F hSumScale1("SumScale1", "Signal spectrum of all pixels (excl. blind pixels)", 120, 0.05, 12.05); 307 305 hSumScale1.SetXTitle("pulse integral [pe]"); 308 306 hSumScale1.SetYTitle("Rate"); … … 332 330 if (usePixel[pixel]==0) 333 331 continue; 332 333 //exclude the pixels without cones 334 if (pixel == 61) 335 continue; 336 if (pixel == 62) 337 continue; 338 if (pixel == 63) 339 continue; 340 341 342 334 343 335 344 TH1D *hist = hsignal->ProjectionY("proj", pixel+1, pixel+1); … … 434 443 if (usePixel[pixel]==0) 435 444 continue; 445 446 // Exclude pixels without cones 447 if (pixel == 61) 448 continue; 449 if (pixel == 62) 450 continue; 451 if (pixel == 63) 452 continue; 436 453 437 454 //Projectipon of a certain Pixel out of Ampl.Spectrum
Note:
See TracChangeset
for help on using the changeset viewer.