18#include <FairRootManager.h>
23#include <TClonesArray.h>
24#include <TEveManager.h>
25#include <TEveTreeTools.h>
26#include <TGenericClassInfo.h>
34 : FairTask(name, iVerbose)
36 , fColorMode(colorMode)
37 , fMarkerMode(markerMode)
46 FairRootManager* fManager = FairRootManager::Instance();
47 fCbmEvents =
dynamic_cast<TClonesArray*
>(fManager->GetObject(
"CbmEvent"));
51 <<
" not found! Task will be deactivated ";
55 fPointList =
new TClonesArray(
"CbmTofHit", 100);
57 LOG(debug1) <<
"CbmTsPointSetArrayDraw::Init() get instance of CbmTimesliceManager ";
90 LOG(debug3) <<
" Fill TofUhit from " << nofPoints <<
" hits in Ts.";
94 LOG(debug3) <<
"Add Hit " << iP <<
", " << iPId <<
", " << tHit <<
" at " << nPoints;
95 if (
nullptr != tHit && iPId > -1)
new ((*fPointList)[nPoints++])
CbmTofHit(*tHit);
105 l->SetSourceCS(TEvePointSelectorConsumer::kTVT_XYZ);
106 l->SetMarkerColor(kRed);
107 l->SetMarkerStyle(22);
108 l->SetMarkerSize(2.0);
111 l->InitBins(
"Hits", nPoints, 0.5, nPoints + 0.5);
114 for (Int_t i = 1; i <= nPoints; i++) {
115 TObject* p =
static_cast<TObject*
>(
fPointList->At(i - 1));
118 l->Fill(vec.X(), vec.Y(), vec.Z(), i);
130 gEve->Redraw3D(kFALSE);
139 LOG(debug2) <<
"-I- CbmTsPointSetArrayDraw::GetVector(): " << p->
GetX() <<
" " << p->
GetY() <<
" " << p->
GetZ()
148 LOG(debug2) <<
"-I- CbmTsPointSetArrayDraw::GetTime(): " << p->
GetTime() -
fTimeOffset;
157 Double_t cluSize = p->
GetFlag();
159 cluSize = ((int) cluSize % 100) / 2;
160 LOG(debug3) <<
"-I- CbmTsPointSetArrayDraw::GetClusterSize(): " << cluSize;
170 LOG(debug3) <<
"-I- CbmTsPointSetArrayDraw::GetTot(): " << tot;
189 for (Int_t i = 0; i < nPoints; i++) {
200 LOG(debug3) << std::setprecision(15) <<
"-I- CbmTsPointSetArrayDraw::DetermineTimeBins: fTimeOffset " <<
fTimeOffset;
214 LOG(debug3) << GetName() <<
": Remove Element " <<
fl->GetName() <<
", Man " <<
fTsManager->GetName();
ClassImp(CbmTsPointSetArrayDraw)
Class characterising one event by a collection of links (indices) to data objects,...
void SetMarkerMode(Int_t markerMode)
void SetColorMode(Int_t colorMode)
void FillValues(Int_t id, Double_t time, Double_t tot, Int_t cluSize, Int_t index)
FillQuantities.
void InitValues(Int_t npoints)
Init Arrays for physical Quantities.
static CbmTimesliceManager * Instance()
TClonesArray * fPointList
Double_t GetTot(TObject *obj)
CbmTimesliceManager * fTsManager
void DetermineTimeOffset()
Int_t GetClusterSize(TObject *obj)
void GotoEvent(uint32_t uEventIdx)
TClonesArray * fCbmEvents
virtual void SetParContainers()
TClonesArray * fTsPointList
virtual void Exec(Option_t *option)
virtual InitStatus Init()
TVector3 GetVector(TObject *obj)
virtual ~CbmTsPointSetArrayDraw()
Int_t GetPointId(TObject *obj)
Double_t GetTime(TObject *obj)