#include "htofdigitizer.h" |
HTofDigitizer
class description - source file - inheritance tree (.pdf)
private:
void doFinalCheckOnArray()
void fillArray()
void fillNtuple(HGeantTof* pOld, HGeantTof* pNew, Int_t count)
void fillOutput()
Int_t findFirstHitInTof(HGeantTof* pOld, HGeantTof** pNew, Int_t* count)
public:
HTofDigitizer()
HTofDigitizer(Text_t* name, Text_t* title)
~HTofDigitizer()
static TClass* Class()
virtual Int_t execute()
Int_t executeOld()
virtual Bool_t finalize()
static HTofDigitizer* getTofDigtizer()
virtual Bool_t init()
Bool_t initParContainer()
virtual TClass* IsA() const
void setDebug(Bool_t flag)
void setOutputFile(TString outname)
void setStoreFirstTrack(Int_t flag)
void setUseOld(Bool_t flag)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
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:
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)
HTofDigitizer digitizes data, puts output values into
raw data category. The input data are read from the HGeantTof
category. After calculating TOF of and Charge etc the output
is stored in the HTofRawSim category.
------------
| HGeantTof |
------------
|
---------------------- -----------------
| HTofUnpacker | | HTofDigitizer |
| (embedding mode) | -- | |
| | / ------------------
---------------------- / |
| / ----------------
------------- / | HTofRawSimTmp |
| HTofRawSim |---- | non persistent | (embedding mode,
------------- ---------------- sim data)
sim (sim mode) /
or real (embedding) /
-----------------
| HTofHitFSim |
-----------------
/ |
/ ----------------
/ | HTofHitSimTmp | (embedding mode
/ | non persistent | sim data )
/ ----------------
/ /
/ /
-------------
| HTofHitSim | sim (sim mode) or
------------- sim and real data
(embedding)
In the case of TRACK EMBEDDING of simulated tracks into
experimental data the real data are written by the HTofUnpacker into
HTofRawSim category. In embedding mode the digitizer will write his
output to HTofRawSimTmp to merge real and sim data on hit level
(keep calibrations constistent).
The embedding mode is recognized automatically by analyzing the
gHades->getEmbeddingMode() flag.
Mode ==0 means no embedding
==1 realistic embedding (first real or sim hit makes the game)
==2 keep GEANT tracks (as 1, but GEANT track numbers will always
win against real data. besides the tracknumber the output will
be the same as in 1)
In HTofRawSim the track number which created the left/right hit will be
stored. For real data the number will be equal to gHades->getEmbeddingRealTrackId().
For the suppression of secondaries produced in the TOF itself there are
several configuration possibilities:
They can be switched via setStoreFirstTrack(Int_t flag):
flag == 0 realistic (secondaries included)
1 primary particle is stored
2 (default) the first track number entering the tof in SAME SECTOR is stored
3 as 2 but condition on SAME SECTOR && MOD
4 as 2 but SAME SECTOR && MOD && ROD
To make the influence of the above selections easily visible
in the output HTofRawSim a debug mode can be switched with
void setDebug(Bool_t flag). In this case the track numbers
affected by the criteria 1-4 will have negative track numbers
(multiples of -200). The multiplication factor gives the number
of steps from the start point to the stored track (chain of
secondaries). In case 1 it is always -200 if a particle has not
been a primary one. With void setOutputFile(TString outname)
an internal Ntuple can be written out with HGeantTof infos
of the original hit and the changed one.
For comparison of the new digitizer (after implemantation of
embedding) and old digitizer (stored 2 fastest tracks instead
of left/right track) the old execute function can be
run by using void setUseOld(Bool_t flag).
The pointer to the TofDigitizer can be retrieved via
static HTofDigitizer* getTofDigtizer(). This function
returns NULL if the Digitizer has not been created yet!
Bool_t initParContainer()
HTofDigitizer(void)
HTofDigitizer(Text_t *name,Text_t *title) :
HReconstructor(name,title)
~HTofDigitizer(void)
Bool_t init(void)
Int_t executeOld(void)
Int_t execute(void)
void fillArray()
-------------------------------------------------
loop over geant category and fill catTofRawTmp
the relsults will be copied later to the final output catTofRaw
void doFinalCheckOnArray()
-------------------------------------------------
Exclusion of hits with charge less than ADC threshold.
Time of hits with charge less than CFD threshold is set
to zero. These hits are excluded later in the hitfinder.
void fillOutput()
-------------------------------------------------
Now copy tmp object to final output
Bool_t finalize()
Int_t findFirstHitInTof(HGeantTof* poldTof,HGeantTof** pnewTof,Int_t* count)
-------------------------------------------------
find the first track ID entering the TOF
Used to suppress the secondaries created in the
TOF itself.
0 (default) = realistic (secondaries included)
1 primary particle is stored
2 the first track number entering the tof in SAME SECTOR is stored
3 as 2 but condition on SAME SECTOR && MOD
4 as 2 but SAME SECTOR && MOD && ROD
void setOutputFile(TString outname)
set ouput file for internal Ntuple. Create
Ntuple inside output.
void fillNtuple(HGeantTof* pold,HGeantTof* pnew,Int_t count)
old GEANT TOF hit
Inline Functions
HTofDigitizer* getTofDigtizer()
void setStoreFirstTrack(Int_t flag)
void setDebug(Bool_t flag)
void setUseOld(Bool_t flag)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Author: D.Vasiliev
Last update: Fri Jan 26 12:36:02 2007
ROOT page - Class index - Class Hierarchy - Top of the page
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.