Changeset 4899 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 09/09/04 17:19:26 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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.