Changeset 765 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 04/23/01 15:42:03 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
r749 r765 28 28 // MCT1ReadAscii // 29 29 // // 30 // Reads a ascii file with CT1 data. The file description and some example // 31 // files can be found on the Magic homepage. // 32 // // 30 33 ///////////////////////////////////////////////////////////////////////////// 31 34 … … 45 48 ClassImp(MCT1ReadAscii) 46 49 50 // -------------------------------------------------------------------------- 51 // 52 // Default constructor. Creates an array which stores the file names of 53 // the files which should be read. If a filename is given it is added 54 // to the list. 55 // 47 56 MCT1ReadAscii::MCT1ReadAscii(const char *fname, 48 57 const char *name, … … 60 69 } 61 70 71 // -------------------------------------------------------------------------- 72 // 73 // Delete the filename list and the input stream if one exists. 74 // 62 75 MCT1ReadAscii::~MCT1ReadAscii() 63 76 { … … 67 80 } 68 81 82 // -------------------------------------------------------------------------- 83 // 84 // Add this file as the last entry in the chain 85 // 69 86 void MCT1ReadAscii::AddFile(const char *txt) 70 87 { 71 // 72 // Add this file as the last entry in the chain 73 // 74 const int sz = fFileNames->GetSize(); 75 const int tsz = strlen(txt)+1; 88 const int sz = fFileNames->GetSize(); 89 const int tsz = strlen(txt)+1; 76 90 77 91 fFileNames->Set(sz+tsz); … … 80 94 } 81 95 96 // -------------------------------------------------------------------------- 97 // 98 // This opens the next file in the list and deletes its name from the list. 99 // 82 100 Bool_t MCT1ReadAscii::OpenNextFile() 83 101 { … … 128 146 } 129 147 148 // -------------------------------------------------------------------------- 149 // 150 // Open the first file in the list. Check for the output containers or create 151 // them if they don't exist. 152 // 153 // Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera) 154 // 130 155 Bool_t MCT1ReadAscii::PreProcess(MParList *pList) 131 156 { … … 159 184 } 160 185 186 // -------------------------------------------------------------------------- 187 // 188 // Read apedestal entry (line) from the file 189 // 161 190 void MCT1ReadAscii::ReadPedestals() 162 191 { … … 185 214 } 186 215 216 // -------------------------------------------------------------------------- 217 // 218 // Read a data entry (line) from the file 219 // 187 220 void MCT1ReadAscii::ReadData() 188 221 { … … 218 251 } 219 252 253 // -------------------------------------------------------------------------- 254 // 255 // Check for the event number and depending on this number decide if 256 // pedestals or event data has to be read. 257 // 258 // If the end of the file is reached try to open the next in the list. If 259 // there is now next file stop the eventloop. 260 // 220 261 Bool_t MCT1ReadAscii::Process() 221 262 { -
trunk/MagicSoft/Mars/manalysis/MHillas.cc
r749 r765 47 47 ClassImp(MHillas) 48 48 49 // -------------------------------------------------------------------------- 50 // 51 // Default constructor. 52 // 49 53 MHillas::MHillas(const char *name, const char *title) : 50 54 fAlpha(0), fTheta(0), fWidth(0), fLength(0), fSize(0), fDist(0), fEllipse(NULL) … … 56 60 } 57 61 62 // -------------------------------------------------------------------------- 63 // 64 // Destructor. Deletes the TEllipse if one exists. 65 // 58 66 MHillas::~MHillas() 59 67 { … … 61 69 } 62 70 71 // -------------------------------------------------------------------------- 72 // 73 // Print the hillas Parameters to *fLog 74 // 63 75 void MHillas::Print(Option_t *) 64 76 { … … 71 83 } 72 84 85 // -------------------------------------------------------------------------- 86 // 87 // call the Paint function of the Ellipse if a TEllipse exists 88 // 73 89 void MHillas::Paint(Option_t *) 74 90 { … … 79 95 } 80 96 97 // -------------------------------------------------------------------------- 98 // 99 // Instead of adding MHillas itself to the Pad 100 // (s. AppendPad in TObject) we create an ellipse, 101 // which is added to the Pad by it's Draw function 102 // You can remove it by deleting the Ellipse Object 103 // (s. Clear() ) 104 // 81 105 void MHillas::Draw(Option_t *) 82 106 { 83 //84 // Instead of adding MHillas itself to the Pad85 // (s. AppendPad in TObject) we create an ellipse,86 // which is added to the Pad by it's Draw function87 // You can remove it by deleting the Ellipse Object88 // (s. Clear() )89 //90 91 107 Clear(); 92 108 … … 112 128 } 113 129 130 // -------------------------------------------------------------------------- 131 // 132 // If a TEllipse object exists it is deleted 133 // 114 134 void MHillas::Clear(Option_t *) 115 135 { … … 122 142 } 123 143 144 // -------------------------------------------------------------------------- 145 // 146 // Calculate the Hillas parameters from a cerenkov photon event 147 // (The calcualtion is some kind of two dimentional statistics) 148 // 124 149 Bool_t MHillas::Calc(MGeomCam &geom, MCerPhotEvt &evt) 125 150 { 126 //127 // Calculate the Hillas parameters from a cerenkov photon event128 // (The calcualtion is some kind of two dimentional statistics)129 //130 131 151 const UInt_t nevt = evt.GetNumPixels(); 132 152 -
trunk/MagicSoft/Mars/manalysis/MHillasCalc.cc
r749 r765 26 26 ///////////////////////////////////////////////////////////////////////////// 27 27 // // 28 // MHillas Calc // 28 // MHillasCalc // 29 // // 30 // This is a task to calculate the Hillas parameters from each event // 29 31 // // 30 32 ///////////////////////////////////////////////////////////////////////////// … … 42 44 ClassImp(MHillasCalc) 43 45 46 // -------------------------------------------------------------------------- 47 // 48 // Default constructor. 49 // 44 50 MHillasCalc::MHillasCalc(const char *name, const char *title) 45 51 { … … 48 54 } 49 55 56 // -------------------------------------------------------------------------- 57 // 58 // Check for a MCerPhotEvt object from which the Hillas are calculated. 59 // Try to find the Geometry conatiner. And try to find the output 60 // (Hillas) container or create one. 61 // 50 62 Bool_t MHillasCalc::PreProcess( MParList *pList ) 51 63 { … … 71 83 } 72 84 85 // -------------------------------------------------------------------------- 86 // 87 // If you want do complex descisions inside the calculations 88 // we must move the calculation code inside this function 89 // 90 // If the calculation wasn't sucessfull skip this event 91 // 73 92 Bool_t MHillasCalc::Process() 74 93 { 75 //76 // If you want do complex descisions inside the calculations77 // we must move the calculation code inside this function78 //79 // If the calculation wasn't sucessfull skip this event80 //81 94 return fHillas->Calc(*fGeomCam, *fCerPhotEvt) ? kTRUE : kCONTINUE; 82 95 } -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
r749 r765 24 24 \* ======================================================================== */ 25 25 26 ///////////////////////////////////////////////////////////////////////////// 27 // 28 // MImgCleanStd 29 // 30 // This is the standard image cleaning. If you want to know how it works 31 // Please look at the three CleanSteps and Process 32 // 33 ///////////////////////////////////////////////////////////////////////////// 26 34 #include "MImgCleanStd.h" 27 35 … … 36 44 ClassImp(MImgCleanStd) 37 45 46 // -------------------------------------------------------------------------- 47 // 48 // Default constructor. Here you can specify the cleaning levels. If you 49 // don't specify them the 'common standard' values 2.5 and 3.0 (sigma 50 // above mean) are used 51 // 38 52 MImgCleanStd::MImgCleanStd(const Float_t lvl1, const Float_t lvl2, 39 53 const char *name, const char *title) 40 54 : fCleanLvl1(lvl1), fCleanLvl2(lvl2) 41 55 { 42 //43 // the default constructor44 //45 56 *fName = name ? name : "MImgCleanStd"; 46 57 *fTitle = title ? title : "Task which does a standard image cleaning"; … … 49 60 } 50 61 62 // -------------------------------------------------------------------------- 63 // 64 // This method looks for all pixels with an entry (photons) 65 // that is three times bigger than the noise of the pixel 66 // (std: 3 sigma, clean level 1) 67 // 51 68 void MImgCleanStd::CleanStep1() 52 69 { 53 //54 // This method looks for all pixels with an entry (photons)55 // that is three times bigger than the noise of the pixel56 // (std: 3 sigma, clean level 1)57 //58 59 70 const Int_t entries = fEvt->GetNumPixels(); 60 71 … … 76 87 } 77 88 89 // -------------------------------------------------------------------------- 90 // 91 // check if the survived pixel have a neighbor, that also 92 // survived 93 // 78 94 void MImgCleanStd::CleanStep2() 79 95 { 80 //81 // check if the survived pixel have a neighbor, that also82 // survived83 //84 85 96 const Int_t entries = fEvt->GetNumPixels(); 86 97 … … 142 153 } 143 154 155 // -------------------------------------------------------------------------- 156 // 157 // Look for the boundary pixels around the core pixels 158 // if a pixel has more than 2.5 (clean level 2) sigma, and 159 // a core neigbor it is declared as used. 160 // 144 161 void MImgCleanStd::CleanStep3() 145 162 { 146 //147 // Look for the boundary pixels around the core pixels148 // if a pixel has more than 2.5 (clean level 2) sigma, and149 // a core neigbor it is declared as used.150 //151 163 const Int_t entries = fEvt->GetNumPixels(); 152 164 … … 202 214 } 203 215 216 // -------------------------------------------------------------------------- 217 // 218 // check if MEvtHeader exists in the Parameter list already. 219 // if not create one and add them to the list 220 // 204 221 Bool_t MImgCleanStd::PreProcess (MParList *pList) 205 222 { 206 //207 // check if MEvtHeader exists in the Parameter list already.208 // if not create one and add them to the list209 //210 223 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 211 224 if (!fCam) … … 225 238 } 226 239 240 // -------------------------------------------------------------------------- 241 // 242 // Cleans the image. 243 // 227 244 Bool_t MImgCleanStd::Process() 228 245 { -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc
r749 r765 36 36 ClassImp(MPedestalCam) 37 37 38 // -------------------------------------------------------------------------- 39 // 40 // Default constructor. Creates a MPedestalPix object for each pixel 41 // 38 42 MPedestalCam::MPedestalCam(const char *name, const char *title) 39 43 { … … 50 54 } 51 55 56 // -------------------------------------------------------------------------- 57 // 58 // Delete the array conatining the pixel pedest information 59 // 52 60 MPedestalCam::~MPedestalCam() 53 61 { 62 // FIXME: Do we have to delete the objects itself? 54 63 delete fArray; 55 64 } -
trunk/MagicSoft/Mars/manalysis/MPedestalPix.cc
r749 r765 33 33 #include "MPedestalPix.h" 34 34 35 //#include <fstream.h>36 37 35 #include "MLog.h" 38 36
Note:
See TracChangeset
for help on using the changeset viewer.