Ignore:
Timestamp:
07/15/02 20:35:15 (22 years ago)
Author:
bigongia
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
2 edited

Legend:

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

    r1399 r1404  
    3333//                                                                          //
    3434//  Input Containers:                                                       //
    35 //   MRawEvtData, MPedesdtalCam                                             //
     35//   MRawEvtData, MPedestalCam                                             //
    3636//                                                                          //
    3737//  Output Containers:                                                      //
     
    5858ClassImp(MCerPhotCalc2);
    5959
    60 const Float_t fWeight[15] ={0, 0.0809835, 0.289593, 0.366926, 0.211665, 0.0508328, 0., 0., 0., 0., 0., 0., 0., 0., 0.};
    61 
    62 Float_t SumQuadWeights, SumWeights;
    63 
    64 
    6560// --------------------------------------------------------------------------
    6661//
     
    7772    AddToBranchList("MRawEvtData.fLoGainFadcSamples");
    7873
    79     SumQuadWeights = SumWeights = 0.;
     74    fSumQuadWeights = fSumWeights = 0.;
    8075    for (Int_t i = 0; i < 15; i++)
    8176      {
    82         SumQuadWeights += pow(fWeight[i],2.);
    83         SumWeights += fWeight[i];
     77        fSumQuadWeights += fWeight[i]*fWeight[i];
     78        fSumWeights += fWeight[i];
    8479      }
    85     SumQuadWeights = sqrt(SumQuadWeights);
     80    fSumQuadWeights = sqrt(fSumQuadWeights);
    8681
    8782}
     
    204199        //
    205200        if (nphot!=0)
    206           nphot -= mean*SumWeights;
    207 
    208         Float_t nphoterr = ped.GetSigma()* SumQuadWeights;
     201          nphot -= mean*fSumWeights;
     202
     203        Float_t nphoterr = ped.GetSigma()* fSumQuadWeights;
    209204
    210205        fCerPhotEvt->AddPixel(pixid, nphot, nphoterr);
     
    217212    return kTRUE;
    218213}
     214
     215Float_t MCerPhotCalc2::fWeight[15] = {0, 0.0809835, 0.289593, 0.366926, 0.211665, 0.0508328, 0., 0., 0., 0., 0., 0., 0., 0., 0.};
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc2.h

    r1399 r1404  
    2222class MCerPhotCalc2 : public MTask
    2323{
    24     MPedestalCam  *fPedestals;  // Pedestals of all pixels in the camera
    25     MRawEvtData   *fRawEvt;     // raw event data (time slices)
    26     MCerPhotEvt   *fCerPhotEvt; // Cerenkov Photon Event used for calculation
    27     MRawRunHeader *fRunHeader;  //  RunHeader information
     24    MPedestalCam   *fPedestals;  // Pedestals of all pixels in the camera
     25    MRawEvtData    *fRawEvt;     // raw event data (time slices)
     26    MCerPhotEvt    *fCerPhotEvt; // Cerenkov Photon Event used for calculation
     27    MRawRunHeader  *fRunHeader;  //  RunHeader information
    2828 
    29     Bool_t         fEnableFix;  // fix for a bug in files from older camera versions (<=40)
     29    Bool_t          fEnableFix;  // fix for a bug in files from older camera versions (<=40)
    3030
     31    Float_t         fSumQuadWeights, fSumWeights;
     32    static Float_t  fWeight[15];
    3133
    3234public:
     
    4143};
    4244
     45
    4346#endif
Note: See TracChangeset for help on using the changeset viewer.