Changeset 1965 for trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
- Timestamp:
- 04/19/03 18:39:05 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r1715 r1965 27 27 28 28 #include <math.h> 29 #include <limits.h> 29 30 #include <fstream.h> 30 31 … … 120 121 { 121 122 const MCerPhotPix &pix = (*this)[i]; 123 if (!pix.IsPixelUsed()) 124 continue; 122 125 123 126 if (id == pix.GetPixId() && pix.IsPixelUsed()) … … 139 142 { 140 143 const MCerPhotPix &pix = (*this)[i]; 144 if (!pix.IsPixelUsed()) 145 continue; 141 146 142 147 if (id == pix.GetPixId() && pix.IsPixelCore()) … … 160 165 const UInt_t n = geom->GetNumPixels(); 161 166 162 Float_t minval = (*this)[0].GetNumPhotons(); 163 164 for (UInt_t i=1; i<fNumPixels; i++) 165 { 166 const MCerPhotPix &pix = (*this)[i]; 167 Float_t minval = FLT_MAX; 168 169 for (UInt_t i=1; i<fNumPixels; i++) 170 { 171 const MCerPhotPix &pix = (*this)[i]; 172 if (!pix.IsPixelUsed()) 173 continue; 167 174 168 175 const UInt_t id = pix.GetPixId(); … … 195 202 const UInt_t n = geom->GetNumPixels(); 196 203 197 Float_t maxval = (*this)[0].GetNumPhotons(); 198 199 for (UInt_t i=1; i<fNumPixels; i++) 200 { 201 const MCerPhotPix &pix = (*this)[i]; 204 Float_t maxval = -FLT_MAX; 205 206 for (UInt_t i=1; i<fNumPixels; i++) 207 { 208 const MCerPhotPix &pix = (*this)[i]; 209 if (!pix.IsPixelUsed()) 210 continue; 202 211 203 212 const UInt_t id = pix.GetPixId(); … … 229 238 { 230 239 const MCerPhotPix &pix = (*this)[i]; 240 if (!pix.IsPixelUsed()) 241 continue; 231 242 232 243 Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot(); … … 247 258 return -5.; 248 259 249 Float_t maxval = (*this)[0].GetNumPhotons()/(*this)[0].GetErrorPhot(); 250 251 for (UInt_t i=1; i<fNumPixels; i++) 252 { 253 const MCerPhotPix &pix = (*this)[i]; 260 Float_t maxval = -FLT_MAX; 261 262 for (UInt_t i=1; i<fNumPixels; i++) 263 { 264 const MCerPhotPix &pix = (*this)[i]; 265 if (!pix.IsPixelUsed()) 266 continue; 254 267 255 268 Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot(); … … 272 285 return 50.; 273 286 274 Float_t minval = (*this)[0].GetErrorPhot(); 275 276 for (UInt_t i=1; i<fNumPixels; i++) 277 { 278 const MCerPhotPix &pix = (*this)[i]; 287 Float_t minval = FLT_MAX; 288 289 for (UInt_t i=1; i<fNumPixels; i++) 290 { 291 const MCerPhotPix &pix = (*this)[i]; 292 if (!pix.IsPixelUsed()) 293 continue; 279 294 280 295 Float_t testval = pix.GetErrorPhot(); … … 300 315 return 50.; 301 316 302 Float_t maxval = (*this)[0].GetErrorPhot(); 303 304 for (UInt_t i=1; i<fNumPixels; i++) 305 { 306 const MCerPhotPix &pix = (*this)[i]; 317 Float_t maxval = -FLT_MAX; 318 319 for (UInt_t i=1; i<fNumPixels; i++) 320 { 321 const MCerPhotPix &pix = (*this)[i]; 322 if (!pix.IsPixelUsed()) 323 continue; 307 324 308 325 Float_t testval = pix.GetErrorPhot(); … … 368 385 } 369 386 */ 387 388 void MCerPhotEvt::Scale(Double_t f) 389 { 390 fPixels->ForEach(MCerPhotPix, Scale)(f); 391 }
Note:
See TracChangeset
for help on using the changeset viewer.