11 #include "FairRootManager.h"
15 fEvent =
new FairMCEventHeader();
21 fEvent =
new FairMCEventHeader();
22 fCbmTracks =
new TClonesArray(
"CbmMCTrack", 1000);
24 FairRootManager* manager = FairRootManager::Instance();
25 TString event_name =
"MCEventHeader.";
26 TString track_name =
"MCTrack";
27 manager->Register(event_name,
"MCEventHeader",
fEvent, write);
28 manager->Register(track_name,
"CbmMCTrack",
fCbmTracks, write);
35 for (
int i = 0;
i < map_size;
i++) {
36 Int_t good_track = map[
i];
37 for (
int j = track_pos; j < good_track; j++) {
40 track_pos = good_track + 1;
46 FairMCEventHeader* header =
50 fEvent->SetRunID(header->GetRunID());
51 fEvent->SetEventID(header->GetEventID());
52 fEvent->SetVertex(header->GetX(), header->GetY(), header->GetZ());
53 fEvent->SetRotX(header->GetRotX());
54 fEvent->SetRotY(header->GetRotY());
55 fEvent->SetRotZ(header->GetRotZ());
56 fEvent->SetB(header->GetB());
57 fEvent->SetNPrim(header->GetNPrim());
71 FairMCEventHeader* header =
73 fEvent->SetRunID(header->GetRunID());
74 fEvent->SetEventID(header->GetEventID());
75 fEvent->SetVertex(header->GetX(), header->GetY(), header->GetZ());
76 fEvent->SetRotX(header->GetRotX());
77 fEvent->SetRotY(header->GetRotY());
78 fEvent->SetRotZ(header->GetRotZ());
79 fEvent->SetB(header->GetB());
80 fEvent->SetNPrim(header->GetNPrim());
82 for (
int i = 0;
i < map_size;
i++) {
92 track->SetRawTrack(
fCbmTracks->UncheckedAt(index));
103 vec.SetXYZT(vec3d.X(), vec3d.Y(), vec3d.Z(), 0);
108 if (CanDeleteEvent()) {
115 FairRootManager* manager = FairRootManager::Instance();
116 if (CanDeleteEvent()) {
120 fEvent = (FairMCEventHeader*) manager->GetObject(
"MCEventHeader.");
122 fEvent = (FairMCEventHeader*) manager->GetObject(
"EventHeader.");
123 fCbmTracks = (TClonesArray*) manager->GetObject(
"MCTrack");