Changeset 14246 for fact/tools/marsmacros/singlepe.C
- Timestamp:
- 06/28/12 14:10:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/marsmacros/singlepe.C
r14245 r14246 161 161 class MHSingles : public MH 162 162 { 163 MH2F fSignal; 164 MH2F fTime; 165 MProfile2D fPulse; 163 TH2F fSignal; //changed from MH2F to TH2F 164 TH2F fTime; //changed from MH2F to TH2F 165 TProfile2D fPulse; //changed from MProfile2D to TProfile2D 166 166 167 167 168 UInt_t fNumEntries; … … 476 477 477 478 int singlepe( 478 //const char *runfile, const char *drsfile, const char *outfile479 const char *runfile, const char *drsfile, const char *outfile 479 480 ) 480 481 { … … 482 483 // ====================================================== 483 484 484 const char *drsfile = "/fact/raw/2012/05/18/20120518_003.drs.fits.gz";485 485 // const char *drsfile = "/fact/raw/2012/06/25/20120625_112.drs.fits.gz"; 486 486 487 487 MDirIter iter; 488 iter.AddDirectory("/fact/raw/2012/05/18", "20120518_005.fits.gz"); 489 // iter.AddDirectory(gSystem->DirName(runfile), gSystem->BaseName(runfile)); 490 491 // TString filename; 492 // for (UInt_t fileNr = 116; fileNr < 147; fileNr++) 493 // { 494 // filename = "20120625_"; 495 // filename += fileNr; 496 // filename += ".fits.gz"; 497 // iter.AddDirectory("/fact/raw/2012/06/25", filename); 498 // } 499 500 // iter.AddDirectory("/fact/raw/2012/06/25", "20120625_116.fits.gz"); 501 // iter.AddDirectory("/fact/raw/2012/06/25", "20120625_117.fits.gz"); 502 // iter.AddDirectory("/fact/raw/2012/06/25", "20120625_118.fits.gz"); 503 // iter.AddDirectory("/fact/raw/2012/06/25", "20120625_119.fits.gz"); 488 iter.AddDirectory(gSystem->DirName(runfile), gSystem->BaseName(runfile)); 504 489 505 490 // ====================================================== … … 677 662 678 663 TH1F hGain ("Gain", "Gain distribution", 679 400, 100, 300);664 100, 0, 400); 680 665 hGain.SetXTitle("gain [a.u.]"); 681 666 hGain.SetYTitle("Rate"); … … 735 720 funcScaled.SetLineColor(kBlue); 736 721 722 /* 737 723 TF1 funcScaledBL("gain_sum_spektrum", fcn, 0, 10, 5); 738 724 funcScaledBL.SetParNames("Maximum", "Gain", "Sigma", "XtalkProb", "Offset"); 739 725 funcScaledBL.SetLineColor(kRed); 740 726 */ 741 727 742 728 … … 1061 1047 for (UInt_t bin = 1; bin < (UInt_t)hSum.GetNbinsX()+1; bin++) 1062 1048 { 1063 hSumScale.SetBinError(bin, hSum .GetBinContent(bin)*0.1);1049 hSumScale.SetBinError(bin, hSumScale.GetBinContent(bin)*0.1); 1064 1050 } 1065 1051 … … 1094 1080 1095 1081 funcScaled.SetParameters(par2); 1096 funcScaledBL.SetParameters(par2);1082 // funcScaledBL.SetParameters(par2); 1097 1083 // funcScaled.FixParameter(1,0.9); 1098 1084 funcScaled.FixParameter(4,0); 1099 funcScaledBL.FixParameter(4,0);1085 // funcScaledBL.FixParameter(4,0); 1100 1086 funcScaled.FixParameter(5,Crosstlk); 1101 funcScaledBL.FixParameter(5,Crosstlk);1087 // funcScaledBL.FixParameter(5,Crosstlk); 1102 1088 1103 1089 const double minScaled = par2[1]-fwhmScaled; … … 1108 1094 1109 1095 funcScaled.SetRange(minScaled, maxScaled); 1110 funcScaledBL.SetRange(minScaled, maxScaled);1096 // funcScaledBL.SetRange(minScaled, maxScaled); 1111 1097 hSumScale.Fit(&funcScaled, "N0QS", "", minScaled, maxScaled); 1112 hSumScale.Fit(&funcScaledBL, "WLN0QS", "", minScaled, maxScaled);1098 // hSumScale.Fit(&funcScaledBL, "WLN0QS", "", minScaled, maxScaled); 1113 1099 funcScaled.DrawCopy("SAME"); 1114 funcScaledBL.DrawCopy("SAME");1100 // funcScaledBL.DrawCopy("SAME"); 1115 1101 //--------fit gausses to peaks of gain corrected sum specetrum ----------- 1116 1102 … … 1212 1198 hGain.DrawCopy(); 1213 1199 1214 1200 /* 1215 1201 TCanvas &c25 = d->AddTab("Spectra"); 1216 1202 c25.Divide(2,1); … … 1227 1213 funcScaled.DrawCopy("SAME"); 1228 1214 funcScaledBL.DrawCopy("SAME"); 1229 1215 */ 1230 1216 1231 1217 /* … … 1235 1221 */ 1236 1222 1237 d->SaveAs( "/home_nfs/isdc/jbbuss/singlepe.root");1223 d->SaveAs(outfile); 1238 1224 return 0; 1239 1225 } … … 1248 1234 Double_t cross = par[3]; 1249 1235 Double_t shift = par[4]; 1250 // Double_t k = par[5];1251 1236 1252 1237 Double_t xTalk = 1; … … 1262 1247 y += xTalk*gauss; 1263 1248 1264 // for (int j = 1; j < k; j++)1265 // {1266 1249 xTalk *= cross; 1267 // } 1250 1268 1251 } 1269 1252
Note:
See TracChangeset
for help on using the changeset viewer.