Changeset 5031 for trunk/MagicSoft
- Timestamp:
- 09/15/04 15:31:22 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5030 r5031 69 69 - simply calls to IntensityCam somewhat 70 70 71 * mcalib/MCalibrationBlindCam.[h,cc] 72 - added function GetFluxInsidePlexiglass() and variances 71 73 72 74 -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindCam.cc
r5019 r5031 106 106 } 107 107 108 // -------------------------------------------------------------------------- 109 // 110 // Return true, if any of the blind pixels have an available photon flux 111 // 112 Bool_t MCalibrationBlindCam::IsFluxInsidePlexiglassAvailable() const 113 { 114 for (Int_t i=0; i<GetSize(); i++) 115 { 116 MCalibrationBlindPix &bp = (MCalibrationBlindPix&)(*this)[i]; 117 if (bp.IsFluxInsidePlexiglassAvailable()) 118 return kTRUE; 119 } 120 121 return kFALSE; 122 } 108 123 124 // -------------------------------------------------------------------------- 125 // 126 // Returns weighted average of the flux calculated by each blind pixel 127 // 128 Float_t MCalibrationBlindCam::GetFluxInsidePlexiglass() const 129 { 130 131 Float_t flux = 0.; 132 Float_t fluxvar = 0.; 133 134 for (Int_t i=0; i<GetSize(); i++) 135 { 136 MCalibrationBlindPix &bp = (MCalibrationBlindPix&)(*this)[i]; 137 if (bp.IsFluxInsidePlexiglassAvailable()) 138 { 139 const Float_t weight = 1./ 140 bp.GetFluxInsidePlexiglassErr() 141 / bp.GetFluxInsidePlexiglassErr(); 142 flux += weight * bp.GetFluxInsidePlexiglass(); 143 fluxvar += weight; 144 } 145 } 146 return fluxvar > 0.0001 ? flux / fluxvar : -1.; 147 } 148 149 // -------------------------------------------------------------------------- 150 // 151 // Returns weighted variance of the flux calculated by each blind pixel 152 // 153 Float_t MCalibrationBlindCam::GetFluxInsidePlexiglassVar() const 154 { 155 156 Float_t fluxvar = 0.; 157 158 for (Int_t i=0; i<GetSize(); i++) 159 { 160 MCalibrationBlindPix &bp = (MCalibrationBlindPix&)(*this)[i]; 161 if (bp.IsFluxInsidePlexiglassAvailable()) 162 { 163 const Float_t weight = 1./ 164 bp.GetFluxInsidePlexiglassErr() 165 / bp.GetFluxInsidePlexiglassErr(); 166 fluxvar += weight; 167 } 168 } 169 return fluxvar > 0.0001 ? 1. / fluxvar : -1.; 170 } 171 172 // -------------------------------------------------------------------------- 173 // 174 // Returns weighted rel. variance of the flux calculated by each blind pixel 175 // 176 Float_t MCalibrationBlindCam::GetFluxInsidePlexiglassRelVar() const 177 { 178 179 Float_t flux = 0.; 180 Float_t fluxvar = 0.; 181 182 for (Int_t i=0; i<GetSize(); i++) 183 { 184 MCalibrationBlindPix &bp = (MCalibrationBlindPix&)(*this)[i]; 185 if (bp.IsFluxInsidePlexiglassAvailable()) 186 { 187 const Float_t weight = 1./ 188 bp.GetFluxInsidePlexiglassErr() 189 / bp.GetFluxInsidePlexiglassErr(); 190 flux += weight * bp.GetFluxInsidePlexiglass(); 191 fluxvar += weight; 192 } 193 } 194 195 return fluxvar > 0.0001 ? flux * fluxvar : -1.; 196 } 197 198 -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindCam.h
r5018 r5031 12 12 void Add(const UInt_t a, const UInt_t b); 13 13 14 14 public: 15 15 16 16 MCalibrationBlindCam(Int_t nblind=1,const char *name=NULL, const char *title=NULL); … … 21 21 void Init ( const MGeomCam &geom ) {} 22 22 void InitSize ( const UInt_t n ); 23 24 Bool_t IsFluxInsidePlexiglassAvailable () const; 25 26 Float_t GetFluxInsidePlexiglass () const; 27 Float_t GetFluxInsidePlexiglassVar () const; 28 Float_t GetFluxInsidePlexiglassRelVar() const; 23 29 24 30 ClassDef(MCalibrationBlindCam, 2) // Container Blind Pixels Calibration Results Camera
Note:
See TracChangeset
for help on using the changeset viewer.