Changeset 7181 for trunk/MagicSoft
- Timestamp:
- 07/12/05 14:31:02 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7180 r7181 26 26 * mhist/MHEvent.[h,cc]: 27 27 - added MTime to output 28 29 * mastro/MAstroCatalog.cc: 30 - added a fix which avoided reproducing the gui elements after 31 reading from file 32 33 * mbase/BaseIncl.h: 34 - added TVector3 35 36 * mbase/MMath.[h,cc]: 37 - added Sgn function 38 - moved include of TVector3 to source file 39 40 * mimage/MHillasExt.cc: 41 - included TVector2 42 43 * mjobs/MJCut.cc: 44 - write Disp to output 45 - write MTime to output 46 - changed handling of source position (MSrcPosCalc) 47 48 * mpointing/MSrcPosCalc.[h,cc]: 49 - allow to switch off source pos calculation 28 50 29 51 -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r7179 r7181 168 168 fList.SetOwner(); 169 169 fMapG.SetOwner(); 170 170 171 fToolTip = gROOT->IsBatch() || !gClient ? 0 : new TGToolTip(0, "", 0); 171 172 } … … 659 660 SetRangePad(o); 660 661 661 if (TestBit(kHasChanged)) 662 // In the case MAstroCatalog has been loaded from a file 663 // kHasChanged is not set, but fMapG.GetSize() is ==0 664 if (TestBit(kHasChanged) || fMapG.GetSize()==0) 662 665 DrawPrimitives(o); 663 666 -
trunk/MagicSoft/Mars/mbase/BaseIncl.h
r1382 r7181 1 1 #ifndef __CINT__ 2 3 #include <TVector3.h> 2 4 3 5 /* -
trunk/MagicSoft/Mars/mbase/MMath.cc
r7176 r7181 18 18 ! Author(s): Thomas Bretz 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 420 ! Copyright: MAGIC Software Development, 2000-2005 21 21 ! 22 22 ! … … 26 26 // 27 27 // MMath 28 // 29 // Mars - Math package (eg Significances, etc) 28 30 // 29 31 ///////////////////////////////////////////////////////////////////////////// 30 32 #include "MMath.h" 33 34 #ifndef ROOT_TVector3 35 #include <TVector3.h> 36 #endif 31 37 32 38 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MMath.h
r6078 r7181 3 3 4 4 #ifndef ROOT_TMath 5 #include <TMath.h> 5 #include <TMath.h> // TMath is included here for convinience 6 6 #endif 7 #ifndef ROOT_TVector3 8 #include <TVector3.h> 9 #endif 7 8 class TVector3; 10 9 11 10 namespace MMath … … 24 23 Double_t InterpolParabLog(const TVector3 &vx, const TVector3 &vy, Double_t x); 25 24 Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x); 25 26 Double_t Sgn(Double_t d); 26 27 } 27 28 29 inline Double_t MMath::Sgn(Double_t d) { return d<0 ? -1 : 1; } 30 28 31 #endif -
trunk/MagicSoft/Mars/mimage/MHillasExt.cc
r7176 r7181 65 65 #include <TArrayF.h> 66 66 #include <TMarker.h> 67 #include <TVector2.h> 67 68 #include <TVirtualPad.h> 68 69 … … 95 96 96 97 // ------------------------------------------------------------------------- 98 // 99 // Reset values to: 100 // fAsym = 0; 101 // fM3Long = 0; 102 // fM3Trans = 0; 103 // fMaxDist = 0; 97 104 // 98 105 void MHillasExt::Reset() -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r7178 r7181 337 337 write->AddContainer("MEnergyEst", "Events", kFALSE); 338 338 write->AddContainer("ThetaSquared", "Events", kFALSE); 339 write->AddContainer("Disp", "Events", kFALSE); 340 write->AddContainer("MTime", "Events", kFALSE); 339 341 write->AddContainer("MMcEvt", "Events", kFALSE); 340 342 write->AddContainer("DataType", "Events"); … … 545 547 // How to get source position from off- and on-data? 546 548 MSrcPosCalc scalc; 547 if (fIsWobble)548 scalc.SetWobbleMode(); /********************/ 549 scalc.SetMode(fIsWobble?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/ 550 549 551 MHillasCalc hcalc; 550 552 MHillasCalc hcalc2("MHillasCalcAnti"); … … 589 591 590 592 tlist.AddToList(&readoff); 591 tlist.AddToList(&print2, "EffectiveOnTime"); 593 if (gLog.GetDebugLevel()>4) 594 tlist.AddToList(&print2, "EffectiveOnTime"); 592 595 tlist.AddToList(&tlist2, "Events"); 593 596 … … 645 648 set.AddFilesOn(readon); 646 649 647 if (fIsWobble) 648 scalc.SetWobbleMode(kFALSE); /********************/ 650 scalc.SetMode(MSrcPosCalc::kDefault); 649 651 650 652 MFillH fill1b("MHHillasOnPre [MHHillas]", "MHillas", "FillHillasPre"); -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r7179 r7181 93 93 MSrcPosCalc::MSrcPosCalc(const char *name, const char *title) 94 94 : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fSrcPosCam(NULL), 95 fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), f IsWobbleMode(kFALSE)95 fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault) 96 96 { 97 97 fName = name ? name : "MSrcPosCalc"; … … 209 209 void MSrcPosCalc::SetSrcPos(TVector2 v) const 210 210 { 211 if (f IsWobbleMode)211 if (fMode==kWobble) 212 212 { 213 213 fSrcPosAnti->SetXY(v); … … 230 230 Bool_t MSrcPosCalc::ReInit(MParList *plist) 231 231 { 232 if (fMode==kOffData) 233 { 234 SetSrcPos(TVector2()); 235 return kTRUE; 236 } 237 232 238 MRawRunHeader *run = (MRawRunHeader*)plist->FindObject("MRawRunHeader"); 233 239 if (!run) … … 328 334 Int_t MSrcPosCalc::Process() 329 335 { 330 if (fRunType==MRawRunHeader::kRTMonteCarlo || !fSourcePos || !fTime || !fObservatory )336 if (fRunType==MRawRunHeader::kRTMonteCarlo || !fSourcePos || !fTime || !fObservatory || fMode==kOffData) 331 337 return kTRUE; 332 338 -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
r6912 r7181 19 19 class MSrcPosCalc : public MTask 20 20 { 21 public: 22 enum Mode_t { 23 kDefault = 0, 24 kOffData = 1, 25 kWobble = 2 26 }; 21 27 private: 22 28 enum { … … 34 40 UShort_t fRunType; //! Run Type to decide where to get pointing position from 35 41 36 Bool_t fIsWobbleMode;42 Int_t fMode; 37 43 38 44 // MSrcPosCalc … … 59 65 void SetSourcePos(Double_t ra, Double_t dec); 60 66 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos 61 void Set WobbleMode(Bool_t b=kTRUE) { fIsWobbleMode = b; }67 void SetMode(Mode_t m=kDefault) { fMode = m; } 62 68 63 69 ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
Note:
See TracChangeset
for help on using the changeset viewer.