Ignore:
Timestamp:
01/14/02 17:34:02 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
2 edited

Legend:

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

    r1131 r1172  
    2626//                                                                         //
    2727//  MMcPedestalCopy                                                        //
     28//                                                                         //
    2829//  This task looks for the ìnformation about FADC pedestals in            //
    2930//  MMcFadcHeader and translates it to the pedestal values in              //
     
    6465}
    6566
     67// --------------------------------------------------------------------------
     68//
     69// Check for the run type. Return kTRUE if it is a MC run or if there
     70// is no MC run header (old camera files) kFALSE in case of a different
     71// run type
     72//
    6673Bool_t MMcPedestalCopy::CheckRunType(MParList *pList) const
    6774{
     
    7683}
    7784
     85// --------------------------------------------------------------------------
     86//
     87// Check runtype and search for MPedestalCam and MMcFadcHeader.
     88// If the runtype check fails the task is removed from the task list.
     89//
    7890Bool_t MMcPedestalCopy::PreProcess(MParList *pList)
    7991{
     
    99111}
    100112
     113// --------------------------------------------------------------------------
     114//
     115// Check for the runtype. (not yet: If the check fails the eventloop is
     116// stopped.)
     117// Initialize the size of MPedestalCam to the number of pixels from
     118// MMcFadcHeader.
     119//
    101120Bool_t MMcPedestalCopy::ReInit(MParList *pList)
    102121{
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r1132 r1172  
    3333//  MPedestalCam the NSB contribution.                                     //
    3434//  The number of photons from the diffuse NSB follows a poisson           //
    35 //  distribution with expected mean value X, then its standard desviation  //
     35//  distribution with expected mean value X, then its standard deviation   //
    3636//  is sqrt(X).                                                            //
    3737//  X is the number of phe per ns so we have to convert in FADC counts per //
     
    8585}
    8686
     87// --------------------------------------------------------------------------
     88//
     89// Check for the run type. Return kTRUE if it is a MC run or if there
     90// is no MC run header (old camera files) kFALSE in case of a different
     91// run type
     92//
    8793Bool_t MMcPedestalNSBAdd::CheckRunType(MParList *pList) const
    8894{
     
    141147
    142148    return kTRUE;
     149}
     150
     151Float_t MMcPedestalNSBAdd::GetDnsb(MParList *pList) const
     152{
     153    MMcRunHeader *mcrunheader = (MMcRunHeader*)pList->FindObject("MMcRunHeader");
     154    if (!mcrunheader && fDnsbPixel < 0 )
     155    {
     156        *fLog << err << dbginf << "Using the default argument of MMcPedestalNSB::MMcPedestalNSB() ";
     157        *fLog << "only allowed if MMcRunHeader is available... aborting." << endl;
     158        return -1;
     159    }
     160
     161    if (!mcrunheader)
     162        return fDnsbPixel;
     163
     164    if (fDnsbPixel >= 0 && fDnsbPixel != mcrunheader->GetNumPheFromDNSB())
     165    {
     166        *fLog << warn << dbginf << "The MC file has been generated with diffuse nsb " << mcrunheader->GetNumPheFromDNSB();
     167        *fLog <<" but you set up the diffuse NSB to " << fDnsbPixel << endl;
     168
     169        return fDnsbPixel;
     170    }
     171
     172    return mcrunheader->GetNumPheFromDNSB();
    143173}
    144174
     
    158188//   - MPedestalCam
    159189//
    160 Float_t MMcPedestalNSBAdd::GetDnsb(MParList *pList) const
    161 {
    162     MMcRunHeader *mcrunheader = (MMcRunHeader*)pList->FindObject("MMcRunHeader");
    163     if (!mcrunheader && fDnsbPixel < 0 )
    164     {
    165         *fLog << err << dbginf << "Using the default argument of MMcPedestalNSB::MMcPedestalNSB() ";
    166         *fLog << "only allowed if MMcRunHeader is available... aborting." << endl;
    167         return -1;
    168     }
    169 
    170     if (!mcrunheader)
    171         return fDnsbPixel;
    172 
    173     if (fDnsbPixel >= 0 && fDnsbPixel != mcrunheader->GetNumPheFromDNSB())
    174     {
    175         *fLog << warn << dbginf << "The MC file has been generated with diffuse nsb " << mcrunheader->GetNumPheFromDNSB();
    176         *fLog <<" but you set up the diffuse NSB to " << fDnsbPixel << endl;
    177 
    178         return fDnsbPixel;
    179     }
    180 
    181     return mcrunheader->GetNumPheFromDNSB();
    182 }
    183 
    184190Bool_t MMcPedestalNSBAdd::ReInit(MParList *pList)
    185191{
Note: See TracChangeset for help on using the changeset viewer.