Changeset 19310 for trunk/Mars/manalysis
- Timestamp:
- 10/25/18 21:17:10 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/manalysis/MSoftwareTriggerCalc.cc
r18957 r19310 93 93 Int_t MSoftwareTriggerCalc::Process() 94 94 { 95 const UInt_t nch = fRawEvt->GetNumPixels(); // HW Channels 96 const UInt_t npix = fSignal->GetNumPixels(); // Pixel in camera 97 95 98 const UShort_t *ids = fRawEvt->GetPixelIds(); 96 99 100 // FACT: Exclude time marker, FAMOUS take the whole range 97 101 const int beg = 10; 98 const int end = std::min(UInt_t(200), fSignal->GetNumSamples());102 const int end = npix==1440 ? std::min(UInt_t(200), fSignal->GetNumSamples()) : fSignal->GetNumSamples()-10; 99 103 const int num = end-beg; 100 104 … … 103 107 double avg = 0; 104 108 105 for (int hw=0; hw<1440; hw++) 106 { 107 // dead pixels 108 if (hw==927 || hw==80 || hw==873) // 3 109 for (int hw=0; hw<nch; hw++) 110 { 111 // The FAMOUS camera has less pixels than 112 // what is stored as channels in the file 113 if (ids[hw]>=npix) 109 114 continue; 110 // crazy pixels 111 if (hw==863 || hw==297 || hw==868) // 3 112 continue; 113 // broken DRS board 114 if (hw>=720 && hw<=728) // 9 115 continue; 116 // broken/suspicious bias channels 117 if ((hw>=171 && hw<=174) || (hw>=184 && hw<=188)) // 9 118 continue; 115 116 if (npix==1440) // FACT[1440] else FAMOUS[64] 117 { 118 // dead pixels 119 if (hw==927 || hw==80 || hw==873) // 3 120 continue; 121 // crazy pixels 122 if (hw==863 || hw==297 || hw==868) // 3 123 continue; 124 // broken DRS board 125 if (hw>=720 && hw<=728) // 9 126 continue; 127 // broken/suspicious bias channels 128 if ((hw>=171 && hw<=174) || (hw>=184 && hw<=188)) // 9 129 continue; 130 } 119 131 120 132 const Float_t *raw = fSignal->GetSamples(ids[hw]); … … 176 188 } 177 189 178 // Question: Should we also keep position and patch id? 179 180 avg /= (num-15)*(1440-24); 190 avg /= num-15; 191 avg /= npix==1440 ? 1440-24 : npix; 181 192 182 193 fTrigger->SetData(patch, avg, pos, max);
Note:
See TracChangeset
for help on using the changeset viewer.