16#include <FairEventManager.h>
17#include <FairRootManager.h>
18#include <FairRunAna.h>
19#include <FairRuntimeDb.h>
22#include <TClonesArray.h>
23#include <TEveBoxSet.h>
24#include <TEveManager.h>
29using std::setprecision;
37 , fModuleInfo(nullptr)
50 : FairTask(name, iVerbose)
54 , fModuleInfo(nullptr)
61 for (Int_t i = 0; i < 15; i++) {
68 LOG(debug) <<
" * CbmTrdDigiDraw * :: SetParContainers() ";
72 FairRunAna* ana = FairRunAna::Instance();
73 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
82 LOG(debug) <<
"CbmTrdDigiDraw::Init()";
83 FairRootManager* fManager = FairRootManager::Instance();
84 fPointList = (TClonesArray*) fManager->GetObject(GetName());
86 LOG(warn) <<
"CbmTrdDigiDraw::Init() branch " << GetName() <<
" Not found! Task will be deactivated ";
89 LOG(debug1) <<
"CbmTrdDigiDraw::Init() get track list" <<
fPointList;
91 LOG(debug1) <<
"CbmTrdDigiDraw::Init() get instance of FairEventManager ";
108 TEveBoxSet* q =
new TEveBoxSet(GetName(),
"");
109 q->Reset(TEveBoxSet::kBT_AABox, kTRUE, npoints);
110 q->SetMainColor(kBlue);
120 Int_t refCounter = 0;
122 for (Int_t i = 0; i < npoints; ++i) {
141 TVector3 posHit, padSize;
143 Sector, Col, Row, posHit, padSize);
149 Double_t X = posHit.X() - (padSize.X() / 2);
150 Double_t Y = posHit.Y() - (padSize.Y() / 2);
154 LOG(debug1) <<
"Col: " << Col;
155 LOG(debug1) <<
"Row: " << Row;
156 LOG(debug1) << setprecision(5) <<
"fPadX: " << padSize.X();
157 LOG(debug1) << setprecision(5) <<
"fPadY: " << padSize.Y();
158 LOG(debug1) << setprecision(5) <<
"fPosX: " << posHit.X();
159 LOG(debug1) << setprecision(5) <<
"fPosY: " << posHit.Y();
160 LOG(debug1) << setprecision(5) <<
"fPosZ: " << posHit.Z();
163 q->AddBox(X, Y, posHit.Z(), padSize.X(), padSize.Y(), 0.);
169 gEve->Redraw3D(kFALSE);
189 Bool_t Layer6, Bool_t Layer7, Bool_t Layer8, Bool_t Layer9, Bool_t Layer10,
190 Bool_t Layer11, Bool_t Layer12, Bool_t Layer13, Bool_t Layer14, Bool_t Layer15)
ClassImp(CbmConverterManager)
Helper class to convert unique channel ID back and forth.
static FairEventManager * fEventManager
static uint32_t GetSectorId(uint32_t address)
Return sector ID from address.
static uint32_t GetColumnId(uint32_t address)
Return column ID from address.
static uint32_t GetLayerId(uint32_t address)
Return layer ID from address.
static uint32_t GetModuleAddress(uint32_t address)
Return unique module ID from address.
static uint32_t GetRowId(uint32_t address)
Return row ID from address.
void SetActiveLayer(Bool_t Layer1=kTRUE, Bool_t Layer2=kFALSE, Bool_t Layer3=kFALSE, Bool_t Layer4=kFALSE, Bool_t Layer5=kFALSE, Bool_t Layer6=kFALSE, Bool_t Layer7=kFALSE, Bool_t Layer8=kFALSE, Bool_t Layer9=kFALSE, Bool_t Layer10=kFALSE, Bool_t Layer11=kFALSE, Bool_t Layer12=kFALSE, Bool_t Layer13=kFALSE, Bool_t Layer14=kFALSE, Bool_t Layer15=kFALSE)
virtual void Exec(Option_t *option)
virtual ~CbmTrdDigiDraw()
virtual InitStatus Init()
CbmTrdParSetDigi * fDigiPar
FairEventManager * fEventManager
virtual void SetParContainers()
CbmTrdParModDigi * fModuleInfo
TClonesArray * fPointList
int32_t GetAddress() const
Address getter for module in the format defined by CbmTrdDigi (format of CbmTrdAddress can be accesse...
Definition of chamber gain conversion for one TRD module.
void GetPosition(Int_t sectorId, Int_t columnId, Int_t rowId, TVector3 &padPos, TVector3 &padSize) const
virtual const CbmTrdParMod * GetModulePar(Int_t detId) const