Project

General

Profile

Actions

Bug #1338

closed

event rotation for UrQmd events from root files not working

Added by Norbert Herrmann almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Urgent
Target version:
Start date:
08/30/2019
Due date:
10/11/2019
% Done:

100%

Estimated time:
Spent time:

Description

mCBM event simulation with standard geometry delivers wrong results, since the events are not rotated by the setup angle of 25degree.

The reason behind is that the CbmEventGenerator functions MakeVertex(), MakeBeamAngle() are not called when reading the events.
In my opinion this is due to the fact that those functions are not declared virtual in the base class FairPrimaryGenerator.h
At least the problem got solved by locally changing FairPrimaryGenerator.h

May be, there are other/better ways to fix this ?

reference: macro/mcbm/mcbm_transport.C


Related issues

Related to Simulation - Sim-Development #335: Smeared vertex position is misplaced in rotated targetsClosedVolker Friese07/27/2015

Actions
Actions #1

Updated by Volker Friese almost 3 years ago

  • Status changed from New to In Progress
  • Assignee changed from Volker Friese to Florian Uhlig

You are right if you use a FairRoot version before 18.2.0, in which the respective methods were made virtual. I should have implemented a protection; the way it is now the failure goes unnoticed. Sorry for that and thanks for reporting.

Florian: what is the proper syntax to check the FairRoot version in the code and take proper action?

Actions #2

Updated by Volker Friese almost 3 years ago

Actions #3

Updated by Florian Uhlig almost 3 years ago

  • Assignee changed from Florian Uhlig to Volker Friese

You have to check the FairRoot version in CMake like in the example below.

If(FairRoot_VERSION VERSION_LESS 18.2.0)
Add_Definitions(-DHAVE_RootDeserializer)
EndIf()

In the code you can then check for the definition and execute the needed code

#ifdef HAVE_RootDeserializer

#else

#endif

Hope this helps.

Actions #4

Updated by Volker Friese almost 3 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Volker Friese to Norbert Herrmann
  • % Done changed from 0 to 100

Should be fixed with r14849. I decided against checking the FairRoot version; instead, I re-implemented FairPrimaryGenerator::GenerateEvent in CbmEventGenerator.

Please test.

Actions #5

Updated by Volker Friese over 2 years ago

Dear Norbert,

please close the issue if resolved satisfactorily.

Actions #6

Updated by Volker Friese over 2 years ago

  • Due date set to 10/11/2019
  • Status changed from Resolved to Closed

Closed after consultation with N. Herrmann.

Actions

Also available in: Atom PDF