Changeset 2208
- Timestamp:
- 06/23/03 11:48:53 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc
r2173 r2208 42 42 #include "MLogManip.h" 43 43 44 #include "MHexagon.h" 45 #include "MGeomCam.h" 46 47 #include "MRflSinglePhoton.h" 48 44 49 ClassImp(MRflEvtData); 45 50 … … 55 60 fName = name ? name : "MRflEvtData"; 56 61 fTitle = title ? title : "All Photons from a reflector event"; 62 } 63 64 const MRflSinglePhoton &MRflEvtData::GetPhoton(Int_t i) const 65 { 66 return *static_cast<MRflSinglePhoton*>(fList.UncheckedAt(i)); 57 67 } 58 68 … … 91 101 } 92 102 103 void MRflEvtData::DrawPixelContent(Int_t num) const 104 { 105 } 106 107 // ------------------------------------------------------------------------ 108 // 109 // Fill a reflector event. Sums all pixels in each pixel as the 110 // pixel contents. 111 // 112 // WARNING: Due to the estimation in DistanceToPrimitive and the 113 // calculation in pixels instead of x, y this is only a 114 // rough estimate. 115 // 116 Bool_t MRflEvtData::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const 117 { 118 // 119 // sum the photons content in each pixel 120 // 121 const Int_t entries = GetNumPhotons(); 122 123 val = 0; 124 125 for (Int_t i=0; i<entries; i++) 126 { 127 const MRflSinglePhoton &ph = GetPhoton(i); 128 129 UInt_t idx; 130 for (idx=0; idx<cam.GetNumPixels(); idx++) 131 { 132 MHexagon hex(cam[idx]); 133 if (hex.DistanceToPrimitive(ph.GetX(), ph.GetY())<0) 134 break; 135 } 136 if (idx==cam.GetNumPixels()) 137 continue; 138 139 val += cam.GetPixRatio(idx); 140 } 141 142 return val>0; 143 } -
trunk/MagicSoft/Mars/mreflector/MRflEvtData.h
r2135 r2208 2 2 #define MARS_MRflEvtData 3 3 4 #ifndef MARS_M RflSinglePhoton5 #include "M RflSinglePhoton.h"4 #ifndef MARS_MCamEvent 5 #include "MCamEvent.h" 6 6 #endif 7 7 … … 10 10 #endif 11 11 12 class MRflEvtData : public MParContainer 12 class MRflSinglePhoton; 13 14 class MRflEvtData : public MCamEvent 13 15 { 14 16 TClonesArray fList; … … 25 27 void FixSize(); 26 28 27 const MRflSinglePhoton &GetPhoton(Int_t i) const { return (MRflSinglePhoton&)*fList.UncheckedAt(i); }29 const MRflSinglePhoton &GetPhoton(Int_t i) const; 28 30 29 31 void Print(Option_t *o="") const; 32 33 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 34 void DrawPixelContent(Int_t num) const; 30 35 31 36 ClassDef(MRflEvtData, 0) // All Photons of a event from the reflector program -
trunk/MagicSoft/Mars/mreflector/Makefile
r2142 r2208 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase 24 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom 25 25 26 26 #------------------------------------------------------------------------------ -
trunk/MagicSoft/Mars/mtools/MChisqEval.cc
r2173 r2208 106 106 } 107 107 108 Bool_t MChisqEval::PreProcess(MParList *plist)108 Int_t MChisqEval::PreProcess(MParList *plist) 109 109 { 110 110 fChisq = 0; … … 123 123 } 124 124 125 Bool_t MChisqEval::Process()125 Int_t MChisqEval::Process() 126 126 { 127 127 const Double_t y1 = fData0->GetValue(); … … 135 135 } 136 136 137 Bool_t MChisqEval::PostProcess()137 Int_t MChisqEval::PostProcess() 138 138 { 139 139 fChisq /= GetNumExecutions(); -
trunk/MagicSoft/Mars/mtools/MChisqEval.h
r1840 r2208 29 29 enum { kIsOwner = BIT(14) }; 30 30 31 Int_t PreProcess(MParList *plist); 32 Int_t Process(); 33 Int_t PostProcess(); 34 31 35 public: 32 36 MChisqEval(const char *name=NULL, const char *title=NULL); … … 42 46 void SetOwner(Bool_t o=kTRUE) { o ? SetBit(kIsOwner) : ResetBit(kIsOwner); } 43 47 44 Bool_t PreProcess(MParList *plist);45 Bool_t Process();46 Bool_t PostProcess();47 48 48 Double_t GetChisq() const { return fChisq; } 49 49
Note:
See TracChangeset
for help on using the changeset viewer.