Changeset 9301 for trunk/MagicSoft
- Timestamp:
- 02/07/09 16:11:57 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9300 r9301 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2009/02/07 Thomas Bretz 22 23 * sponde.rc: 24 - fixed a typo 25 26 * datacenter/scripts/runcorsika: 27 - added a comment 28 29 * mbase/MContinue.h: 30 - changed a comment 31 32 * mbase/MEnv.h: 33 - Do not assign a temporary TString to const char * 34 35 * mcamera/MCameraCentralPix.[h,cc]: 36 - changed fDC from Float_t to Int_t 37 38 * mhflux/MHCollectionArea.cc, mhflux/MHDisp.cc, mhflux/MHEnergyEst.cc, 39 mhflux/MHFalseSource.cc, mhflux/MHThreshold.cc: 40 - use MString::Format instead of Form 41 42 * msim/MHPhotonEvent.cc: 43 - don't fill kNightSky primaries 44 45 * msim/MPhotonEvent.[h,cc]: 46 - return the number of non NightSky photons 47 48 * msimcamera/MSimPSF.cc: 49 - changed default for fSigma from 1 to -1 50 51 20 52 21 53 2009/02/06 Daniela Dorner -
trunk/MagicSoft/Mars/datacenter/scripts/runcorsika
r9220 r9301 62 62 echo "OBSLEV 2200.E2" 63 63 # From www.noaa.gov/geomagmodels roughly for January 2009. (was 29.5 and 23.0) 64 # MAGNET BX BZ (BX is the horizontal component (muT) to the x-direction of 65 # the detector, BZ is the vertical component (muT) downwards) 64 66 echo "MAGNET 30.3 24.1" 65 67 # Atmosphere -
trunk/MagicSoft/Mars/mbase/MContinue.h
r9178 r9301 57 57 void Print(Option_t *o="") const; //*MENU* 58 58 59 ClassDef(MContinue, 2) //Task returning kCONTINUE 59 ClassDef(MContinue, 2) //Task returning kCONTINUE (or any other return code) 60 60 }; 61 61 -
trunk/MagicSoft/Mars/mbase/MEnv.h
r8882 r9301 40 40 Double_t GetValue(const char *name, Double_t dflt); 41 41 const char *GetValue(const char *name, const char *dflt); 42 43 // GetValue: regexp 42 44 43 45 const char *GetName() const; -
trunk/MagicSoft/Mars/mcamera/MCameraCentralPix.cc
r9289 r9301 29 29 // Class Version 2: 30 30 // ---------------- 31 // + Float_t fDC31 // + Int_t fDC 32 32 // 33 33 ///////////////////////////////////////////////////////////////////////////// -
trunk/MagicSoft/Mars/mcamera/MCameraCentralPix.h
r9289 r9301 13 13 Bool_t fStatus; // Status of central pixel 14 14 15 Float_t fDC; // [nA]15 Int_t fDC; // DC current in ADC counts 16 16 17 17 public: 18 MCameraCentralPix() : fDC( -1)18 MCameraCentralPix() : fDC(0) 19 19 { 20 20 fName = "MCameraCentralPix"; … … 25 25 Bool_t GetStatusCPix() const { return fStatus; } // deprecated - for compatibility only 26 26 27 Int_t GetDC() const { return fDC; } 28 27 29 ClassDef(MCameraCentralPix, 2) // Container storing information about the Central Pixel status 28 30 }; -
trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
r9153 r9301 45 45 #include "MLogManip.h" 46 46 47 #include "MString.h" 47 48 #include "MBinning.h" 48 49 … … 300 301 // GetCollectionAreaEff(), 301 302 // GetCollectionAreaAbs(), fMcAreaRadius); 302 const TString txt = Form("r_{max}=%.0fm --> A_{max}=%.0fm^{2}",303 fMcAreaRadius, GetCollectionAreaAbs());303 const TString txt = MString::Format("r_{max}=%.0fm --> A_{max}=%.0fm^{2}", 304 fMcAreaRadius, GetCollectionAreaAbs()); 304 305 305 306 TLatex text(0.31, 0.95, txt); -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r9281 r9301 624 624 h2->Fit(&func, "IQ", "", 0, 1.0); 625 625 626 h2->SetTitle(Form("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ f=%.2f", x0, y0, func.GetParameter(2), TMath::Abs(scale))); 626 h2->SetTitle(MString::Format("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ f=%.2f", 627 x0, y0, func.GetParameter(2), TMath::Abs(scale))); 627 628 } 628 629 } -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r9153 r9301 399 399 TH1 *MHEnergyEst::MakeProf(TH2 &h) 400 400 { 401 TH1 *p = h.ProfileX( Form("Prof%s", h.GetName()), -1, -1, "s");401 TH1 *p = h.ProfileX(MString::Format("Prof%s", h.GetName()), -1, -1, "s"); 402 402 p->SetDirectory(NULL); 403 403 p->SetBit(kCanDelete); -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r9153 r9301 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.2 3 2008-11-11 11:42:14tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.24 2009-02-07 16:11:57 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 144 144 #include "MAlphaFitter.h" 145 145 146 #include "MString.h" 146 147 #include "MBinning.h" 147 148 #include "MParList.h" … … 409 410 const Float_t cut1 = axe.GetBinLowEdge(f); 410 411 const Float_t cut2 = axe.GetBinUpEdge(l); 411 h2->SetTitle( Form("Distribution of %.1f\\circ<|\\alpha|<%.1f\\circ in x,y", cut1, cut2));412 h2->SetTitle(MString::Format("Distribution of %.1f\\circ<|\\alpha|<%.1f\\circ in x,y", cut1, cut2)); 412 413 413 414 // Get projection for range … … 446 447 axe.SetRangeUser(0, fAlphaCut); 447 448 const Float_t cut = axe.GetBinUpEdge(axe.GetLast()); 448 h3->SetTitle( Form("Distribution of |\\alpha|<%.1f\\circ in x,y", cut));449 h3->SetTitle(MString::Format("Distribution of |\\alpha|<%.1f\\circ in x,y", cut)); 449 450 450 451 // Get projection for range … … 606 607 // Than for their projections 607 608 TH1 *h = fHist.ProjectionZ("Alpha_z", maxx, maxx, maxy, maxy); 608 h->SetTitle( Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s));609 h->SetTitle(MString::Format("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s)); 609 610 610 611 TH1D *ho=0; … … 934 935 histb->Reset(); 935 936 hist->SetNameTitle("Significance", 936 Form("Fit Region: Signal<%.1f\\circ, %.1f\\circ<Bg<%.1f\\circ",937 sigmax, bgmin, bgmax));937 MString::Format("Fit Region: Signal<%.1f\\circ, %.1f\\circ<Bg<%.1f\\circ", 938 sigmax, bgmin, bgmax)); 938 939 hists->SetName("Excess"); 939 940 histb->SetName("Background"); … … 1052 1053 h0b.GetXaxis()->SetRangeUser(0, maxalpha0*1.5); 1053 1054 1054 hists->SetTitle( Form("Excess events for \\alpha<%.0f\\circ (N_{max}=%d)", sigint, (int)hists->GetMaximum()));1055 histb->SetTitle( Form("Background events for \\alpha<%.0f\\circ", sigint));1055 hists->SetTitle(MString::Format("Excess events for \\alpha<%.0f\\circ (N_{max}=%d)", sigint, (int)hists->GetMaximum())); 1056 histb->SetTitle(MString::Format("Background events for \\alpha<%.0f\\circ", sigint)); 1056 1057 1057 1058 //hists->SetMinimum(GetMinimumGT(*hists)); … … 1142 1143 if (maxx>0 && maxy>0) 1143 1144 { 1144 const char *title = Form(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ",1145 hist->GetXaxis()->GetBinCenter(maxx),1146 hist->GetYaxis()->GetBinCenter(maxy), maxs);1145 const char *title = MString::Format(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ", 1146 hist->GetXaxis()->GetBinCenter(maxx), 1147 hist->GetYaxis()->GetBinCenter(maxy), maxs); 1147 1148 1148 1149 h = fHist.ProjectionZ("AlphaFit", maxx, maxx, maxy, maxy); … … 1188 1189 } 1189 1190 1190 TF1 f1("f1", Form("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);1191 TF1 f2("f2", Form("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);1191 TF1 f1("f1", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90); 1192 TF1 f2("f2", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90); 1192 1193 f1.SetParameters(maxpar.GetArray()); 1193 1194 f2.SetParameters(maxpar.GetArray()); … … 1204 1205 leg->SetBorderSize(1); 1205 1206 leg->SetTextSize(0.04); 1206 leg->AddText(0.5, 0.82, Form("A * exp(-(\\frac{x-\\mu}{\\sigma})^{2}/2) + pol%d", polynom))->SetTextAlign(22);1207 leg->AddText(0.5, 0.82, MString::Format("A * exp(-(\\frac{x-\\mu}{\\sigma})^{2}/2) + pol%d", polynom))->SetTextAlign(22); 1207 1208 //leg->AddText(0.5, 0.82, "A * exp(-(\\frac{x-\\mu}{\\sigma})^{2}/2) + b*x^{2} + a")->SetTextAlign(22); 1208 1209 leg->AddLine(0, 0.65, 0, 0.65); 1209 leg->AddText(0.06, 0.54, Form("A=%.2f", maxpar[0]))->SetTextAlign(11);1210 leg->AddText(0.06, 0.34, Form("\\sigma=%.2f", maxpar[2]))->SetTextAlign(11);1211 leg->AddText(0.06, 0.14, Form("\\mu=%.2f (fix)", maxpar[1]))->SetTextAlign(11);1212 leg->AddText(0.60, 0.54, Form("a=%.2f", maxpar[3]))->SetTextAlign(11);1213 leg->AddText(0.60, 0.34, Form("b=%.2f (fix)", maxpar[4]))->SetTextAlign(11);1210 leg->AddText(0.06, 0.54, MString::Format("A=%.2f", maxpar[0]))->SetTextAlign(11); 1211 leg->AddText(0.06, 0.34, MString::Format("\\sigma=%.2f", maxpar[2]))->SetTextAlign(11); 1212 leg->AddText(0.06, 0.14, MString::Format("\\mu=%.2f (fix)", maxpar[1]))->SetTextAlign(11); 1213 leg->AddText(0.60, 0.54, MString::Format("a=%.2f", maxpar[3]))->SetTextAlign(11); 1214 leg->AddText(0.60, 0.34, MString::Format("b=%.2f (fix)", maxpar[4]))->SetTextAlign(11); 1214 1215 if (polynom>1) 1215 leg->AddText(0.60, 0.14, Form("c=%.2f", !fHistOff?maxpar[5]:0))->SetTextAlign(11);1216 leg->AddText(0.60, 0.14, MString::Format("c=%.2f", !fHistOff?maxpar[5]:0))->SetTextAlign(11); 1216 1217 leg->SetBit(kCanDelete); 1217 1218 leg->Draw(); … … 1249 1250 leg->SetBorderSize(1); 1250 1251 leg->SetTextSize(0.1); 1251 leg->AddText( Form("S_{max}=%.1f\\sigma at \\alpha_{max}=%d\\circ", maxsig, max));1252 leg->AddText(MString::Format("S_{max}=%.1f\\sigma at \\alpha_{max}=%d\\circ", maxsig, max)); 1252 1253 leg->SetBit(kCanDelete); 1253 1254 leg->Draw(); … … 1356 1357 TString str2("el.SetY1(gPad->GetY1()+0.9*(gPad->GetY2()-gPad->GetY1()));"); 1357 1358 1358 str1.ReplaceAll("el.", Form("((TEllipse*)%p)->", el));1359 str2.ReplaceAll("el.", Form("((TEllipse*)%p)->", el));1360 1361 str1.ReplaceAll("0.9", Form("%f", x0));1362 str2.ReplaceAll("0.9", Form("%f", y0));1359 str1.ReplaceAll("el.", MString::Format("((TEllipse*)%p)->", el)); 1360 str2.ReplaceAll("el.", MString::Format("((TEllipse*)%p)->", el)); 1361 1362 str1.ReplaceAll("0.9", MString::Format("%f", x0)); 1363 str2.ReplaceAll("0.9", MString::Format("%f", y0)); 1363 1364 1364 1365 TLatex tex; … … 1391 1392 "y.GetBinLowEdge(y.GetLast()+1));"); 1392 1393 1393 str3.ReplaceAll("x.", Form("((TAxis*)%p)->", &x));1394 str3.ReplaceAll("y.", Form("((TAxis*)%p)->", &y));1394 str3.ReplaceAll("x.", MString::Format("((TAxis*)%p)->", &x)); 1395 str3.ReplaceAll("y.", MString::Format("((TAxis*)%p)->", &y)); 1395 1396 // str3.ReplaceAll("pad", Form("((TPad*)(%p))", pad)); 1396 1397 -
trunk/MagicSoft/Mars/mhflux/MHThreshold.cc
r9153 r9301 46 46 #include "MLogManip.h" 47 47 48 #include "MString.h" 48 49 #include "MBinning.h" 49 50 … … 115 116 116 117 TH1D h(fHEnergy); 118 h.SetDirectory(0); 117 119 118 120 #if ROOT_VERSION_CODE<ROOT_VERSION(5,20,00) … … 138 140 const Axis_t maxe = TMath::Sqrt(axe.GetBinLowEdge(bin)*axe.GetBinUpEdge(bin)); 139 141 140 TLatex text(0.30, 0.95, Form("E_{max}=%dGeV (%dGeV,%dGeV)", TMath::Nint(maxe),141 TMath::Nint(axe.GetBinLowEdge(bin)),142 TMath::Nint(axe.GetBinUpEdge(bin))));142 TLatex text(0.30, 0.95, MString::Format("E_{max}=%dGeV (%dGeV,%dGeV)", TMath::Nint(maxe), 143 TMath::Nint(axe.GetBinLowEdge(bin)), 144 TMath::Nint(axe.GetBinUpEdge(bin)))); 143 145 text.SetBit(TLatex::kTextNDC); 144 146 text.SetTextSize(0.04); -
trunk/MagicSoft/Mars/msim/MPhotonEvent.cc
r9243 r9301 213 213 } 214 214 215 Int_t MPhotonEvent::GetNumExternal() const 216 { 217 Int_t n=0; 218 219 for (int i=0; i<GetNumPhotons(); i++) 220 if ((*this)[i].GetPrimary()!=MMcEvtBasic::kNightSky) 221 n++; 222 223 return n; 224 } 225 215 226 // -------------------------------------------------------------------------- 216 227 // -
trunk/MagicSoft/Mars/msim/MPhotonEvent.h
r9239 r9301 78 78 // Getter/Setter 79 79 Int_t GetNumPhotons() const { return fData.GetEntriesFast(); } 80 Int_t GetNumExternal() const; 80 81 81 82 TClonesArray &GetArray() { return fData; } -
trunk/MagicSoft/Mars/msimcamera/MSimPSF.cc
r9243 r9301 58 58 // 59 59 MSimPSF::MSimPSF(const char* name, const char *title) 60 : fEvt(0), fSigma( 1)60 : fEvt(0), fSigma(-1) 61 61 { 62 62 fName = name ? name : "MSimPSF"; -
trunk/MagicSoft/Mars/sponde.rc
r8750 r9301 63 63 64 64 # You can apply a cut in addition to all other cuts to your data and 65 # M Onte Carlos. This can be usefull for example to setup a second65 # Monte Carlos. This can be usefull for example to setup a second 66 66 # MFMagicCuts with a tighter behaviour assuming that your ganymed 67 67 # was written with a really loose cut.
Note:
See TracChangeset
for help on using the changeset viewer.