Changeset 1888 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 04/02/03 09:03:22 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MPointingCorr.cc
r1885 r1888 38 38 #include "MSrcPosCam.h" 39 39 #include "MGeomCam.h" 40 #include "MParameters.h" 40 41 41 42 #include "MLog.h" … … 81 82 } 82 83 84 fHourAngle = (MParameterD*)pList->FindObject("HourAngle", "MParameterD"); 85 if (!fHourAngle) 86 { 87 *fLog << dbginf << "HourAngle not found... aborting." << endl; 88 return kFALSE; 89 } 90 83 91 84 92 fSrcPos = (MSrcPosCam*)pList->FindObject(fSrcName, "MSrcPosCam"); … … 104 112 // (cx, cy) is the source position in the camera [mm] 105 113 // 106 Float_t fhourangle = fMcEvt->GetOtherCphFraction(); 114 Float_t fhourangle = fHourAngle->GetVal(); 115 116 //*fLog << "MPointingCorr::Process; fhourangle = " 117 // << fhourangle << endl; 118 107 119 Float_t cx = -0.05132 - 0.001064 * fhourangle 108 120 - 3.530e-6 * fhourangle * fhourangle; -
trunk/MagicSoft/Mars/manalysis/MPointingCorr.h
r1868 r1888 16 16 class MMcEvt; 17 17 class MSrcPosCam; 18 class MParameterD; 19 18 20 19 21 class MPointingCorr : public MTask … … 23 25 MSrcPosCam *fSrcPos; 24 26 TString fSrcName; 27 MParameterD *fHourAngle; 25 28 26 29 Float_t fMm2Deg; -
trunk/MagicSoft/Mars/manalysis/MSelBasic.cc
r1885 r1888 61 61 fTitle = title ? title : "Task to evaluate basic cuts"; 62 62 63 ThetaMin = 0.0;64 ThetaMax = 60.0;63 fThetaMin = 0.0; 64 fThetaMax = 60.0; 65 65 } 66 66 … … 109 109 } 110 110 111 memset(f Errors, 0, sizeof(fErrors));111 memset(fCut, 0, sizeof(fCut)); 112 112 113 113 return kTRUE; … … 123 123 Bool_t MSelBasic::Process() 124 124 { 125 /*126 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$127 *fLog << "=========================================================" << endl;128 *fLog << "" << endl;129 *fLog << "MmcEvt data : " << endl;130 *fLog << "" << endl;131 fMcEvt->Print();132 *fLog << "" << endl;133 *fLog << "PartId() = " << fMcEvt->GetPartId() << endl;134 *fLog << "Energy() = " << fMcEvt->GetEnergy() << endl;135 *fLog << "Theta() = " << fMcEvt->GetTheta() << endl;136 137 *fLog << "Phi() = " << fMcEvt->GetPhi() << endl;138 //*fLog << "CoreD() = " << fMcEvt->GetCoreD() << endl;139 //*fLog << "CoreX() = " << fMcEvt->GetCoreX() << endl;140 141 //*fLog << "CoreY() = " << fMcEvt->GetCoreY() << endl;142 *fLog << "Impact() = " << fMcEvt->GetImpact() << endl;143 //*fLog << "PhotIni()= " << fMcEvt->GetPhotIni() << endl;144 145 //*fLog << "PassPhotAtm() = " << fMcEvt->GetPassPhotAtm() << endl;146 //*fLog << "PassPhotRef() = " << fMcEvt->GetPassPhotRef() << endl;147 //*fLog << "PassPhotCone() = " << fMcEvt->GetPassPhotCone() << endl;148 149 //*fLog << "PhotElfromShower() = " << fMcEvt->GetPhotElfromShower() << endl;150 //*fLog << "PhotElinCamera() = " << fMcEvt->GetPhotElinCamera() << endl;151 *fLog << "TelescopePhi() = " << fMcEvt->GetTelescopePhi() << endl;152 153 *fLog << "TelescopeTheta() = " << fMcEvt->GetTelescopeTheta() << endl;154 *fLog << "Impact() = " << fMcEvt->GetImpact() << endl;155 //*fLog << "PhotIni()= " << fMcEvt->GetPhotIni() << endl;156 *fLog << "" << endl;157 *fLog << "=========================================================" << endl;158 159 *fLog << "=========================================================" << endl;160 *fLog << "" << endl;161 *fLog << "MPedestalPix data : " << endl;162 *fLog << "" << endl;163 164 Int_t ntot;165 ntot = fPed->GetSize();166 *fLog << "MeanRms() :" << endl;167 for (Int_t i=0; i<ntot; i++)168 {169 MPedestalPix &pix = (*fPed)[i];170 //*fLog << "Mean() = " << i << ", " << pix.GetMean() << endl;171 //*fLog << "Sigma() = " << i << ", " << pix.GetSigma() << endl;172 *fLog << pix.GetMeanRms() << " ";173 //*fLog << "SigmaRms()= " << i << ", " << pix.GetSigmaRms() << endl;174 }175 *fLog << "" << endl;176 177 *fLog << "" << endl;178 ntot = fEvt->GetNumPixels();179 *fLog << "MCerPhotPix : pix.GetNumPhotons()" << endl;180 for (Int_t i=0; i<ntot; i++)181 {182 MCerPhotPix &pix = (*fEvt)[i];183 *fLog << pix.GetNumPhotons() << " ";184 }185 *fLog << "" << endl;186 187 *fLog << "" << endl;188 ntot = fEvt->GetNumPixels();189 *fLog << "MCerPhotPix : pix.GetErrorPhot()" << endl;190 for (Int_t i=0; i<ntot; i++)191 {192 MCerPhotPix &pix = (*fEvt)[i];193 *fLog << pix.GetErrorPhot() << " ";194 }195 *fLog << "" << endl;196 197 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$198 */199 200 201 125 Int_t rc = 0; 202 126 … … 207 131 //} 208 132 209 Double_t Theta = kRad2Deg*fMcEvt->GetTelescopeTheta();210 if ( Theta <ThetaMin )133 Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta(); 134 if ( theta < fThetaMin ) 211 135 { 212 136 *fLog << "MSelBasic::Process; Run, Event, Theta = " 213 137 << fRawRun->GetRunNumber()<< ", " 214 << fMcEvt->GetEvtNumber() << ", " << Theta << endl;138 << fMcEvt->GetEvtNumber() << ", " << theta << endl; 215 139 rc = 1; 216 140 } 217 141 218 else if ( Theta >ThetaMax )142 else if ( theta > fThetaMax ) 219 143 { 220 144 rc = 2; … … 227 151 } 228 152 229 f Errors[rc]++;153 fCut[rc]++; 230 154 231 155 return rc==0 ? kTRUE : kCONTINUE; … … 246 170 const Int_t entries = fEvt->GetNumPixels(); 247 171 248 //$$$$$$$$$$$$$$$$$$249 //const Int_t nall = fPed->GetSize();250 //*fLog << "nall = " << nall << endl;251 //for (Int_t id=0; id<nall; id++)252 //{253 // MGeomPix &gpix = (*fCam)[id];254 // if ( gpix.IsInOutermostRing() )255 // {256 // *fLog << "IsInOutermostRing : pixel no. = " << id << endl;257 // }258 259 // if ( gpix.IsInOuterRing() )260 // {261 // *fLog << "IsInOuterRing : pixel no. = " << id << endl;262 // }263 //}264 //$$$$$$$$$$$$$$$$$$265 266 267 172 for (Int_t i=0; i<entries; i++) 268 173 { … … 316 221 *fLog << GetDescriptor() << " execution statistics:" << endl; 317 222 *fLog << dec << setfill(' '); 318 *fLog << " " << setw(7) << f Errors[1] << " (" << setw(3)319 << (int)(f Errors[1]*100/GetNumExecutions())320 << "%) Evts skipped due to: Zenith angle < " << ThetaMin << endl;321 322 *fLog << " " << setw(7) << f Errors[2] << " (" << setw(3)323 << (int)(f Errors[2]*100/GetNumExecutions())324 << "%) Evts skipped due to: Zenith angle > " << ThetaMax << endl;325 326 *fLog << " " << setw(7) << f Errors[3] << " (" << setw(3)327 << (int)(f Errors[3]*100/GetNumExecutions())223 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 224 << (int)(fCut[1]*100/GetNumExecutions()) 225 << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl; 226 227 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 228 << (int)(fCut[2]*100/GetNumExecutions()) 229 << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl; 230 231 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 232 << (int)(fCut[3]*100/GetNumExecutions()) 328 233 << "%) Evts skipped due to: Software trigger not fullfilled" << endl; 329 234 330 *fLog << " " << f Errors[0] << " (" << (int)(fErrors[0]*100/GetNumExecutions())235 *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions()) 331 236 << "%) Evts survived Basic selections!" << endl; 332 237 *fLog << endl; … … 336 241 337 242 243 244 245 246 247 248 249 -
trunk/MagicSoft/Mars/manalysis/MSelBasic.h
r1872 r1888 24 24 { 25 25 private: 26 const MPedestalCam *fPed; // Pedestal information27 const MGeomCam *fCam; // Camera Geometry28 const MCerPhotEvt *fEvt; // Cerenkov Photon Event29 const MMcEvt *fMcEvt;26 const MPedestalCam *fPed; // Pedestal information 27 const MGeomCam *fCam; // Camera Geometry 28 const MCerPhotEvt *fEvt; // Cerenkov Photon Event 29 const MMcEvt *fMcEvt; 30 30 const MRawRunHeader *fRawRun; 31 31 32 Double_tThetaMin;33 Double_tThetaMax;32 Float_t fThetaMin; 33 Float_t fThetaMax; 34 34 35 Int_t f Errors[4];35 Int_t fCut[4]; 36 36 37 37 public: … … 43 43 44 44 Bool_t SwTrigger(); 45 void SetCuts(Float_t thetamin, Float_t thetamax) 46 { fThetaMin = thetamin; fThetaMax = thetamax; } 45 47 46 48 ClassDef(MSelBasic, 0) // Task to evaluate basic cuts -
trunk/MagicSoft/Mars/manalysis/MSelFinal.cc
r1885 r1888 67 67 fHilSrcName = HilSrcName; 68 68 69 fHadronnessCut = 0.2; 70 fAlphaCut = 100.0; //degrees 69 // default values of cuts 70 fHadronnessMax = 1.0; 71 fAlphaMax = 100.0; //degrees 71 72 } 72 73 … … 109 110 } 110 111 111 memset(f Errors, 0, sizeof(fErrors));112 memset(fCut, 0, sizeof(fCut)); 112 113 113 114 return kTRUE; … … 133 134 Double_t h = fHadronness->GetHadronness(); 134 135 135 if ( h>fHadronness Cut)136 if ( h>fHadronnessMax ) 136 137 { 137 138 //*fLog << "MSelFinal::Process; h, alpha = " << h << ", " … … 140 141 } 141 142 142 else if ( modalpha > fAlpha Cut)143 else if ( modalpha > fAlphaMax ) 143 144 { 144 145 //*fLog << "MSelFinal::Process; h, alpha = " << h << ", " … … 147 148 } 148 149 149 f Errors[rc]++;150 fCut[rc]++; 150 151 151 152 return rc==0 ? kTRUE : kCONTINUE; … … 164 165 *fLog << GetDescriptor() << " execution statistics:" << endl; 165 166 *fLog << dec << setfill(' '); 166 *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) 167 << (int)(fErrors[1]*100/GetNumExecutions()) 168 << "%) Evts skipped due to: g/h separation cut (" << fHadronnessCut 169 << ")" << endl; 167 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 168 << (int)(fCut[1]*100/GetNumExecutions()) 169 << "%) Evts skipped due to: hadroness > "<< fHadronnessMax << endl; 170 170 171 *fLog << " " << setw(7) << f Errors[2] << " (" << setw(3)172 << (int)(f Errors[2]*100/GetNumExecutions())173 << "%) Evts skipped due to: cut in ALPHA (" << fAlphaCut174 << " degrees)" << endl;171 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 172 << (int)(fCut[2]*100/GetNumExecutions()) 173 << "%) Evts skipped due to: |ALPHA| > " << fAlphaMax 174 << " [degrees]" << endl; 175 175 176 *fLog << " " << f Errors[0] << " ("177 << (int)(f Errors[0]*100/GetNumExecutions())176 *fLog << " " << fCut[0] << " (" 177 << (int)(fCut[0]*100/GetNumExecutions()) 178 178 << "%) Evts survived Final selections!" << endl; 179 179 *fLog << endl; -
trunk/MagicSoft/Mars/manalysis/MSelFinal.h
r1847 r1888 32 32 33 33 Double_t fMm2Deg; // conversion mm to degrees in camera 34 Int_t f Errors[3];34 Int_t fCut[3]; 35 35 TString fHilName; 36 36 TString fHilSrcName; 37 37 38 Float_t fHadronness Cut;39 Float_t fAlpha Cut;38 Float_t fHadronnessMax; 39 Float_t fAlphaMax; 40 40 41 41 public: … … 47 47 Bool_t PostProcess(); 48 48 49 void Set HadronnessCut(Float_t hadcut) { fHadronnessCut = hadcut; }50 void SetAlphaCut(Float_t alpha) { fAlphaCut = alpha; }49 void SetCuts(Float_t hadmax, Float_t alphamax) 50 { fHadronnessMax = hadmax; fAlphaMax = alphamax; } 51 51 52 52 ClassDef(MSelFinal, 0) // Task to evaluate final cuts -
trunk/MagicSoft/Mars/manalysis/MSelStandard.cc
r1885 r1888 64 64 fHilName = HilName; 65 65 fHilSrcName = HilSrcName; 66 67 // default values of cuts 68 fUsedPixelsMax = 92; 69 fCorePixelsMin = 4; 70 fSizeMin = 60; 71 fDistMin = 0.4; 72 fDistMax = 1.05; 73 fLengthMin = 0.0; 74 fWidthMin = 0.0; 66 75 } 67 76 … … 114 123 //*fLog << "fMm2Deg = " << fMm2Deg << endl; 115 124 116 memset(f Errors, 0, sizeof(fErrors));125 memset(fCut, 0, sizeof(fCut)); 117 126 118 127 return kTRUE; … … 131 140 Int_t rc = 0; 132 141 133 Double_t fLength = fHil->GetLength() * fMm2Deg; 134 Double_t fWidth = fHil->GetWidth() * fMm2Deg; 135 Double_t fDist = fHilSrc->GetDist()* fMm2Deg; 136 //Double_t fDelta = fHil->GetDelta() * kRad2Deg; 137 Double_t fSize = fHil->GetSize(); 138 Int_t fNumUsedPixels = fHil->GetNumUsedPixels(); 139 Int_t fNumCorePixels = fHil->GetNumCorePixels(); 140 141 if ( fNumUsedPixels >= 92 || fNumCorePixels <= 4 ) 142 { 143 //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = " 144 // << fSize << ", " << fDist << ", " << fNumUsedPixels << ", " 145 // << fNumCorePixels << endl; 142 Double_t length = fHil->GetLength() * fMm2Deg; 143 Double_t width = fHil->GetWidth() * fMm2Deg; 144 Double_t dist = fHilSrc->GetDist()* fMm2Deg; 145 //Double_t delta = fHil->GetDelta() * kRad2Deg; 146 Double_t size = fHil->GetSize(); 147 Int_t numusedpixels = fHil->GetNumUsedPixels(); 148 Int_t numcorepixels = fHil->GetNumCorePixels(); 149 150 if ( numusedpixels >= fUsedPixelsMax || numcorepixels <= fCorePixelsMin ) 151 { 146 152 rc = 1; 147 153 } 148 154 149 else if ( fSize <= 60.0 || fDist< 0.4 || fDist > 1.05 ) 150 { 151 //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = " 152 // << fSize << ", " << fDist << ", " << fNumUsedPixels << ", " 153 // << fNumCorePixels << endl; 155 else if ( size <= fSizeMin ) 156 { 154 157 rc = 2; 155 158 } 156 159 157 else if ( fLength <= 0.0 || fWidth <= 0.0 ) 158 { 159 //*fLog << "MSelStandard::Process; fLength, fWidth = " 160 // << fLength << ", " << fWidth << endl; 160 else if ( dist< fDistMin || dist > fDistMax ) 161 { 161 162 rc = 3; 162 163 } 163 164 164 165 fErrors[rc]++; 165 else if ( length <= fLengthMin || width <= fWidthMin ) 166 { 167 rc = 4; 168 } 169 170 171 fCut[rc]++; 166 172 167 173 return rc==0 ? kTRUE : kCONTINUE; … … 180 186 *fLog << GetDescriptor() << " execution statistics:" << endl; 181 187 *fLog << dec << setfill(' '); 182 *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) 183 << (int)(fErrors[1]*100/GetNumExecutions()) 184 << "%) Evts skipped due to: Requirements on no.of used or core pxels not fullfilled" << endl; 185 186 *fLog << " " << setw(7) << fErrors[2] << " (" << setw(3) 187 << (int)(fErrors[2]*100/GetNumExecutions()) 188 << "%) Evts skipped due to: Requirements on SIZE or DIST not fullfilled" << endl; 189 190 *fLog << " " << setw(7) << fErrors[3] << " (" << setw(3) 191 << (int)(fErrors[3]*100/GetNumExecutions()) 192 << "%) Evts skipped due to: Length or Width is <= 0" << endl; 193 194 *fLog << " " << fErrors[0] << " (" 195 << (int)(fErrors[0]*100/GetNumExecutions()) 188 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 189 << (int)(fCut[1]*100/GetNumExecutions()) 190 << "%) Evts skipped due to: Used pixels >= " << fUsedPixelsMax 191 << " or Core pixels <= " << fCorePixelsMin << endl; 192 193 *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 194 << (int)(fCut[2]*100/GetNumExecutions()) 195 << "%) Evts skipped due to: SIZE <= " << fSizeMin << endl; 196 197 *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 198 << (int)(fCut[3]*100/GetNumExecutions()) 199 << "%) Evts skipped due to: DIST < " << fDistMin 200 << " or DIST > " << fDistMax << endl; 201 202 *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) 203 << (int)(fCut[4]*100/GetNumExecutions()) 204 << "%) Evts skipped due to: LENGTH <= " << fLengthMin 205 << " or WIDTH <= " << fWidthMin << endl; 206 207 *fLog << " " << fCut[0] << " (" 208 << (int)(fCut[0]*100/GetNumExecutions()) 196 209 << "%) Evts survived Standard selections!" << endl; 197 210 *fLog << endl; … … 201 214 202 215 216 217 218 219 220 221 222 223 224 225 -
trunk/MagicSoft/Mars/manalysis/MSelStandard.h
r1847 r1888 30 30 31 31 Double_t fMm2Deg; // conversion mm to degrees in camera 32 Int_t f Errors[4];32 Int_t fCut[5]; 33 33 TString fHilName; 34 34 TString fHilSrcName; 35 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; 35 43 36 44 public: … … 42 50 Bool_t PostProcess(); 43 51 52 void SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin, 53 Float_t sizemin, Float_t distmin, Float_t distmax, 54 Float_t lengthmin, Float_t widthmin) 55 { fUsedPixelsMax = usedpixelsmax; fCorePixelsMin = corepixelsmin; 56 fSizeMin = sizemin; fDistMin = distmin; fDistMax = distmax; 57 fLengthMin = lengthmin; fWidthMin = widthmin; } 44 58 45 59 ClassDef(MSelStandard, 0) // Task to evaluate standard cuts
Note:
See TracChangeset
for help on using the changeset viewer.