Changeset 7842 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 08/04/06 08:48:43 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MArrivalTimeCam.cc
r7804 r7842 138 138 Bool_t MArrivalTimeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const 139 139 { 140 if (idx>=GetSize()) 141 return kFALSE; 142 143 const MArrivalTimePix &pix = (*this)[idx]; 144 140 145 switch (type) 141 146 { 142 147 case 0: 143 val = (*this)[idx].GetArrivalTimeHiGain(); 144 break; 148 val = pix.GetArrivalTimeHiGain(); 149 return pix.IsHiGainValid(); 150 145 151 case 1: 146 val = (*this)[idx].GetArrivalTimeHiGainError(); 147 break; 152 val = pix.GetArrivalTimeHiGainError(); 153 return val>0; 154 148 155 case 2: 149 val = (*this)[idx].GetArrivalTimeLoGain(); 150 break; 156 val = pix.GetArrivalTimeLoGain(); 157 return pix.IsLoGainValid(); 158 151 159 case 3: 152 val = (*this)[idx].GetArrivalTimeLoGainError(); 153 break; 160 val = pix.GetArrivalTimeLoGainError(); 161 return val>0; 162 154 163 case 4: 155 164 case 6: 156 if ((*this)[idx].GetNumHiGainSaturated() > 0) 157 val = (*this)[idx].GetArrivalTimeLoGain();158 else 159 val = (*this)[idx].GetArrivalTimeHiGain(); 160 break;165 val = pix.GetArrivalTime(); 166 return pix.IsValid(); 167 168 // This is for the case the signal has been 169 // extracted from lo- and hi-gain 161 170 case 7: 162 if ( (*this)[idx].GetNumHiGainSaturated() == 0)171 if (!pix.IsLoGainValid() || !pix.IsHiGainValid()) 163 172 return kFALSE; 164 173 165 val = (*this)[idx].GetArrivalTimeHiGain()-(*this)[idx].GetArrivalTimeLoGain(); 166 return kTRUE; 174 val = pix.GetArrivalTimeLoGain()-pix.GetArrivalTimeHiGain(); 175 176 if (pix.GetArrivalTimeHiGain()<3 || pix.GetArrivalTimeHiGain()>12 || 177 pix.GetArrivalTimeLoGain()<3 || pix.GetArrivalTimeLoGain()>12) 178 return kFALSE; 179 180 val = pix.GetArrivalTimeLoGain()-pix.GetArrivalTimeHiGain(); 181 return TMath::Abs(val)<2; // FIXME: Is this a good value? 167 182 168 183 default: 169 184 return kFALSE; 170 185 } 171 return val>=0; 186 187 return kFALSE; 172 188 } 173 189 -
trunk/MagicSoft/Mars/msignal/MExtractedSignalCam.cc
r7810 r7842 154 154 Bool_t MExtractedSignalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const 155 155 { 156 if (idx>=GetSize()) 157 return kFALSE; 158 159 const MExtractedSignalPix &pix = (*this)[idx]; 160 156 161 switch (type) 157 162 { 158 163 case 0: 159 val = (*this)[idx].GetExtractedSignalHiGain(); 160 break; 164 val = pix.GetExtractedSignalHiGain(); 165 return pix.IsHiGainValid(); 166 161 167 case 1: 162 val = (*this)[idx].GetExtractedSignalHiGainError(); 163 break; 168 val = pix.GetExtractedSignalHiGainError(); 169 return val>0; 170 164 171 case 2: 165 val = (*this)[idx].GetExtractedSignalLoGain(); 166 break; 172 val = pix.GetExtractedSignalLoGain(); 173 return pix.IsLoGainValid(); 174 167 175 case 3: 168 val = (*this)[idx].GetExtractedSignalLoGainError(); 169 break; 176 val = pix.GetExtractedSignalLoGainError(); 177 return val>0; 178 179 // This is for the case the signal has been 180 // extracted from lo- and hi-gain 181 case 4: 182 if (!pix.IsLoGainValid() || !pix.IsHiGainValid()) 183 return kFALSE; 184 185 val = pix.GetExtractedSignalHiGain()/pix.GetExtractedSignalLoGain(); 186 return pix.GetExtractedSignalLoGain()>2 && val<25; 187 170 188 default: 171 189 return kFALSE; 172 190 } 173 return val>=0; 191 192 return kFALSE; 174 193 } 175 194 -
trunk/MagicSoft/Mars/msignal/MExtractedSignalPix.h
r7810 r7842 15 15 Float_t fExtractedSignalLoGainError; // error of the mean value of the extracted signal 16 16 17 Byte_t fNumHiGainSaturated; 18 Byte_t fNumLoGainSaturated; 17 Byte_t fNumHiGainSaturated; // Number of first hi-gain slice which has saturated (could be negative if already the first slice saturates) 18 Byte_t fNumLoGainSaturated; // Number of first lo-gain slices which have saturated 19 19 20 20 public: … … 40 40 41 41 Bool_t IsLoGainUsed() const { return fNumHiGainSaturated>0; } 42 Bool_t IsLoGainValid() const { return fExtractedSignalLoGainError>=0 && fNumLoGainSaturated==0; } 43 Bool_t IsHiGainValid() const { return fExtractedSignalHiGainError>=0 && fNumHiGainSaturated==0; } 42 44 Bool_t IsValid() const; 43 45
Note:
See TracChangeset
for help on using the changeset viewer.