Ignore:
Timestamp:
06/20/01 10:41:23 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmontecarlo/MCollAreaTrigger.cc

    r749 r852  
    1717!
    1818!   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     19!             Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    2626#include "MCollAreaTrigger.h"
    2727
     28#include "MParList.h"
     29
    2830#include "MLog.h"
    2931#include "MLogManip.h"
    30 #include "MParList.h"
    3132
    32 #include "MCollArea.h"
    33 #include "MMcEvt.hxx"
     33#include "MMcEvt.hxx"
    3434#include "MMcTrig.hxx"
     35
     36#include "MHMcCollectionArea.h"
    3537
    3638ClassImp(MCollAreaTrigger)
     
    3840MCollAreaTrigger::MCollAreaTrigger (const char *name, const char *title)
    3941{
    40   *fName  = name  ? name  : "MCollAreaTrigger";
    41   *fTitle = title ? title : "Task to calc the collection area ";
     42    *fName  = name  ? name  : "MCollAreaTrigger";
     43    *fTitle = title ? title : "Task to calc the collection area ";
    4244}
    43 
    4445
    4546Bool_t MCollAreaTrigger::PreProcess (MParList *pList)
    4647{
    47   // connect the raw data with this task
    48  
    49   fMcEvt  = (MMcEvt*)pList->FindObject("MMcEvt") ;
    50   if (!fMcEvt) {
    51     *fLog << dbginf << "MMcEvt not found... exit." << endl;
    52     return kFALSE;
    53   }
     48    // connect the raw data with this task
    5449
    55   fMcTrig = (MMcTrig*)pList->FindObject("MMcTrig") ;
    56   if (!fMcTrig) {
    57     *fLog << dbginf << "MMcTrig not found... exit." << endl;
    58     return kFALSE;
    59   }
     50    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
     51    if (!fMcEvt)
     52    {
     53        *fLog << dbginf << "MMcEvt not found... exit." << endl;
     54        return kFALSE;
     55    }
    6056
    61   fCollArea = (MCollArea*)pList->FindCreateObj("MCollArea") ;
    62   if (!fCollArea)
    63     return kFALSE;
     57    fMcTrig = (MMcTrig*)pList->FindObject("MMcTrig");
     58    if (!fMcTrig)
     59    {
     60        *fLog << dbginf << "MMcTrig not found... exit." << endl;
     61        return kFALSE;
     62    }
    6463
    65   return kTRUE ;
     64    fCollArea = (MHMcCollectionArea*)pList->FindCreateObj("MHMcCollectionArea");
     65    if (!fCollArea)
     66        return kFALSE;
    6667
    67 }
    68 
     68    return kTRUE;
     69}
    6970
    7071Bool_t MCollAreaTrigger::Process ()
     
    7576    fCollArea->FillAll(energy, impact);
    7677
    77 
    7878    if (fMcTrig->GetFirstLevel() <= 0)
    7979        return kTRUE;
     
    8181    fCollArea->FillSel(energy, impact);
    8282
    83     return kTRUE ;
     83    return kTRUE;
    8484}
    8585
    8686Bool_t MCollAreaTrigger::PostProcess ()
    8787{
    88   //
    89   //   do the calculation of the effectiv area
    90   //
     88    //
     89    //   do the calculation of the effectiv area
     90    //
     91    fCollArea->CalcEfficiency();
    9192
    92   fCollArea->CalcEfficiency() ;
    93 
    94   return kTRUE ;
     93    return kTRUE;
    9594}
Note: See TracChangeset for help on using the changeset viewer.