Changeset 5917 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 01/20/05 18:34:40 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
r5829 r5917 86 86 87 87 const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -2.8; 88 const Int_t MExtractTimeAndCharge::fgMaxBinContentLimit = 100; 88 89 // -------------------------------------------------------------------------- 89 90 // … … 94 95 // - fWindowSizeHiGain and fWindowSizeLoGain to 0 95 96 // - fLoGainStartShift to fgLoGainStartShift+fgOffsetLoGain 97 // - fMaxBinContentLimt to fgMaxBinContentLimit 96 98 // 97 99 MExtractTimeAndCharge::MExtractTimeAndCharge(const char *name, const char *title) … … 102 104 103 105 SetLoGainStartShift(); 106 SetMaxBinContentLimit(); 104 107 } 105 108 … … 182 185 Float_t timehi=0., deltatimehi=0; // Set hi-gain of MArrivalTimePix valid 183 186 Byte_t sathi=0; 187 188 fMaxBinContent = 0; 184 189 185 190 const Int_t pixidx = pixel.GetPixelId(); … … 206 211 // Adapt the low-gain extraction range from the obtained high-gain time 207 212 // 208 if (pixel.HasLoGain() )213 if (pixel.HasLoGain() && fMaxBinContent < fMaxBinContentLimit ) 209 214 { 210 215 deltasumlo = 0; // make logain of MExtractedSignalPix valid … … 267 272 } 268 273 274 if (IsEnvDefined(env, prefix, "MaxBinContentLimit", print)) 275 { 276 fMaxBinContentLimit = GetEnvValue(env, prefix, "MaxBinContentLimit", fMaxBinContentLimit); 277 rc = kTRUE; 278 } 269 279 270 280 return MExtractTime::ReadEnv(env, prefix, print) ? kTRUE : rc; … … 284 294 << " to " << (Int_t)fLoGainLast << " incl" << endl; 285 295 286 *fLog << " LoGainStartShift: " << fLoGainStartShift << endl; 296 *fLog << " LoGainStartShift: " << fLoGainStartShift << endl; 297 *fLog << " MaxBinContentLimit: " << fMaxBinContentLimit << endl; 287 298 MExtractTime::Print(o); 288 299 } -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h
r5595 r5917 11 11 private: 12 12 13 static const Float_t fgLoGainStartShift; // Default for fLoGainStartShift (now set to: -2.8) 13 static const Float_t fgLoGainStartShift; // Default for fLoGainStartShift (now set to: -2.8) 14 static const Int_t fgMaxBinContentLimit; // Default for fMaxBinContentLimit (now set to: 100) 14 15 15 16 Byte_t fLoGainFirstSave; //! Temporary variable to store the original position of low-gain start slice 16 17 Float_t fLoGainStartShift; // Shift to start searching the low-gain signal obtained from the high-gain times. 18 19 Int_t fMaxBinContentLimit; // Limit for max. bin content before the low-gain gets extracted 17 20 18 21 protected: … … 20 23 Int_t fWindowSizeHiGain; // Window Size High-Gain 21 24 Int_t fWindowSizeLoGain; // Window Size Low-Gain 25 26 Int_t fMaxBinContent; // Maximum bin content 22 27 23 28 Int_t PreProcess(MParList *pList); … … 31 36 MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL); 32 37 33 Int_t GetWindowSizeHiGain() const { return fWindowSizeHiGain; } 34 Int_t GetWindowSizeLoGain() const { return fWindowSizeLoGain; } 38 Int_t GetWindowSizeHiGain () const { return fWindowSizeHiGain; } 39 Int_t GetWindowSizeLoGain () const { return fWindowSizeLoGain; } 40 Int_t GetMaxBinContentLimit() const { return fMaxBinContentLimit; } 35 41 36 42 void Print(Option_t *o="") const; 37 43 38 44 void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain; } 45 void SetMaxBinContentLimit( const Int_t i=fgMaxBinContentLimit ) { fMaxBinContentLimit = i; } 46 39 47 virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh; 40 48 fWindowSizeLoGain = windowl; } … … 50 58 Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag) { } 51 59 52 ClassDef(MExtractTimeAndCharge, 1) // Time And Charge Extractor Base Class60 ClassDef(MExtractTimeAndCharge, 2) // Time And Charge Extractor Base Class 53 61 }; 54 62
Note:
See TracChangeset
for help on using the changeset viewer.