Skip to content
Snippets Groups Projects
Commit 99e20f74 authored by Alexandru Bercuci's avatar Alexandru Bercuci
Browse files

add configuration options to the TrdModule to accomodate various

pad-plane topologies and FEEs
parent 4c1c2424
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !634. Comments created here will be created in the context of that merge request.
......@@ -28,7 +28,7 @@ class CbmTrdCluster : public CbmCluster {
public:
enum eCbmTrdClusterDef
{
kFasp = 5 ///< set type of FEE digis contained
kFasp = 5 ///< set type of FEE digis contained
,
kProfileStart ///< only for triangular if no T in first col
,
......
......@@ -7,6 +7,7 @@
//_______________________________________________________________________________
CbmTrdModuleAbstract::CbmTrdModuleAbstract()
: TNamed()
, fModConfig(0)
, fModAddress(0)
, fLayerId(-1)
, fRotation(0)
......@@ -21,6 +22,7 @@ CbmTrdModuleAbstract::CbmTrdModuleAbstract()
//_______________________________________________________________________________
CbmTrdModuleAbstract::CbmTrdModuleAbstract(Int_t mod, Int_t ly, Int_t rot)
: TNamed("CbmTrdModule", "Abstract TRD module implementation")
, fModConfig(0)
, fModAddress(mod)
, fLayerId(ly)
, fRotation(rot)
......
......@@ -21,6 +21,12 @@ class CbmTrdParModGas;
**/
class CbmTrdModuleAbstract : public TNamed {
public:
enum eCbmTrdModuleDef
{
kTrd2d = 0 ///< toggle pad-plane type of the chamber
,
kFasp = 1 ///< toggle FEE type for the module
};
/** \brief Default constructor.*/
CbmTrdModuleAbstract();
/** \brief Constructor with placement */
......@@ -58,14 +64,50 @@ public:
*/
virtual inline Int_t GetPadRowCol(Int_t address, Int_t& c) const;
virtual const Char_t* GetPath() const { return fGeoPar ? fGeoPar->GetTitle() : ""; }
/** \brief Inquire the FEE read-out type of the module
* \return false for SPADIC and true for FASP
*/
bool HasFaspFEE() const { return TESTBIT(fModConfig, eCbmTrdModuleDef::kFasp); }
/** \brief Inquire the pad-plane type of the chamber
* \return false for TRD-1D and true for TRD-2D
*/
bool Has2dPadPlane() const { return TESTBIT(fModConfig, eCbmTrdModuleDef::kTrd2d); }
virtual void LocalToMaster(Double_t in[3], Double_t out[3]);
virtual void SetAsicPar(CbmTrdParSetAsic* p = nullptr) { fAsicPar = p; }
virtual void SetChmbPar(const CbmTrdParModGas* p) { fChmbPar = p; }
virtual void SetDigiPar(const CbmTrdParModDigi* p) { fDigiPar = p; }
virtual void SetGainPar(const CbmTrdParModGain* p) { fGainPar = p; }
virtual void SetGeoPar(const CbmTrdParModGeo* p) { fGeoPar = p; }
/** \brief Define the read-out FEE type of the module
* \param[in] set true for FASP and false [default] for SPADIC
*/
void SetFEE(bool set = true)
{
set ? SETBIT(fModConfig, eCbmTrdModuleDef::kFasp) : CLRBIT(fModConfig, eCbmTrdModuleDef::kFasp);
}
/** \brief Define the pad-plane type of the chamber
* \param[in] set true for TRD-2D and false [default] for TRD-1D
*/
void SetPadPlane(bool set = true)
{
set ? SETBIT(fModConfig, eCbmTrdModuleDef::kTrd2d) : CLRBIT(fModConfig, eCbmTrdModuleDef::kTrd2d);
}
protected:
/** 8 bits bit map for module configuration
* [0] - chamber's pad-plane type; 0 rectangular pads, 1 triangular pads, \see SetRO
* [1] - chamber's FEE type; 0 SPADIC, 1 FASP, \see SetFEE
* [2] -
* [3] -
* [4] -
* [5] -
* [6] -
* [7] -
*/
uint8_t fModConfig;
// geometrical definitions imported from CbmTrdGeoHandler
UShort_t fModAddress; ///< unique identifier for current module
Char_t fLayerId; ///< layer identifier
......
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