GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » CBM » CBMROOT » General » CbmGenerators and MCEvent
CbmGenerators and MCEvent [message #8651] Tue, 26 May 2009 10:55 Go to previous message
Volker Friese is currently offline  Volker Friese
Messages: 365
Registered: April 2004
Location: GSI CBM
first-grade participant
From: *gsi.de
Latest chages in the framework offer the possibility to define experiment-specific classes for event information on the MC level.

For CBM, there is now the class CbmMCEvent (library cbmdata). It is very similar to the (still existing) class FairMCEventHeader, but adds the variable event plane angle. Further additions can be made on request.

The new class will be in the branch MCEvent. The old branch MCEventHeader (class FairMCEventHeader) is still present such as not to interfere with other fairroot users.

In the simulation macros, the instantiation of FairPrimaryGenerator must be replaced by the one of CbmPrimaryGenerator:
CbmPrimaryGenerator* primGen = new CbmPrimaryGenerator();
fRun->SetGenerator(primGen);       


The proper filling of the CbmMCEvent class is in the responsibility of the concrete generator class. The PrimaryGenerator takes care for the event vertex, event time and number of primary tracks. All other variables have to be filled by the concrete classes (derived from FairGenerator). Example:

// -----   Public method ReadEvent   --------------------------------------
Bool_t CbmHsdLvmGenerator::ReadEvent(FairPrimaryGenerator* primGen) {

  ....
  ....

  // --> Convert to CbmPrimaryGenerator
  CbmPrimaryGenerator* cbmGen = (CbmPrimaryGenerator*) primGen;

  // Set event information
  CbmMCEvent* event = cbmGen->GetEvent();
  if ( ! event->IsSet() ) {
    event->SetEventID(++fCurrentEvent);
    event->SetB(b);
    event->SetPhi(0.);
  }

}
 
Read Message
Read Message
Read Message
Previous Topic: FairMCEventHeader
Next Topic: CBMROOT release JUN09
Goto Forum:
  


Current Time: Tue Nov 26 01:28:34 CET 2024

Total time taken to generate the page: 0.00820 seconds