Adrian Meyer-Ahrens (28bdb0ac) at 08 Feb 12:25
Renaming Bmon to T0 in AT converter
... and 149 more commits
Adrian Meyer-Ahrens (17ab3df0) at 01 Dec 16:44
thanks
@f.uhlig do you have any preferences here? If not, we are in principle ready to merge
Adrian Meyer-Ahrens (f8d79a40) at 27 Nov 13:36
apply format
Adrian Meyer-Ahrens (2858141b) at 27 Nov 13:29
convert radiator pointer into shared_ptr instead of constructing ne...
... and 3 more commits
When trying to do simulations with non-default radiator parameters I noticed that the parameters I set where always overwritten by the defaults.
For example if I set a radiator with 100 transitions in the run_digi.C
:
CbmDigitization run;
CbmTrdRadiator* radiator = new CbmTrdRadiator(true,100, 0.0012, 0.09, "pefoam20", "Kapton");
CbmTrdDigitizer *trddigitizer = new CbmTrdDigitizer(radiator);
run.SetDigitizer(ECbmModuleId::kTrd, trddigitizer);
the number of transitions in the actual digitization run were always reset to the default value of 337.
This seems to happen because the CbmTrdDigitizer
expects a shared_ptr<CbmTrdRadiator>
and when provided with a normal pointer it will create a new shared one (Line 85f):
CbmTrdDigitizer::CbmTrdDigitizer(CbmTrdRadiator* radiator)
: CbmTrdDigitizer(std::make_shared<CbmTrdRadiator>(radiator)) {};
The problem is that std::make_shared
will invoke the default constructor of CbmTrdRadiator
since no parameters are provided, thus overwriting any custom parameters set previously. I think instead of creating a new shared pointer one should convert the normal pointer into a shared pointer to keep the parameters.
I am not sure if this should be done by using std::shared_ptr
directly or using a static_cast
(or some other way?):
//option 1
CbmTrdDigitizer::CbmTrdDigitizer(CbmTrdRadiator* radiator)
: CbmTrdDigitizer(std::shared_ptr<CbmTrdRadiator>(radiator)) {};
//option 2
CbmTrdDigitizer::CbmTrdDigitizer(CbmTrdRadiator* radiator)
: CbmTrdDigitizer(static_cast<std::shared_ptr<CbmTrdRadiator>>(radiator)) {};
Both options seem to work in my case, I commited option 1 as it is a bit simpler to read in my opinion.
Adrian Meyer-Ahrens (a8870c47) at 27 Nov 13:00
convert radiator pointer into shared_ptr instead of constructing ne...
Adrian Meyer-Ahrens (a8870c47) at 27 Nov 12:48
convert radiator pointer into shared_ptr instead of constructing ne...
Sorry, was on vacation. The issue seems to be resolved right?
Fix some errors in classifier implementation:
if (TRDTrackIndex> 0)
, but since index starts at 0 it has to be if (TRDTrackIndex>= 0)
Adrian Meyer-Ahrens (0dec467a) at 23 Oct 10:58
Update Classifiers, fix errors in implementation
Adrian Meyer-Ahrens (ca319d7b) at 23 Aug 11:43
update z value due to change of coordinate system
But in general, I approve the changes
Just a detail here, but @lena.rossel_AT_stud.uni-frankfurt.de could you change the title of the merge request to something like "TRD: Fix errors in rectangular module sim ionization point calculation"? I think the current title gives the impression that the energy loss was calculated in a wrong way before. But this is not the case, the energy loss of the mc point is calculated by geant (correctly i hope ;) ) and this is not changed here. The only thing that is changed here, is on how many ionization points in the gas volume this energy loss will be spread.