Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Axel Puntke
mcbmroot
Commits
d2468ee1
Commit
d2468ee1
authored
Jul 29, 2021
by
Pierre-Alain Loizeau
Browse files
[DEBUG, NOT FOR MASTER] Add debug plots in TOF CRI unpacker
parent
0157edc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/detectors/tof/CbmMcbm2018TofPar.cxx
View file @
d2468ee1
...
...
@@ -257,7 +257,7 @@ void CbmMcbm2018TofPar::BuildChannelsUidMap()
break
;
}
default:
{
LOG
(
error
)
<<
"Invalid Tof Type
specifier
"
;
LOG
(
error
)
<<
"Invalid Tof Type specifier
for GBTx "
<<
std
::
setw
(
2
)
<<
uGbtx
<<
": "
<<
fiRpcType
[
uGbtx
]
;
}
}
// switch (fiRpcType[uGbtx])
}
// for (UInt_t uGbtx = 0; uGbtx < uNrOfGbtx; ++uGbtx)
...
...
macro/beamtime/mcbm2021/mTofCriPar.par
View file @
d2468ee1
...
...
@@ -4,7 +4,6 @@
NrOfGdpbs: Int_t 4
GdpbIdArray: Int_t \
0xabc0 0xabc1 0xabc2 0xabc3
//0x5b7b 0x55c4 0x18c5 0x5f64 0x1889 0x181c 0x1922 0x1925 0x1902
NrOfFeesPerGdpb: Int_t 10
NrOfGet4PerFee: Int_t 8
NrOfChannelsPerGet4: Int_t 4
...
...
reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx
View file @
d2468ee1
...
...
@@ -120,6 +120,23 @@ Bool_t CbmTofUnpackAlgo::initParSet(CbmMcbm2018TofPar* parset)
LOG
(
info
)
<<
fName
<<
"::initParSetTofMcbm2018 - Successfully initialized TOF settings"
;
TDirectory
*
oldDir
=
gDirectory
;
gROOT
->
cd
();
UInt_t
uNbFee
=
fuNrOfGdpbs
*
fuNrOfFeePerGdpb
;
fhFeeChannelCountsIn
=
new
TH2I
(
"FeeChannelCountsIn"
,
"Raw counts; Channel; FEE; Counts"
,
fuNrOfChannelsPerFee
,
-
0.5
,
fuNrOfChannelsPerFee
-
0.5
,
uNbFee
,
-
0.5
,
uNbFee
-
0.5
);
fhFeeChannelCountsOut
=
new
TH2I
(
"FeeChannelCountsOut"
,
"Counts to digi; Channel; FEE; Counts"
,
fuNrOfChannelsPerFee
,
-
0.5
,
fuNrOfChannelsPerFee
-
0.5
,
uNbFee
,
-
0.5
,
uNbFee
-
0.5
);
fhTotChannelCountsIn
=
new
TH2I
(
"TotChannelCountsIn"
,
"Raw counts; Channel; FEE; Counts"
,
fuNrOfChannelsPerFee
*
uNbFee
,
-
0.5
,
fuNrOfChannelsPerFee
*
uNbFee
-
0.5
,
256
,
-
0.5
,
256
-
0.5
);
fhTotChannelCountsOut
=
new
TH2I
(
"TotChannelCountsOut"
,
"Counts to digi; Channel; FEE; Counts"
,
fuNrOfChannelsPerFee
*
uNbFee
,
-
0.5
,
fuNrOfChannelsPerFee
*
uNbFee
-
0.5
,
256
,
-
0.5
,
256
-
0.5
);
gDirectory
=
oldDir
;
return
kTRUE
;
}
...
...
@@ -369,6 +386,9 @@ void CbmTofUnpackAlgo::ProcessHit(const critof001::Message& mess)
Double_t
dHitTime
=
mess
.
getMsgFullTimeD
(
fulEpochIndexInTs
);
Double_t
dHitTot
=
uTot
;
// in bins
fhFeeChannelCountsIn
->
Fill
(
uChannelNrInFee
,
uFeeNrInSys
);
fhTotChannelCountsIn
->
Fill
(
uFeeNrInSys
*
fuNrOfChannelsPerFee
+
uChannelNr
,
uTot
);
if
(
fviRpcChUId
.
size
()
<
uRemappedChannelNrInSys
)
{
LOG
(
fatal
)
<<
fName
<<
"::unpack => "
<<
"Invalid mapping index "
<<
uRemappedChannelNrInSys
<<
" VS "
<<
fviRpcChUId
.
size
()
<<
", from FLIM "
...
...
@@ -404,6 +424,9 @@ void CbmTofUnpackAlgo::ProcessHit(const critof001::Message& mess)
/// Create output object and store it
std
::
unique_ptr
<
CbmTofDigi
>
digi
(
new
CbmTofDigi
(
uChanUId
,
dHitTime
,
dHitTot
));
if
(
digi
)
fOutputVec
.
emplace_back
(
*
std
::
move
(
digi
));
fhFeeChannelCountsOut
->
Fill
(
uChannelNrInFee
,
uFeeNrInSys
);
fhTotChannelCountsOut
->
Fill
(
uFeeNrInSys
*
fuNrOfChannelsPerFee
+
uChannelNr
,
uTot
);
}
ClassImp
(
CbmTofUnpackAlgo
)
reco/detectors/tof/unpack/CbmTofUnpackAlgo.h
View file @
d2468ee1
...
...
@@ -30,6 +30,9 @@
#include
<Rtypes.h>
// for types
#include
<RtypesCore.h>
#include
<TH2I.h>
#include
<TCanvas.h>
#include
"TROOT.h"
#include
<cstddef>
#include
<cstdint>
...
...
@@ -71,6 +74,35 @@ protected:
finishDerived
();
// Finish the monitor if we have one
// if (fMonitor) fMonitor->Finish();
TDirectory
*
oldDir
=
gDirectory
;
gROOT
->
cd
();
TCanvas
*
canv
=
new
TCanvas
(
"FeeChanCounts"
,
"Fee and channel counts in/out"
);
canv
->
Divide
(
2
,
2
);
canv
->
cd
(
1
);
gPad
->
SetGridx
();
gPad
->
SetGridy
();
gPad
->
SetLogz
();
fhFeeChannelCountsIn
->
Draw
(
"colz"
);
canv
->
cd
(
2
);
gPad
->
SetGridx
();
gPad
->
SetGridy
();
gPad
->
SetLogz
();
fhFeeChannelCountsOut
->
Draw
(
"colz"
);
canv
->
cd
(
3
);
gPad
->
SetGridx
();
gPad
->
SetGridy
();
gPad
->
SetLogz
();
fhTotChannelCountsIn
->
Draw
(
"colz"
);
canv
->
cd
(
4
);
gPad
->
SetGridx
();
gPad
->
SetGridy
();
gPad
->
SetLogz
();
fhTotChannelCountsOut
->
Draw
(
"colz"
);
gDirectory
=
oldDir
;
//fhFeeChannelCountsIn->Write();
//fhFeeChannelCountsOut->Write();
}
/** @brief Function that allows special calls during Finish in the derived algos */
...
...
@@ -182,6 +214,12 @@ private:
uint64_t
fulTsStartInEpoch
=
0
;
uint64_t
fulEpochIndexInTs
=
0
;
TH2I
*
fhFeeChannelCountsIn
=
nullptr
;
TH2I
*
fhFeeChannelCountsOut
=
nullptr
;
TH2I
*
fhTotChannelCountsIn
=
nullptr
;
TH2I
*
fhTotChannelCountsOut
=
nullptr
;
ClassDef
(
CbmTofUnpackAlgo
,
1
)
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment