- Timestamp:
- 03/04/07 12:01:41 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
r8355 r8361 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.3 3 2007-03-03 22:01:13tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.34 2007-03-04 11:55:55 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 540 540 << endl; 541 541 } 542 return;543 542 } 544 543 -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r8347 r8361 95 95 #include "MPedestalCam.h" 96 96 #include "MPedestalPix.h" 97 #include "MPedestalSubtract.h" 97 98 98 99 ClassImp(MJPedestal); … … 211 212 TString title = fDisplay->GetTitle(); 212 213 title += "-- Pedestal "; 213 title += fSequence.Get Name();214 title += fSequence.GetFileName(); 214 215 title += " --"; 215 216 fDisplay->SetTitle(title); … … 914 915 915 916 // 917 // This is for data without lo-gains 918 // 919 const Bool_t haslo = ext->HasLoGain(); 920 921 // 916 922 // Get the ranges for the new extractor setting. The window 917 923 // size is always rounded to the next higher integer. … … 940 946 } 941 947 942 if ( poslo+wslogain+fExtractWinRight > lo1-0.5)948 if (haslo && poslo+wslogain+fExtractWinRight > lo1-0.5) 943 949 { 944 950 *fLog << err; … … 959 965 } 960 966 961 if ( poslo2-fExtractWinLeft < lo0+0.5)967 if (haslo && poslo2-fExtractWinLeft < lo0+0.5) 962 968 { 963 969 *fLog << warn; … … 1064 1070 hpedcam.SetRenorm(kTRUE); 1065 1071 1066 MFillH fillpul("MHCalibrationPulseTimeCam", "MPedestalSubtractedEvt", "FillPulseTime"); 1072 // To have it in the parlist! 1073 MHCalibrationPulseTimeCam pulcam; 1074 plist.AddToList(&pulcam); 1075 MFillH fillpul(&pulcam, "MPedestalSubtractedEvt", "FillPulseTime"); 1067 1076 fillpul.SetBit(MFillH::kDoNotDisplay); 1068 1077 … … 1103 1112 MFTriggerPattern fcalib("CalibFilter"); 1104 1113 fcalib.SetDefault(kFALSE); 1105 fcalib. RequireCalibration();1106 fcalib. SetInverted();1114 fcalib.DenyCalibration(); 1115 fcalib.DenyPedestal(); 1107 1116 1108 1117 tlist.AddToList(&decode); … … 1127 1136 // ---------------------------------------------------------------------- 1128 1137 MTaskEnv taskenv("ExtractPedestal"); 1138 1139 //------------------------------ 1140 MFTriggerPattern ftp2("PedestalFilter"); 1141 ftp2.SetDefault(kTRUE); 1142 ftp2.DenyCalibration(); 1143 // ftp2.RequirePedestal(); 1144 1145 if (!IsUseMC()) 1146 { 1147 taskenv.SetFilter(&ftp2); 1148 tlist.AddToList(&ftp2); 1149 } 1150 //------------------------------ 1151 1129 1152 switch (fExtractType) 1130 1153 { … … 1166 1189 pedlogain.SetPedestalsOut(&fPedestalCamOut); 1167 1190 1168 1191 // kFundamental 1169 1192 if (fExtractor) 1170 1193 { … … 1181 1204 else 1182 1205 { 1183 // The window size of the extractor is not yet initialized, 1184 // so we have to stick to the extraction range 1185 const Int_t f = fExtractor->GetHiGainFirst(); 1186 const Int_t l = fExtractor->GetHiGainLast(); 1187 const Int_t w = (l-f+1)&~1; 1188 1189 // Setup to use the hi-gain extraction window in the lo-gain 1190 // range (the start of the lo-gain range is added automatically 1191 // by MPedCalcFromLoGain) 1192 pedcalc.SetExtractWindow(f, w); 1193 pedlogain.SetExtractWindow(f, w); 1206 pedcalc.SetRangeFromExtractor(*fExtractor); 1207 pedlogain.SetRangeFromExtractor(*fExtractor); 1194 1208 } 1195 1209 -
trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
r8343 r8361 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.3 6 2007-03-01 21:20:41tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.37 2007-03-04 12:00:30 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 214 214 return kFALSE; 215 215 216 CheckExtractionWindow(fRunHeader->GetNumSamplesHiGain()); 216 const Int_t nhi = fRunHeader->GetNumSamplesHiGain(); 217 const Int_t nlo = fRunHeader->GetNumSamplesLoGain(); 218 CheckExtractionWindow(nlo>0?nhi:0); 217 219 218 220 return kTRUE; … … 227 229 Int_t MPedCalcFromLoGain::Calc() 228 230 { 231 const Int_t nhi = fRunHeader->GetNumSamplesHiGain(); 232 const Int_t nlo = fRunHeader->GetNumSamplesLoGain(); 233 229 234 // Real Process 230 235 MRawEvtPixelIter pixel(fRawEvt); 231 232 236 while (pixel.Next()) 233 237 { … … 240 244 UInt_t ab[2]; 241 245 const Float_t sum = fExtractor ? 242 CalcExtractor(pixel, pixel.GetNumHiGainSamples()) :243 CalcSums(pixel, pixel.GetNumHiGainSamples(), ab[0], ab[1]);246 CalcExtractor(pixel, nlo>0?nhi:0) : 247 CalcSums(pixel, nlo>0?nhi:0, ab[0], ab[1]); 244 248 245 249 const UInt_t aidx = (*fGeom)[idx].GetAidx(); -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.cc
r8250 r8361 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtractedEvt.cc,v 1. 2 2007-01-15 12:06:15tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtractedEvt.cc,v 1.3 2007-03-04 12:01:37 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 105 105 Byte_t *p0 = GetSamplesRaw(idx); 106 106 107 Byte_t *sat hi0 = 0; // first saturating hi-gainslice108 Byte_t *sat hi1 = 0; // last saturating hi-gainslice107 Byte_t *sat0 = 0; // first saturating slice 108 Byte_t *sat1 = 0; // last saturating slice 109 109 110 110 Int_t num = 0; … … 115 115 if (*ptr>=limit) 116 116 { 117 sat hi1 = ptr;118 if (!sat hi0)119 sat hi0 = ptr;117 sat1 = ptr; 118 if (!sat0) 119 sat0 = ptr; 120 120 num++; 121 121 } 122 122 } 123 123 124 last = sat hi1 ? sathi1-p0 : -1;125 first = sat hi0 ? sathi0-p0 : -1;124 last = sat1 ? sat1-p0 : -1; 125 first = sat0 ? sat0-p0 : -1; 126 126 127 127 return num; … … 138 138 // Warning: No range checks and no sanity checks are done! 139 139 // 140 Int_t MPedestalSubtractedEvt::GetMax(const Int_t idx, const Int_t first, const Int_t last, Int_t &val) const140 Int_t MPedestalSubtractedEvt::GetMax(const Int_t idx, const Int_t first, const Int_t last, UInt_t &val) const 141 141 { 142 142 // Get pointer to first slice to be considered -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h
r8350 r8361 41 41 Int_t GetSaturation(const Int_t idx, Int_t limit, Int_t &first, Int_t &last) const; 42 42 //void InterpolateSaturation(const Int_t idx, Int_t limit, Int_t first, Int_t last) const; 43 Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, Int_t &val) const;43 Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, UInt_t &val) const; 44 44 Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last) const 45 45 { 46 Int_t val;46 UInt_t val; 47 47 return GetMax(pixidx, first, last, val); 48 48 } 49 Int_t GetMax(const Int_t pixidx, Int_t &val) const49 Int_t GetMax(const Int_t pixidx, UInt_t &val) const 50 50 { 51 51 return GetMax(pixidx, 0, fNumSamples, val); … … 54 54 Int_t GetMax(const Int_t pixidx) const 55 55 { 56 Int_t val;56 UInt_t val; 57 57 return GetMax(pixidx, 0, fNumSamples, val); 58 58 }
Note:
See TracChangeset
for help on using the changeset viewer.