Changeset 8279 for trunk/MagicSoft/Mars
- Timestamp:
- 01/30/07 14:16:45 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8278 r8279 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2007/01/30 Thomas Bretz 22 23 * mbadpixels/MBadPixelsCam.[h,cc]: 24 - added function to return the uncalibrated and unsuitable 25 pixels as TArrayC (to be used in MHCamera) 26 27 * mhcalib/MHCalibrationChargeCam.cc: 28 - added a FIXME-comment 29 30 * mhist/MHCamEvent.[h,cc]: 31 - added an option to change the kind of error which is displayed 32 - consequently increased version number by 1 33 34 * mhist/MHCamera.[h,cc]: 35 - added a new bit to allow the error to be switched between 36 mean and spread 37 38 20 39 21 40 2007/01/27 Thomas Bretz -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
r8165 r8279 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.cc,v 1.48 2007-01-30 14:16:44 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 17 19 ! 18 20 ! Author(s): Thomas Bretz 1/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 21 ! Author(s): Markus Gaug 3/2004 <mailto:markus@ifae.es> 20 22 ! 21 23 ! Copyright: MAGIC Software Development, 2000-2004 … … 36 38 #include <iostream> 37 39 40 #include <TArrayC.h> 38 41 #include <TClonesArray.h> 39 42 … … 525 528 PrintBadPixels(MBadPixelsPix::kRelTimeOscillating ,"Relative Arr. Times Oscillation"); 526 529 PrintBadPixels(MBadPixelsPix::kDeviatingFFactor ,"Deviating global F-Factor"); 530 } 531 532 TArrayC MBadPixelsCam::GetUnsuitable(MBadPixelsPix::UnsuitableType_t typ) const 533 { 534 TArrayC rc(GetSize()); 535 536 for (Int_t i=0; i<rc.GetSize(); i++) 537 rc[i] = (*this)[i].IsUnsuitable(typ) ? 0 : 1; 538 539 return rc; 540 } 541 542 TArrayC MBadPixelsCam::GetUncalibrated(MBadPixelsPix::UncalibratedType_t typ) const 543 { 544 TArrayC rc(GetSize()); 545 546 for (Int_t i=0; i<rc.GetSize(); i++) 547 rc[i] = (*this)[i].IsUncalibrated(typ) ? 0 : 1; 548 549 return rc; 527 550 } 528 551 -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h
r8149 r8279 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.h,v 1.11 2007-01-30 14:16:44 tbretz Exp $ 3 \* ======================================================================== */ 1 4 #ifndef MARS_MBadPixelsCam 2 5 #define MARS_MBadPixelsCam … … 9 12 #endif 10 13 14 class TArrayC; 15 class TClonesArray; 16 11 17 class MGeomPix; 12 class TClonesArray;13 18 14 19 class MBadPixelsCam : public MParContainer, public MCamEvent … … 50 55 Short_t GetNumMaxCluster(const MGeomCam &geom, Int_t aidx=-1) { return GetNumMaxCluster(MBadPixelsPix::kUnsuitableRun, geom, aidx); } 51 56 57 TArrayC GetUnsuitable(MBadPixelsPix::UnsuitableType_t typ=MBadPixelsPix::kUnsuitable) const; 58 TArrayC GetUncalibrated(MBadPixelsPix::UncalibratedType_t typ) const; 59 52 60 void AsciiRead(istream &fin); 53 61 Bool_t AsciiWrite(ostream &out) const; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r8243 r8279 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.4 8 2007-01-11 14:14:37tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.49 2007-01-30 14:16:45 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 1142 1142 const Float_t upperlimit = (Float_t)last ;// - fTimeUpperLimit; 1143 1143 1144 // FIXME: instead of checking whether the maximum is in the first or 1145 // last extracted slice we should check whether the extractor 1146 // was able to properly extract the signal!!! 1147 1144 1148 if (mean<lowerlimit) 1145 1149 { -
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r7832 r8279 90 90 // 91 91 MHCamEvent::MHCamEvent(const char *name, const char *title) 92 : fSum(NULL), fEvt(NULL), fType(0), f Threshold(0), fUseThreshold(0)92 : fSum(NULL), fEvt(NULL), fType(0), fErrorSpread(kTRUE), fThreshold(0), fUseThreshold(0) 93 93 { 94 94 Init(name, title); … … 100 100 // 101 101 MHCamEvent::MHCamEvent(Int_t type, const char *name, const char *title) 102 : fSum(NULL), fEvt(NULL), fType(type), f Threshold(0), fUseThreshold(0)102 : fSum(NULL), fEvt(NULL), fType(type), fErrorSpread(kTRUE), fThreshold(0), fUseThreshold(0) 103 103 { 104 104 Init(name, title); … … 156 156 fSum->SetYTitle("a.u."); 157 157 fSum->SetBit(MHCamera::kProfile); 158 if (!fErrorSpread) 159 fSum->SetBit(MHCamera::kErrorMean); 158 160 159 161 fSum->SetXTitle("Pixel Idx"); … … 282 284 MHCamera *cam = new MHCamera(*fSum->GetGeometry()); 283 285 cam->SetName(Form("%s;err", fName.Data())); 284 cam->SetTitle( "Sqrt(Variance)");286 cam->SetTitle(fErrorSpread?"Sqrt(Variance)":"Sqrt(Variance)/Sqrt(n_{i})"); 285 287 cam->SetYTitle(fSum->GetYaxis()->GetTitle()); 286 288 cam->SetCamContent(*fSum, 1); -
trunk/MagicSoft/Mars/mhist/MHCamEvent.h
r7035 r8279 23 23 24 24 Int_t fType; // Type to used for calling GetPixelContent 25 Bool_t fErrorSpread; // kFALSE==mean, kTRUE==spread 25 26 26 27 Float_t fThreshold; // Count pixel above/below this threshold … … 51 52 52 53 void SetThreshold(Float_t f=0, Char_t direction=kIsLowerBound) { fThreshold = f; fUseThreshold=direction; } 54 void SetErrorSpread(Bool_t b=kTRUE) { fErrorSpread = b; } 53 55 54 ClassDef(MHCamEvent, 1) // Histogram to sum camera events56 ClassDef(MHCamEvent, 2) // Histogram to sum camera events 55 57 }; 56 58 -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r8106 r8279 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.9 5 2006-10-17 17:16:00tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.96 2007-01-30 14:16:45 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 1333 1333 } 1334 1334 1335 // ------------------------------------------------------------------------ 1336 // 1337 // In the case the kProfile flag is set the spread of the bin is returned. 1338 // If you want to have the mean error instead set the kErrorMean bit via 1339 // SetBit(kErrorMean) first. 1340 // 1335 1341 Stat_t MHCamera::GetBinError(Int_t bin) const 1336 1342 { … … 1346 1352 const Double_t val = fArray[bin] / n; 1347 1353 1348 return sqr>val*val ? TMath::Sqrt(sqr - val*val) / n : 0; 1354 const Double_t spread = sqr>val*val ? TMath::Sqrt(sqr - val*val); 1355 1356 return TestBit(kErrorMean) ? spread/TMath::Sqrt(n) : spread; 1349 1357 1350 1358 /*
Note:
See TracChangeset
for help on using the changeset viewer.