Changeset 7208
- Timestamp:
- 07/22/05 11:11:26 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7205 r7208 20 20 21 21 -*-*- END OF LINE -*-*- 22 2005/07/22 Thomas Bretz 23 24 * macros/tutorials/extendcam.C, macros/tutorials/hft.C: 25 - some updates. Replaced MCerPhotEvt by MSignalCam 26 27 * mhflux/MHDisp.cc: 28 - some more fixes to allow no-smearing 29 30 * mhft/MGeomCamMagicEnhance.cc: 31 - replaced GetPixById by the id itself 32 33 * mimage/MImgCleanStd.cc: 34 - do not check for the pedestal container if absolute cleaning 35 has been chosen 36 37 * mjobs/MJCalibrateSignal.cc: 38 - removed obsolete comments 39 40 * mreport/MReport.[h,cc]: 41 - added some conversions for wrong version numbers 42 43 * mreport/MReportCamera.cc: 44 - fixed a problem reading files with gkActiveLoadControlVersNum 45 46 47 22 48 2005/07/21 Thomas Bretz 23 49 -
trunk/MagicSoft/Mars/macros/tutorials/extendcam.C
r7159 r7208 65 65 MHCamera *d6=new MHCamera(MGeomCamMagicXT()); 66 66 67 M CerPhotEvt*evt=0;67 MSignalCam *evt=0; 68 68 MMcEvt *mc; 69 69 … … 81 81 82 82 //Für Real-Raum 83 evt = (M CerPhotEvt*)plist->FindObject("MCerPhotEvt");83 evt = (MSignalCam*)plist->FindObject("MSignalCam"); 84 84 if (!evt) 85 85 { 86 cout << "Fehler: M CerPhotEvt" << endl;86 cout << "Fehler: MSignalCam" << endl; 87 87 return kFALSE; 88 88 } … … 135 135 Int_t Process() 136 136 { 137 d1->SetCamContent(*(M CerPhotEvt*)cl1->GetClone());138 d2->SetCamContent(*(M CerPhotEvt*)cl2->GetClone());137 d1->SetCamContent(*(MSignalCam*)cl1->GetClone()); 138 d2->SetCamContent(*(MSignalCam*)cl2->GetClone()); 139 139 d3->SetCamContent(*fFreq2); 140 d4->SetCamContent(*(M CerPhotEvt*)cl4->GetClone());141 d5->SetCamContent(*(M CerPhotEvt*)cl3->GetClone());140 d4->SetCamContent(*(MSignalCam*)cl4->GetClone()); 141 d5->SetCamContent(*(MSignalCam*)cl3->GetClone()); 142 142 d6->SetCamContent(*evt); 143 143 … … 174 174 MReadMarsFile read("Events"); 175 175 read.DisableAutoScheme(); 176 read.AddFile("/home/ kolodziejski/Diplomarbeit/marsdata/mcdata/*.root");176 read.AddFile("/home/tbretz/Software/mcwobble/lza/cal/19*.root"); 177 177 //read.AddFile("/home/hoehne/data/mcdata/gammas/calib/calib_gamma_zbin0.root"); 178 178 //read.AddFile("/home/hoehne/data/mcdata/hadrons/calib/calib_proton_zbin0.root"); … … 184 184 // enhance.SetNameCerPhotEvtOut("MCerPhotEvt2"); 185 185 186 MClone clone1("M CerPhotEvt", "Clone1");187 MClone clone2("M CerPhotEvt", "Clone2");188 MClone clone3("M CerPhotEvt", "Clone3");189 MClone clone4("M CerPhotEvt", "Clone4");186 MClone clone1("MSignalCam", "Clone1"); 187 MClone clone2("MSignalCam", "Clone2"); 188 MClone clone3("MSignalCam", "Clone3"); 189 MClone clone4("MSignalCam", "Clone4"); 190 190 191 191 cl1 = &clone1; … … 202 202 mytask.SetProcess(Process); 203 203 204 MImgCleanStd clean1( 26, 18);204 MImgCleanStd clean1(8, 4.5); 205 205 clean1.SetMethod(MImgCleanStd::kAbsolute); 206 206 clean1.SetNameGeomCam("MGeomCamMagicXT"); 207 208 MImgCleanStd clean2(26, 18); 207 clean1.SetNamePedPhotCam("MPedPhotFromExtractorRndm"); 208 209 MImgCleanStd clean2(8, 4.5); 209 210 clean2.SetMethod(MImgCleanStd::kAbsolute); 210 211 clean2.SetNameGeomCam("MGeomCamMagicXT"); 212 clean2.SetNamePedPhotCam("MPedPhotFromExtractorRndm"); 211 213 212 214 // Setup your tasklist -
trunk/MagicSoft/Mars/macros/tutorials/hft.C
r7159 r7208 188 188 } 189 189 190 void hft(const char *fname="/home/ hoehne/data/mcdata/hadrons/calib/calib_proton_zbin0.root")190 void hft(const char *fname="/home/tbretz/Software/mcwobble/lza/cal/19*.root") 191 191 { 192 192 // Setup parameter- and tasklist … … 201 201 202 202 // Clone MCerPhotEvt befor eimage cleaning 203 MClone clone1("M CerPhotEvt", "Clone1");203 MClone clone1("MSignalCam", "Clone1"); 204 204 205 205 // Setup image cleaning 206 MImgCleanStd clean( 24, 12);206 MImgCleanStd clean(8.5, 4); 207 207 clean.SetMethod(MImgCleanStd::kAbsolute); 208 clean.SetNamePedPhotCam("MPedPhotFromExtractorRndm"); 208 209 209 210 // Clone MCerPhotEvt befor eimage cleaning 210 MClone clone2("M CerPhotEvt", "Clone2");211 MClone clone2("MSignalCam", "Clone2"); 211 212 212 213 // Setup intercative task calling the functions defined above -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7202 r7208 248 248 // To calculate significance map smear with 2*theta-cut and 249 249 // do not normalize gauss, for event map use theta-cut/2 instead 250 for (int x=1; x<=nx; x++) 251 { 252 const Double_t cx = axex.GetBinCenter(x); 253 const Double_t px = cx-pos1.X(); 254 255 for (int y=1; y<=ny; y++) 256 { 257 const Double_t cy = axey.GetBinCenter(y); 258 const Double_t sp = Sq(px, cy-pos1.Y()); 259 if (smear) 250 if (smear || fHistOff) 251 { 252 for (int x=1; x<=nx; x++) 253 { 254 const Double_t cx = axex.GetBinCenter(x); 255 const Double_t px = cx-pos1.X(); 256 257 for (int y=1; y<=ny; y++) 260 258 { 261 const Double_t dp = sp/psf; 262 263 // Values below 1e-3 (>3.5sigma) are not filled into the histogram 264 if (dp<4) 259 const Double_t cy = axey.GetBinCenter(y); 260 const Double_t sp = Sq(px, cy-pos1.Y()); 261 if (smear) 265 262 { 266 const Double_t rc = TMath::Exp(-dp)/normg; 267 if (!fHistOff) 268 bg.AddBinContent(bg.GetBin(x, y), rc); 269 else 270 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); 263 const Double_t dp = sp/psf; 264 265 // Values below 1e-3 (>3.5sigma) are not filled into the histogram 266 if (dp<4) 267 { 268 const Double_t rc = TMath::Exp(-dp)/normg; 269 if (!fHistOff) 270 bg.AddBinContent(bg.GetBin(x, y), rc); 271 else 272 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); 273 } 271 274 } 275 276 if (!fHistOff) 277 continue; 278 279 // If we are filling the signal already (fHistOff!=NULL) 280 // we also fill the background by projecting the 281 // background in the camera into the sky plot. 282 const TVector2 v = TVector2(cx+m.X(), cy+m.Y()); 283 284 // Speed up further: Xmax-fWobble 285 if (v.Mod()>axex.GetXmax()) // Gains 10% speed 286 continue; 287 288 const Int_t bx = axex.FindFixBin(v^rot); 289 const Int_t by = axey.FindFixBin(v*rot); 290 const Double_t bg = fHistOff->GetBinContent(bx, by, bz); 291 292 fHistBg.AddBinContent(fHistBg.GetBin(x, y), bg); 272 293 } 273 274 if (!fHistOff)275 continue;276 277 // If we are filling the signal already (fHistOff!=NULL)278 // we also fill the background by projecting the279 // background in the camera into the sky plot.280 const TVector2 v = TVector2(cx+m.X(), cy+m.Y());281 282 // Speed up further: Xmax-fWobble283 if (v.Mod()>axex.GetXmax()) // Gains 10% speed284 continue;285 286 const Int_t bx = axex.FindFixBin(v^rot);287 const Int_t by = axey.FindFixBin(v*rot);288 const Double_t bg = fHistOff->GetBinContent(bx, by, bz);289 290 fHistBg.AddBinContent(fHistBg.GetBin(x, y), bg);291 294 } 292 295 } -
trunk/MagicSoft/Mars/mhft/MGeomCamMagicEnhance.cc
r6857 r7208 92 92 Double_t dEvt[577]; 93 93 for (int i = 0; i<577; ++i) 94 dEvt[i] = fEvtIn->GetPixById(i)->GetNumPhotons();94 dEvt[i] = (*fEvtIn)[i].GetNumPhotons(); 95 95 96 96 MArrayD dEvent(1141); -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r7179 r7208 563 563 } 564 564 565 fPed = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam"); 566 if (!fPed) 567 { 568 *fLog << err << fNamePedPhotCam << " [MPedPhotCam] not found... aborting." << endl; 569 return kFALSE; 565 fPed=0; 566 if (fCleaningMethod!=kAbsolute) 567 { 568 fPed = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam"); 569 if (!fPed) 570 { 571 *fLog << err << fNamePedPhotCam << " [MPedPhotCam] not found... aborting." << endl; 572 return kFALSE; 573 } 570 574 } 571 575 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r7189 r7208 620 620 write.AddContainer("MTime", "Events", kFALSE); 621 621 write.AddContainer("MRawEvtHeader", "Events"); 622 //write.AddContainer("MArrivalTime", "Events", kFALSE);623 //write.AddContainer("MPointingPos", "Events", kFALSE);624 622 // Slow-Control: Current-tree 625 623 write.AddContainer("MTimeCurrents", "Currents", kFALSE); -
trunk/MagicSoft/Mars/mreport/MReport.cc
r4575 r7208 29 29 // This is a base class for all reports comming from subsystems stored in 30 30 // a report file. 31 // 32 // 33 // Due to wrong assignment by arehucas the veriosn number for some 34 // cases is replaced. 35 // 36 // Old Version | MjdMin | MjdMax | New Version 37 // -------------+---------+---------+------------- 38 // 200504130 | 53548.0 | 53567.0 | 200506300 39 // 200503170 | 53446.5 | 53447.5 | 200502240 40 // 31 41 // 32 42 // Be carefull: The class name of all classes derived from this class … … 105 115 // SetupReading must be called successfully before. 106 116 // 117 // Due to wrong assignment by arehucas the veriosn number for some 118 // cases is replaced. 119 // 120 // Old Version | MjdMin | MjdMax | New Version 121 // -------------+---------+---------+------------- 122 // 200504130 | 53548.0 | 53567.0 | 200506300 123 // 200503170 | 53446.5 | 53447.5 | 200502240 124 // 107 125 Int_t MReport::Interprete(TString &str, const MTime &start, const MTime &stop, Int_t ver) 108 126 { 127 // Interprete header (time, status, etc) of report 109 128 if (!InterpreteHeader(str)) 110 129 return kFALSE; … … 116 135 return -1; 117 136 137 // Due to wrong assignment by arehucas the veriosn number for some 138 // cases is replaced. 139 if (ver==200504130 && GetMjd()>53548 && GetMjd()<53567) 140 ver=200506300; 141 142 if (ver==200503170 && GetMjd()>53446.5 && GetMjd()<53447.5) 143 ver=200502240; 144 145 // Interprete body (contents) of report 118 146 const Int_t rc = InterpreteBody(str, ver); 119 147 if (rc != kTRUE) -
trunk/MagicSoft/Mars/mreport/MReport.h
r4575 r7208 5 5 #include "MParContainer.h" 6 6 #endif 7 7 #include "MTime.h" 8 8 class MTime; 9 9 class MParList; … … 42 42 43 43 Byte_t GetState() const { return fState; } 44 Double_t GetMjd() const { return fTime ? fTime->GetMjd() : -1; } 44 45 45 46 ClassDef(MReport, 1) // Base class for control reports -
trunk/MagicSoft/Mars/mreport/MReportCamera.cc
r7202 r7208 622 622 return kCONTINUE; 623 623 624 if (ver > =gkActiveLoadControlVersNum)624 if (ver > gkActiveLoadControlVersNum) 625 625 { 626 626 if (!InterpreteActiveLoad(str))
Note:
See TracChangeset
for help on using the changeset viewer.