#ifndef HTOFDIGITIZER_H
#define HTOFDIGITIZER_H
using namespace std;
#include "hreconstructor.h"
#include <iostream> 
#include <iomanip>
#include "hlocation.h"
#include "hgeanttof.h"
#include "TNtuple.h"
#include "TFile.h"
#include "TString.h"

class HIterator;
class HCategory;
class HLinearCategory;
class HTofDigiPar;
class HTofCalPar;

class HTofDigitizer : public HReconstructor {

private:
  HLocation fLoc;                       //! Location for new object
  HCategory* fGeantCat;                 //! Pointer to Geant data category
  HLinearCategory* fGeantKineCat;       //! Pointer to GeantKine data category
  HCategory* fRawCat;                   //! Pointer to raw data category
  HCategory* fRawCatTmp;                //! Pointer to tmp raw data category
  HTofDigiPar *fDigiPar;                //! Digitization parameters
  HIterator* iterGeant;                 //! Iterator over GeantCell category
  HIterator* iterTofRaw;                //! Iterator over HTofRawSim category
  HIterator* iterTofRawTmp;             //! Iterator over tmp HTofRawSim category

  //--------------------------------------------------------------------------
  Int_t storeFirstTrack;         //! flag:
                                 //        0  = realistic (secondaries included)
                                 //        1 primary particle is stored
                                 //        2 (default) the track number entering the tof in SAME SECTOR is stored , not the
                                 //          secondaries created in TOF itself (delta electrons etc)
                                 //        3 as 2 but in SAME MODULE
                                 //        4 as 2 but condition on SAME ROD
  Bool_t debug;                  //! change stored tracknumbers (when storeFirstTrack!=0)
  TNtuple* out;                  //! ntuple pointer
  TFile*   outFile;              //! output file pointer
  static HTofDigitizer* pTofDigi;//! pointer to this
  Bool_t useOld;                 //! flag: kTRUE:use old execute function (before embedding)
  //--------------------------------------------------------------------------

  Int_t findFirstHitInTof(HGeantTof* pOld,HGeantTof** pNew,Int_t* count);
  void  fillNtuple       (HGeantTof* pOld,HGeantTof*  pNew,Int_t count);
  void  fillArray();
  void  doFinalCheckOnArray();
  void  fillOutput();
public:
  HTofDigitizer(void);
  HTofDigitizer(const Text_t* name,const Text_t* title);
  ~HTofDigitizer(void);
  Bool_t initParContainer();
  Bool_t init(void);
  Bool_t finalize(void);
  Int_t  execute(void);
  Int_t  executeOld(void);
  static HTofDigitizer* getTofDigtizer(){return pTofDigi;}
  void   setStoreFirstTrack(Int_t flag) {storeFirstTrack=flag;}
  void   setDebug(Bool_t flag)          {debug=flag;}
  void   setOutputFile(TString outname="");
  void   setUseOld(Bool_t flag)         {useOld=flag;}
public:
  ClassDef(HTofDigitizer,0) //Digitizer of TOF data.
};

#endif










Last change: Sat May 22 13:16:07 2010
Last generated: 2010-05-22 13:16

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.