Changeset 14911 for trunk/Mars/mmuon
- Timestamp:
- 02/13/13 10:47:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mmuon/MHSingleMuon.cc
r14896 r14911 211 211 for (Int_t i=0; i<entries; i++) 212 212 { 213 const MSignalPix &pix = (*fSignalCam)[i]; 214 if (fUseCleanedSignal && !pix.IsPixelUsed()) 215 continue; 216 217 const MGeom &gpix = (*fGeomCam)[i]; 213 const MSignalPix &pix = (*fSignalCam)[i]; 214 const MGeom &gpix = (*fGeomCam)[i]; 218 215 219 216 const Float_t dx = gpix.GetX() - cenx; … … 230 227 } 231 228 232 // use only the inner pix els. FIXME: This is geometry dependent229 // use only the inner pixles. FIXME: This is geometry dependent 233 230 if (gpix.GetAidx()>0) 234 231 continue; … … 237 234 } 238 235 239 if (!fUseCleanedSignal) 240 { 241 // Setup the function and perform the fit 242 TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax()); 243 244 // Choose starting values as accurate as possible 245 g1.SetParameter(0, fHistTime.GetMaximum()); 246 g1.SetParameter(1, 0); 247 g1.SetParameter(2, 0.7); // FIXME! GetRMS instead??? 248 249 // According to fMuonSearchPar->GetTimeRMS() identified muons 250 // do not have an arrival time rms>3 251 g1.SetParLimits(1, -1.7, 1.7); 252 g1.SetParLimits(2, 0, 3.4); 253 254 // options : N do not store the function, do not draw 255 // I use integral of function in bin rather than value at bin center 256 // R use the range specified in the function range 257 // Q quiet mode 258 if (fHistTime.Fit(&g1, "QNB")) 259 return kTRUE; 260 261 fRelTimeMean = g1.GetParameter(1); 262 fRelTimeSigma = g1.GetParameter(2); 263 } 264 else 265 { 266 fRelTimeMean = fMuonSearchPar->GetTime(); 267 fRelTimeSigma = fMuonSearchPar->GetTimeRms(); 268 } 236 // Setup the function and perform the fit 237 TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax()); 238 239 // Choose starting values as accurate as possible 240 g1.SetParameter(0, fHistTime.GetMaximum()); 241 g1.SetParameter(1, 0); 242 g1.SetParameter(2, 0.7); // FIXME! GetRMS instead??? 243 244 // According to fMuonSearchPar->GetTimeRMS() identified muons 245 // do not have an arrival time rms>3 246 g1.SetParLimits(1, -1.7, 1.7); 247 g1.SetParLimits(2, 0, 3.4); 248 249 // options : N do not store the function, do not draw 250 // I use integral of function in bin rather than value at bin center 251 // R use the range specified in the function range 252 // Q quiet mode 253 if (fHistTime.Fit(&g1, "QNB")) 254 return kTRUE; 255 256 fRelTimeMean = g1.GetParameter(1); 257 fRelTimeSigma = g1.GetParameter(2); 269 258 270 259 // The mean arrival time which was subtracted before will … … 275 264 { 276 265 const MSignalPix &pix = (*fSignalCam)[i]; 277 if (fUseCleanedSignal && !pix.IsPixelUsed()) 278 continue; 279 280 const MGeom &gpix = (*fGeomCam)[i]; 266 const MGeom &gpix = (*fGeomCam)[i]; 281 267 282 268 const Float_t dx = gpix.GetX() - cenx; … … 287 273 // if the signal is not near the estimated circle, it is ignored. 288 274 if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin && 289 (fUseCleanedSignal || TMath::Abs(pix.GetArrivalTime()-tm0) < 2*fRelTimeSigma))275 TMath::Abs(pix.GetArrivalTime()-tm0) < 2*fRelTimeSigma) 290 276 { 291 277 fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons()); … … 407 393 { 408 394 Int_t first, last; 395 409 396 if (!FindRangeAboveThreshold(fHistWidth, thres, first, last)) 410 397 return kFALSE;
Note:
See TracChangeset
for help on using the changeset viewer.