Changeset 1180 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 01/15/02 11:48:08 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MBlindPixels.cc
r1148 r1180 23 23 \* ======================================================================== */ 24 24 25 ///////////////////////////////////////////////////////////////////////////// 26 // // 27 // MBlindPixel // 28 // // 29 // If you want to exclude pixels from the analysis (eg. hillas parameter // 30 // calculation) you can use this container to switch off the pixels by Id // 31 // // 32 ///////////////////////////////////////////////////////////////////////////// 25 33 #include "MBlindPixels.h" 26 34 … … 45 53 // ------------------------------------------------------------------------- 46 54 // 47 // We add information of blind (c!=0) or not (c=0) for the pixel i 55 // If you don't want to use pixel with Id id call 56 // SetPixelBlind(id, kTRUE) 57 // otherwise 58 // SetPixelBlind(id, kFALSE) 48 59 // 49 60 void MBlindPixels::SetPixelBlind(UShort_t id, Bool_t val) -
trunk/MagicSoft/Mars/manalysis/MBlindPixels.h
r1148 r1180 25 25 Bool_t IsBlind(UShort_t id) { return (Bool_t)fPixels[id]; } 26 26 27 ClassDef(MBlindPixels, 1) // container of Blind pixels27 ClassDef(MBlindPixels, 1) // container to store blind pixels 28 28 }; 29 29 -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r1145 r1180 124 124 while (pixel.Next()) 125 125 { 126 127 UInt_t pixid = pixel.GetPixelId(); 126 const UInt_t pixid = pixel.GetPixelId(); 128 127 129 128 const MPedestalPix &ped = (*fPedestals)[pixid]; 130 129 131 130 // 132 // sanity check 131 // sanity check (old MC files sometimes have pixids>577) 133 132 // 134 if (!fPedestals->CheckBounds(pixid)){ 135 *fLog<<inf<<"Pixel ID larger than camera ... Skip the event"<<endl; 133 if (!fPedestals->CheckBounds(pixid)) 134 { 135 *fLog << inf << "Pixel ID larger than camera... skipping event." << endl; 136 136 return kCONTINUE; 137 137 } … … 139 139 Float_t nphot = (Float_t)pixel.GetSumHiGainSamples(); 140 140 141 // 141 142 // We check that the pixel is not empty, if it is empty 142 143 // we won't substract the pedestal. Empty means that it has 143 144 // 0 signal in all the slices. 144 145 if(nphot!=0) nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean(); 145 // 146 if (nphot!=0) 147 nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean(); 146 148 147 149 fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fRunHeader->GetNumSamplesHiGain())*ped.GetSigma()); -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.h
r1132 r1180 1 1 #ifndef MARS_MMcPedestalCopy 2 2 #define MARS_MMcPedestalCopy 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MMcPedestalCopy //7 // //8 // This task copies the pedestals from the MC data into the corresponding //9 // MARS Container (MPedestals). This seems to be overdone, but at this //10 // point you have a standard interface to access the pedestals //11 // (MPedestals), which makes it possible that from now on all pedestals //12 // can be treated in the same way //13 // //14 /////////////////////////////////////////////////////////////////////////////15 3 16 4 #ifndef MARS_MTask -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
r1174 r1180 38 38 // slice: // 39 39 // // 40 // Y=sqrt(X*FADC_time/Number_of_slice*pixel_size)*Amp_single_phe_response // 40 // Y = sqrt(X * FADC_time / Number_of_slices * pixel_size) // 41 // * Amp_single_phe_response // 41 42 // // 42 43 // Input Containers: // … … 81 82 // RunHeader tree the auto scheme is disabled by default 82 83 // 83 AddToBranchList(" fPedesMean");84 AddToBranchList(" fElecNoise");84 AddToBranchList("MMcFadcHeader.fPedesMean"); 85 AddToBranchList("MMcFadcHeader.fElecNoise"); 85 86 } 86 87 … … 105 106 // -------------------------------------------------------------------------- 106 107 // 107 // The PreProcess does nothing since the process does not exist and 108 // therefore it does not need any pointer or files already initialysed 109 108 // - check whether we have a monte carlo file. if not skip this task 109 // - try to get MMcFadcHeader, MGeomCam and MPedestalCam from the parameter 110 // list 111 // - try to find a MMcRunHeader, too 112 // 110 113 Bool_t MMcPedestalNSBAdd::PreProcess(MParList *pList) 111 114 { 112 113 // FIX ME , ReInit should be called automatically. When it is114 // implemented then this line should be removed.115 116 115 if (!CheckRunType(pList)) 117 116 { … … 149 148 } 150 149 150 // -------------------------------------------------------------------------- 151 // 152 // If a MMcRunHeader is available the DNSB MMcRunHeader::GetNumPheFromDNSB 153 // is returned. Otherwise the user given number is used. 154 // 151 155 Float_t MMcPedestalNSBAdd::GetDnsb(MParList *pList) const 152 156 { … … 206 210 for (int i=0; i<num; i++) 207 211 { 208 MPedestalPix &pix = (*fPedCam)[i];209 MGeomPix&pixgeom = (*fGeom)[i];210 211 const Float_t pedrms 212 const Float_t size 213 214 const Float_t ampl 212 MPedestalPix &pix = (*fPedCam)[i]; 213 const MGeomPix &pixgeom = (*fGeom)[i]; 214 215 const Float_t pedrms = pix.GetSigma(); 216 const Float_t size = pixgeom.GetR()*pixgeom.GetR()/size0; 217 218 const Float_t ampl = fFadc->GetAmplitud(); 215 219 216 220 pix.SetSigma(sqrt(pedrms*pedrms + dnsbpix*ampl*ampl*size)); -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.h
r1132 r1180 1 1 #ifndef MARS_MMcPedestalNSBAdd 2 2 #define MARS_MMcPedestalNSBAdd 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MMcPedestalNSBAdd //7 // //8 // This task adds the contribution to pedestal rms from the NSB in the //9 // MARS Container (MPedestals). //10 // //11 /////////////////////////////////////////////////////////////////////////////12 3 13 4 #ifndef MARS_MTask … … 22 13 { 23 14 private: 24 MMcFadcHeader *fFadc;25 15 const MGeomCam *fGeom; 26 MPedestalCam *fPedCam; 16 MMcFadcHeader *fFadc; 17 MPedestalCam *fPedCam; 27 18 28 19 Float_t fDnsbPixel;
Note:
See TracChangeset
for help on using the changeset viewer.