Changeset 6857 for trunk/MagicSoft
- Timestamp:
- 03/18/05 17:54:02 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc
r6210 r6857 26 26 // MHCalibrationTestCam 27 27 // 28 // Fills the calibrated signal from an M CerPhotEvtinto28 // Fills the calibrated signal from an MSignalCam into 29 29 // MHCalibrationPix for every: 30 30 // … … 94 94 #include "MCalibrationPix.h" 95 95 96 #include "M CerPhotEvt.h"97 #include "M CerPhotPix.h"96 #include "MSignalCam.h" 97 #include "MSignalPix.h" 98 98 99 99 #include "MGeomCam.h" … … 155 155 // 156 156 // Searches pointer to: 157 // - M CerPhotEvt157 // - MSignalCam 158 158 // 159 159 // Calls: … … 174 174 175 175 176 M CerPhotEvt *signal = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");176 MSignalCam *signal = (MSignalCam*)pList->FindObject("MSignalCam"); 177 177 if (!signal) 178 178 { 179 *fLog << err << "M CerPhotEvtnot found... abort." << endl;179 *fLog << err << "MSignalCam not found... abort." << endl; 180 180 return kFALSE; 181 181 } … … 199 199 // ------------------------------------------------------------------------------- 200 200 // 201 // Retrieves pointer to M CerPhotEvt:201 // Retrieves pointer to MSignalCam: 202 202 // 203 203 // Retrieves from MGeomCam: … … 208 208 // Fills HiGain histograms (MHGausEvents::FillHistAndArray()) 209 209 // with: 210 // - M CerPhotPix::GetNumPhotons(pixid);210 // - MSignalPix::GetNumPhotons(pixid); 211 211 // 212 212 Bool_t MHCalibrationTestCam::FillHists(const MParContainer *par, const Stat_t w) 213 213 { 214 214 215 M CerPhotEvt *calibration = (MCerPhotEvt*)par;215 MSignalCam *calibration = (MSignalCam*)par; 216 216 if (!calibration) 217 217 { … … 234 234 MHCalibrationPix &histhi = (*this)[i]; 235 235 236 const M CerPhotPix *pix = calibration->GetPixById(i);236 const MSignalPix *pix = calibration->GetPixById(i); 237 237 if (!pix) 238 238 continue; -
trunk/MagicSoft/Mars/mhft/MGeomCamMagicEnhance.cc
r6855 r6857 28 28 // MGeomCamMagicEnhance 29 29 // 30 // This task takes M CerPhotEvtassuming that it is related to the Magic31 // camera geometry. By deviding and interpolation it resamples M CerPhotEvt30 // This task takes MSignalCam assuming that it is related to the Magic 31 // camera geometry. By deviding and interpolation it resamples MSignalCam 32 32 // such, that afterwards it is related to a geometry MGeomCamMagicXT 33 33 // … … 40 40 #include "MParList.h" 41 41 42 #include "M CerPhotEvt.h"43 #include "M CerPhotPix.h"42 #include "MSignalCam.h" 43 #include "MSignalPix.h" 44 44 45 45 #include "MArrayD.h" … … 49 49 using namespace std; 50 50 51 const char *MGeomCamMagicEnhance::fgName CerPhotEvtIn = "MCerPhotEvt";52 const char *MGeomCamMagicEnhance::fgName CerPhotEvtOut = "MCerPhotEvt";51 const char *MGeomCamMagicEnhance::fgNameSignalCamIn = "MSignalCam"; 52 const char *MGeomCamMagicEnhance::fgNameSignalCamOut = "MSignalCam"; 53 53 54 54 // --------------------------------------------------------------------------- … … 57 57 // 58 58 MGeomCamMagicEnhance::MGeomCamMagicEnhance(const char *name, const char *title) 59 : fName CerPhotEvtIn(fgNameCerPhotEvtIn), fNameCerPhotEvtOut(fgNameCerPhotEvtOut),59 : fNameSignalCamIn(fgNameSignalCamIn), fNameSignalCamOut(fgNameSignalCamOut), 60 60 fEvtIn(0), fEvtOut(0) 61 61 { 62 62 fName = name ? name : "MGeomCamMagicEnhance"; 63 fTitle = title ? title : "Task to convert M CerPhotEvtfrom MGeomCamMagic to MGeomCamMagicXT";63 fTitle = title ? title : "Task to convert MSignalCam from MGeomCamMagic to MGeomCamMagicXT"; 64 64 } 65 65 66 66 // --------------------------------------------------------------------------- 67 67 // 68 // Search for M CerPhotEvtinput and output container.68 // Search for MSignalCam input and output container. 69 69 // 70 70 Int_t MGeomCamMagicEnhance::PreProcess(MParList *plist) 71 71 { 72 fEvtIn = (M CerPhotEvt*)plist->FindObject(fNameCerPhotEvtIn, "MCerPhotEvt");72 fEvtIn = (MSignalCam*)plist->FindObject(fNameSignalCamIn, "MSignalCam"); 73 73 if (!fEvtIn) 74 74 { 75 *fLog << err << fName CerPhotEvtIn << " [MCerPhotEvt] not found... abort." << endl;75 *fLog << err << fNameSignalCamIn << " [MSignalCam] not found... abort." << endl; 76 76 return kFALSE; 77 77 } 78 78 79 fEvtOut = (M CerPhotEvt*)plist->FindCreateObj("MCerPhotEvt", fNameCerPhotEvtOut);79 fEvtOut = (MSignalCam*)plist->FindCreateObj("MSignalCam", fNameSignalCamOut); 80 80 if (!fEvtOut) 81 81 return kFALSE; … … 155 155 // --------------------------------------------------------------------------- 156 156 // 157 // Call Convert and copy result into output M CerPhotEvt157 // Call Convert and copy result into output MSignalCam 158 158 // 159 159 Int_t MGeomCamMagicEnhance::Process() … … 162 162 const MArrayD res(Convert()); 163 163 164 // Copy result into output M CerPhotEvt164 // Copy result into output MSignalCam 165 165 fEvtOut->InitSize(res.GetSize()); 166 166 -
trunk/MagicSoft/Mars/mhft/MGeomCamMagicEnhance.h
r5691 r6857 7 7 8 8 class MArrayD; 9 class M CerPhotEvt;9 class MSignalCam; 10 10 11 11 class MGeomCamMagicEnhance : public MTask 12 12 { 13 13 private: 14 static const char *fgName CerPhotEvtIn;15 static const char *fgName CerPhotEvtOut;14 static const char *fgNameSignalCamIn; 15 static const char *fgNameSignalCamOut; 16 16 17 TString fName CerPhotEvtIn;18 TString fName CerPhotEvtOut;17 TString fNameSignalCamIn; 18 TString fNameSignalCamOut; 19 19 20 M CerPhotEvt*fEvtIn;21 M CerPhotEvt*fEvtOut;20 MSignalCam *fEvtIn; 21 MSignalCam *fEvtOut; 22 22 23 23 MArrayD Convert() const; … … 31 31 MGeomCamMagicEnhance(const char *name=0, const char *title=0); 32 32 33 void SetName CerPhotEvtIn(const char *n) { fNameCerPhotEvtIn = n; }34 void SetName CerPhotEvtOut(const char *n) { fNameCerPhotEvtOut = n; }33 void SetNameSignalCamIn(const char *n) { fNameSignalCamIn = n; } 34 void SetNameSignalCamOut(const char *n) { fNameSignalCamOut = n; } 35 35 36 ClassDef(MGeomCamMagicEnhance, 0) //Task to convert M CerPhotEvtfrom MGeomCamMagic to MGeomCamMagicXT36 ClassDef(MGeomCamMagicEnhance, 0) //Task to convert MSignalCam from MGeomCamMagic to MGeomCamMagicXT 37 37 }; 38 38 -
trunk/MagicSoft/Mars/mhft/MHexagonalFTCalc.cc
r6855 r6857 31 31 // backward tranformation. 32 32 // 33 // If you don't want to copy the rsult back to any M CerPhotEvtcall34 // SetName CerPhotEvtOut()33 // If you don't want to copy the rsult back to any MSignalCam call 34 // SetNameSignalCamOut() 35 35 // 36 36 // Currently - this will change in the future! - there are two output … … 60 60 #include "MGeomPix.h" 61 61 62 #include "M CerPhotEvt.h"63 #include "M CerPhotPix.h"62 #include "MSignalCam.h" 63 #include "MSignalPix.h" 64 64 65 65 #include "MHexagonFreqSpace.h" … … 72 72 73 73 const char *MHexagonalFTCalc::fgNameGeomCam = "MGeomCam"; 74 const char *MHexagonalFTCalc::fgName CerPhotEvtIn = "MCerPhotEvt";75 const char *MHexagonalFTCalc::fgName CerPhotEvtOut = "MCerPhotEvt";74 const char *MHexagonalFTCalc::fgNameSignalCamIn = "MSignalCam"; 75 const char *MHexagonalFTCalc::fgNameSignalCamOut = "MSignalCam"; 76 76 77 77 // --------------------------------------------------------------------------- … … 83 83 MHexagonalFTCalc::MHexagonalFTCalc(const char *name, const char *title) 84 84 : fNameGeomCam(fgNameGeomCam), 85 fName CerPhotEvtIn(fgNameCerPhotEvtIn), fNameCerPhotEvtOut(fgNameCerPhotEvtOut),85 fNameSignalCamIn(fgNameSignalCamIn), fNameSignalCamOut(fgNameSignalCamOut), 86 86 fEvtIn(0), fEvtOut(0), 87 87 fMaxAmplitude(0.08), fMaxRowFraction(0.75), fSkipBwdTrafo(kFALSE) … … 114 114 Int_t MHexagonalFTCalc::PreProcess(MParList *plist) 115 115 { 116 fEvtIn = (M CerPhotEvt*)plist->FindObject(fNameCerPhotEvtIn, "MCerPhotEvt");116 fEvtIn = (MSignalCam*)plist->FindObject(fNameSignalCamIn, "MSignalCam"); 117 117 if (!fEvtIn) 118 118 { 119 *fLog << err << fName CerPhotEvtIn << " [MCerPhotEvt] not found... abort." << endl;119 *fLog << err << fNameSignalCamIn << " [MSignalCam] not found... abort." << endl; 120 120 return kFALSE; 121 121 } 122 122 123 123 fEvtOut=0; 124 if (!fName CerPhotEvtOut.IsNull())125 { 126 fEvtOut = (M CerPhotEvt*)plist->FindCreateObj(fNameCerPhotEvtOut, "MCerPhotEvt");124 if (!fNameSignalCamOut.IsNull()) 125 { 126 fEvtOut = (MSignalCam*)plist->FindCreateObj(fNameSignalCamOut, "MSignalCam"); 127 127 if (!fEvtOut) 128 128 return kFALSE; … … 240 240 // --------------------------------------------------------------------------- 241 241 // 242 // - Copy input M CerPhotEvtusing the pixel mapping into an array242 // - Copy input MSignalCam using the pixel mapping into an array 243 243 // - Do forward transformation 244 244 // - substract fourier offset … … 246 246 // - add fourier offset 247 247 // - do backward tranformation 248 // - copy result back into output M CerPhotEvt248 // - copy result back into output MSignalCam 249 249 // 250 250 Int_t MHexagonalFTCalc::Process() … … 254 254 MArrayD re(lim); 255 255 256 // M CerPhotPix *pix=0;257 // M CerPhotEvtIter Next(fEvtIn, kFALSE);258 // while ((pix = (M CerPhotPix*)Next()))259 // Copy data from M CerPhotEvtinto array256 // MSignalPix *pix=0; 257 // MSignalCamIter Next(fEvtIn, kFALSE); 258 // while ((pix = (MSignalPix*)Next())) 259 // Copy data from MSignalCam into array 260 260 const UInt_t npix = fEvtIn->GetNumPixels(); 261 261 for (UInt_t idx=0; idx<npix; idx++) … … 302 302 303 303 // ---------------------------------------------------- 304 // Do we have to copy the result back into M CerPhotEvt?304 // Do we have to copy the result back into MSignalCam? 305 305 // ---------------------------------------------------- 306 306 if (!fEvtOut) -
trunk/MagicSoft/Mars/mhft/MHexagonalFTCalc.h
r5691 r6857 13 13 14 14 class MArrayD; 15 class M CerPhotEvt;15 class MSignalCam; 16 16 class MHexagonFreqSpace; 17 17 … … 20 20 private: 21 21 static const char *fgNameGeomCam; // Default name of used geometry 22 static const char *fgName CerPhotEvtIn; // Default name of used input MCerPhotEvt23 static const char *fgName CerPhotEvtOut; // Default name of used output MCerPhotEvt22 static const char *fgNameSignalCamIn; // Default name of used input MSignalCam 23 static const char *fgNameSignalCamOut; // Default name of used output MSignalCam 24 24 25 25 TString fNameGeomCam; // name of used geometry 26 TString fName CerPhotEvtIn; // name of used input MCerPhotEvt27 TString fName CerPhotEvtOut; // name of used output MCerPhotEvt26 TString fNameSignalCamIn; // name of used input MSignalCam 27 TString fNameSignalCamOut; // name of used output MSignalCam 28 28 29 M CerPhotEvt *fEvtIn; // input MCerPhotEvt30 M CerPhotEvt *fEvtOut; // output MCerPhotEvt29 MSignalCam *fEvtIn; // input MSignalCam 30 MSignalCam *fEvtOut; // output MSignalCam 31 31 32 32 MHexagonFreqSpace *fFreq1; //! … … 56 56 57 57 void SetNameGeomCam(const char *n) { fNameGeomCam = n; } // name of camera geometry used 58 void SetName CerPhotEvtIn(const char *n) { fNameCerPhotEvtIn = n; } // name of input MCerPhotEvtused59 void SetName CerPhotEvtOut(const char *n="") { fNameCerPhotEvtOut = n; } // name of ouput MCerPhotEvtused58 void SetNameSignalCamIn(const char *n) { fNameSignalCamIn = n; } // name of input MSignalCam used 59 void SetNameSignalCamOut(const char *n="") { fNameSignalCamOut = n; } // name of ouput MSignalCam used 60 60 61 61 void SetMaxAmplitude(Float_t max) { fMaxAmplitude=max; } // amplitude to cut at -
trunk/MagicSoft/Mars/mhft/Makefile
r5694 r6857 19 19 # connect the include files defined in the config.mk file 20 20 # 21 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../m analysis21 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../msignal 22 22 23 23 #manalysis: MChisqEval (MParameters) -
trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.cc
r5354 r6857 20 20 ! Author(s): Markus Gaug 4/2004 <mailto:markus@ifae.es> 21 21 ! 22 ! Copyright: MAGIC Software Development, 2000-200 422 ! Copyright: MAGIC Software Development, 2000-2005 23 23 ! 24 24 ! … … 36 36 // 37 37 // Input Containers: 38 // M CerPhotEvt38 // MSignalCam 39 39 // 40 40 // Output Containers: … … 50 50 #include "MRawRunHeader.h" 51 51 52 #include "M CerPhotPix.h"53 #include "M CerPhotEvt.h"52 #include "MSignalPix.h" 53 #include "MSignalCam.h" 54 54 55 55 #include "MPedPhotPix.h" … … 77 77 // Look for the following input containers: 78 78 // 79 // - M CerPhotEvt79 // - MSignalCam 80 80 // - MBadPixelsCam 81 81 // … … 88 88 { 89 89 // Look for input container 90 fCerPhot = (M CerPhotEvt*)pList->FindObject("MCerPhotEvt");90 fCerPhot = (MSignalCam*)pList->FindObject("MSignalCam"); 91 91 if (!fCerPhot) 92 92 { 93 *fLog << err << "M PedPhotCalc::PreProcess Error: MCerPhotEvtnot found... aborting." << endl;93 *fLog << err << "MSignalCam not found... aborting." << endl; 94 94 return kFALSE; 95 95 } … … 98 98 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 99 99 if (!fBadPixels) 100 { 101 *fLog << warn << "MPedPhotCalc::PreProcess Warning: No MBadPixelsCam found." << endl; 102 } 100 *fLog << warn << "WARNING - MBadPixelsCam not found... ignored." << endl; 103 101 104 102 // Create output container … … 143 141 Int_t MPedPhotCalc::Process() 144 142 { 145 for(UInt_t i=0;i<fCerPhot->GetNumPixels();i++) 143 const UInt_t n = fCerPhot->GetNumPixels(); 144 for(UInt_t idx=0; idx<n; idx++) 146 145 { 147 const MCerPhotPix &pix = (*fCerPhot)[i]; 148 const Int_t pixidx = pix.GetPixId(); 149 150 const Float_t nphot = pix.GetNumPhotons(); 146 const Float_t nphot = (*fCerPhot)[idx].GetNumPhotons(); 151 147 152 fSumx[ pixidx] += nphot;153 fSumx2[ pixidx] += nphot*nphot;148 fSumx[idx] += nphot; 149 fSumx2[idx] += nphot*nphot; 154 150 } 155 151 -
trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.h
r3803 r6857 11 11 12 12 class MPedPhotCam; 13 class M CerPhotEvt;13 class MSignalCam; 14 14 class MBadPixelsCam; 15 15 class MPedPhotCalc : public MTask … … 17 17 18 18 MPedPhotCam *fPedestals; // Pedestals of all pixels in the camera 19 M CerPhotEvt *fCerPhot; // Calibrated Cherenkov events19 MSignalCam *fCerPhot; // Calibrated Cherenkov events 20 20 MBadPixelsCam *fBadPixels; // Bad Pixels 21 21
Note:
See TracChangeset
for help on using the changeset viewer.