Ignore:
Timestamp:
04/02/03 09:03:22 (22 years ago)
Author:
wittek
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1885 r1888  
    6161    fTitle = title ? title : "Task to evaluate basic cuts";
    6262
    63     ThetaMin =  0.0;
    64     ThetaMax = 60.0;
     63    fThetaMin =  0.0;
     64    fThetaMax = 60.0;
    6565}
    6666
     
    109109    }
    110110
    111     memset(fErrors, 0, sizeof(fErrors));
     111    memset(fCut, 0, sizeof(fCut));
    112112
    113113    return kTRUE;
     
    123123Bool_t MSelBasic::Process()
    124124{
    125   /*
    126   //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    127   *fLog << "=========================================================" << endl;
    128   *fLog << "" << endl;
    129   *fLog << "MmcEvt data : " << endl;
    130   *fLog << "" << endl;
    131   fMcEvt->Print();
    132   *fLog << "" << endl;
    133   *fLog << "PartId() = " << fMcEvt->GetPartId() << endl;
    134   *fLog << "Energy() = " << fMcEvt->GetEnergy() << endl;
    135   *fLog << "Theta()  = " << fMcEvt->GetTheta() << endl;
    136 
    137   *fLog << "Phi()    = " << fMcEvt->GetPhi() << endl;
    138   //*fLog << "CoreD()  = " << fMcEvt->GetCoreD() << endl;
    139   //*fLog << "CoreX()  = " << fMcEvt->GetCoreX() << endl;
    140 
    141   //*fLog << "CoreY()  = " << fMcEvt->GetCoreY() << endl;
    142   *fLog << "Impact() = " << fMcEvt->GetImpact() << endl;
    143   //*fLog << "PhotIni()= " << fMcEvt->GetPhotIni() << endl;
    144 
    145   //*fLog << "PassPhotAtm() = " << fMcEvt->GetPassPhotAtm() << endl;
    146   //*fLog << "PassPhotRef() = " << fMcEvt->GetPassPhotRef() << endl;
    147   //*fLog << "PassPhotCone()  = " << fMcEvt->GetPassPhotCone() << endl;
    148 
    149   //*fLog << "PhotElfromShower()    = " << fMcEvt->GetPhotElfromShower() << endl;
    150   //*fLog << "PhotElinCamera()  = " << fMcEvt->GetPhotElinCamera() << endl;
    151   *fLog << "TelescopePhi()  = " << fMcEvt->GetTelescopePhi() << endl;
    152 
    153   *fLog << "TelescopeTheta()  = " << fMcEvt->GetTelescopeTheta() << endl;
    154   *fLog << "Impact() = " << fMcEvt->GetImpact() << endl;
    155   //*fLog << "PhotIni()= " << fMcEvt->GetPhotIni() << endl;
    156   *fLog << "" << endl;
    157   *fLog << "=========================================================" << endl;
    158 
    159   *fLog << "=========================================================" << endl;
    160   *fLog << "" << endl;
    161   *fLog << "MPedestalPix data : " << endl;
    162   *fLog << "" << endl;
    163 
    164   Int_t ntot;
    165   ntot = fPed->GetSize();
    166     *fLog << "MeanRms() :" << endl;   
    167   for (Int_t i=0; i<ntot; i++)
    168   {
    169     MPedestalPix &pix = (*fPed)[i];
    170     //*fLog << "Mean()    = " << i << ",  " << pix.GetMean() << endl;   
    171     //*fLog << "Sigma()   = " << i << ",  " << pix.GetSigma() << endl;   
    172     *fLog << pix.GetMeanRms() << " ";   
    173     //*fLog << "SigmaRms()= " << i << ",  " << pix.GetSigmaRms() << endl;   
    174   }
    175   *fLog << "" << endl;
    176 
    177   *fLog << "" << endl;
    178   ntot = fEvt->GetNumPixels();
    179     *fLog << "MCerPhotPix :  pix.GetNumPhotons()" << endl;   
    180   for (Int_t i=0; i<ntot; i++)
    181   {
    182     MCerPhotPix &pix = (*fEvt)[i];
    183     *fLog << pix.GetNumPhotons() << " ";   
    184   }
    185   *fLog << "" << endl;
    186 
    187   *fLog << "" << endl;
    188   ntot = fEvt->GetNumPixels();
    189     *fLog << "MCerPhotPix :  pix.GetErrorPhot()" << endl;   
    190   for (Int_t i=0; i<ntot; i++)
    191   {
    192     MCerPhotPix &pix = (*fEvt)[i];
    193     *fLog << pix.GetErrorPhot() << " ";   
    194   }
    195   *fLog << "" << endl;
    196 
    197   //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    198   */
    199 
    200 
    201125    Int_t rc = 0;
    202126
     
    207131    //}
    208132
    209     Double_t Theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
    210     if ( Theta < ThetaMin )
     133    Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
     134    if ( theta < fThetaMin )
    211135    {
    212136      *fLog << "MSelBasic::Process; Run, Event, Theta = "
    213137            << fRawRun->GetRunNumber()<< ",  "
    214             << fMcEvt->GetEvtNumber() << ",  " << Theta << endl;
     138            << fMcEvt->GetEvtNumber() << ",  " << theta << endl;
    215139      rc = 1;
    216140    }   
    217141
    218     else if ( Theta > ThetaMax )
     142    else if ( theta > fThetaMax )
    219143    {
    220144      rc = 2;
     
    227151    }   
    228152
    229     fErrors[rc]++;
     153    fCut[rc]++;
    230154
    231155    return rc==0 ? kTRUE : kCONTINUE;
     
    246170    const Int_t entries = fEvt->GetNumPixels();
    247171 
    248     //$$$$$$$$$$$$$$$$$$
    249     //const Int_t nall = fPed->GetSize(); 
    250     //*fLog << "nall = " << nall << endl;
    251     //for (Int_t id=0; id<nall; id++)
    252     //{
    253     //  MGeomPix &gpix = (*fCam)[id];
    254     //  if ( gpix.IsInOutermostRing() )
    255     //  {
    256     //    *fLog << "IsInOutermostRing : pixel no. = " << id << endl;
    257     //  }
    258 
    259     //  if ( gpix.IsInOuterRing() )
    260     //  {
    261     //    *fLog << "IsInOuterRing : pixel no. = " << id << endl;
    262     //  }
    263     //}
    264     //$$$$$$$$$$$$$$$$$$
    265 
    266 
    267172    for (Int_t i=0; i<entries; i++)
    268173    {
     
    316221    *fLog << GetDescriptor() << " execution statistics:" << endl;
    317222    *fLog << dec << setfill(' ');
    318     *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3)
    319           << (int)(fErrors[1]*100/GetNumExecutions())
    320           << "%) Evts skipped due to: Zenith angle < " << ThetaMin << endl;
    321 
    322     *fLog << " " << setw(7) << fErrors[2] << " (" << setw(3)
    323           << (int)(fErrors[2]*100/GetNumExecutions())
    324           << "%) Evts skipped due to: Zenith angle > " << ThetaMax << endl;
    325 
    326     *fLog << " " << setw(7) << fErrors[3] << " (" << setw(3)
    327           << (int)(fErrors[3]*100/GetNumExecutions())
     223    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3)
     224          << (int)(fCut[1]*100/GetNumExecutions())
     225          << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
     226
     227    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3)
     228          << (int)(fCut[2]*100/GetNumExecutions())
     229          << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
     230
     231    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3)
     232          << (int)(fCut[3]*100/GetNumExecutions())
    328233          << "%) Evts skipped due to: Software trigger not fullfilled" << endl;
    329234
    330     *fLog << " " << fErrors[0] << " (" << (int)(fErrors[0]*100/GetNumExecutions())
     235    *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions())
    331236          << "%) Evts survived Basic selections!" << endl;
    332237    *fLog << endl;
     
    336241
    337242
     243
     244
     245
     246
     247
     248
     249
Note: See TracChangeset for help on using the changeset viewer.