Changeset 1915 for trunk/MagicSoft/Mars
- Timestamp:
- 04/07/03 17:46:00 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1914 r1915 38 38 - fixed a bug in the draw function (the drawn pixel has not been the 39 39 one with the given Id, but simply the i-th entry in the array) 40 41 * mfilter/MFCT1Supercuts.[h,cc]: 42 - changed naming style of variables 43 - changes array access 40 44 41 45 -
trunk/MagicSoft/Mars/mfilter/MFCT1Supercuts.cc
r1905 r1915 45 45 ClassImp(MFCT1Supercuts); 46 46 47 48 // -------------------------------------------------------------------------- 49 // 50 MFCT1Supercuts::MFCT1Supercuts(const char *hilname, const char *hilsrcname, 51 const char *name, const char *title) 52 { 53 fName = name ? name : "MFCT1Supercuts"; 54 fTitle = title ? title : "Class to evaluate the Supercuts"; 55 56 fHilName = hilname; 57 fHilSrcName = hilsrcname; 58 } 59 60 // -------------------------------------------------------------------------- 61 // 62 Bool_t MFCT1Supercuts::PreProcess(MParList *pList) 63 { 64 fHil = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt"); 65 if (!fHil) 66 { 67 *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl; 68 return kFALSE; 69 } 70 71 fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc"); 72 if (!fHilSrc) 73 { 74 *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl; 75 return kFALSE; 76 } 77 78 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 79 if (!fMcEvt) 80 { 81 *fLog << dbginf << "MMcEvt not found... aborting." << endl; 82 return kFALSE; 83 } 84 85 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); 86 if (!fEvt) 87 { 88 *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; 89 return kFALSE; 90 } 91 92 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 93 if (!fCam) 94 { 95 *fLog << dbginf << "MGeomCam (Camera Geometry) missing in Parameter List... aborting." << endl; 96 return kFALSE; 97 } 98 fMm2Deg = fCam->GetConvMm2Deg(); 99 100 //*fLog << "fMm2Deg = " << fMm2Deg << endl; 101 102 47 void MFCT1Supercuts::InitParams() 48 { 103 49 //--------------------------------- 104 50 // cut parameters 105 106 lengthup[0] = 0.315585; 107 lengthup[1] = 0.001455; 108 lengthup[2] = 0.203198; 109 lengthup[3] = 0.005532; 110 lengthup[4] =-0.001670; 111 lengthup[5] =-0.020362; 112 lengthup[6] = 0.007388; 113 lengthup[7] =-0.013463; 114 115 widthup[0] = 0.145412; 116 widthup[1] =-0.001771; 117 widthup[2] = 0.054462; 118 widthup[3] = 0.022280; 119 widthup[4] =-0.009893; 120 widthup[5] = 0.056353; 121 widthup[6] = 0.020711; 122 widthup[7] =-0.016703; 123 124 distup[0] = 1.787943; 125 distup[1] = 0.; 126 distup[2] = 2.942310; 127 distup[3] = 0.199815; 128 distup[4] = 0.; 129 distup[5] = 0.249909; 130 distup[6] = 0.189697; 131 distup[7] = 0.; 132 133 lengthlow[0] = 0.151530; 134 lengthlow[1] = 0.028323; 135 lengthlow[2] = 0.510707; 136 lengthlow[3] = 0.053089; 137 lengthlow[4] = 0.013708; 138 lengthlow[5] = 2.357993; 139 lengthlow[6] = 0.000080; 140 lengthlow[7] =-0.007157; 141 142 widthlow[0] = 0.089187; 143 widthlow[1] =-0.006430; 144 widthlow[2] = 0.074442; 145 widthlow[3] = 0.003738; 146 widthlow[4] =-0.004256; 147 widthlow[5] =-0.014101; 148 widthlow[6] = 0.006126; 149 widthlow[7] =-0.002849; 51 fLengthUp[0] = 0.315585; 52 fLengthUp[1] = 0.001455; 53 fLengthUp[2] = 0.203198; 54 fLengthUp[3] = 0.005532; 55 fLengthUp[4] =-0.001670; 56 fLengthUp[5] =-0.020362; 57 fLengthUp[6] = 0.007388; 58 fLengthUp[7] =-0.013463; 59 60 fWidthUp[0] = 0.145412; 61 fWidthUp[1] =-0.001771; 62 fWidthUp[2] = 0.054462; 63 fWidthUp[3] = 0.022280; 64 fWidthUp[4] =-0.009893; 65 fWidthUp[5] = 0.056353; 66 fWidthUp[6] = 0.020711; 67 fWidthUp[7] =-0.016703; 68 69 fDistUp[0] = 1.787943; 70 fDistUp[1] = 0.; 71 fDistUp[2] = 2.942310; 72 fDistUp[3] = 0.199815; 73 fDistUp[4] = 0.; 74 fDistUp[5] = 0.249909; 75 fDistUp[6] = 0.189697; 76 fDistUp[7] = 0.; 77 78 fLengthLo[0] = 0.151530; 79 fLengthLo[1] = 0.028323; 80 fLengthLo[2] = 0.510707; 81 fLengthLo[3] = 0.053089; 82 fLengthLo[4] = 0.013708; 83 fLengthLo[5] = 2.357993; 84 fLengthLo[6] = 0.000080; 85 fLengthLo[7] =-0.007157; 86 87 fWidthLo[0] = 0.089187; 88 fWidthLo[1] =-0.006430; 89 fWidthLo[2] = 0.074442; 90 fWidthLo[3] = 0.003738; 91 fWidthLo[4] =-0.004256; 92 fWidthLo[5] =-0.014101; 93 fWidthLo[6] = 0.006126; 94 fWidthLo[7] =-0.002849; 150 95 151 96 distlow[0] = 0.589406; … … 158 103 distlow[7] = 0.; 159 104 160 asymup[0] = 0.061267;161 asymup[1] = 0.014462;162 asymup[2] = 0.014327;163 asymup[3] = 0.014540;164 asymup[4] = 0.013391;165 asymup[5] = 0.012319;166 asymup[6] = 0.010444;167 asymup[7] = 0.008328;168 169 asymlow[0] =-0.012055;170 asymlow[1] = 0.009157;171 asymlow[2] = 0.005441;172 asymlow[3] = 0.000399;173 asymlow[4] = 0.001433;174 asymlow[5] =-0.002050;175 asymlow[6] =-0.000104;176 asymlow[7] =-0.001188;177 178 alphaup[0] = 13.123440;179 alphaup[1] = 0.;180 alphaup[2] = 0.;181 alphaup[3] = 0.;182 alphaup[4] = 0.;183 alphaup[5] = 0.;184 alphaup[6] = 0.;185 alphaup[7] = 0.;105 fAsymUp[0] = 0.061267; 106 fAsymUp[1] = 0.014462; 107 fAsymUp[2] = 0.014327; 108 fAsymUp[3] = 0.014540; 109 fAsymUp[4] = 0.013391; 110 fAsymUp[5] = 0.012319; 111 fAsymUp[6] = 0.010444; 112 fAsymUp[7] = 0.008328; 113 114 fAsymLo[0] =-0.012055; 115 fAsymLo[1] = 0.009157; 116 fAsymLo[2] = 0.005441; 117 fAsymLo[3] = 0.000399; 118 fAsymLo[4] = 0.001433; 119 fAsymLo[5] =-0.002050; 120 fAsymLo[6] =-0.000104; 121 fAsymLo[7] =-0.001188; 122 123 fAlphaUp[0] = 13.123440; 124 fAlphaUp[1] = 0.; 125 fAlphaUp[2] = 0.; 126 fAlphaUp[3] = 0.; 127 fAlphaUp[4] = 0.; 128 fAlphaUp[5] = 0.; 129 fAlphaUp[6] = 0.; 130 fAlphaUp[7] = 0.; 186 131 //--------------------------------- 132 } 133 134 // -------------------------------------------------------------------------- 135 // 136 MFCT1Supercuts::MFCT1Supercuts(const char *hilname, const char *hilsrcname, 137 const char *name, const char *title) 138 { 139 fName = name ? name : "MFCT1Supercuts"; 140 fTitle = title ? title : "Class to evaluate the Supercuts"; 141 142 fHilName = hilname; 143 fHilSrcName = hilsrcname; 144 145 InitParams(); 146 } 147 148 // -------------------------------------------------------------------------- 149 // 150 Bool_t MFCT1Supercuts::PreProcess(MParList *pList) 151 { 152 fHil = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt"); 153 if (!fHil) 154 { 155 *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl; 156 return kFALSE; 157 } 158 159 fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc"); 160 if (!fHilSrc) 161 { 162 *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl; 163 return kFALSE; 164 } 165 166 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 167 if (!fMcEvt) 168 { 169 *fLog << dbginf << "MMcEvt not found... aborting." << endl; 170 return kFALSE; 171 } 172 173 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); 174 if (!fEvt) 175 { 176 *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; 177 return kFALSE; 178 } 179 180 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 181 if (!fCam) 182 { 183 *fLog << dbginf << "MGeomCam (Camera Geometry) missing in Parameter List... aborting." << endl; 184 return kFALSE; 185 } 186 fMm2Deg = fCam->GetConvMm2Deg(); 187 187 188 188 return kTRUE; … … 207 207 // dd2: DIST^2 208 208 209 Double_t limit = *a + *(a+1) * dd2 + *(a+2) * ct 210 + ls * (*(a+3) + *(a+4) * dd2 + *(a+5) * ct) 211 + ls2 * (*(a+6) + *(a+7) * dd2); 212 209 const Double_t limit = 210 a[0] + a[1] * dd2 + a[2] * ct + 211 ls * (a[3] + a[4] * dd2 + a[5] * ct) + 212 ls2 * (a[6] + a[7] * dd2); 213 /* 213 214 *fLog << "MFCT1Supercuts::Process; *a = " 214 215 << *a << ", " << *(a+1) << ", " << *(a+2) << ", " … … 219 220 << ", " << ls2 << ", " << ct << ", " << dd2 << ", " 220 221 << limit << endl; 221 222 */ 222 223 return limit; 223 224 } … … 260 261 261 262 if ( newdist < 1.05 262 && newdist < CtsMCut ( distup, dmls, dmcza, dmls2, dd2)263 && newdist < CtsMCut (fDistUp, dmls, dmcza, dmls2, dd2) 263 264 && newdist > CtsMCut (distlow, dmls, dmcza, dmls2, dd2) 264 265 && dist < 1.05 265 && length < CtsMCut ( lengthup, dmls, dmcza, dmls2, dd2)266 && length > CtsMCut ( lengthlow, dmls, dmcza, dmls2, dd2)267 && width < CtsMCut ( widthup, dmls, dmcza, dmls2, dd2)268 && width > CtsMCut ( widthlow, dmls, dmcza, dmls2, dd2)269 //&& asym < CtsMCut ( asymup, dmls, dmcza, dmls2, dd2)270 //&& asym > CtsMCut ( asymlow, dmls, dmcza, dmls2, dd2)271 && dist < CtsMCut ( distup, dmls, dmcza, dmls2, dd2)266 && length < CtsMCut (fLengthUp, dmls, dmcza, dmls2, dd2) 267 && length > CtsMCut (fLengthLo, dmls, dmcza, dmls2, dd2) 268 && width < CtsMCut (fWidthUp, dmls, dmcza, dmls2, dd2) 269 && width > CtsMCut (fWidthLo, dmls, dmcza, dmls2, dd2) 270 //&& asym < CtsMCut (fAsymUp, dmls, dmcza, dmls2, dd2) 271 //&& asym > CtsMCut (fAsymLo, dmls, dmcza, dmls2, dd2) 272 && dist < CtsMCut (fDistUp, dmls, dmcza, dmls2, dd2) 272 273 && dist > CtsMCut (distlow, dmls, dmcza, dmls2, dd2) ) 273 274 fResult = kTRUE; -
trunk/MagicSoft/Mars/mfilter/MFCT1Supercuts.h
r1905 r1915 38 38 //--------------------------------- 39 39 // cut parameters 40 41 double lengthup[8]; 42 double widthup[8]; 43 double distup[8]; 44 double lengthlow[8]; 45 double widthlow[8]; 46 double distlow[8]; 47 double asymup[8]; 48 double asymlow[8]; 49 double alphaup[8]; 40 Double_t fLengthUp[8]; 41 Double_t fWidthUp[8]; 42 Double_t fDistUp[8]; 43 Double_t fLengthLo[8]; 44 Double_t fWidthLo[8]; 45 Double_t distlow[8]; 46 Double_t fAsymUp[8]; 47 Double_t fAsymLo[8]; 48 Double_t fAlphaUp[8]; 50 49 //--------------------------------- 51 50 51 void InitParams(); 52 52 53 53 public:
Note:
See TracChangeset
for help on using the changeset viewer.