Changeset 7366
- Timestamp:
- 09/27/05 14:38:40 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.cc
r4920 r7366 124 124 MAstro::Mjd2Ymd(fMjd, y, m, d); 125 125 } 126 127 // -------------------------------------------------------------------------- 128 // 129 // GetMoonPhase - calculate phase of moon as a fraction: 130 // Returns -1 if calculation failed 131 // 132 // see MAstro::GetMoonPhase 133 // 134 Double_t MTime::GetMoonPhase() const 135 { 136 return MAstro::GetMoonPhase(GetMjd()); 137 } 138 139 // -------------------------------------------------------------------------- 140 // 141 // Calculate the Period to which the time belongs to. The Period is defined 142 // as the number of synodic months ellapsed since the first full moon 143 // after Jan 1st 1980 (which was @ MJD=44240.37917) 144 // 145 // see MAstro::GetMoonPeriod 146 // 147 Double_t MTime::GetMoonPeriod() const 148 { 149 return MAstro::GetMoonPeriod(GetMjd()); 150 } 151 152 // -------------------------------------------------------------------------- 153 // 154 // To get the moon period as defined for MAGIC observation we take the 155 // nearest integer mjd, eg: 156 // 53257.8 --> 53258 157 // 53258.3 --> 53258 158 // Which is the time between 13h and 12:59h of the following day. To 159 // this day-period we assign the moon-period at midnight. To get 160 // the MAGIC definition we now substract 284. 161 // 162 // For MAGIC observation period do eg: 163 // GetMagicPeriod(53257.91042) 164 // or 165 // MTime t; 166 // t.SetMjd(53257.91042); 167 // GetMagicPeriod(t.GetMjd()); 168 // or 169 // MTime t; 170 // t.Set(2004, 1, 1, 12, 32, 11); 171 // GetMagicPeriod(t.GetMjd()); 172 // 173 // 174 // see MAstro::GetMagicPeriod 175 // 176 Int_t MTime::GetMagicPeriod() const 177 { 178 return MAstro::GetMagicPeriod(GetMjd()); 179 } 180 126 181 127 182 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MTime.h
r5061 r7366 100 100 TTime GetRootTime() const; 101 101 Double_t GetAxisTime() const; 102 Double_t GetMoonPhase() const; 103 Double_t GetMoonPeriod() const; 104 Int_t GetMagicPeriod() const; 102 105 Long_t GetTime() const { return (Long_t)fTime; } // [ms] Time of Day returned in the range [-11h, 13h) 103 106 void GetTime(Byte_t &h, Byte_t &m, Byte_t &s, UShort_t &ms) const; -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
r7191 r7366 277 277 278 278 PrintUncalibrated(MBadPixelsPix::kDeviatingTimeResolution, 279 Form("%s%2.1f%s","Time resol. less than ", fRelTimeResolutionLimit," FADC sl. from Mean:"));279 Form("%s%2.1f%s","Time resol. less than ", fRelTimeResolutionLimit, " FADC sl. from Mean:")); 280 280 PrintUncalibrated(MBadPixelsPix::kRelTimeOscillating, 281 "Pixels with changing Rel. Times over time: 281 "Pixels with changing Rel. Times over time:"); 282 282 PrintUncalibrated(MBadPixelsPix::kRelTimeNotFitted, 283 "Pixels with unsuccesful Gauss fit to the times: 283 "Pixels with unsuccesful Gauss fit to the times:"); 284 284 285 285 if (asciilog) … … 494 494 if (fGeom->InheritsFrom("MGeomCamMagic")) 495 495 { 496 *fLog << " Uncalibrated Pixels: Inner: " 497 << Form("%3i",unsuit[0]) << " Outer: " << Form("%3i",unsuit[1]) << endl; 498 *fLog << " Unreliable Pixels: Inner: " 499 << Form("%3i",unrel[0]) << " Outer: " << Form("%3i",unrel[1]) << endl; 496 PrintUncalibrated("Uncalibrated Pixels:", unsuit[0], unsuit[1]); 497 PrintUncalibrated("Unreliable Pixels:", unrel[0], unrel[1]); 500 498 } 501 499 } … … 522 520 } 523 521 524 *fLog << " " << text << "Inner: " << Form("%3i",countinner); 525 *fLog << " Outer: " << Form("%3i", countouter) << endl; 522 PrintUncalibrated(text, countinner, countouter); 523 } 524 525 void MCalibrationRelTimeCalc::PrintUncalibrated(const char *text, Int_t in, Int_t out) const 526 { 527 *fLog << " " << setfill(' ') << setw(56) << setiosflags(ios::left) << text; 528 *fLog << " Inner: " << Form("%3i", in); 529 *fLog << " Outer: " << Form("%3i", out); 530 *fLog << resetiosflags(ios::left) << endl; 531 526 532 } 527 533 -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h
r7188 r7366 65 65 void FinalizeUnsuitablePixels (); 66 66 67 void PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const; 67 void PrintUncalibrated(const char *text, Int_t in, Int_t out) const; 68 void PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const; 68 69 69 70 // Query checks -
trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc
r7365 r7366 238 238 AppendPad("pad4"); 239 239 } 240 240 /* 241 241 Double_t MHMuonPar::Integral(const TProfile &p, Int_t a, Int_t b) const 242 242 { … … 252 252 return denominator==0 ? 0 : numerator/denominator; 253 253 } 254 254 */ 255 255 Double_t MHMuonPar::Integral(const TProfile &p, Float_t a, Float_t b) const 256 256 { … … 258 258 const Int_t bin2 = p.GetXaxis()->FindFixBin(b); 259 259 260 // return Integral(p, bin1, bin2);261 260 return p.Integral(bin1, bin2); 262 261 } … … 268 267 const TString txt = Form("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %.3f", 269 268 fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad)); 270 // fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad)*1000);271 269 272 270 TLatex text(0.55, 0.93, txt); -
trunk/MagicSoft/Mars/mmuon/MHMuonPar.h
r7252 r7366 33 33 Float_t fMm2Deg; 34 34 35 Double_t Integral(const TProfile &p, Int_t a, Int_t b) const;35 //Double_t Integral(const TProfile &p, Int_t a, Int_t b) const; 36 36 Double_t Integral(const TProfile &p, Float_t a=fgIntegralLoLim, Float_t b=fgIntegralUpLim) const; 37 37 -
trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
r7365 r7366 130 130 fHistTime.SetTitle("HistTime"); 131 131 fHistTime.SetXTitle("timing difference"); 132 fHistTime.SetYTitle(" number of pixels");132 fHistTime.SetYTitle("Counts"); 133 133 fHistTime.SetDirectory(NULL); 134 134 fHistTime.SetFillStyle(4000); … … 180 180 ApplyBinning(*plist, "ArcPhi", &fHistPhi); 181 181 ApplyBinning(*plist, "MuonWidth", &fHistWidth); 182 ApplyBinning(*plist, "MuonTime", &fHistTime);182 ApplyBinning(*plist, "MuonTime", &fHistTime); 183 183 184 184 return kTRUE; … … 213 213 214 214 // if the signal is not near the estimated circle, it is ignored. 215 if (dist < fMuonSearchPar->GetRadius() + fMargin && 216 dist > fMuonSearchPar->GetRadius() - fMargin) 215 if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin) 217 216 { 218 217 fHistTime.Fill(pix.GetArrivalTime()-fMuonSearchPar->GetTime()); 219 218 } 219 220 220 // use only the inner pixles. FIXME: This is geometry dependent 221 221 if(i>397) … … 240 240 241 241 // Double_t err; 242 Double_t mean, meanerr, sig, sigerr;243 gMinuit->GetParameter(2, sig, sigerr);// get the sigma value244 gMinuit->GetParameter(1, mean, meanerr);// get the sigma value242 Double_t mean, meanerr, dummy; 243 gMinuit->GetParameter(2, sig, dummy); // get the sigma value 244 gMinuit->GetParameter(1, mean, dummy); // get the sigma value 245 245 246 246 for (Int_t i=0; i<entries; i++) … … 255 255 256 256 // if the signal is not near the estimated circle, it is ignored. 257 if ( dist < fMuonSearchPar->GetRadius() +fMargin &&258 dist > fMuonSearchPar->GetRadius() - fMargin)257 if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin && 258 TMath::Abs(pix.GetArrivalTime()-fMuonSearchPar->GetTime()-mean) < 2*sig) 259 259 { 260 if(TMath::Abs(pix.GetArrivalTime()-(fMuonSearchPar->GetTime()+mean))<2*sig) 261 fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons()); 260 fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons()); 262 261 } 263 262 }
Note:
See TracChangeset
for help on using the changeset viewer.