Changeset 4899 for trunk/MagicSoft
- Timestamp:
- 09/09/04 17:19:26 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4898 r4899 21 21 22 22 2004/09/09: Markus Gaug 23 24 * mcalib/MCalibrationIntensityCam.[h,cc] 25 * mcalib/MCalibrationIntensityChargeCam.[h,cc] 26 * mcalib/MCalibrationIntensityQECam.[h,cc] 27 * mcalib/MCalibrationIntensityRelTimeCam.[h,cc] 28 * mcalib/Makefile 29 * mcalib/CalibLinkDef.h 30 - new classes for the intensity calibration. First is base class, 31 other derive from it. 32 33 * mcalib/MHGausEvents.[h,cc] 34 * mcalib/MHCalibrationPix.[h,cc] 35 * mcalib/Makefile 36 * mcalib/CalibLinkDef.h 37 - put typical calibration members into new base class MHCalibrationPix 38 and leave only typical Gaussian behaviour members in MHGausEvents. 39 - all MHCalibration*Pix classes derive now from MHCalibrationPix 40 41 * mcalib/MCalibColorSet.[h,cc] 42 - finished 43 44 * mcalib/MCalibColorSteer.[h,cc] 45 * mcalib/Makefile 46 * mcalib/CalibLinkDef.h 47 - new task to be executed before the calibration tasks. Steers the 48 occurrance of multiple intensities and the new *Intensity* 49 containers 23 50 24 51 * msignal/MExtractor.cc -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r4881 r4899 39 39 #include "MCalibColorSet.h" 40 40 41 #include "TRegexp.h" 42 41 43 #include "MLog.h" 42 44 #include "MLogManip.h" … … 49 51 ClassImp(MCalibColorSet); 50 52 53 51 54 using namespace std; 52 55 53 56 const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113; 57 const Int_t MCalibColorSet::gkMCRunLimit = 1000; 54 58 // -------------------------------------------------------------------------- 55 59 // … … 126 130 k1LedGreen = BIT(14), 127 131 k2LedGreen = BIT(1 ), 128 k3LedGreen = k1LedGreen &k2LedGreen,132 k3LedGreen = k1LedGreen | k2LedGreen, 129 133 k5LedGreen = BIT(0 ), 134 k6LedGreen = k5LedGreen | k1LedGreen, 135 k7LedGreen = k5LedGreen | k2LedGreen, 136 k8LedGreen = k5LedGreen | k3LedGreen, 130 137 k1LedUV = BIT(3 ), 131 138 k2LedUV = BIT(4 ), 132 k3LedUV = k1LedUV &k2LedUV,139 k3LedUV = k1LedUV | k2LedUV, 133 140 k5LedUV1 = BIT(11), 134 141 k5LedUV2 = BIT(12), 135 k10LedUV = k5LedUV1 & k5LedUV2, 136 k11LedUV = k10LedUV & k1LedUV, 137 k12LedUV = k10LedUV & k2LedUV, 138 k13LedUV = k10LedUV & k1LedUV, 142 k6LedUV = k5LedUV1 | k1LedUV, 143 k7LedUV = k5LedUV1 | k2LedUV, 144 k8LedUV = k5LedUV1 | k3LedUV, 145 k10LedUV = k5LedUV1 | k5LedUV2, 146 k11LedUV = k10LedUV | k1LedUV, 147 k12LedUV = k10LedUV | k2LedUV, 148 k13LedUV = k10LedUV | k1LedUV, 139 149 k01LedBlue = BIT(8 ), 140 150 k1LedBlue = BIT(10), 141 151 k2LedBlue = BIT(7 ), 142 k3LedBlue = k1LedBlue &k2LedBlue,152 k3LedBlue = k1LedBlue | k2LedBlue, 143 153 k5LedBlue1 = BIT(13), 144 154 k5LedBlue2 = BIT(2 ), 145 155 k5LedBlue3 = BIT(5 ), 146 156 k5LedBlue4 = BIT(6 ), 147 k10LedBlue = k5LedBlue1 & k5LedBlue2, 148 k15LedBlue = k10LedBlue & k5LedBlue3, 149 k20LedBlue = k15LedBlue & k5LedBlue4, 150 k21LedBlue = k20LedBlue & k1LedBlue, 151 k22LedBlue = k20LedBlue & k2LedBlue, 152 k23LedBlue = k22LedBlue & k1LedBlue, 157 k6LedBlue = k5LedBlue1 | k1LedBlue, 158 k7LedBlue = k5LedBlue1 | k2LedBlue, 159 k8LedBlue = k5LedBlue1 | k3LedBlue, 160 k10LedBlue = k5LedBlue1 | k5LedBlue2, 161 k15LedBlue = k10LedBlue | k5LedBlue3, 162 k20LedBlue = k15LedBlue | k5LedBlue4, 163 k21LedBlue = k20LedBlue | k1LedBlue, 164 k22LedBlue = k20LedBlue | k2LedBlue, 165 k23LedBlue = k22LedBlue | k1LedBlue, 153 166 kCT1Pulser = BIT(16) 154 167 }; 155 168 156 169 const Int_t num = header->GetRunNumber(); 170 171 if (num<gkMCRunLimit) 172 { 173 *fLog << inf << "Assumed MC run ... using GREEN pulser." << endl; 174 fPattern |= k1LedGreen; 175 fIsValid = kTRUE; 176 return kTRUE; 177 } 157 178 158 179 if (num<gkIFAEBoxInaugurationRun) … … 204 225 else 205 226 { 227 206 228 const TString proj = header->GetProjectName(); 207 229 208 230 // Possible green combinations 209 if (proj.Contains("0.1ledgree",TString::kIgnoreCase)) 231 TRegexp gre0("[0.1][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 232 if (proj.Contains(gre0)) 210 233 { fPattern |= k01LedGreen; color = kGREEN; } 211 if (proj.Contains("1ledgree",TString::kIgnoreCase)) 234 TRegexp gre1("[1][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 235 if (proj.Contains(gre1)) 212 236 { fPattern |= k1LedGreen; color = kGREEN; } 213 if (proj.Contains("2ledgree",TString::kIgnoreCase)) 237 TRegexp gre2("[2][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 238 if (proj.Contains(gre2)) 214 239 { fPattern |= k2LedGreen; color = kGREEN; } 215 if (proj.Contains("3ledgree",TString::kIgnoreCase)) 240 TRegexp gre3("[3][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 241 if (proj.Contains(gre3)) 216 242 { fPattern |= k3LedGreen; color = kGREEN; } 217 if (proj.Contains("5ledgree",TString::kIgnoreCase)) 243 TRegexp gre5("[5][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 244 if (proj.Contains(gre5)) 218 245 { fPattern |= k5LedGreen; color = kGREEN; } 246 TRegexp gre6("[6][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 247 if (proj.Contains(gre6)) 248 { fPattern |= k6LedGreen; color = kGREEN; } 249 TRegexp gre7("[7][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 250 if (proj.Contains(gre7)) 251 { fPattern |= k7LedGreen; color = kGREEN; } 252 TRegexp gre8("[8][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 253 if (proj.Contains(gre8)) 254 { fPattern |= k8LedGreen; color = kGREEN; } 219 255 220 256 // Possible green combinations 221 if (proj.Contains("0.1ledblue",TString::kIgnoreCase)) 257 TRegexp blu0("[0.1][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 258 if (proj.Contains(blu0)) 222 259 { fPattern |= k01LedBlue; color = kBLUE; } 223 if (proj.Contains("1ledblue",TString::kIgnoreCase)) 260 TRegexp blu1("[1][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 261 if (proj.Contains(blu1)) 224 262 { fPattern |= k1LedBlue; color = kBLUE; } 225 if (proj.Contains("2ledblue",TString::kIgnoreCase)) 263 TRegexp blu2("[2][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 264 if (proj.Contains(blu2)) 226 265 { fPattern |= k2LedBlue; color = kBLUE; } 227 if (proj.Contains("3ledblue",TString::kIgnoreCase)) 266 TRegexp blu3("[3][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 267 if (proj.Contains(blu3)) 228 268 { fPattern |= k3LedBlue; color = kBLUE; } 229 if (proj.Contains("5ledblue",TString::kIgnoreCase)) 269 TRegexp blu5("[5][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 270 if (proj.Contains(blu5)) 230 271 { fPattern |= k5LedBlue1; color = kBLUE; } 231 if (proj.Contains("10ledblue",TString::kIgnoreCase)) 272 TRegexp blu6("[6][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 273 if (proj.Contains(blu6)) 274 { fPattern |= k6LedBlue; color = kBLUE; } 275 TRegexp blu7("[7][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 276 if (proj.Contains(blu7)) 277 { fPattern |= k7LedBlue; color = kBLUE; } 278 TRegexp blu8("[8][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 279 if (proj.Contains(blu8)) 280 { fPattern |= k8LedBlue; color = kBLUE; } 281 TRegexp blu10("[10][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 282 if (proj.Contains(blu10)) 232 283 { fPattern |= k10LedBlue; color = kBLUE; } 233 if (proj.Contains("15ledblue",TString::kIgnoreCase)) 284 TRegexp blu15("[15][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 285 if (proj.Contains(blu15)) 234 286 { fPattern |= k15LedBlue; color = kBLUE; } 235 if (proj.Contains("20ledblue",TString::kIgnoreCase)) 287 TRegexp blu20("[20][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 288 if (proj.Contains(blu20)) 236 289 { fPattern |= k20LedBlue; color = kBLUE; } 237 if (proj.Contains("21ledblue",TString::kIgnoreCase)) 290 TRegexp blu21("[21][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 291 if (proj.Contains(blu21)) 238 292 { fPattern |= k21LedBlue; color = kBLUE; } 239 if (proj.Contains("22ledblue",TString::kIgnoreCase)) 293 TRegexp blu22("[22][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 294 if (proj.Contains(blu22)) 240 295 { fPattern |= k22LedBlue; color = kBLUE; } 241 if (proj.Contains("23ledblue",TString::kIgnoreCase)) 296 TRegexp blu23("[23][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 297 if (proj.Contains(blu23)) 242 298 { fPattern |= k23LedBlue; color = kBLUE; } 243 299 244 300 // Possible UV combinations 245 if (proj.Contains("1leduv",TString::kIgnoreCase)) 301 TRegexp uv1("[1][lL]?[eE]?[dD]?[sS]?[U][vV]"); 302 if (proj.Contains(uv1)) 246 303 { fPattern |= k1LedUV; color = kUV; } 247 if (proj.Contains("2leduv",TString::kIgnoreCase)) 304 TRegexp uv2("[2][lL]?[eE]?[dD]?[sS]?[U][vV]"); 305 if (proj.Contains(uv2)) 248 306 { fPattern |= k2LedUV; color = kUV; } 249 if (proj.Contains("3leduv",TString::kIgnoreCase)) 307 TRegexp uv3("[3][lL]?[eE]?[dD]?[sS]?[U][vV]"); 308 if (proj.Contains(uv3)) 250 309 { fPattern |= k3LedUV; color = kUV; } 251 if (proj.Contains("5leduv",TString::kIgnoreCase)) 310 TRegexp uv5("[5][lL]?[eE]?[dD]?[sS]?[U][vV]"); 311 if (proj.Contains(uv5)) 252 312 { fPattern |= k5LedUV1; color = kUV; } 253 if (proj.Contains("10leduv",TString::kIgnoreCase)) 313 TRegexp uv6("[6][lL]?[eE]?[dD]?[sS]?[U][vV]"); 314 if (proj.Contains(uv6)) 315 { fPattern |= k6LedUV; color = kUV; } 316 TRegexp uv7("[7][lL]?[eE]?[dD]?[sS]?[U][vV]"); 317 if (proj.Contains(uv7)) 318 { fPattern |= k7LedUV; color = kUV; } 319 TRegexp uv8("[8][lL]?[eE]?[dD]?[sS]?[U][vV]"); 320 if (proj.Contains(uv8)) 321 { fPattern |= k8LedUV; color = kUV; } 322 TRegexp uv10("[10][lL]?[eE]?[dD]?[sS]?[U][vV]"); 323 if (proj.Contains(uv10)) 254 324 { fPattern |= k10LedUV; color = kUV; } 255 if (proj.Contains("11leduv",TString::kIgnoreCase)) 325 TRegexp uv11("[11][lL]?[eE]?[dD]?[sS]?[U][vV]"); 326 if (proj.Contains(uv11)) 256 327 { fPattern |= k11LedUV; color = kUV; } 257 if (proj.Contains("12leduv",TString::kIgnoreCase)) 328 TRegexp uv12("[12][lL]?[eE]?[dD]?[sS]?[U][vV]"); 329 if (proj.Contains(uv12)) 258 330 { fPattern |= k12LedUV; color = kUV; } 259 if (proj.Contains("13leduv",TString::kIgnoreCase)) 331 TRegexp uv13("[13][lL]?[eE]?[dD]?[sS]?[U][vV]"); 332 if (proj.Contains(uv13)) 260 333 { fPattern |= k13LedUV; color = kUV; } 261 334 -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h
r4861 r4899 12 12 { 13 13 private: 14 static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration15 14 16 MRawEvtHeader *fHeader; 15 static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration (set to: 20113) 16 static const Int_t gkMCRunLimit; //! Maximum MC run number (now set to: 1000) 17 17 18 UInt_t fPattern; 19 Bool_t fIsValid; 18 MRawEvtHeader *fHeader; //! Event header with the pulse pattern information 19 20 UInt_t fPattern; // Current pulse pattern 21 Bool_t fIsValid; // Have to set the pulse pattern? 22 23 Bool_t ReInit(MParList *pList); 24 Int_t PreProcess(MParList *pList); 25 Int_t Process(); 26 27 public: 20 28 21 Bool_t ReInit(MParList *pList); 22 Int_t PreProcess(MParList *pList); 23 Int_t Process(); 24 25 public: 26 MCalibColorSet(const char *name=NULL, const char *title=NULL); 27 28 void Clear(const Option_t *o=""); 29 30 ClassDef(MCalibColorSet, 0) // Task to workaround missing colors 29 MCalibColorSet(const char *name=NULL, const char *title=NULL); 30 31 void Clear(const Option_t *o=""); 32 33 ClassDef(MCalibColorSet, 0) // Task to workaround missing colors 31 34 }; 32 35 -
trunk/MagicSoft/Mars/msignal/MArrivalTimePix.h
r4274 r4899 38 38 Byte_t GetNumLoGainSaturated() const { return fNumLoGainSaturated; } 39 39 40 Bool_t IsLoGainUsed() const { return fNumHiGainSaturated > 0; }41 Bool_t IsValid() const;40 Bool_t IsLoGainUsed() const { return fNumHiGainSaturated > 0; } 41 Bool_t IsValid() const; 42 42 43 43 ClassDef(MArrivalTimePix, 1) // Storage Container for ArrivalTime information of one pixel -
trunk/MagicSoft/Mars/msignal/MExtractAmplitudeSpline.cc
r4378 r4899 121 121 122 122 fNumHiGainSamples = 2.; 123 fNumLoGainSamples = 2.;123 fNumLoGainSamples = lolast == 0 ? 0. : 2.; 124 124 125 125 fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples); … … 166 166 Int_t range = fHiGainLast - fHiGainFirst + 1 + fHiLoLast; 167 167 168 fHiGainSignal = new Float_t[range];168 fHiGainSignal = new Float_t[range]; 169 169 memset(fHiGainSignal,0,range*sizeof(Float_t)); 170 170 fHiGainFirstDeriv = new Float_t[range]; … … 181 181 << endl; 182 182 183 range = fLoGainLast - fLoGainFirst + 1;183 range = fLoGainLast ? fLoGainLast - fLoGainFirst + 1 : 0; 184 184 185 185 fLoGainSignal = new Float_t[range]; … … 189 189 fLoGainSecondDeriv = new Float_t[range]; 190 190 memset(fLoGainSecondDeriv,0,range*sizeof(Float_t)); 191 191 192 192 *fLog << endl; 193 193 *fLog << inf << GetDescriptor() << ": Using for Low-Gain Extraction " << range -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r4896 r4899 181 181 182 182 fNumHiGainSamples = (Float_t)(fHiGainLast-fHiGainFirst+1); 183 fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst+1); 183 if (lolast) 184 fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst+1); 185 else 186 fNumLoGainSamples = 0.; 184 187 185 188 fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples); -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowSpline.cc
r4449 r4899 111 111 112 112 const Byte_t windowhi = hilast-hifirst+1; 113 const Byte_t windowlo = lolast-lofirst+1;114 115 113 const Byte_t whieven = windowhi & ~1; 116 const Byte_t wloeven = windowlo & ~1;117 114 118 115 if (whieven != windowhi) … … 124 121 } 125 122 126 if (wloeven != windowlo)127 {128 *fLog << warn << GetDescriptor()129 << Form("%s%2i%s%2i",": Lo Gain window size has to be even, set last slice from "130 ,(int)lolast," to ",(int)(lolast-1)) << endl;131 lolast -= 1;132 }133 134 123 if (whieven<2) 135 124 { … … 139 128 hilast = hifirst+1; 140 129 } 141 142 if (wloeven<2) 143 { 144 *fLog << warn << GetDescriptor() 145 << Form("%s%2i%s%2i",": Lo Gain window is smaller than 2 FADC sampes, set last slice from" 146 ,(int)lolast," to ",(int)(lofirst+1)) << endl; 147 lolast = lofirst+1; 148 } 149 130 131 const Byte_t windowlo = lolast-lofirst+1; 132 const Byte_t wloeven = windowlo & ~1; 133 134 if (lolast != 0) 135 { 136 if (wloeven != windowlo) 137 { 138 *fLog << warn << GetDescriptor() 139 << Form("%s%2i%s%2i",": Lo Gain window size has to be even, set last slice from " 140 ,(int)lolast," to ",(int)(lolast-1)) << endl; 141 lolast -= 1; 142 } 143 144 145 if (wloeven<2) 146 { 147 *fLog << warn << GetDescriptor() 148 << Form("%s%2i%s%2i",": Lo Gain window is smaller than 2 FADC sampes, set last slice from" 149 ,(int)lolast," to ",(int)(lofirst+1)) << endl; 150 lolast = lofirst+1; 151 } 152 } 153 150 154 151 155 MExtractor::SetRange(hifirst,hilast,lofirst,lolast); … … 157 161 // 158 162 fNumHiGainSamples = (Float_t)(fHiGainLast-fHiGainFirst); 159 fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst); 163 if (fLoGainLast != 0) 164 fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst); 165 else 166 fNumLoGainSamples = 0.; 160 167 161 168 fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples); -
trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.cc
r4340 r4899 129 129 fLoGainFirst, fLoGainLast, fNumLoGainSamples); 130 130 131 132 *fLog << endl; 133 *fLog << inf << GetDescriptor() << ": Taking " << fNumHiGainSamples 134 << " HiGain samples from a window starting with slice " << (Int_t)fHiGainFirst 135 << " to " << (Int_t)(fHiGainLast+fHiLoLast) << " incl" << endl; 136 *fLog << inf << GetDescriptor() << ": Taking " << fNumLoGainSamples 137 << " LoGain samples from a window starting with slice " << (Int_t)fLoGainFirst 138 << " to " << (Int_t)fLoGainLast << " incl" << endl; 139 131 140 return kTRUE; 132 141 … … 161 170 162 171 const Byte_t availhirange = (fHiGainLast-fHiGainFirst+1) & ~1; 163 const Byte_t availlorange = (fLoGainLast-fLoGainFirst+1) & ~1;164 172 165 173 if (fWindowSizeHiGain > availhirange) … … 173 181 } 174 182 175 if (fWindowSizeLoGain > availlorange)176 {177 *fLog << warn << GetDescriptor()178 << Form("%s%2i%s%2i%s%2i%s",": Lo Gain window size: ",(int)fWindowSizeLoGain,179 " is bigger than available range: [",(int)fLoGainFirst,",",(int)fLoGainLast,"]") << endl;180 *fLog << warn << GetDescriptor()181 << ": Will set window size to: " << (int)availlorange << endl;182 fWindowSizeLoGain = availlorange;183 }184 185 183 if (fWindowSizeHiGain<2) 186 184 { … … 189 187 } 190 188 191 if (fWindowSizeLoGain<2) 192 { 193 fWindowSizeLoGain = 2; 194 *fLog << warn << GetDescriptor() << ": Lo Gain window size set to two samples" << endl; 195 } 196 189 if (fLoGainLast != 0 && fWindowSizeLoGain != 0) 190 { 191 const Byte_t availlorange = (fLoGainLast-fLoGainFirst+1) & ~1; 192 193 if (fWindowSizeLoGain > availlorange) 194 { 195 *fLog << warn << GetDescriptor() 196 << Form("%s%2i%s%2i%s%2i%s",": Lo Gain window size: ",(int)fWindowSizeLoGain, 197 " is bigger than available range: [",(int)fLoGainFirst,",",(int)fLoGainLast,"]") << endl; 198 *fLog << warn << GetDescriptor() 199 << ": Will set window size to: " << (int)availlorange << endl; 200 fWindowSizeLoGain = availlorange; 201 } 202 203 if (fWindowSizeLoGain<2) 204 { 205 fWindowSizeLoGain = 2; 206 *fLog << warn << GetDescriptor() << ": Lo Gain window size set to two samples" << endl; 207 } 208 } 209 197 210 fNumHiGainSamples = (Float_t)fWindowSizeHiGain; 198 211 fNumLoGainSamples = (Float_t)fWindowSizeLoGain;
Note:
See TracChangeset
for help on using the changeset viewer.