Skip to content
Snippets Groups Projects
Commit add4339b authored by Alexandru Bercuci's avatar Alexandru Bercuci Committed by Sergey Gorbunov
Browse files

improve verbosity, save more cluster data for further processing

parent 5758cc4c
No related branches found
No related tags found
1 merge request!818Developing the TRD(2D) detector as intermediate tracker
......@@ -198,8 +198,8 @@ string CbmTrdCluster::ToString() const
{
stringstream ss;
ss << CbmCluster::ToString();
ss << "CbmTrdCluster: mod=" << GetAddress() << " t0=" << fStartTime << " row=" << (int32_t) GetRow() << " "
<< (HasFaspDigis() ? "Fasp " : "Spadic ") << "Chs=";
ss << "CbmTrdCluster: mod=" << GetAddress() << " row=" << (int32_t) GetRow() << " "
<< (HasFaspDigis() ? "Fasp_" : "Spadic_") << "Chs=";
ss << (HasOpenStart() ? "/" : "|");
for (int32_t i(0); i < fNCols; i++)
ss << fStartCh + i << " ";
......
......@@ -107,11 +107,11 @@ public:
virtual std::string ToString() const;
protected:
uint8_t fNCols = 0; //! number of columns with charge above threshold
uint8_t fNRows = 0x1f; //! cluster row info plus extra meta data. Use dedicated getters for the correct value
uint16_t fStartCh = 0xffff; //! channel address of first channel
uint8_t fNCols = 0; //< number of columns with charge above threshold
uint8_t fNRows = 0x1f; //< cluster row info plus extra meta data. Use dedicated getters for the correct value
uint16_t fStartCh = 0xffff; //< channel address of first channel
uint32_t fStartTime = 0xffffffff; //! start time of cluster in clk units wrt buffer start
ClassDef(CbmTrdCluster, 5) // cluster of digi for the TRD detector
ClassDef(CbmTrdCluster, 6) // cluster of digi for the TRD detector
};
#endif
......@@ -43,10 +43,8 @@ std::string CbmTrdHit::ToString() const
{
stringstream ss;
ss << CbmPixelHit::ToString();
ss << "CbmTrdHit: time[ns]=" << GetTime() << "+-" << GetTimeError() << " eloss=" << GetELoss();
if (GetClassType()) ss << " typ[T]" << (GetMaxType() ? "Max{T}" : "Max{R}");
else
ss << " typ[R]";
ss << "CbmTrdHit" << (GetClassType() ? "2" : "1")<< "D: time[ns]=" << GetTime() << "+-" << GetTimeError() << " eloss=" << GetELoss();
if (GetClassType()) ss << " Max=" << (GetMaxType() ? "T" : "R");
ss << " RC=" << (IsRowCross() ? 'y' : 'n') << " Ovf=" << (HasOverFlow() ? 'y' : 'n') << endl;
return ss.str();
}
......
......@@ -51,5 +51,19 @@ void CbmTrdPoint::Print(const Option_t* /*opt*/) const
}
// -------------------------------------------------------------------------
// ----- Public method Print -------------------------------------------
std::string CbmTrdPoint::ToString() const
{
std::stringstream ss;
ss << "CbmTrdPoint: Track " << fTrackID << " Detector " << fDetectorID << "\n";
ss << " Position In (" << fX << ", " << fY << ", " << fZ << ") cm" << "\n";
ss << " Momentum In (" << fPx << ", " << fPy << ", " << fPz << ") GeV" << "\n";
ss << " Position Out (" << fX_out << ", " << fY_out << ", " << fZ_out << ") cm" << "\n";
ss << " Momentum Out (" << fPx_out << ", " << fPy_out << ", " << fPz_out << ") GeV" << "\n";
ss << " Time " << fTime << " ns, Length " << fLength << " cm, Energy loss " << fELoss * 1.0e06 << " keV" << "\n";
return ss.str();
}
// -------------------------------------------------------------------------
ClassImp(CbmTrdPoint)
......@@ -25,6 +25,7 @@
#include <TVector3.h> // for TVector3
#include <cstdint>
#include <string>
class CbmTrdPoint : public FairMCPoint {
......@@ -55,8 +56,10 @@ public:
/** Destructor **/
virtual ~CbmTrdPoint();
/** Output to screen **/
/** \brief Output to screen **/
virtual void Print(const Option_t* opt) const;
/** \brief Output to string.**/
virtual std::string ToString() const;
/** Accessors **/
double GetXIn() const { return fX; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment