Project
Loading...
Searching...
No Matches
O2TrivialMCApplication.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12// An absolut minimal implementation of a TVirtualMCApplication for studies and code that e.g. only depends on the presence of a VMC.
13
14#ifndef ALICEO2_MC_TRIVIALMCAPPLICATION_H_
15#define ALICEO2_MC_TRIVIALMCAPPLICATION_H_
16
17#include "TGeoManager.h"
18#include "TGeoBBox.h"
19#include "TGeoMaterial.h"
20#include "TGeoMedium.h"
21
22#include "TVirtualMCApplication.h"
23
24namespace o2
25{
26
27namespace mc
28{
29
31{
32 public:
33 O2TrivialMCApplication() : TVirtualMCApplication("O2TrivialMCApplication", "O2TrivialMCApplication") {}
34 ~O2TrivialMCApplication() override = default;
36 void ConstructGeometry() override
37 {
38 auto geoMgr = gGeoManager;
39 // we need some dummies, any material and medium will do
40 auto mat = new TGeoMaterial("vac", 0, 0, 0);
41 auto med = new TGeoMedium("vac", 1, mat);
42 auto vol = geoMgr->MakeBox("cave", med, 1, 1, 1);
43 geoMgr->SetTopVolume(vol);
44 geoMgr->CloseGeometry();
45 }
46 void InitGeometry() override {}
47 void GeneratePrimaries() override {}
48 void BeginEvent() override {}
49 void BeginPrimary() override {}
50 void PreTrack() override {}
51 void Stepping() override {}
52 void PostTrack() override {}
53 void FinishPrimary() override {}
54 void FinishEvent() override {}
56 {
57 return new O2TrivialMCApplication(*this);
58 }
59};
60
61} // namespace mc
62
63} // namespace o2
64
65#endif
~O2TrivialMCApplication() override=default
O2TrivialMCApplication(O2TrivialMCApplication const &app)
TVirtualMCApplication * CloneForWorker() const override
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...