Changeset 2946 for trunk/MagicSoft/Mars
- Timestamp:
- 01/28/04 16:55:40 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2945 r2946 10 10 11 11 12 12 13 2004/01/28: Markus Gaug 13 14 14 * mcalib/MCalibrationCalc.[h,cc] 15 * mcalib/MCalibrationCam.[h,cc] 15 * mcalib/MCalibrationCalc.[h,cc], mcalib/MCalibrationCam.[h,cc]: 16 16 - included flags to indicate if Blind Pixel Method or PIn Diode 17 17 method was OK. Up to now, program stopped, if one of the two 18 18 methods was chosen but not able to being executed. 19 19 20 * manalysis/MArrivalTimeCalc.cc 21 * manalysis/MExtractSignals.cc 22 * manalysis/MGeomApply.cc 20 * manalysis/MArrivalTimeCalc.cc, manalysis/MExtractSignals.cc, 21 manalysis/MGeomApply.cc: 23 22 - put all missing InitSize(npixels) into MGeomApply 24 23 25 24 25 26 26 2004/01/28: Abelardo Moralejo 27 28 27 29 28 * mcalib/MMcCalibration.cc … … 48 47 a workaround for a 'bug' in very old camera files, which is not 49 48 necessary anymore. 49 50 * manalysis/MCerPhotAnal2.[h,cc]: 51 - replaced MPedestalCam by MPedPhotCam 52 53 * manalysis/MExtractSignal.cc: 54 - some small simplification to the signal extraction 55 - removed some obsolete variables 56 - replaced for by while 57 - removed obsolete casts 58 59 * mmain/MEventDisplay.cc: 60 - gave names to the filters 61 - removed adding MHCamera to fList because it was deleted twice 50 62 51 63 -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc
r2386 r2946 31 31 // 32 32 // Input Containers: 33 // MRawEvtData, MPed estalCam33 // MRawEvtData, MPedPhotCam 34 34 // 35 35 // Output Containers: … … 48 48 #include "MRawEvtData.h" // MRawEvtData::GetNumPixels 49 49 #include "MCerPhotEvt.h" 50 #include "MPed estalPix.h"51 #include "MPed estalCam.h"50 #include "MPedPhotPix.h" 51 #include "MPedPhotCam.h" 52 52 #include "MRawEvtPixelIter.h" 53 53 … … 78 78 // - MRawRunHeader 79 79 // - MRawEvtData 80 // - MPed estalCam80 // - MPedPhotCam 81 81 // 82 82 // The following output containers are also searched and created if … … 116 116 } 117 117 118 fPedestals = (MPed estalCam*)pList->FindCreateObj("MPedestalCam");118 fPedestals = (MPedPhotCam*)pList->FindCreateObj("MPedPhotCam"); 119 119 if (runheader && !fPedestals) 120 120 return kFALSE; -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.h
r2265 r2946 16 16 17 17 class MRawEvtData; 18 class MPed estalCam;18 class MPedPhotCam; 19 19 class MCerPhotEvt; 20 20 class MRawRunHeader; … … 23 23 { 24 24 private: 25 MPed estalCam*fPedestals; // Pedestals of all pixels in the camera25 MPedPhotCam *fPedestals; // Pedestals of all pixels in the camera 26 26 MRawEvtData *fRawEvt; // raw event data (time slices) 27 27 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2944 r2946 102 102 if (!fRawEvt) 103 103 { 104 *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl;104 *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl; 105 105 return kFALSE; 106 106 } … … 116 116 fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam")); 117 117 if (!fPedestals) 118 118 { 119 119 *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl; 120 120 return kFALSE; 121 122 } 121 } 123 122 124 123 fArrivalTime = (MArrivalTime*)pList->FindCreateObj(AddSerialNumber("MArrivalTime")); 124 if (!fArrivalTime) 125 return kFALSE; 125 126 126 127 return kTRUE; … … 135 136 Bool_t MExtractSignal::ReInit(MParList *pList ) 136 137 { 137 138 138 MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam")); 139 139 if (!cam) … … 143 143 } 144 144 145 return kTRUE; 146 } 147 145 return kTRUE; 146 } 148 147 149 148 // -------------------------------------------------------------------------- … … 154 153 Int_t MExtractSignal::Process() 155 154 { 156 157 155 MRawEvtPixelIter pixel(fRawEvt); 158 156 fSignals->Clear(); … … 165 163 UShort_t satLo = 0; 166 164 167 Byte_t *ptr = pixel.GetHiGainSamples(); 168 Byte_t *first = ptr + fHiGainFirst; 169 Byte_t *last = ptr + fHiGainFirst + fNumHiGainSamples; 170 171 UInt_t sumHi = 0; 172 UInt_t sumLo = 0; 165 UInt_t sumHi = 0; 166 UInt_t sumLo = 0; 167 168 Byte_t maxhi = 0; 169 Byte_t midhi = 0; 170 171 Byte_t *ptr = pixel.GetHiGainSamples() + fHiGainFirst; 172 Byte_t *last = ptr + fNumHiGainSamples; 173 174 while (ptr<last) 175 { 176 sumHi += *ptr; 177 178 if (*ptr > maxhi) 179 { 180 maxhi = *ptr; 181 midhi = ptr-pixel.GetHiGainSamples(); 182 } 183 184 if (*ptr >= fSaturationLimit) 185 satHi++; 186 187 ptr++; 188 } 189 190 ptr = pixel.GetLoGainSamples() + fLoGainFirst; 191 last = ptr + fNumLoGainSamples; 192 193 Byte_t maxlo = 0; 194 Byte_t midlo = 0; 195 196 while (ptr<last) 197 { 198 sumLo += *ptr; 199 200 if (*ptr > maxlo) 201 { 202 maxlo = *ptr; 203 midlo = ptr-pixel.GetLoGainSamples(); 204 } 205 206 if (*ptr >= fSaturationLimit) 207 satLo++; 208 209 ptr++; 210 } 211 212 if (satLo) 213 satlo++; 173 214 174 215 const Int_t pixid = pixel.GetPixelId(); 216 175 217 const MPedestalPix &ped = (*fPedestals)[pixid]; 176 218 MExtractedSignalPix &pix = (*fSignals)[pixid]; 177 219 178 const Float_t pedes = ped.GetPedestal(); 179 const Float_t pedrms = ped.GetPedestalRms(); 180 181 Byte_t maxhi = 0; 182 Byte_t midhi = 0; 183 184 for (ptr=first;ptr<last;ptr++) 185 { 186 187 if (*ptr > maxhi) 188 { 189 maxhi = *ptr; 190 midhi = ptr-first; 191 } 192 193 sumHi += *ptr; 194 195 if (*ptr >= fSaturationLimit) 196 satHi++; 197 198 } 199 200 ptr = pixel.GetLoGainSamples(); 201 first = ptr + fLoGainFirst; 202 last = ptr + fLoGainFirst + fNumLoGainSamples; 203 Byte_t maxlo = 0; 204 Byte_t midlo = 0; 205 206 for (ptr=first;ptr<last;ptr++) 207 { 208 209 if (*ptr > maxlo) 210 { 211 maxlo = *ptr; 212 midlo = ptr-first; 213 } 214 215 sumLo += *ptr; 216 217 if (*ptr >= fSaturationLimit) 218 satLo++; 219 } 220 221 if (satLo) 222 satlo++; 223 224 pix.SetExtractedSignal((Float_t)sumHi - pedes*(Float_t)fNumHiGainSamples, 225 pedrms*fSqrtHiGainSamples, 226 (Float_t)sumLo - pedes*(Float_t)fNumLoGainSamples, 227 pedrms*fSqrtLoGainSamples); 220 const Float_t pedes = ped.GetPedestal(); 221 const Float_t pedrms = ped.GetPedestalRms(); 222 223 pix.SetExtractedSignal(sumHi - pedes*fNumHiGainSamples, pedrms*fSqrtHiGainSamples, 224 sumLo - pedes*fNumLoGainSamples, pedrms*fSqrtLoGainSamples); 228 225 229 226 pix.SetGainSaturation(satHi, satHi, satLo); 230 227 231 if (satHi) 232 fArrivalTime->SetTime(pixid,(Float_t)(midlo+fLoGainFirst)); 233 else 234 fArrivalTime->SetTime(pixid,(Float_t)(midhi+fHiGainFirst)); 235 236 228 fArrivalTime->SetTime(pixid, satHi?midlo:midhi); 237 229 238 230 } /* while (pixel.Next()) */ -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r2781 r2946 204 204 MFilter *f1=new MFDataMember("MRawRunHeader.fRunType", '>', 255.5); 205 205 MFilter *f2=new MFDataMember("MRawRunHeader.fRunType", '<', 255.5); 206 f1->SetName("MFMonteCarlo"); 207 f2->SetName("MFRealData"); 206 208 207 209 ncalc->SetFilter(f1); … … 210 212 tlist->AddToList(f1); 211 213 tlist->AddToList(f2); 214 tlist->AddToList(ncalc); 212 215 tlist->AddToList(pcopy); 213 216 tlist->AddToList(pdnsb); 214 tlist->AddToList(ncalc);215 217 tlist->AddToList(nanal); 216 218 tlist->AddToList(fill1); … … 228 230 tlist->AddToList(fill8); 229 231 230 231 232 // 232 233 // Now distribute Display to all tasks … … 495 496 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend|kCanDelete); 496 497 cam->Draw("pixelindex"); 497 fList->Add(cam);498 498 499 499 c1.Modified(); … … 505 505 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend|kCanDelete); 506 506 cam->Draw("sectorindex"); 507 fList->Add(cam);508 507 509 508 c2.Modified();
Note:
See TracChangeset
for help on using the changeset viewer.