Changeset 2298
- Timestamp:
- 08/01/03 14:44:13 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
r2296 r2298 78 78 #include "MCerPhotPix.h" 79 79 #include "MCerPhotEvt.h" 80 #include "MPedestalPix.h" 81 #include "MPedestalCam.h" 80 82 #include "MBlindPixels.h" 81 83 … … 122 124 return kFALSE; 123 125 } 126 fPed = (MPedestalCam*)pList->FindObject("MPedestalCam"); 127 if (!fEvt) 128 { 129 *fLog << err << dbginf << "MPedestalCam not found... aborting." << endl; 130 return kFALSE; 131 } 124 132 125 133 fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam"); … … 165 173 Double_t *nphot = new Double_t[entries]; 166 174 Double_t *perr = new Double_t[entries]; 175 Double_t *ped = new Double_t[entries]; 167 176 168 177 // … … 185 194 186 195 nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetNumPhotons() : 0; 187 perr[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetErrorPhot() : 0; 196 perr[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fPed)[idx].GetPedestalRms() : 0; 197 ped[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fPed)[idx].GetPedestal() : 0; 188 198 189 199 nphot[i] *= fGeomCam->GetPixRatio(idx); 190 // FIXME: perr[i] ??? 200 // FIXME? perr 201 // FIXME? ped 191 202 192 203 const Int_t n = gpix.GetNumNeighbors(); … … 199 210 200 211 const MCerPhotPix *evtpix = fEvt->GetPixById(nidx); 201 if (evtpix) 202 { 203 nphot[i] += evtpix->GetNumPhotons()*fGeomCam->GetPixRatio(nidx); 204 perr[i] += evtpix->GetErrorPhot(); 205 // FIXME: perr[i] ??? 206 num++; 207 } 212 if (!evtpix) 213 continue; 214 215 nphot[i] += evtpix->GetNumPhotons()*fGeomCam->GetPixRatio(nidx); 216 perr[i] += (*fPed)[nidx].GetPedestalRms(); 217 ped[i] += (*fPed)[nidx].GetPedestal(); 218 // FIXME? perr 219 // FIXME? ped 220 221 num++; 208 222 } 209 223 210 224 nphot[i] /= num*fGeomCam->GetPixRatio(idx); 211 225 perr[i] /= num/*FIXME:???*/; 226 ped[i] /= num/*FIXME:???*/; 212 227 } 213 228 … … 218 233 219 234 if (fPixels->IsBlind(pix.GetPixId())) 220 pix.Set(nphot[i], perr[i]); 235 { 236 pix.Set(nphot[i], -1); 237 (*fPed)[pix.GetPixId()].Set(ped[i], perr[i]); 238 } 221 239 } 222 240 223 241 delete nphot; 224 242 delete perr; 243 delete ped; 225 244 } 226 245 -
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h
r2274 r2298 11 11 12 12 class MGeomCam; 13 class MPedestal; 13 14 class MCerPhotEvt; 14 15 class MBlindPixels; 16 class MPedestalCam; 15 17 16 18 class MBlindPixelCalc : public MTask … … 20 22 MBlindPixels *fPixels; //! 21 23 MGeomCam *fGeomCam; //! 24 MPedestalCam *fPed; //! 22 25 23 26 TArrayS fPixelsIdx; // Pixel Indices for blind pixels, which are entered by the user. -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r2221 r2298 410 410 Int_t numcnts = 0; 411 411 412 Bool_t rc = kTRUE;412 Int_t rc = kTRUE; 413 413 if (maxcnt<0) 414 414 // process first and increment if sucessfull -
trunk/MagicSoft/Mars/mfileio/MRead.cc
r2296 r2298 52 52 } 53 53 54 Int_t MRead::AddFiles(MDirIter &files) 55 { 56 files.Reset(); 57 58 Int_t rc = 0; 59 60 TString str; 61 while (!(str=files.Next()).IsNull()) 62 { 63 const Int_t num = AddFile(str); 64 if (num<0) 65 *fLog << warn << "Warning: AddFile(\"" << str << "\") returned " << num << "... skipped." << endl; 66 else 67 rc += num; 68 } 69 70 return rc; 71 } 72 54 73 // -------------------------------------------------------------------------- 55 74 // … … 100 119 return i!=0; 101 120 } 102 103 Int_t MRead::AddFiles(MDirIter &next)104 {105 Int_t rc=0;106 TString n;107 while (!(n=next()).IsNull())108 {109 const Int_t num = AddFile(n);110 if (num>0)111 rc += num;112 }113 return rc;114 }115 -
trunk/MagicSoft/Mars/mfileio/MRead.h
r2296 r2298 24 24 25 25 virtual Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; } 26 Int_t AddFiles(MDirIter & next);26 Int_t AddFiles(MDirIter &dir); 27 27 28 28 Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2297 r2298 1077 1077 fNotify->ForEach(MCamEvent, DrawPixelContent)(idx); 1078 1078 } 1079 1080 UInt_t MHCamera::GetNumPixels() const 1081 { 1082 return fGeomCam->GetNumPixels(); 1083 } -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2297 r2298 144 144 void AddNotify(const MCamEvent &event) { fNotify->Add((TObject*)(&event)); } 145 145 146 Stat_t GetMean(Int_t axis) const; 147 Stat_t GetRMS(Int_t axis) const; 146 Stat_t GetMean(Int_t axis=-1) const; 147 Stat_t GetRMS(Int_t axis=-1) const; 148 149 UInt_t GetNumPixels() const; 148 150 149 151 //void SetStatusBar(TGStatusBar *bar) { fStatusBar = bar; } -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
r2265 r2298 142 142 } 143 143 144 void MHTriggerLvl0::PrintOutlayers(Float_t s) const 145 { 146 const Double_t mean = fSum->GetMean(); 147 const Double_t rms = fSum->GetRMS(); 148 149 *fLog << all << underline << GetDescriptor() << ": Mean=" << mean << ", Rms=" << rms << endl; 150 151 for (unsigned int i=0; i<fSum->GetNumPixels(); i++) 152 { 153 if (!fSum->IsUsed(i)) 154 continue; 155 156 if ((*fSum)[i+1]>mean+s*rms) 157 *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " > " << s << "*rms" << endl; 158 // if ((*fSum)[i+1]==0) 159 // *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " == 0" << endl; 160 // if ((*fSum)[i+1]<fSum->GetMean()-s*fSum->GetRMS()) 161 // *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " < " << s << "*rms" << endl; 162 } 163 } 164 144 165 TH1 *MHTriggerLvl0::GetHistByName(const TString name) 145 166 { … … 152 173 pad->SetBorderMode(0); 153 174 175 pad->Divide(1,2); 176 177 pad->cd(1); 178 gPad->SetBorderMode(0); 179 gPad->Divide(1,1); 180 gPad->cd(1); 181 gPad->SetBorderMode(0); 154 182 fSum->Draw(); 183 184 pad->cd(2); 185 gPad->SetBorderMode(0); 186 fSum->Draw("EPhist"); 155 187 } -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
r2229 r2298 36 36 void Draw(Option_t * =""); 37 37 38 void PrintOutlayers(Float_t s) const; 39 38 40 ClassDef(MHTriggerLvl0, 1) // Histogram to count how often a pixel is above threshold 39 41 };
Note:
See TracChangeset
for help on using the changeset viewer.