Go to the documentation of this file.
14 #include "FairLogger.h"
15 #include "FairRootManager.h"
16 #include "FairRunOnline.h"
18 #include "TClonesArray.h"
21 #include "THttpServer.h"
32 using std::setprecision;
36 : FairTask(
"CbmCheckDigisNbCorr")
37 , fuMinTotPulserT0(90)
38 , fuMaxTotPulserT0(100)
61 FairRootManager* ioman = FairRootManager::Instance();
65 static_cast<TClonesArray*
>(ioman->GetObject(
"TimesliceMetaData"));
66 if (!
fTsMetaData) { LOG(info) <<
"No TClonesArray with TS meta data found."; }
72 fT0DigiVec = ioman->InitObjectAs<std::vector<CbmTofDigi>
const*>(
"T0Digi");
74 fT0DigiArr =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"T0Digi"));
75 if (!
fT0DigiArr) { LOG(fatal) <<
"No TClonesArray with T0 digis found."; }
79 LOG(info) <<
"No TClonesArray with STS digis found.";
83 LOG(info) <<
"No TClonesArray with MUCH digis found.";
87 LOG(info) <<
"No TClonesArray with TOF digis found.";
91 LOG(info) <<
"No TClonesArray with RICH digis found.";
119 new TH2F(
"fT0StsCorr",
120 Form(
"T0 - STS digis Nb correlation per %.0f ns time interval; Nb "
121 "T0 Digis []; Nb STS Digis []; Counts",
131 new TH2F(
"fT0MuchCorr",
132 Form(
"T0 - MUCH digis Nb correlation per %.0f ns time interval; "
133 "Nb T0 Digis []; Nb MUCH Digis []; Counts",
143 new TH2F(
"fT0TofCorr",
144 Form(
"T0 - TOF digis Nb correlation per %.0f ns time interval; Nb "
145 "T0 Digis []; Nb TOF Digis []; Counts",
155 new TH2F(
"fT0RichCorr",
156 Form(
"T0 - RICH digis Nb correlation per %.0f ns time interval; "
157 "Nb T0 Digis []; Nb RICH Digis []; Counts",
168 new TH2F(
"fStsMuchCorr",
169 Form(
"STS - MUCH digis Nb correlation per %.0f ns time interval; "
170 "Nb STS Digis []; Nb STS Digis []; Counts",
180 new TH2F(
"fStsTofCorr",
181 Form(
"STS - TOF digis Nb correlation per %.0f ns time interval; "
182 "Nb STS Digis []; Nb TOF Digis []; Counts",
192 new TH2F(
"fStsRichCorr",
193 Form(
"STS - RICH digis Nb correlation per %.0f ns time interval; "
194 "Nb STS Digis []; Nb RICH Digis []; Counts",
205 new TH2F(
"fMuchTofCorr",
206 Form(
"MUCH - TOF digis Nb correlation per %.0f ns time interval; "
207 "Nb MUCH Digis []; Nb TOF Digis []; Counts",
217 new TH2F(
"fMuchRichCorr",
218 Form(
"MUCH - RICH digis Nb correlation per %.0f ns time interval; "
219 "Nb MUCH Digis []; Nb RICH Digis []; Counts",
230 new TH2F(
"fTofRichCorr",
231 Form(
"TOF - RICH digis Nb correlation per %.0f ns time interval; "
232 "Nb TOF Digis []; Nb RICH Digis []; Counts",
244 new TProfile(
"fT0StsCorrProf",
245 Form(
"T0 - STS digis Nb correlation per %.0f ns time "
246 "interval; Nb T0 Digis []; Nb STS Digis []",
253 new TProfile(
"fT0MuchCorrProf",
254 Form(
"T0 - MUCH digis Nb correlation per %.0f ns time "
255 "interval; Nb T0 Digis []; Nb MUCH Digis []",
262 new TProfile(
"fT0TofCorrProf",
263 Form(
"T0 - TOF digis Nb correlation per %.0f ns time "
264 "interval; Nb T0 Digis []; Nb TOF Digis []",
271 new TProfile(
"fT0RichCorrProf",
272 Form(
"T0 - RICH digis Nb correlation per %.0f ns time "
273 "interval; Nb T0 Digis []; Nb RICH Digis []",
281 new TProfile(
"fStsMuchCorrProf",
282 Form(
"STS - MUCH digis Nb correlation per %.0f ns time "
283 "interval; Nb STS Digis []; Nb STS Digis []",
290 new TProfile(
"fStsTofCorrProf",
291 Form(
"STS - TOF digis Nb correlation per %.0f ns time "
292 "interval; Nb STS Digis []; Nb TOF Digis []",
299 new TProfile(
"fStsRichCorrProf",
300 Form(
"STS - RICH digis Nb correlation per %.0f ns time "
301 "interval; Nb STS Digis []; Nb RICH Digis []",
309 new TProfile(
"fMuchTofCorrProf",
310 Form(
"MUCH - TOF digis Nb correlation per %.0f ns time "
311 "interval; Nb MUCH Digis []; Nb TOF Digis []",
318 new TProfile(
"fMuchRichCorrProf",
319 Form(
"MUCH - RICH digis Nb correlation per %.0f ns time "
320 "interval; Nb MUCH Digis []; Nb RICH Digis []",
328 new TProfile(
"fTofRichCorrProf",
329 Form(
"TOF - RICH digis Nb correlation per %.0f ns time "
330 "interval; Nb TOF Digis []; Nb RICH Digis []",
338 new TH2F(Form(
"fT0StsDpbCorr%02u", uStsDpb),
339 Form(
"T0 - STS digis Nb correlation per %.0f ns time interval, "
340 "DPB %02u; Nb T0 Digis []; Nb STS Digis []; Counts",
350 Form(
"fStsMuchDpbCorr%02u", uStsDpb),
351 Form(
"STS - MUCH digis Nb correlation per %.0f ns time interval, DPB "
352 "%02u; Nb STS Digis []; Nb STS Digis []; Counts",
362 new TH2F(Form(
"fStsTofDpbCorr%02u", uStsDpb),
363 Form(
"STS - TOF digis Nb correlation per %.0f ns time interval, "
364 "DPB %02u; Nb STS Digis []; Nb TOF Digis []; Counts",
374 Form(
"fStsRichDpbCorr%02u", uStsDpb),
375 Form(
"STS - RICH digis Nb correlation per %.0f ns time interval, DPB "
376 "%02u; Nb STS Digis []; Nb RICH Digis []; Counts",
387 new TProfile(Form(
"fT0StsDpbCorrProf%02u", uStsDpb),
388 Form(
"T0 - STS digis Nb correlation per %.0f ns time "
389 "interval, DPB %02u; Nb T0 Digis []; Nb STS Digis []",
396 new TProfile(Form(
"fStsMuchDpbCorrProf%02u", uStsDpb),
397 Form(
"STS - MUCH digis Nb correlation per %.0f ns time "
398 "interval, DPB %02u; Nb STS Digis []; Nb STS Digis []",
405 new TProfile(Form(
"fStsTofDpbCorrProf%02u", uStsDpb),
406 Form(
"STS - TOF digis Nb correlation per %.0f ns time "
407 "interval, DPB %02u; Nb STS Digis []; Nb TOF Digis []",
414 new TProfile(Form(
"fStsRichDpbCorrProf%02u", uStsDpb),
415 Form(
"STS - RICH digis Nb correlation per %.0f ns time "
416 "interval, DPB %02u; Nb STS Digis []; Nb RICH Digis []",
425 FairRunOnline* run = FairRunOnline::Instance();
427 THttpServer* server = run->GetHttpServer();
428 if (
nullptr != server) {
430 server->Register(
"CheckDigisNbCorr",
fT0StsCorr);
432 server->Register(
"CheckDigisNbCorr",
fT0TofCorr);
460 server->Register(
"CheckDigisNbCorr",
fT0StsDpbCorr[uStsDpb]);
479 for (Int_t uBin = 0; uBin <
fiBinNb; ++uBin) {
489 LOG(debug) <<
"executing TS " <<
fNrTs;
495 LOG(debug) <<
"Begin";
496 Int_t nrT0Digis = -1;
506 LOG(debug) <<
"T0Digis: " << nrT0Digis;
507 LOG(debug) <<
"StsDigis: " << nrStsDigis;
508 LOG(debug) <<
"MuchDigis: " << nrMuchDigis;
509 LOG(debug) <<
"TofDigis: " << nrTofDigis;
510 LOG(debug) <<
"RichDigis: " << nrRichDigis;
514 for (Int_t iDigi = 0; iDigi < nrT0Digis; ++iDigi) {
523 if (fuMinTotPulserT0 < pDigi->GetCharge()
527 Double_t dTime = pDigi->
GetTime() - dTsStart;
529 if (dTime < 0)
continue;
539 for (Int_t iDigi = 0; iDigi < nrStsDigis; ++iDigi) {
544 if (dTime < 0)
continue;
552 UInt_t uDPB = (0 < (pDigi->
GetAddress() & 0x00000400));
557 for (Int_t iDigi = 0; iDigi < nrMuchDigis; ++iDigi) {
562 if (dTime < 0)
continue;
572 for (Int_t iDigi = 0; iDigi < nrTofDigis; ++iDigi) {
580 if (dTime < 0)
continue;
590 for (Int_t iDigi = 0; iDigi < nrRichDigis; ++iDigi) {
595 if (dTime < 0)
continue;
605 for (Int_t uBin = 0; uBin <
fiBinNb; ++uBin) {
virtual void Exec(Option_t *)
TProfile * fT0StsCorrProf
virtual InitStatus Init()
virtual Double_t GetTime() const
const std::vector< CbmTofDigi > * fT0DigiVec
Interface to digi data.
TClonesArray * fT0DigiArr
InitStatus Init()
Initialisation.
TProfile * fTofRichCorrProf
TProfile * fStsRichCorrProf
std::vector< UInt_t > fvuNbDigisPerBinT0
static Int_t GetNofDigis(ECbmModuleId systemId)
TClonesArray * fTsMetaData
std::vector< UInt_t > fvuNbDigisPerBinMuch
@ kTof
Time-of-flight Detector.
TProfile * fT0StsDpbCorrProf[kuMaxNbStsDpbs]
TProfile * fMuchTofCorrProf
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
static CbmDigiManager * Instance()
Static instance.
TProfile * fT0MuchCorrProf
TProfile * fStsTofDpbCorrProf[kuMaxNbStsDpbs]
const Digi * Get(Int_t index) const
Get a digi object.
CbmDigiManager * fDigiMan
TProfile * fStsRichDpbCorrProf[kuMaxNbStsDpbs]
TH2 * fStsRichDpbCorr[kuMaxNbStsDpbs]
Double_t GetTime() const
Inherited from CbmDigi.
@ kRich
Ring-Imaging Cherenkov Detector.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
virtual InitStatus ReInit()
Data class for a single-channel message in the STS.
TH2 * fT0StsDpbCorr[kuMaxNbStsDpbs]
std::vector< UInt_t > fvuNbDigisPerBinTof
Data class for expanded digital TOF information.
TProfile * fT0RichCorrProf
virtual void SetParContainers()
std::vector< UInt_t > fvuNbDigisPerBinSts
std::vector< UInt_t > fvuNbDigisPerBinRich
TProfile * fStsMuchCorrProf
TH2 * fStsMuchDpbCorr[kuMaxNbStsDpbs]
static const UInt_t kuMaxNbStsDpbs
@ kMuch
Muon detection system.
std::vector< std::vector< UInt_t > > fvuNbDigisPerBinStsDpb
TH2 * fStsTofDpbCorr[kuMaxNbStsDpbs]
TProfile * fMuchRichCorrProf
Double_t GetCharge() const
Inherited from CbmDigi.
@ kSts
Silicon Tracking System.
TProfile * fStsMuchDpbCorrProf[kuMaxNbStsDpbs]
TProfile * fT0TofCorrProf
TProfile * fStsTofCorrProf