Commit 40785b44 authored by J.Dudouet [IPNL/CSNSM]'s avatar J.Dudouet [IPNL/CSNSM]
Browse files

Adding the tracking figure of merit in the dataflow, in key version 1.0 of data:tracked


git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@2232 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 24a6b78d
......@@ -257,12 +257,13 @@ class TrackedHit : public Hit
{
private:
UShort_t fType;
Double_t fFOM;
public:
enum {kUndef, kSingle, kCompton, kPair};
public:
TrackedHit(): fType(0)
TrackedHit(): fType(0), fFOM(-1)
{;}
virtual ~TrackedHit()
{;}
......@@ -280,6 +281,10 @@ public:
{return fType;}
virtual void SetType(UShort_t s)
{fType = s;}
virtual Double_t GetFOM() const
{return fFOM;}
virtual void SetFOM(Double_t fom)
{fFOM = fom;}
};
//! Concrete implementation of a tracked Hit
......
......@@ -193,9 +193,9 @@ UInt_t TrackedFrame_1_0::ReadImp()
for (UShort_t i = 0; i < nb_gamma ; i++ ) {
// careful type !!
Float_t x, y, z, e, t; UShort_t s, type; Int_t id0, id1;
Float_t x, y, z, e, t; UShort_t s, type; Int_t id0, id1; Double_t fom;
//
(*fBuffer) >> s >> e >> type;
(*fBuffer) >> s >> e >> type >> fom;
// add a new gamma
TrackedHit *trhit = fGammas.New();
......@@ -207,6 +207,7 @@ UInt_t TrackedFrame_1_0::ReadImp()
trhit->SetStatus(s);
trhit->SetE(e);
trhit->SetType(type);
trhit->SetFOM(fom);
// now the trace
UShort_t nb_hits = 0u;
......@@ -258,7 +259,7 @@ UInt_t TrackedFrame_1_0::WriteImp()
const TrackedHit *trhit =
fGammas.At(i); // next tracked hit
// status of the trace and full energie
(*fBuffer) << trhit->GetStatus() << Float_t(trhit->GetE()) << trhit->GetType() ;
(*fBuffer) << trhit->GetStatus() << Float_t(trhit->GetE()) << trhit->GetType() << trhit->GetFOM();
// now add the trace itself ... postions, energies, time and ids
(*fBuffer) << trhit->GetNbHits();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment