Changeset 9000
- Timestamp:
- 07/14/08 22:25:59 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8999 r9000 72 72 * mraw/RawLinkDef.h, mraw/Makefile: 73 73 - removed MRawSocketRead 74 75 * mpointing/MHSrcPosCam.[h,cc]: 76 - fixed ouput in case a container is not found 77 - made it work for monte carlos, too 78 - use weight when filling histogram 79 - changed circle line styles 80 - changed default in constructor to wobble=kTRUE 74 81 75 82 -
trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc
r8689 r9000 89 89 Bool_t MHSrcPosCam::SetupFill(const MParList *pl) 90 90 { 91 fTimeEffOn = (MTime*)pl->FindObject("MTimeEffectiveOnTime");92 if (!fTimeEffOn)93 {94 *fLog << err << "ERROR - MTimeEffOnTime not found... aborting." << endl;95 return kFALSE;96 }97 98 91 MGeomCam *geom = (MGeomCam*)pl->FindObject("MGeomCam"); 99 92 if (!geom) … … 103 96 } 104 97 98 fTimeEffOn = (MTime*) pl->FindObject("MTimeEffectiveOnTime"); 105 99 fEffOnTime = (MParameterD*)pl->FindObject("MEffectiveOnTime"); 106 if (!fEffOnTime) 100 101 if (!fTimeEffOn && fEffOnTime) 102 { 103 *fLog << err << "ERROR - MTimeEffOnTime not found... aborting." << endl; 104 return kFALSE; 105 } 106 if (!fEffOnTime && fTimeEffOn) 107 107 { 108 108 *fLog << err << "ERROR - MEffectiveOnTime not found... aborting." << endl; … … 110 110 } 111 111 112 MPointingPos *pos = (MPointingPos*)pl->FindObject("MSourcePos", "MPointingPos");113 if (!pos)114 {115 *fLog << warn << "ERROR - MSourcePos not found... aborting." << endl;116 return kFALSE; 117 }118 119 const TString src = pos ->GetString("radec");112 if (!fEffOnTime && !fTimeEffOn) 113 *fLog << inf << "Neither MTimeEffOnTime nor MEffectiveOnTime found... assuming MC." << endl; 114 else 115 fTimeLastEffOn = MTime(); 116 117 const MPointingPos *pos = (MPointingPos*)pl->FindObject("MSourcePos", "MPointingPos"); 118 119 const TString src = pos ? pos->GetString("radec") : "MonteCarlo"; 120 120 fHist.SetTitle(MString::Format("SrcPos distribution in camera: %s", src.Data())); 121 121 122 122 fHist.Reset(); 123 fTimeLastEffOn = MTime(); 124 fConvMm2Deg = geom->GetConvMm2Deg(); 125 fNum = 0; 123 fConvMm2Deg = geom->GetConvMm2Deg(); 124 fNum = 0; 126 125 127 126 return kTRUE; … … 145 144 } 146 145 146 if (!fEffOnTime) 147 { 148 const TVector2 v(cam->GetXY()*fConvMm2Deg); 149 fHist.Fill(v.X(), v.Y(), w); 150 return kTRUE; 151 } 152 147 153 // Increase array size if necessary 148 154 if (fNum==fPositions.GetSize()) … … 167 173 { 168 174 const TVector2 &v = (TVector2&)*fPositions[i]; 169 fHist.Fill(v.X(), v.Y(), scale );175 fHist.Fill(v.X(), v.Y(), scale*w); 170 176 } 171 177 … … 205 211 if (fHist.GetXaxis()->GetXmax()>0.5) 206 212 { 213 // Typical wobble distance +/- 1 shaftencoder step 207 214 TEllipse el; 208 215 el.SetFillStyle(4000); 209 el.SetLineColor(kMagenta); 216 el.SetLineColor(kBlack); 217 el.SetLineStyle(kDashed); 210 218 el.DrawEllipse(0, 0, 0.4, 0, 0, 360, 0); 211 } 212 } 213 219 el.SetLineColor(17); 220 el.DrawEllipse(0, 0, 0.4-0.022, 0, 0, 360, 0); 221 el.DrawEllipse(0, 0, 0.4+0.022, 0, 0, 360, 0); 222 } 223 } 224 -
trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h
r8689 r9000 37 37 38 38 public: 39 MHSrcPosCam(Bool_t wobble=k FALSE, const char *name=NULL, const char *title=NULL);39 MHSrcPosCam(Bool_t wobble=kTRUE, const char *name=NULL, const char *title=NULL); 40 40 41 41 // MH
Note:
See TracChangeset
for help on using the changeset viewer.