Go to the documentation of this file.
27 #include "FairLogger.h"
31 #include "TGeoMatrix.h"
32 #include "TGeoVolume.h"
64 , fSensorArray(nullptr)
65 , fSensorIDArray(nullptr)
68 , foutputHits(nullptr)
69 , foutputDigis(nullptr)
70 , foutputCluster(nullptr)
72 foutputDigiMatchs(nullptr)
73 , foutputHitMatchs(nullptr)
74 , fcurrentEvent(nullptr)
79 , fSensorArrayFilled(kFALSE)
83 , fParameter(nullptr) {
85 Fatal(GetName(),
" - Do not use standard constructor");
93 , fSensorArray(new TClonesArray(
"CbmMvdSensor", 10))
94 , fSensorIDArray(nullptr)
97 , foutputHits(nullptr)
98 , foutputDigis(nullptr)
99 , foutputCluster(nullptr)
101 foutputDigiMatchs(nullptr)
102 , foutputHitMatchs(nullptr)
103 , fcurrentEvent(nullptr)
108 , fSensorArrayFilled(kFALSE)
109 , initialized(kFALSE)
112 , fParameter(nullptr) {
115 Fatal(GetName(),
" - Error, singleton does already exist.");
137 Double_t sensorStartTime,
148 Fatal(GetName(),
" - Error, must add all sensors before adding plugins.");
171 Float_t misalignment[3], randArray[3];
173 gRandom->RndmArray(3, randArray);
174 misalignment[0] = ((2 * randArray[0]) - 1) *
fepsilon[0];
175 misalignment[1] = ((2 * randArray[0]) - 1) *
fepsilon[1];
176 misalignment[2] = ((2 * randArray[0]) - 1) *
fepsilon[2];
178 LOG(debug1) <<
"new sensor " << myname
179 <<
" to detector added at station: " << stationNr;
195 const TString digitizername =
"CbmMvdSensorDigitizerTask";
196 const TString digitizerTBname =
"CbmMvdSensorDigitizerTBTask";
197 const TString findername =
"CbmMvdSensorFindHitTask";
200 const TString clustername =
"CbmMvdSensorClusterfinderTask";
201 const TString hitname =
"CbmMvdSensorHitfinderTask";
202 const TString digitohitname =
"CbmMvdSensorDigiToHitTask";
205 for (Int_t
i = 0;
i < nSensors;
i++) {
210 if (plugin->ClassName() == digitizername) {
217 }
else if (plugin->ClassName() == digitizerTBname) {
225 }
else if (plugin->ClassName() == findername) {
234 else if (plugin->ClassName() == clustername) {
241 }
else if (plugin->ClassName() == hitname) {
250 else if (plugin->ClassName() == digitohitname) {
258 cout << endl <<
"task not included yet, adding standart task." << endl;
268 cout <<
"Invalide" << endl;
288 foutput =
new TClonesArray(
"CbmMvdPoint", 1000);
298 LOG(fatal) <<
"CbmMvdDetector could not load Sensors from Geometry!";
301 for (Int_t j = 0; j < nSensors; j++) {
304 LOG(debug1) <<
"Init Sensor " << sensor->GetName();
318 for (Int_t j = 0; j < nSensors; j++) {
330 for (Int_t j = 0; j < nSensors; j++) {
350 Int_t nEntries = input->GetEntriesFast();
353 Bool_t send = kFALSE;
354 for (Int_t
i = 0;
i < nEntries;
i++) {
357 for (Int_t k = 0; k < nSensors; k++) {
366 LOG(warn) <<
"Point not send to any sensor: " << point->GetDetectorID();
391 for (Int_t
i = 0;
i < nEntries;
i++) {
394 for (Int_t k = 0; k < nSensors; k++) {
421 Int_t nEntries = digis->GetEntriesFast();
423 for (Int_t
i = 0;
i < nEntries;
i++) {
426 for (Int_t k = 0; k < nSensors; k++) {
450 Int_t nEntries = digis->GetEntriesFast();
453 for (Int_t
i = 0;
i < nEntries;
i++) {
456 for (Int_t k = 0; k < nSensors; k++) {
480 Int_t nEntries = clusters->GetEntriesFast();
483 for (Int_t
i = 0;
i < nEntries;
i++) {
486 for (Int_t k = 0; k < nSensors; k++) {
490 LOG(debug2) <<
"Sending cluster to sensor: " << sensor->
GetSensorNr();
515 for (Int_t
i = 0;
i < nSensors;
i++) {
542 for (Int_t
i = 0;
i < nSensors;
i++) {
544 sensor->
Exec(nLevel);
568 for (Int_t
i = 0;
i < nSensors;
i++) {
583 for (Int_t
i = 0;
i < nSensors;
i++) {
603 for (Int_t
i = 0;
i < nSensors;
i++) {
627 for (Int_t
i = 0;
i < nSensors;
i++) {
648 for (Int_t
i = 0;
i < nSensors;
i++) {
666 for (Int_t
i = 0;
i < nSensors;
i++) {
692 for (Int_t
i = 0;
i < nSensors;
i++) {
709 for (Int_t
i = 0;
i < nSensors;
i++) {
static CbmMvdDetector * Instance()
Int_t GetDetectorID() const
void SetDigiPlugin(const Int_t &nPlugin)
TClonesArray * GetOutputArray(Int_t nPlugin) const
void Exec(UInt_t nPlugin)
TClonesArray * fcurrentEvent
TClonesArray * foutputDigiMatchs
void SendInputDigisToHits(TClonesArray *digis)
void SendInputCluster(CbmMvdCluster *cluster)
TClonesArray * GetOutputCluster()
void Init(Bool_t isSimulation=kFALSE)
void SetSensorTyp(CbmMvdSensorTyp typ)
void SetRefId(Int_t refId)
void SetDataSheet(CbmMvdSensorDataSheet *sheet)
void SetMisalignment(Float_t misalignment[3])
virtual ~CbmMvdDetector()
void ExecFrom(UInt_t nPlugin)
void SendInput(TClonesArray *input)
TClonesArray * GetOutputDigiMatchs()
virtual MvdSensorPluginType GetPluginType()=0
void SetHitPlugin(const Int_t &nPlugin)
TClonesArray * GetOutputArray(Int_t nPlugin)
@ kMvd
Micro-Vertex Detector.
void SetStation(Int_t StationNumber)
static Int_t GetNofDigis(ECbmModuleId systemId)
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
Helper class to extract information from the GeoManager. Addapted from TrdGeoHandler byFlorian Uhlig ...
Int_t GetHitPlugin() const
TClonesArray * GetCurrentEvent()
void SendInput(CbmMvdPoint *point)
TClonesArray * GetOutputMatch() const
Int_t GetOutputArrayLen(Int_t nPlugin) const
TClonesArray * GetOutputHits()
const Digi * Get(Int_t index) const
Get a digi object.
void AddSensor(TString clearName, TString fullName, TString nodeName, CbmMvdSensorDataSheet *sensorData, Int_t sensorNr, Int_t volumeId, Double_t sensorStartTime, Int_t stationNr)
Int_t GetDigiPlugin() const
void SendInputDigiToHit(CbmMvdDigi *digi)
void SendInputDigis(CbmDigiManager *digiMan)
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
TClonesArray * fSensorArray
void SetRefId(Int_t RefId)
void ExecFrom(UInt_t nLevel)
TClonesArray * foutputCluster
void SetPointId(Int_t myId)
TClonesArray * foutputDigis
void SendInputDigi(CbmMvdDigi *digi)
Int_t GetClusterPlugin() const
static CbmMvdSensorTyp fSensorTyp
TClonesArray * GetOutputBuffer() const
static CbmMvdDetector * fInstance
TClonesArray * foutputHits
Int_t GetSensorNr() const
Bool_t fSensorArrayFilled
void AddPlugin(CbmMvdSensorPlugin *plugin)
void SendInputCluster(TClonesArray *cluster)
void AddPlugin(CbmMvdSensorPlugin *plugin)
void SetClusterPlugin(const Int_t &nPlugin)
TClonesArray * GetOutputDigis()