Changeset 2037
- Timestamp:
- 04/29/03 09:48:42 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2036 r2037 1 1 -*-*- END OF LINE -*-*- 2 2003/04/29: Abelardo Moralej0 2 2003/04/29: Thomas Bretz 3 4 * mfilter/MFCT1SelBasic.[h,cc], mfilter/MFCT1SelFinal.[h,cc], 5 mfilter/MFCT1SelStandard.[h,cc]: 6 - reordered includes 7 - removed MHillas from constructor (if present) 8 - added corresponding Setter-methods 9 - added many const qualifiers 10 - removed some obsolete data members 11 - made some member functions private 12 - only store fMm2Deg, not the pointer to MGeomCam 13 - don't use the CT1 camera build in... (to be discussed) 14 - fixed MHillas, MHillasExt and MNewImagePar stuff 15 16 17 18 2003/04/29: Abelardo Moralejo 3 19 4 20 * mmontecarlo/MMcCollectionareaCalc.[h,cc] … … 15 31 to CalcEfficiency. 16 32 33 34 17 35 2003/04/28: Nadia Tonello 18 36 … … 26 44 * manalysis/MCerPhotPix.[h,cc] 27 45 - added fRing and Get-Set functions 28 46 47 48 29 49 2003/04/28: Oscar Blanch 30 50 … … 37 57 * mgeom/Makefile 38 58 - Added class MGeomCamECO1000 59 60 39 61 40 62 2003/04/28: Abelardo Moralejo … … 46 68 Removed couts and used fLog instead. Function fcn is no longer 47 69 declared external. 70 71 48 72 49 73 2003/04/28: Thomas Bretz -
trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc
r1905 r2037 16 16 ! 17 17 ! 18 ! Author(s): Wolfgang Wittek 04/2003 <mailto:wittek@mppmu.mpg.de> 18 ! Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de> 19 ! Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2003 … … 24 25 25 26 ///////////////////////////////////////////////////////////////////////////// 26 // // 27 // MFCT1SelBasic // 28 // // 29 // This is a class to evaluate basic cuts // 30 // // 31 // to be called after the calibration (when the number of photons is // 32 // available for all pixels) // 33 // // 27 // 28 // MFCT1SelBasic 29 // 30 // This is a class to evaluate basic cuts 31 // 32 // WHAT ARE THE BASIC CUTS? 33 // 34 // to be called after the calibration (when the number of photons is 35 // available for all pixels) 36 // 34 37 ///////////////////////////////////////////////////////////////////////////// 35 38 … … 38 41 #include "MParList.h" 39 42 40 #include "MHillas.h" 43 #include "MMcEvt.hxx" 44 41 45 #include "MCerPhotEvt.h" 42 #include "MMcEvt.hxx" 43 #include "MRawRunHeader.h" 46 //nclude "MRawRunHeader.h" 47 48 #include "MGeomPix.h" 44 49 #include "MGeomCam.h" 50 51 #include "MPedestalPix.h" 45 52 #include "MPedestalCam.h" 46 #include "MPedestalPix.h"47 #include "MGeomPix.h"48 53 49 54 #include "MLog.h" … … 73 78 Float_t thetamin, Float_t thetamax) 74 79 { 75 fMinPhotons = minphotons;76 fThetaMin = thetamin;77 fThetaMax = thetamax;78 79 *fLog << inf << "MFCT1SelBasic cut values : fMinPhotons, fThetaMin, fThetaMax = "80 80 fMinPhotons = minphotons; 81 fThetaMin = thetamin; 82 fThetaMax = thetamax; 83 84 *fLog << inf << "MFCT1SelBasic cut values : fMinPhotons, fThetaMin, fThetaMax = "; 85 *fLog << fMinPhotons <<", " << fThetaMin << ", " << fThetaMax << endl; 81 86 } 82 87 … … 88 93 Bool_t MFCT1SelBasic::PreProcess(MParList *pList) 89 94 { 95 /* 90 96 fRawRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 91 97 if (!fRawRun) … … 94 100 return kFALSE; 95 101 } 102 */ 96 103 97 104 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); … … 109 116 } 110 117 111 112 118 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 113 119 if (!fCam) … … 116 122 return kFALSE; 117 123 } 118 124 /* 119 125 fPed = (MPedestalCam*)pList->FindObject("MPedestalCam"); 120 126 if (!fPed) … … 123 129 return kFALSE; 124 130 } 125 131 */ 126 132 memset(fCut, 0, sizeof(fCut)); 127 133 … … 138 144 Bool_t MFCT1SelBasic::Process() 139 145 { 146 const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta(); 147 140 148 Int_t rc = 0; 141 149 fResult = kFALSE; 142 150 143 //if ( fRawRun->GetRunNumber() < 16279 )144 //{145 // rc = 1;146 // fResult = kTRUE;147 //}148 149 Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();150 151 if ( theta < fThetaMin ) 151 152 { … … 153 154 fResult = kTRUE; 154 155 } 155 156 156 else if ( theta > fThetaMax ) 157 157 { … … 159 159 fResult = kTRUE; 160 160 } 161 162 161 else if ( !SwTrigger() ) 163 162 { 164 //*fLog << "MFCT1SelBasic::Process; SwTrigger = " << SwTrigger << endl;165 163 rc = 3; 166 164 fResult = kTRUE; … … 185 183 for (Int_t i=0; i<entries; i++) 186 184 { 187 MCerPhotPix &pix = (*fEvt)[i]; 188 Int_t id = pix.GetPixId(); 189 if (!pix.IsPixelUsed()) continue; 190 191 Double_t photons = pix.GetNumPhotons(); 192 if (photons < fMinPhotons) continue; 193 194 // this pixel is used and has the required no.of photons 195 // check whether this is also true for a neigboring pixel 196 197 MGeomPix &gpix = (*fCam)[id]; 198 if ( gpix.IsInOutermostRing() ) continue; 199 200 const Int_t nneighbors = gpix.GetNumNeighbors(); 201 for (Int_t n=0; n<nneighbors; n++) 202 { 203 const Int_t id1 = gpix.GetNeighbor(n); 204 if ( !fEvt->IsPixelUsed(id1) ) continue; 205 206 MGeomPix &gpix1 = (*fCam)[id1]; 207 if ( gpix1.IsInOutermostRing() ) continue; 208 209 MCerPhotPix &pix1 = *(fEvt->GetPixById(id1)); 210 211 Double_t photons1 = pix1.GetNumPhotons(); 212 if (photons1 >= fMinPhotons) return kTRUE; 213 } 185 const MCerPhotPix &pix = (*fEvt)[i]; 186 187 const Int_t id = pix.GetPixId(); 188 if (!pix.IsPixelUsed()) 189 continue; 190 191 const Double_t photons = pix.GetNumPhotons(); 192 if (photons < fMinPhotons) 193 continue; 194 195 // this pixel is used and has the required no.of photons 196 // check whether this is also true for a neigboring pixel 197 198 const MGeomPix &gpix = (*fCam)[id]; 199 if ( gpix.IsInOutermostRing() ) 200 continue; 201 202 const Int_t nneighbors = gpix.GetNumNeighbors(); 203 for (Int_t n=0; n<nneighbors; n++) 204 { 205 const Int_t id1 = gpix.GetNeighbor(n); 206 if ( !fEvt->IsPixelUsed(id1) ) 207 continue; 208 209 const MGeomPix &gpix1 = (*fCam)[id1]; 210 if ( gpix1.IsInOutermostRing() ) 211 continue; 212 213 const MCerPhotPix &pix1 = *fEvt->GetPixById(id1); 214 215 const Double_t photons1 = pix1.GetNumPhotons(); 216 if (photons1 >= fMinPhotons) 217 return kTRUE; 218 } 214 219 } 215 220 return kFALSE; … … 228 233 *fLog << GetDescriptor() << " execution statistics:" << endl; 229 234 *fLog << dec << setfill(' '); 230 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 231 << (int)(fCut[1]*100/GetNumExecutions())232 233 234 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 235 << (int)(fCut[2]*100/GetNumExecutions())236 237 238 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 239 << (int)(fCut[3]*100/GetNumExecutions())240 << "%) Evts skipped due to: Software trigger not fullfilled"241 242 243 *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions()) 244 235 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ; 236 *fLog << (int)(fCut[1]*100/GetNumExecutions()) ; 237 *fLog << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl; 238 239 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ; 240 *fLog << (int)(fCut[2]*100/GetNumExecutions()) ; 241 *fLog << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl; 242 243 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ; 244 *fLog << (int)(fCut[3]*100/GetNumExecutions()) ; 245 *fLog << "%) Evts skipped due to: Software trigger not fullfilled" ; 246 *fLog << " (with fMinPhotons = " << fMinPhotons << ")" << endl; 247 248 *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions()) ; 249 *fLog << "%) Evts survived Basic selections!" << endl; 245 250 *fLog << endl; 246 251 247 252 return kTRUE; 248 253 } 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 -
trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.h
r1905 r2037 14 14 #endif 15 15 16 class MMcEvt; 16 17 class MGeomCam; 18 class MCerPhotEvt; 17 19 class MPedestalCam; 18 class MCerPhotEvt; 19 class MHillas; 20 class MMcEvt; 21 class MRawRunHeader; 20 //class MRawRunHeader; 22 21 23 22 class MFCT1SelBasic : public MFilter 24 23 { 25 24 private: 26 const M PedestalCam *fPed; // Pedestal information25 const MMcEvt *fMcEvt; 27 26 const MGeomCam *fCam; // Camera Geometry 28 27 const MCerPhotEvt *fEvt; // Cerenkov Photon Event 29 const MMcEvt *fMcEvt;30 const MRawRunHeader *fRawRun;28 //const MPedestalCam *fPed; // Pedestal information 29 //const MRawRunHeader *fRawRun; 31 30 32 31 Float_t fMinPhotons; … … 34 33 Float_t fThetaMax; 35 34 36 Bool_t fResult;37 38 35 Int_t fCut[4]; 39 36 40 public: 41 MFCT1SelBasic(const char *name=NULL, const char *title=NULL); 42 43 Bool_t IsExpressionTrue() const { return fResult; } 37 Bool_t fResult; 44 38 45 39 Bool_t PreProcess(MParList *pList); … … 47 41 Bool_t PostProcess(); 48 42 43 Bool_t IsExpressionTrue() const { return fResult; } 44 49 45 Bool_t SwTrigger(); 46 47 public: 48 MFCT1SelBasic(const char *name=NULL, const char *title=NULL); 49 50 50 void SetCuts(Float_t minphotons, Float_t thetamin, Float_t thetamax); 51 51 -
trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc
r1999 r2037 24 24 25 25 ///////////////////////////////////////////////////////////////////////////// 26 // // 27 // MFCT1SelFinal // 28 // // 29 // This is a class to evaluate the Final Cuts // 30 // (these cuts define the final sample of gammas; // 31 // relevant for the calculation of the effective collection areas) // 32 // // 33 // to be called after the calculation of the hadroness // 34 // // 26 // 27 // MFCT1SelFinal 28 // 29 // WHAT ARE THE FINAL CUTS? 30 // 31 // This is a class to evaluate the Final Cuts 32 // (these cuts define the final sample of gammas; 33 // relevant for the calculation of the effective collection areas) 34 // 35 // to be called after the calculation of the hadroness 36 // 35 37 ///////////////////////////////////////////////////////////////////////////// 38 #include "MFCT1SelFinal.h" 36 39 37 #include "math.h" 38 #include "MFCT1SelFinal.h" 40 #include <math.h> 39 41 40 42 #include "MParList.h" 41 43 42 #include "MHillas.h" 43 #include "MHillasExt.h" 44 #include "MHillasSrc.h" 44 #include "MMcEvt.hxx" 45 45 46 #include "MCerPhotEvt.h" 46 #include "MMcEvt.hxx" 47 48 #include "MGeomPix.h" 47 49 #include "MGeomCam.h" 48 #include "MGeomCamCT1.h"49 #include "MGeomPix.h"50 #include "MHadronness.h"51 50 52 51 #include "MLog.h" 53 52 #include "MLogManip.h" 53 54 #include "MHillasExt.h" 55 #include "MHillasSrc.h" 56 #include "MHadronness.h" 54 57 55 58 ClassImp(MFCT1SelFinal); … … 59 62 // Default constructor. 60 63 // 61 MFCT1SelFinal::MFCT1SelFinal(const char *HilName, const char *HilSrcName, 62 const char *name, const char *title) 64 MFCT1SelFinal::MFCT1SelFinal(const char *hilsrcname, 65 const char *name, const char *title) 66 : fHilSrcName(hilsrcname), fHadronnessName("MHadronness") 63 67 { 64 68 fName = name ? name : "MFCT1SelFinal"; 65 69 fTitle = title ? title : "Class to evaluate the Final Cuts"; 66 67 fHilName = HilName;68 fHilSrcName = HilSrcName;69 fHadronnessName = "MHadronness";70 71 MGeomCamCT1 camct1;72 fMm2Deg = camct1.GetConvMm2Deg();73 70 74 71 // default values of cuts … … 83 80 void MFCT1SelFinal::SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax) 84 81 { 85 fHadronnessMax = hadmax;86 fAlphaMax = alphamax;87 fDistMax = distmax;82 fHadronnessMax = hadmax; 83 fAlphaMax = alphamax; 84 fDistMax = distmax; 88 85 89 *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = "90 86 *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = "; 87 *fLog << fHadronnessMax << ", " << fAlphaMax << ", " << fDistMax << endl; 91 88 } 92 89 … … 94 91 // 95 92 // Set the pointers 96 //97 93 // 98 94 Bool_t MFCT1SelFinal::PreProcess(MParList *pList) 99 95 { 100 fHil = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt");101 if (!fHil)102 {103 *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl;104 return kFALSE;105 }106 107 96 fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc"); 108 97 if (!fHilSrc) … … 119 108 } 120 109 121 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");122 if (! fMcEvt)110 MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam"); 111 if (!cam) 123 112 { 124 *fLog << dbginf << "MMcEvtnot found... aborting." << endl;113 *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl; 125 114 return kFALSE; 126 115 } 116 117 fMm2Deg = cam->GetConvMm2Deg(); 127 118 128 119 memset(fCut, 0, sizeof(fCut)); … … 139 130 Bool_t MFCT1SelFinal::Process() 140 131 { 132 const Double_t modalpha = fabs( fHilSrc->GetAlpha() ); 133 const Double_t h = fHadronness->GetHadronness(); 134 141 135 Int_t rc = 0; 142 136 fResult = kFALSE; 143 144 Double_t modalpha = fabs( fHilSrc->GetAlpha() );145 146 Double_t h = fHadronness->GetHadronness();147 137 148 138 if ( h>fHadronnessMax ) … … 151 141 fResult = kTRUE; 152 142 } 153 154 143 else if ( modalpha > fAlphaMax ) 155 144 { … … 157 146 fResult = kTRUE; 158 147 } 159 160 148 else if ( fMm2Deg*fHilSrc->GetDist() > fDistMax ) 161 149 { … … 181 169 *fLog << GetDescriptor() << " execution statistics:" << endl; 182 170 *fLog << dec << setfill(' '); 183 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 184 << (int)(fCut[1]*100/GetNumExecutions())185 << "%) Evts skipped due to: hadronness > "<< fHadronnessMax186 171 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ; 172 *fLog << (int)(fCut[1]*100/GetNumExecutions()); 173 *fLog << "%) Evts skipped due to: hadronness > "<< fHadronnessMax; 174 *fLog << " (hadronness from '" << fHadronnessName << "')" << endl; 187 175 188 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 189 << (int)(fCut[2]*100/GetNumExecutions())190 << "%) Evts skipped due to: |ALPHA| > " << fAlphaMax191 176 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ; 177 *fLog << (int)(fCut[2]*100/GetNumExecutions()); 178 *fLog << "%) Evts skipped due to: |ALPHA| > " << fAlphaMax; 179 *fLog << " [degrees]" << endl; 192 180 193 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 194 << (int)(fCut[3]*100/GetNumExecutions()) 195 << "%) Evts skipped due to: DIST > " << fDistMax 196 181 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ; 182 *fLog << (int)(fCut[3]*100/GetNumExecutions()); 183 *fLog << "%) Evts skipped due to: DIST > " << fDistMax; 184 *fLog << " [degrees]" << endl; 197 185 198 *fLog << " " << fCut[0] << " (" 199 << (int)(fCut[0]*100/GetNumExecutions())200 186 *fLog << " " << fCut[0] << " (" ; 187 *fLog << (int)(fCut[0]*100/GetNumExecutions()); 188 *fLog << "%) Evts survived Final selections!" << endl; 201 189 *fLog << endl; 202 190 -
trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h
r1982 r2037 14 14 #endif 15 15 16 class MGeomCam;17 class MCerPhotEvt;18 16 class MHillas; 19 17 class MHillasSrc; 20 class MMcEvt;21 18 class MHadronness; 22 19 … … 24 21 { 25 22 private: 26 MGeomCam *fCam; // Camera Geometry27 MCerPhotEvt *fEvt; // Cerenkov Photon Event28 MMcEvt *fMcEvt;29 MHillas *fHil;30 23 MHillasSrc *fHilSrc; 31 24 MHadronness *fHadronness; 32 25 33 Double_t fMm2Deg; // conversion mm to degrees in camera34 Int_t fCut[4];35 26 TString fHilName; 36 27 TString fHilSrcName; … … 41 32 Float_t fDistMax; 42 33 34 Double_t fMm2Deg; // conversion mm to degrees in camera 35 36 Int_t fCut[4]; 37 43 38 Bool_t fResult; 44 45 46 public:47 MFCT1SelFinal(const char *HilName="MHillas", const char *HilSrcName="MHillasSrc",48 const char *name=NULL, const char *title=NULL);49 50 void SetHadronnessName(const TString name) { fHadronnessName = name; }51 Bool_t IsExpressionTrue() const { return fResult; }52 39 53 40 Bool_t PreProcess(MParList *pList); 54 41 Bool_t Process(); 55 42 Bool_t PostProcess(); 43 44 Bool_t IsExpressionTrue() const { return fResult; } 45 46 public: 47 MFCT1SelFinal(const char *HilSrcName="MHillasSrc", 48 const char *name=NULL, const char *title=NULL); 49 50 void SetHadronnessName(const TString name) { fHadronnessName = name; } 56 51 57 52 void SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax); -
trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc
r1905 r2037 16 16 ! 17 17 ! 18 ! Author(s): Wolfgang Wittek 04/2003 <mailto:wittek@mppmu.mpg.de> 18 ! Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de> 19 ! Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2003 … … 24 25 25 26 ///////////////////////////////////////////////////////////////////////////// 26 // // 27 // MFCT1SelStandard // 28 // // 29 // This is a class to evaluate the Standard Cuts // 30 // // 31 // to be called after the calculation of the image parameters // 32 // before the g/h separation // 33 // // 27 // 28 // MFCT1SelStandard 29 // 30 // This is a class to evaluate the Standard Cuts 31 // 32 // WHAT ARE THE STANDARD CUTS? // 33 // 34 // to be called after the calculation of the image parameters 35 // before the g/h separation 36 // 34 37 ///////////////////////////////////////////////////////////////////////////// 35 38 … … 37 40 38 41 #include "MParList.h" 42 43 #include "MMcEvt.hxx" 44 45 #include "MGeomPix.h" 46 #include "MGeomCam.h" 47 48 #include "MCerPhotEvt.h" 49 50 #include "MLog.h" 51 #include "MLogManip.h" 39 52 40 53 #include "MHillas.h" 41 54 #include "MHillasExt.h" 42 55 #include "MHillasSrc.h" 43 #include "MCerPhotEvt.h" 44 #include "MMcEvt.hxx" 45 #include "MGeomCam.h" 46 #include "MGeomPix.h" 47 48 #include "MLog.h" 49 #include "MLogManip.h" 56 #include "MNewImagePar.h" 50 57 51 58 ClassImp(MFCT1SelStandard); … … 55 62 // Default constructor. 56 63 // 57 MFCT1SelStandard::MFCT1SelStandard(const char * HilName, const char *HilSrcName,64 MFCT1SelStandard::MFCT1SelStandard(const char *hilsrcname, 58 65 const char *name, const char *title) 66 : fHilName("MHillas"), fHilSrcName(hilsrcname), fImgParName("MNewImgPar") 59 67 { 60 68 fName = name ? name : "MFCT1SelStandard"; 61 69 fTitle = title ? title : "Class to evaluate the Standard Cuts"; 62 70 63 fHilName = HilName;64 fHilSrcName = HilSrcName;65 66 71 // default values of cuts 67 72 SetCuts(92, 4, 60, 0.4, 1.05, 0.0, 0.0); … … 74 79 // 75 80 void MFCT1SelStandard::SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin, 76 Float_t sizemin, Float_t distmin, Float_t distmax,77 Float_t lengthmin, Float_t widthmin)81 Float_t sizemin, Float_t distmin, Float_t distmax, 82 Float_t lengthmin, Float_t widthmin) 78 83 { 79 fUsedPixelsMax = usedpixelsmax; 80 fCorePixelsMin = corepixelsmin; 81 fSizeMin = sizemin; 82 fDistMin = distmin; 83 fDistMax = distmax; 84 fLengthMin = lengthmin; 85 fWidthMin = widthmin; 86 87 *fLog << inf << "MFCT1SelStandard cut values : fUsedPixelsMax, fCorePixelsMin = " 88 << fUsedPixelsMax << ", " << fCorePixelsMin << endl; 89 *fLog << inf << " fSizeMin, fDistMin, fDistMax = " << fSizeMin 90 << ", " << fDistMin << ", " << fDistMax << endl; 91 *fLog << inf << " fLengthMin, fWidthMin = " << fLengthMin 92 << ", " << fWidthMin << endl; 93 } 94 95 // -------------------------------------------------------------------------- 96 // 97 // 98 // 99 // 84 fUsedPixelsMax = usedpixelsmax; 85 fCorePixelsMin = corepixelsmin; 86 fSizeMin = sizemin; 87 fDistMin = distmin; 88 fDistMax = distmax; 89 fLengthMin = lengthmin; 90 fWidthMin = widthmin; 91 92 *fLog << inf << "MFCT1SelStandard cut values : fUsedPixelsMax, fCorePixelsMin = "; 93 *fLog << fUsedPixelsMax << ", " << fCorePixelsMin << endl; 94 *fLog << inf << " fSizeMin, fDistMin, fDistMax = " << fSizeMin ; 95 *fLog << ", " << fDistMin << ", " << fDistMax << endl; 96 *fLog << inf << " fLengthMin, fWidthMin = " << fLengthMin ; 97 *fLog << ", " << fWidthMin << endl; 98 } 99 100 // -------------------------------------------------------------------------- 101 // 102 // MISSING 100 103 // 101 104 Bool_t MFCT1SelStandard::PreProcess(MParList *pList) 102 105 { 103 fHil = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt");106 fHil = (MHillas*)pList->FindObject(fHilName, "MHillas"); 104 107 if (!fHil) 105 108 { 106 *fLog << dbginf << "MHillasExt object " << fHilName << "not found... aborting." << endl;107 return kFALSE;109 *fLog << err << fHilName << " [MHillas] not found... aborting." << endl; 110 return kFALSE; 108 111 } 109 112 … … 111 114 if (!fHilSrc) 112 115 { 113 *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl; 114 return kFALSE; 115 } 116 117 118 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 119 if (!fMcEvt) 120 { 121 *fLog << dbginf << "MMcEvt not found... aborting." << endl; 122 return kFALSE; 123 } 124 125 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); 126 if (!fEvt) 127 { 128 *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; 129 return kFALSE; 130 } 131 132 133 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 134 if (!fCam) 135 { 136 *fLog << dbginf << "MGeomCam (Camera Geometry) missing in Parameter List... aborting." << endl; 137 return kFALSE; 138 } 139 fMm2Deg = fCam->GetConvMm2Deg(); 140 141 //*fLog << "fMm2Deg = " << fMm2Deg << endl; 116 *fLog << err << fHilSrcName << " [MHillasSrc] not found... aborting." << endl; 117 return kFALSE; 118 } 119 120 fNewImgPar = (MNewImagePar*)pList->FindObject(fImgParName, "MNewImagePar"); 121 if (!fNewImgPar) 122 { 123 *fLog << err << fImgParName << " [MNewImagePar] not found... aborting." << endl; 124 return kFALSE; 125 } 126 127 MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam"); 128 if (!cam) 129 { 130 *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl; 131 return kFALSE; 132 } 133 134 fMm2Deg = cam->GetConvMm2Deg(); 142 135 143 136 memset(fCut, 0, sizeof(fCut)); … … 155 148 Bool_t MFCT1SelStandard::Process() 156 149 { 150 const Double_t length = fHil->GetLength() * fMm2Deg; 151 const Double_t width = fHil->GetWidth() * fMm2Deg; 152 const Double_t dist = fHilSrc->GetDist()* fMm2Deg; 153 //const Double_t delta = fHil->GetDelta() * kRad2Deg; 154 const Double_t size = fHil->GetSize(); 155 const Int_t numusedpixels = fNewImgPar->GetNumUsedPixels(); 156 const Int_t numcorepixels = fNewImgPar->GetNumCorePixels(); 157 157 158 Int_t rc = 0; 158 159 fResult = kFALSE; 159 160 160 Double_t length = fHil->GetLength() * fMm2Deg;161 Double_t width = fHil->GetWidth() * fMm2Deg;162 Double_t dist = fHilSrc->GetDist()* fMm2Deg;163 //Double_t delta = fHil->GetDelta() * kRad2Deg;164 Double_t size = fHil->GetSize();165 Int_t numusedpixels = fHil->GetNumUsedPixels();166 Int_t numcorepixels = fHil->GetNumCorePixels();167 168 161 if ( numusedpixels >= fUsedPixelsMax || numcorepixels <= fCorePixelsMin ) 169 162 { … … 171 164 fResult = kTRUE; 172 165 } 173 174 166 else if ( size <= fSizeMin ) 175 167 { … … 177 169 fResult = kTRUE; 178 170 } 179 180 171 else if ( dist< fDistMin || dist > fDistMax ) 181 172 { … … 183 174 fResult = kTRUE; 184 175 } 185 186 176 else if ( length <= fLengthMin || width <= fWidthMin ) 187 177 { … … 207 197 *fLog << GetDescriptor() << " execution statistics:" << endl; 208 198 *fLog << dec << setfill(' '); 209 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 210 << (int)(fCut[1]*100/GetNumExecutions())211 << "%) Evts skipped due to: Used pixels >= " << fUsedPixelsMax212 213 214 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 215 << (int)(fCut[2]*100/GetNumExecutions())216 217 218 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 219 << (int)(fCut[3]*100/GetNumExecutions())220 << "%) Evts skipped due to: DIST < " << fDistMin221 222 223 *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) 224 << (int)(fCut[4]*100/GetNumExecutions())225 << "%) Evts skipped due to: LENGTH <= " << fLengthMin226 227 228 *fLog << " " << fCut[0] << " (" 229 << (int)(fCut[0]*100/GetNumExecutions())230 199 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3); 200 *fLog << (int)(fCut[1]*100/GetNumExecutions()) ; 201 *fLog << "%) Evts skipped due to: Used pixels >= " << fUsedPixelsMax ; 202 *fLog << " or Core pixels <= " << fCorePixelsMin << endl; 203 204 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ; 205 *fLog << (int)(fCut[2]*100/GetNumExecutions()) ; 206 *fLog << "%) Evts skipped due to: SIZE <= " << fSizeMin << endl; 207 208 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ; 209 *fLog << (int)(fCut[3]*100/GetNumExecutions()) ; 210 *fLog << "%) Evts skipped due to: DIST < " << fDistMin; 211 *fLog << " or DIST > " << fDistMax << endl; 212 213 *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) ; 214 *fLog << (int)(fCut[4]*100/GetNumExecutions()) ; 215 *fLog << "%) Evts skipped due to: LENGTH <= " << fLengthMin; 216 *fLog << " or WIDTH <= " << fWidthMin << endl; 217 218 *fLog << " " << fCut[0] << " (" ; 219 *fLog << (int)(fCut[0]*100/GetNumExecutions()) ; 220 *fLog << "%) Evts survived Standard selections!" << endl; 231 221 *fLog << endl; 232 222 -
trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h
r1905 r2037 14 14 #endif 15 15 16 class MGeomCam;17 class MCerPhotEvt;18 16 class MHillas; 19 17 class MHillasSrc; 20 class M McEvt;18 class MNewImagePar; 21 19 22 20 class MFCT1SelStandard : public MFilter 23 21 { 24 22 private: 25 MGeomCam *fCam; // Camera Geometry 26 MCerPhotEvt *fEvt; // Cerenkov Photon Event 27 MMcEvt *fMcEvt; 28 MHillas *fHil; 29 MHillasSrc *fHilSrc; 23 MHillas *fHil; 24 MHillasSrc *fHilSrc; 25 MNewImagePar *fNewImgPar; 30 26 31 Double_t fMm2Deg; // conversion mm to degrees in camera 27 TString fHilName; 28 TString fHilSrcName; 29 TString fImgParName; 30 31 Float_t fUsedPixelsMax; 32 Float_t fCorePixelsMin; 33 Float_t fSizeMin; 34 Float_t fDistMin; 35 Float_t fDistMax; 36 Float_t fLengthMin; 37 Float_t fWidthMin; 38 39 Double_t fMm2Deg; // conversion mm to degrees in camera 40 32 41 Int_t fCut[5]; 33 TString fHilName;34 TString fHilSrcName;35 42 36 Float_t fUsedPixelsMax; 37 Float_t fCorePixelsMin; 38 Float_t fSizeMin; 39 Float_t fDistMin; 40 Float_t fDistMax; 41 Float_t fLengthMin; 42 Float_t fWidthMin; 43 44 Bool_t fResult; 45 46 public: 47 MFCT1SelStandard(const char *HilName="MHillas", const char *HilSrcName="MHillasSrc", 48 const char *name=NULL, const char *title=NULL); 49 50 Bool_t IsExpressionTrue() const { return fResult; } 43 Bool_t fResult; 51 44 52 45 Bool_t PreProcess(MParList *pList); 53 46 Bool_t Process(); 54 47 Bool_t PostProcess(); 48 49 Bool_t IsExpressionTrue() const { return fResult; } 50 51 public: 52 MFCT1SelStandard(const char *HilSrcName="MHillasSrc", 53 const char *name=NULL, const char *title=NULL); 54 55 void SetHillasName(const char *name) { fHilName = name; } 56 void SetImgParName(const char *name) { fImgParName = name; } 55 57 56 58 void SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin, -
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r1965 r2037 35 35 #include "MGeomCam.h" 36 36 37 #include <TClass.h> 37 #include <TClass.h> // IsA()->New() 38 38 39 39 #include "MLog.h" -
trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc
r1965 r2037 19 19 ! Author(s): Harald Kornmayer 1/2001 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 221 ! Copyright: MAGIC Software Development, 2000-2003 22 22 ! 23 23 ! … … 33 33 // 34 34 //////////////////////////////////////////////////////////////////////////// 35 36 35 #include "MGeomCamCT1.h" 37 36 38 39 37 #include <math.h> // floor 40 38 41 #include "TCanvas.h" 42 43 #include "MLog.h"44 #include "MLogManip.h" 39 /* 40 #include "MLog.h" 41 #include "MLogManip.h" 42 */ 45 43 46 44 #include "MGeomPix.h" -
trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc
r2033 r2037 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! Author(s): Harald Kornmayer 1/2001 18 ! Author(s): Oscar Blanch, 4/2003 <mailto:blanch@ifae.es> 20 19 ! 21 ! Copyright: MAGIC Software Development, 2000-200 220 ! Copyright: MAGIC Software Development, 2000-2003 22 21 ! 23 22 ! … … 28 27 // MGeomCamECO1000 29 28 // 30 // This class stores the geometry information of the Magiccamera.29 // This class stores the geometry information of the ECO1000 camera. 31 30 // All information are copied from tables, see source code. 32 31 // 33 32 //////////////////////////////////////////////////////////////////////////// 34 35 33 #include "MGeomCamECO1000.h" 36 37 #include "TCanvas.h"38 34 39 35 #include "MLog.h" … … 66 62 // fill the geometry class with the coordinates of the MAGIC camera 67 63 // 68 *fLog << inf << " Creating Magicgeometry " << endl ;64 *fLog << inf << " Creating ECO1000 geometry " << endl ; 69 65 70 66 // … … 302 298 // fill the pixels list with this data 303 299 // 304 305 300 for (UInt_t i=0; i<GetNumPixels(); i++) 306 301 (*this)[i].Set(xtemp[i], ytemp[i], rtemp[i]) ; -
trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.h
r2033 r2037 15 15 MGeomCamECO1000(const char *name=NULL); 16 16 17 ClassDef(MGeomCamECO1000, 1) // Geometry class for the Magiccamera17 ClassDef(MGeomCamECO1000, 1) // Geometry class for the ECO1000 camera 18 18 }; 19 19 -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc
r1965 r2037 19 19 ! Author(s): Harald Kornmayer 1/2001 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 221 ! Copyright: MAGIC Software Development, 2000-2003 22 22 ! 23 23 ! … … 32 32 // 33 33 //////////////////////////////////////////////////////////////////////////// 34 35 34 #include "MGeomCamMagic.h" 36 35 37 #include "TCanvas.h" 38 39 #include "MLog.h"40 #include "MLogManip.h" 36 /* 37 #include "MLog.h" 38 #include "MLogManip.h" 39 */ 41 40 42 41 #include "MGeomPix.h"
Note:
See TracChangeset
for help on using the changeset viewer.