Changeset 2377 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 10/04/03 12:47:13 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r2300 r2377 19 19 #pragma link C++ class MMcPedestalCopy+; 20 20 #pragma link C++ class MMcPedestalNSBAdd+; 21 #pragma link C++ class MGeomApply+; 21 22 22 23 #pragma link C++ class MHadronness+; -
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
r2298 r2377 303 303 fPixels->Clear(); 304 304 305 if (!fGeomCam->InheritsFrom("MGeomCamMagic")) 306 { 307 *fLog << warn << "MBlindPixelCalc::ReInit: Warning - Starfield only implemented for Magic standard Camera... no action." << endl; 308 return kTRUE; 309 } 310 305 311 // 306 312 // Set as blind some particular pixels because of a particular -
trunk/MagicSoft/Mars/manalysis/MBlindPixels.h
r1967 r2377 21 21 void AdoptPixels(Char_t pixels[577]) { fPixels.Adopt(577, pixels); } 22 22 23 void AdoptPixels(const TArrayC &pixels) { fPixels = pixels; } 24 23 25 void Clear(Option_t *o="") { fPixels.Reset(); } 24 26 25 27 Bool_t IsBlind(UShort_t id) const { return fPixels.GetSize() && ((TArrayC)fPixels)[id]; } 28 29 void InitSize(UShort_t i) { fPixels.Set(i); } 26 30 27 31 ClassDef(MBlindPixels, 1) // container to store blind pixels -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r2350 r2377 48 48 #include "MLogManip.h" 49 49 50 #include "MGeomCam.h" 50 51 #include "MMcRunHeader.hxx" 51 52 … … 174 175 void MCerPhotCalc::ScalePedestals() 175 176 { 176 Int_t n = 577; //FIXME: fPedestals->GetNumPixel();177 const Int_t n = fPedestals->GetSize(); 177 178 178 179 for (int idx=0; idx<n; idx++) … … 186 187 const Double_t offset = fEnableFix ? ped.GetPedestal()-0.5 : ped.GetPedestal(); 187 188 188 ped.Set(offset*fSumWeights, 189 ped.GetPedestalRms()*fSumQuadWeights); 189 ped.Set(offset*fSumWeights, ped.GetPedestalRms()*fSumQuadWeights); 190 190 } 191 191 … … 205 205 // ScalePedestals(); 206 206 207 const Int_t n = fWeight.GetSize(); 208 207 209 MRawEvtPixelIter pixel(fRawEvt); 208 210 209 Int_t SaturatedPixels = 0;211 Int_t saturatedpixels = 0; 210 212 211 213 while (pixel.Next()) 212 214 { 213 215 const UInt_t idx = pixel.GetPixelId(); 214 MPedestalPix &ped = (*fPedestals)[idx];215 216 216 // 217 217 // sanity check (old MC files sometimes have pixids>577) … … 219 219 if (!fPedestals->CheckBounds(idx)) 220 220 { 221 *fLog << inf << "Pixel Index larger than camera... skipping event." << endl;221 *fLog << inf << "Pixel Index out of MPedestalCam bounds... skipping event." << endl; 222 222 return kCONTINUE; 223 } 223 } 224 225 MPedestalPix &ped = (*fPedestals)[idx]; 224 226 225 227 // … … 230 232 Int_t i; 231 233 Double_t nphot = 0; 232 for (i=0; i< fWeight.GetSize(); i++)234 for (i=0; i<n; i++) 233 235 { 234 236 if (ptr[i]==0xff) … … 237 239 } 238 240 239 Bool_t SaturatedLG= kFALSE;240 241 if (i< fWeight.GetSize())241 Bool_t saturatedlg = kFALSE; 242 243 if (i<n) 242 244 { 243 245 nphot = 0; … … 250 252 } 251 253 252 for (i=0; i< fWeight.GetSize(); i++)254 for (i=0; i<n; i++) 253 255 { 254 255 SaturatedLG= kTRUE;256 257 256 if (ptr[i]==0xff) 257 saturatedlg = kTRUE; 258 259 nphot += ptr[i]*fWeight[i]; 258 260 } 259 261 … … 266 268 fCerPhotEvt->AddPixel(idx, nphot, 0); 267 269 268 if (SaturatedLG) 269 SaturatedPixels ++; 270 } 271 272 switch(SaturatedPixels) 273 { 274 case 0: 275 break; 276 case 1: 277 *fLog << warn << "WARNING: 1 pixel had saturating low gains..." << endl; 278 break; 279 default: 280 *fLog << warn << "WARNING: " << SaturatedPixels << " pixels had saturating low gains..." << endl; 281 break; 282 } 283 270 if (saturatedlg) 271 saturatedpixels++; 272 } 273 274 if (saturatedpixels>0) 275 *fLog << warn << "WARNING: " << saturatedpixels << " pixel(s) had saturating low gains..." << endl; 284 276 285 277 fCerPhotEvt->FixSize(); -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r2237 r2377 126 126 return kFALSE; 127 127 128 const int num = fMcPed->GetNumPixel(); 129 130 fPedCam->InitSize(num); 128 const int num = fPedCam->GetSize(); 131 129 132 130 for (int i=0; i<num; i++) -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
r2237 r2377 207 207 return kFALSE; 208 208 209 const int num = fFadc->GetNumPixel(); 210 211 fPedCam->InitSize(num); 209 const int num = fPedCam->GetSize(); 212 210 213 211 for (int i=0; i<num; i++) -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc
r2244 r2377 53 53 fTitle = title ? title : "Storage container for all Pedestal Information in the camera"; 54 54 55 fArray = new TClonesArray("MPedestalPix", 577);55 fArray = new TClonesArray("MPedestalPix", 1); 56 56 57 for (int i=0; i<577; i++)58 new ((*fArray)[i]) MPedestalPix;57 // for (int i=0; i<577; i++) 58 // new ((*fArray)[i]) MPedestalPix; 59 59 } 60 60 -
trunk/MagicSoft/Mars/manalysis/Makefile
r2300 r2377 35 35 MMcPedestalCopy.cc \ 36 36 MMcPedestalNSBAdd.cc \ 37 MGeomApply.cc \ 37 38 MCurrents.cc \ 38 39 MEnergyEst.cc \
Note:
See TracChangeset
for help on using the changeset viewer.