- Timestamp:
- 02/13/13 10:34:54 (12 years ago)
- Location:
- trunk/Mars
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/Makefile.conf.linux
r12753 r14896 19 19 OPTIM := -O5 -std=c++0x -Wall -Winit-self -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Woverloaded-virtual 20 20 # ggc 4.3: removed -Wshadow -fnonnull-objects -Wtraditional -Wnested-externs -Wconversion 21 DEBUG := 21 DEBUG := -g 22 22 ARCHDEF := -D__LINUX__ 23 23 SOFLAG := -shared -
trunk/Mars/mbase/BaseLinkDef.h
r11559 r14896 19 19 #pragma link C++ class izstream+; 20 20 #pragma link C++ class fits+; 21 #pragma link C++ class ofits+; 21 22 //#pragma link C++ class MBzlib2+; 23 24 // mcore 25 #pragma link C++ class DrsCalibrateTime+; 22 26 23 27 // Basic Network Tools -
trunk/Mars/mbase/Makefile
r11872 r14896 70 70 MObjLookup.cc \ 71 71 ../mcore/izstream.h \ 72 ../mcore/fits.h 72 ../mcore/fits.h \ 73 ../mcore/DrsCalib.h 73 74 74 75 ############################################################ -
trunk/Mars/mcalib/CalibLinkDef.h
r8657 r14896 12 12 13 13 #pragma link C++ class MCalibrateData+; 14 #pragma link C++ class MCalibrateFact+; 14 15 #pragma link C++ class MCalibrateRelTimes+; 15 16 … … 39 40 #pragma link C++ class MCalibrationChargePINDiode+; 40 41 42 #pragma link C++ class MCalibrateDrsTimes+; 43 41 44 #endif -
trunk/Mars/mcalib/Makefile
r9518 r14896 21 21 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../mhcalib -I../mhbase \ 22 22 -I../manalysis -I../mraw -I../mtools -I../mmc -I../mhist \ 23 -I../mimage -I../msignal -I../mbadpixels -I../mpedestal 23 -I../mimage -I../msignal -I../mbadpixels -I../mpedestal -I../mcore 24 24 # mhbase: MBinning MH 25 25 # mgui: MCamEvent (McalibrationCam) … … 34 34 MCalibCalcFromPast.cc \ 35 35 MCalibrateData.cc \ 36 MCalibrateFact.cc \ 36 37 MCalibConstCam.cc \ 37 38 MCalibConstPix.cc \ … … 39 40 MCalibrationPatternDecode.cc \ 40 41 MCalibrateRelTimes.cc \ 42 MCalibrateDrsTimes.cc \ 41 43 MCalibrationCam.cc \ 42 44 MCalibrationPix.cc \ -
trunk/Mars/mcore/fits.h
r14860 r14896 420 420 421 421 #ifdef __CINT__ 422 typedef char Pointers[ 56];422 typedef char Pointers[48]; 423 423 #else 424 424 typedef unordered_map<string, void*> Pointers; -
trunk/Mars/mdata/MDataArray.cc
r8910 r14896 114 114 { 115 115 const MDataPhrase data(rule); 116 if (!data.IsValid())117 return -1;116 // if (!data.IsValid()) 117 // return -1; 118 118 119 119 const TString r(data.GetRule()); -
trunk/Mars/mhflux/MHThetaSq.cc
r9851 r14896 130 130 MBinning binsa(nbins, 0, nbins*intmax/nsig); 131 131 132 gLog << inf << "Theta-cut set to " << intmax << "deg" << endl; 133 132 134 // Apply binning 133 135 binsa.Apply(fHistTime); … … 177 179 void MHThetaSq::InitMapping(MHMatrix *mat, Int_t type) 178 180 { 181 return MHAlpha::InitMapping(mat, type); 182 179 183 if (fMatrix) 180 184 return; -
trunk/Mars/mhist/HistLinkDef.h
r8614 r14896 5 5 #pragma link off all functions; 6 6 7 //#pragma link C++ class MHFadcCam+; 7 #pragma link C++ class MDrsCalibration+; 8 #pragma link C++ class MDrsCalibrationTime+; 9 #pragma link C++ class MHDrsCalibration+; 10 #pragma link C++ class MHDrsCalibrationT+; 11 #pragma link C++ class MHDrsCalibrationCheck+; 8 12 //#pragma link C++ class MHFadcPix+; 9 13 … … 16 20 17 21 //#pragma link C++ class MHCompProb+; 18 #pragma link C++ class MHHadronness+; 22 #pragma link C++ class MHHadronness+; 19 23 20 24 #pragma link C++ class MHCamera+; -
trunk/Mars/mhist/Makefile
r9519 r14896 22 22 -I../mgui -I../mgeom -I../mdata -I../mfilter -I../mimage \ 23 23 -I../mpointing -I../mmc -I../mastro -I../msignal \ 24 -I../mbadpixels -I../mcalib -I../mreport -I../mtrigger 24 -I../mbadpixels -I../mcalib -I../mreport -I../mtrigger \ 25 -I../mcore -I../mpedestal 25 26 26 27 SRCFILES = MHEvent.cc \ 28 MHDrsCalib.cc \ 27 29 MHCamEvent.cc \ 28 30 MHCamEventRot.cc \ -
trunk/Mars/mjobs/JobsLinkDef.h
r9275 r14896 18 18 19 19 #pragma link C++ class MJPedestal+; 20 #pragma link C++ class MJPedestalF+; 20 21 #pragma link C++ class MJStar+; 21 22 #pragma link C++ class MJCut+; -
trunk/Mars/mjobs/Makefile
r9518 r14896 33 33 MJSimulation.cc \ 34 34 MJPedestal.cc \ 35 MJPedestalF.cc \ 35 36 MJCalib.cc \ 36 37 MJCalibration.cc \ -
trunk/Mars/mmuon/MHSingleMuon.cc
r10166 r14896 211 211 for (Int_t i=0; i<entries; i++) 212 212 { 213 const MSignalPix &pix = (*fSignalCam)[i]; 214 const MGeom &gpix = (*fGeomCam)[i]; 213 const MSignalPix &pix = (*fSignalCam)[i]; 214 if (fUseCleanedSignal && !pix.IsPixelUsed()) 215 continue; 216 217 const MGeom &gpix = (*fGeomCam)[i]; 215 218 216 219 const Float_t dx = gpix.GetX() - cenx; … … 227 230 } 228 231 229 // use only the inner pix les. FIXME: This is geometry dependent232 // use only the inner pixels. FIXME: This is geometry dependent 230 233 if (gpix.GetAidx()>0) 231 234 continue; … … 234 237 } 235 238 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); 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 } 258 269 259 270 // The mean arrival time which was subtracted before will … … 264 275 { 265 276 const MSignalPix &pix = (*fSignalCam)[i]; 266 const MGeom &gpix = (*fGeomCam)[i]; 277 if (fUseCleanedSignal && !pix.IsPixelUsed()) 278 continue; 279 280 const MGeom &gpix = (*fGeomCam)[i]; 267 281 268 282 const Float_t dx = gpix.GetX() - cenx; … … 273 287 // if the signal is not near the estimated circle, it is ignored. 274 288 if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin && 275 TMath::Abs(pix.GetArrivalTime()-tm0) < 2*fRelTimeSigma)289 (fUseCleanedSignal || TMath::Abs(pix.GetArrivalTime()-tm0) < 2*fRelTimeSigma)) 276 290 { 277 291 fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons()); … … 393 407 { 394 408 Int_t first, last; 395 396 409 if (!FindRangeAboveThreshold(fHistWidth, thres, first, last)) 397 410 return kFALSE; -
trunk/Mars/mmuon/MHSingleMuon.h
r9153 r14896 23 23 24 24 Double_t fMargin; //! 25 Bool_t fUseCleanedSignal; //! 25 26 26 27 TProfile fHistPhi; // Histogram of photon distribution along the arc. … … 49 50 Double_t GetRelTimeSigma() const { return fRelTimeSigma; } 50 51 52 void SetUseCleanedSignal(Bool_t b=kTRUE) { fUseCleanedSignal = b; } 53 51 54 Float_t CalcSize() const; 52 55 -
trunk/Mars/mmuon/MMuonSearchPar.cc
r9376 r14896 295 295 296 296 //SetReadyToSave(); 297 } 297 } 298 299 Bool_t MMuonSearchPar::CalcFact(const MGeomCam &geom, const MSignalCam &evt) 300 { 301 // ===================== Reset cleaning ====================== 302 303 for (UInt_t idx=0; idx<evt.GetNumPixels(); idx++) 304 { 305 MSignalPix &pix = evt[idx]; 306 if (pix.IsPixelUnmapped()) 307 continue; 308 309 pix.SetPixelUnused(); 310 pix.SetPixelCore(kFALSE); 311 } 312 313 // ============ Do muon cleaning / calculate COG ============= 314 315 // The window must be large enough that the earliest and latest 316 // events do not get a biased timerms 317 double time_min = -19.5; 318 double time_max = -4.5; 319 double signal_min = 2.30; 320 double delta_t = 1.75; 321 322 Double_t sumx = 0.; 323 Double_t sumy = 0.; 324 Double_t sumw = 0.; 325 for (UInt_t i=0; i<evt.GetNumPixels(); i++) 326 { 327 MSignalPix &pix = evt[i]; 328 329 if (pix.GetNumPhotons()<signal_min) 330 continue; 331 if (pix.GetArrivalTime()>=time_max || pix.GetArrivalTime()<time_min) 332 continue; 333 if (pix.IsPixelUnmapped()) 334 continue; 335 336 const MGeom &gpix = geom[i]; 337 338 const double x = gpix.GetX(); 339 const double y = gpix.GetY(); 340 341 int counter = 0; 342 for (int j=0; j<gpix.GetNumNeighbors(); j++) 343 { 344 const int idx = gpix.GetNeighbor(j); 345 346 const MSignalPix &spix = evt[idx]; 347 348 if (spix.GetNumPhotons()<signal_min) 349 continue; 350 if (spix.GetArrivalTime()>=time_max || spix.GetArrivalTime()<time_min) 351 continue; 352 if (spix.IsPixelUnmapped()) 353 continue; 354 355 if (TMath::Abs(pix.GetArrivalTime()-spix.GetArrivalTime())>delta_t) 356 continue; 357 358 counter++; 359 } 360 361 if (counter==0) 362 continue; 363 364 sumx += pix.GetNumPhotons()*x; 365 sumy += pix.GetNumPhotons()*y; 366 sumw += pix.GetNumPhotons(); 367 368 pix.SetPixelUsed(); 369 pix.SetPixelCore(); 370 } 371 372 if (sumw==0) 373 return kFALSE; 374 375 sumx /= sumw; 376 sumy /= sumw; 377 378 // ============== Fit circle to resulting data =============== 379 380 Double_t sigma, rad; 381 CalcMinimumDeviation(geom, evt, sumx, sumy, sigma, rad); 382 383 fCenterX = sumx; 384 fCenterY = sumy; 385 fRadius = rad; 386 fDeviation = sigma; 387 388 return kTRUE; 389 } 298 390 299 391 void MMuonSearchPar::Print(Option_t *) const -
trunk/Mars/mmuon/MMuonSearchPar.h
r8911 r14896 52 52 void Calc(const MGeomCam &geom, const MSignalCam &evt, 53 53 const MHillas &hillas); 54 Bool_t CalcFact(const MGeomCam &geom, const MSignalCam &evt); 54 55 55 56 // TObject -
trunk/Mars/mmuon/MMuonSearchParCalc.cc
r7009 r14896 76 76 Int_t MMuonSearchParCalc::PreProcess(MParList *pList) 77 77 { 78 fHillas = (MHillas*)pList->FindObject("MHillas");79 if (!f Hillas)78 fHillas = 0; 79 if (!fUseFactAlgorithm) 80 80 { 81 *fLog << err << "MHillas not found... aborting." << endl; 82 return kFALSE; 81 fHillas = (MHillas*)pList->FindObject("MHillas"); 82 if (!fHillas) 83 { 84 *fLog << err << "MHillas not found... aborting." << endl; 85 return kFALSE; 86 } 83 87 } 84 88 … … 108 112 Int_t MMuonSearchParCalc::Process() 109 113 { 110 fMuonPar->Calc(*fGeomCam, *fSignalCam, *fHillas); 114 if (fUseFactAlgorithm) 115 fMuonPar->CalcFact(*fGeomCam, *fSignalCam); 116 else 117 fMuonPar->Calc(*fGeomCam, *fSignalCam, *fHillas); 118 111 119 return kTRUE; 112 120 } -
trunk/Mars/mmuon/MMuonSearchParCalc.h
r6979 r14896 19 19 MMuonSearchPar *fMuonPar; //! Pointer to the output container for the new image parameters 20 20 21 Bool_t fUseFactAlgorithm; 22 21 23 Int_t PreProcess(MParList *plist); 22 24 Int_t Process(); … … 25 27 MMuonSearchParCalc(const char *name=NULL, const char *title=NULL); 26 28 29 void SetUseFactAlgorithm(Bool_t b=kTRUE) { fUseFactAlgorithm = kTRUE; } 30 27 31 ClassDef(MMuonSearchParCalc, 0) // task to calculate muon parameters 28 32 }; -
trunk/Mars/mpedestal/MPedCalcPedRun.cc
r10166 r14896 256 256 void MPedCalcPedRun::Calc() 257 257 { 258 if (fIsNotPedRun && !IsPedBitSet())259 return;258 // if (fIsNotPedRun && !IsPedBitSet()) 259 // return; 260 260 261 261 MRawEvtPixelIter pixel(fRawEvt); -
trunk/Mars/mpedestal/Makefile
r11873 r14896 42 42 MHPedestalCor.cc \ 43 43 MPedestalSubtract.cc \ 44 MPedestalSubtractedEvt.cc 44 MPedestalSubtractedEvt.cc \ 45 MDrsCalibApply.cc 45 46 46 47 ############################################################ -
trunk/Mars/mpedestal/PedestalLinkDef.h
r8154 r14896 20 20 #pragma link C++ class MPedestalSubtractedEvt+; 21 21 22 #pragma link C++ class MDrsCalibApply+; 23 #pragma link C++ class MDrsCalibResult+; 24 22 25 #pragma link C++ class MHPedestalCor+; 23 26
Note:
See TracChangeset
for help on using the changeset viewer.