Changeset 1809 for trunk/MagicSoft/Mars/manalysis/MSelStandard.cc
- Timestamp:
- 03/08/03 14:00:30 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MSelStandard.cc
r1762 r1809 1 1 2 /* ======================================================================== *\ 2 3 ! … … 39 40 40 41 #include "MHillas.h" 42 #include "MHillasExt.h" 41 43 #include "MHillasSrc.h" 42 44 #include "MCerPhotEvt.h" … … 54 56 // Default constructor. 55 57 // 56 MSelStandard::MSelStandard(const MHillas *parhil, const MHillasSrc *parhilsrc,58 MSelStandard::MSelStandard(const char *HilName, const char *HilSrcName, 57 59 const char *name, const char *title) 58 60 { … … 60 62 fTitle = title ? title : "Task to evaluate the Standard Cuts"; 61 63 62 fHil = parhil;63 fHil src = parhilsrc;64 fHilName = HilName; 65 fHilSrcName = HilSrcName; 64 66 } 65 67 … … 72 74 Bool_t MSelStandard::PreProcess(MParList *pList) 73 75 { 76 fHil = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt"); 77 if (!fHil) 78 { 79 *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl; 80 return kFALSE; 81 } 82 83 fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc"); 84 if (!fHilSrc) 85 { 86 *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl; 87 return kFALSE; 88 } 89 90 74 91 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 75 92 if (!fMcEvt) … … 95 112 fMm2Deg = fCam->GetConvMm2Deg(); 96 113 97 *fLog << "fMm2Deg = " << fMm2Deg << endl;114 //*fLog << "fMm2Deg = " << fMm2Deg << endl; 98 115 99 116 memset(fErrors, 0, sizeof(fErrors)); … … 114 131 Int_t rc = 0; 115 132 116 //Double_t fLength = fHil->GetLength() * fMm2Deg;117 //Double_t fWidth = fHil->GetWidth() * fMm2Deg;118 Double_t fDist = fHil src->GetDist()* fMm2Deg;133 Double_t fLength = fHil->GetLength() * fMm2Deg; 134 Double_t fWidth = fHil->GetWidth() * fMm2Deg; 135 Double_t fDist = fHilSrc->GetDist()* fMm2Deg; 119 136 //Double_t fDelta = fHil->GetDelta() * kRad2Deg; 120 137 Double_t fSize = fHil->GetSize(); … … 122 139 Int_t fNumCorePixels = fHil->GetNumCorePixels(); 123 140 124 if ( fSize <= 60.0 || fDist< 0.4 || fDist > 1.1 125 || fNumUsedPixels >= 92 || fNumCorePixels < 4) 141 if ( fNumUsedPixels >= 92 || fNumCorePixels < 4 ) 126 142 { 127 143 //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = " … … 129 145 // << fNumCorePixels << endl; 130 146 rc = 1; 147 } 148 149 else if ( fSize <= 60.0 || fDist< 0.4 || fDist > 1.1 ) 150 { 151 //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = " 152 // << fSize << ", " << fDist << ", " << fNumUsedPixels << ", " 153 // << fNumCorePixels << endl; 154 rc = 2; 155 } 156 157 else if ( fLength <= 0.0 || fWidth <= 0.0 ) 158 { 159 //*fLog << "MSelStandard::Process; fLength, fWidth = " 160 // << fLength << ", " << fWidth << endl; 161 rc = 3; 131 162 } 132 163 … … 149 180 *fLog << GetDescriptor() << " execution statistics:" << endl; 150 181 *fLog << dec << setfill(' '); 151 *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Standard selections are not fullfilled" << endl; 182 *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Requirements on no.of used or core pxels not fullfilled" << endl; 183 184 *fLog << " " << setw(7) << fErrors[2] << " (" << setw(3) << (int)(fErrors[2]*100/GetNumExecutions()) << "%) Evts skipped due to: Requirements on SIZE or DIST not fullfilled" << endl; 185 186 *fLog << " " << setw(7) << fErrors[3] << " (" << setw(3) << (int)(fErrors[3]*100/GetNumExecutions()) << "%) Evts skipped due to: Length or Width is <= 0" << endl; 152 187 153 188 *fLog << " " << fErrors[0] << " (" << (int)(fErrors[0]*100/GetNumExecutions()) << "%) Evts survived Standard selections!" << endl; … … 156 191 return kTRUE; 157 192 } 193 194
Note:
See TracChangeset
for help on using the changeset viewer.