CbmRoot
Loading...
Searching...
No Matches
CbmTrdModuleSim2D.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci, Florian Uhlig [committer] */
4
5#ifndef CBMTRDMODULESIM2D_H
6#define CBMTRDMODULESIM2D_H
7
8#include "CbmTrdModuleSim.h"
9
10class CbmTimeSlice;
11class CbmTrdFASP;
26public:
28 {
30 ,
32 ,
34 };
35 CbmTrdModuleSim2D(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP = kTRUE);
36 virtual ~CbmTrdModuleSim2D();
37
39 Bool_t IsFeCalib() const { return TESTBIT(fConfig, kLab); }
45 Int_t FlushBuffer(ULong64_t time = 0);
46
55 Bool_t MakeDigi(CbmTrdPoint* p, Double_t time, Bool_t TR);
56 Bool_t MakeRaw(/*CbmTrdPoint *p*/) { return kTRUE; }
57 void SetGamma(Double_t /*gamma*/) { ; }
58 void SetMessageConverter(CbmTrdRawToDigiR* conv = NULL) { (void) conv; }
59 void SetQA(CbmTrdCheckUtil* qa = NULL) { (void) qa; }
60 void SetLabMeasurement(Bool_t set = kTRUE)
61 {
63 SetFeCalib(set);
64 }
65 void SetFeCalib(Bool_t set = kTRUE) { set ? SETBIT(fConfig, kLab) : CLRBIT(fConfig, kLab); }
66
71 void SetFasp(Bool_t set = kTRUE) { set ? SETBIT(fConfig, kFEE) : CLRBIT(fConfig, kFEE); }
72 void SetAsicPar(CbmTrdParModAsic* p = NULL);
73 Bool_t UseFasp() const { return TESTBIT(fConfig, kFEE); }
74
75private:
78
87 Bool_t ScanPadPlane(Double_t* point, Double_t dx, Double_t E, Double_t tdrift);
98 void AddDigi(Int_t address, Double_t* charge, Double_t time);
103 void DumpBuffer() const;
104
105 UChar_t fConfig;
109 ULong64_t fTimeOld;
110
111 ClassDef(CbmTrdModuleSim2D, 1)
112};
113
114#endif
#define SETBIT(n, i)
Definition RTypes.h:15
#define TESTBIT(n, i)
Definition RTypes.h:17
#define CLRBIT(n, i)
Definition RTypes.h:16
int Int_t
bool Bool_t
Bookkeeping of time-slice content.
FASP channel simulator.
Definition CbmTrdFASP.h:30
Bool_t ScanPadPlane(Double_t *point, Double_t dx, Double_t E, Double_t tdrift)
Build digits for the triangular pad geometry.
Bool_t IsFeCalib() const
void SetQA(CbmTrdCheckUtil *qa=NULL)
Bool_t MakeRaw()
Steering routine for converting MC point to raw format.
void SetAsicPar(CbmTrdParModAsic *p=NULL)
Int_t FlushBuffer(ULong64_t time=0)
Flush local buffer of digits which can no longer interact with current event.
CbmTimeSlice * fTimeSlice
link to CBM time slice
@ kLab
default simulate 55Fe, if set X-rays, see X-rays spectrum generator
@ kMeasurement
default simulate setup interactions, if set simulate laboratory measurement, see kLab
@ kFEE
FEE simulator. Default FASP otherwise SPADIC.
Bool_t MakeDigi(CbmTrdPoint *p, Double_t time, Bool_t TR)
Steer building of digits for triangular pad geometry.
CbmTrdModuleSim2D(const CbmTrdModuleSim2D &ref)
UChar_t fConfig
bit map for configuration. See class documentation
void SetMessageConverter(CbmTrdRawToDigiR *conv=NULL)
CbmTrdFASP * fFASP
FASP simulator.
CbmTrdModuleSim2D(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP=kTRUE)
ULong64_t fTimeOld
time [ns] of the last event processed (check CbmDaq)
void SetFasp(Bool_t set=kTRUE)
Set the FEE type operating on the chamber.
CbmTrdTrianglePRF * fTriangleBinning
Integration of PRF on triangular pad-plane geometry.
Bool_t IsLabMeasurement() const
const CbmTrdModuleSim2D & operator=(const CbmTrdModuleSim2D &ref)
Bool_t UseFasp() const
void AddDigi(Int_t address, Double_t *charge, Double_t time)
Adding triangular digits to time slice buffer.
void DumpBuffer() const
Print current buffer content.
void SetGamma(Double_t)
void SetFeCalib(Bool_t set=kTRUE)
void SetLabMeasurement(Bool_t set=kTRUE)
CbmTrdModuleSim()
Default constructor.
Describe TRD module ASIC settings (electronic gain, delays, etc)
Utility for converting energy to signal over the triangular pad geometry (Bucharest prototype)