Changeset 1880 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 03/31/03 10:37:56 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
r1647 r1880 414 414 } 415 415 416 void MImgCleanStd::SetLvl1(Float_t lvl) 417 { 418 fCleanLvl1 = lvl; 419 *fLog << inf << "Cleaning level 1 set to " << lvl << " sigma." << endl; 420 } 421 422 void MImgCleanStd::SetLvl2(Float_t lvl) 423 { 424 fCleanLvl2 = lvl; 425 *fLog << inf << "Cleaning level 2 set to " << lvl << " sigma." << endl; 426 } 427 416 428 // -------------------------------------------------------------------------- 417 429 // … … 433 445 { 434 446 case kImgCleanLvl1: 435 fCleanLvl1 = lvl; 436 *fLog << "Cleaning level 1 set to " << lvl << " sigma." << endl; 447 SetLvl1(lvl); 437 448 return kTRUE; 438 449 439 450 case kImgCleanLvl2: 440 fCleanLvl2 = lvl; 441 *fLog << "Cleaning level 2 set to " << lvl << " sigma." << endl; 451 SetLvl2(lvl); 442 452 return kTRUE; 443 453 } … … 465 475 out << ");" << endl; 466 476 } 477 478 // -------------------------------------------------------------------------- 479 // 480 // Read the setup from a TEnv: 481 // Float_t fCleanLvl1: CleaningLevel1 482 // Float_t fCleanLvl2: CleaningLevel2 483 // 484 Bool_t MImgCleanStd::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 485 { 486 Bool_t rc = kTRUE; 487 if (!IsEnvDefined(env, prefix, "CleaningLevel1", print)) 488 rc = kFALSE; 489 else 490 { 491 SetLvl1(GetEnvValue(env, prefix, "CleaningLevel1", fCleanLvl1)); 492 if (fCleanLvl1<0) 493 { 494 *fLog << err << "ERROR - Negative values for Cleaning Level 1 forbidden." << endl; 495 return kERROR; 496 } 497 } 498 499 if (!IsEnvDefined(env, prefix, "CleaningLevel2", print)) 500 rc = kFALSE; 501 else 502 { 503 SetLvl2(GetEnvValue(env, prefix, "CleaningLevel2", fCleanLvl2)); 504 if (fCleanLvl2<0) 505 { 506 *fLog << err << "ERROR - Negative values for Cleaning Level 2 forbidden." << endl; 507 return kERROR; 508 } 509 } 510 511 return rc; 512 } -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h
r1540 r1880 20 20 Float_t fCleanLvl2; 21 21 22 void SetLvl1(Float_t lvl); 23 void SetLvl2(Float_t lvl); 24 22 25 void CreateGuiElements(MGGroupFrame *f); 23 26 void StreamPrimitive(ofstream &out) const; … … 40 43 41 44 Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2); 45 Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 42 46 43 47 ClassDef(MImgCleanStd, 0) // task doing a standard image cleaning -
trunk/MagicSoft/Mars/manalysis/MNewImagePar.cc
r1872 r1880 72 72 const MHillas *hillas) 73 73 { 74 fHillas =hillas;74 //fHillas = (MHillas*)hillas; 75 75 76 76 const UInt_t npixevt = evt.GetNumPixels(); … … 96 96 } 97 97 98 99 fLeakage1 = edgepix1 / fHillas->GetSize(); 100 fLeakage2 = edgepix2 / fHillas->GetSize(); 98 fLeakage1 = edgepix1 / hillas->GetSize(); 99 fLeakage2 = edgepix2 / hillas->GetSize(); 101 100 102 101 SetReadyToSave(); -
trunk/MagicSoft/Mars/manalysis/MNewImagePar.h
r1872 r1880 11 11 { 12 12 private: 13 const MHillas *fHillas; //! Input parameters14 const MSrcPosCam *fSrcPos; //! Source position in the camera15 16 13 Float_t fLeakage1; // (photons in most outer ring of pixels) over fSize 17 14 Float_t fLeakage2; // (photons in the 2 outer rings of pixels) over fSize … … 20 17 MNewImagePar(const char *name=NULL, const char *title=NULL); 21 18 22 void SetSrcPos(constMSrcPosCam *pos) { fSrcPos = pos; }23 const MSrcPosCam *GetSrcPos() const { return fSrcPos; }19 // void SetSrcPos(MSrcPosCam *pos) { fSrcPos = pos; } 20 // const MSrcPosCam *GetSrcPos() const { return fSrcPos; } 24 21 25 22 void Reset(); -
trunk/MagicSoft/Mars/manalysis/MNewImageParCalc.cc
r1872 r1880 107 107 return kFALSE; 108 108 109 fNewImagePar->SetSrcPos(fSrcPos);110 111 109 fErrors = 0; 112 110 -
trunk/MagicSoft/Mars/manalysis/MNewImageParCalc.h
r1872 r1880 15 15 { 16 16 private: 17 constMGeomCam *fGeomCam;18 constMCerPhotEvt *fCerPhotEvt;17 MGeomCam *fGeomCam; 18 MCerPhotEvt *fCerPhotEvt; 19 19 20 20 MHillas *fHillas; //! Pointer to the source independent hillas parameters -
trunk/MagicSoft/Mars/manalysis/MRanForest.cc
r1871 r1880 288 288 289 289 // give running output 290 TString str=Form("%.2f",100.*fErr); 291 cout.width(5); cout<<fTreeNo; 292 cout.width(15); cout<<str<<endl; 290 cout << setw(5) << fTreeNo << setw(15) << Form("%.2f",100.*fErr) << endl; 293 291 294 292 // adding tree to forest -
trunk/MagicSoft/Mars/manalysis/MSigmabar.cc
r1748 r1880 91 91 Int_t outerPixels[6] = {0,0,0,0,0,0}; 92 92 93 Int_t currentSector;94 Float_t angle;95 96 93 // sum up sigma**2 for each sector, separately for inner and outer region; 97 94 // all pixels are renormalized to the area of pixel 0 … … 117 114 118 115 Int_t j = cerpix.GetPixId(); 119 Double_t Area = geom.GetPixRatio(j);116 Double_t area = geom.GetPixRatio(j); 120 117 121 118 const MGeomPix &gpix = geom[j]; … … 125 122 //if (angle<0.0) angle+=6.0; 126 123 127 angle = 6.0*atan2(gpix.GetY(),gpix.GetX()) / (2.0*TMath::Pi()); 128 if (angle<0.0) angle+=6.0; 129 currentSector=(Int_t)angle; 124 Float_t angle = atan2(gpix.GetY(),gpix.GetX())*6 / (TMath::Pi()*2); 125 if (angle<0) angle+=6; 126 127 Int_t currentSector=(Int_t)angle; 130 128 131 129 // count only those pixels which have a sigma != 0.0 … … 134 132 if ( sigma != 0.0 ) 135 133 { 136 if ( Area < 1.5)134 if (area < 1.5) 137 135 { 138 136 innerPixels[currentSector]++; 139 innerSquaredSum[currentSector]+= sigma*sigma / Area;137 innerSquaredSum[currentSector]+= sigma*sigma / area; 140 138 } 141 139 else 142 140 { 143 141 outerPixels[currentSector]++; 144 outerSquaredSum[currentSector]+= sigma*sigma / Area;142 outerSquaredSum[currentSector]+= sigma*sigma / area; 145 143 } 146 144 } … … 191 189 } 192 190 193 return (fSigmabar);191 return fSigmabar; 194 192 } 195 193
Note:
See TracChangeset
for help on using the changeset viewer.