Changeset 1127 for trunk


Ignore:
Timestamp:
12/18/01 17:51:08 (23 years ago)
Author:
blanch
Message:
Remove fNumLoGainFadcSlices and fNumHiGainFadcSlices members and it has been
fixed a bug in the convention of Pedestals and Pedestals fluctuations (it did
not affect previous result since the bug was done twice).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1108 r1127  
    8383Bool_t MCerPhotCalc::PreProcess(MParList *pList)
    8484{
    85     MRawRunHeader *RunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    86     if (!RunHeader)
     85    fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
     86    if (!fRunHeader)
    8787    {
    8888        *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;
    8989        return kFALSE;
    9090    }
    91     fNumLoGainFadcSlices= RunHeader->GetNumSamplesLoGain();
    92     fNumHiGainFadcSlices= RunHeader->GetNumSamplesHiGain();
    9391
    9492    fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
     
    133131        Float_t nphot = (Float_t)pixel.GetSumHiGainSamples();
    134132
    135         if(nphot>0) nphot -= fNumHiGainFadcSlices*ped.GetMean();
     133        // We check that the pixel is not empty, if it is empty
     134        // we won't substract the pedestal. Empty means that it has
     135        // 0 signal in all the slices.
    136136
    137         fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fNumHiGainFadcSlices)*ped.GetMeanRms());
     137        if(nphot!=0) nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean();
     138
     139        fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fRunHeader->GetNumSamplesHiGain())*ped.GetSigma());
    138140
    139141        // FIXME! Handling of Lo Gains is missing!
     
    144146    return kTRUE;
    145147}
     148
Note: See TracChangeset for help on using the changeset viewer.