1+ // Copyright CERN and copyright holders of ALICE O2. This software is
2+ // distributed under the terms of the GNU General Public License v3 (GPL
3+ // Version 3), copied verbatim in the file "COPYING".
4+ //
5+ // See http://alice-o2.web.cern.ch/license for full licensing information.
6+ //
7+ // In applying this license CERN does not waive the privileges and immunities
8+ // granted to it by virtue of its status as an Intergovernmental Organization
9+ // or submit itself to any jurisdiction.
10+
11+ #ifndef O2_MCH_SIMULATION_GEOMETRYTEST_H
12+ #define O2_MCH_SIMULATION_GEOMETRYTEST_H
13+
14+ #include < iostream>
15+
16+ class TH2 ;
17+
18+ namespace o2
19+ {
20+ namespace mch
21+ {
22+ namespace test
23+ {
24+
25+ // / creates MCH geometry from scratch (i.e. from a null TGeoManager)
26+ // / usefull for tests or drawing for instance.
27+ void createStandaloneGeometry ();
28+
29+ // / tree like textual dump of the geometry nodes
30+ void showGeometryAsTextTree (const char * fromPath = " " , int maxdepth = 2 , std::ostream& out = std::cout);
31+
32+ // / basic drawing of the geometry
33+ void drawGeometry ();
34+
35+ // / set the volume and daughter visibility for all volumes with a name matching the regexp pattern
36+ void setVolumeVisibility (const char * pattern, bool visible, bool visibleDaughters);
37+
38+ // / set the volume line and fill for all volumes with a name matching the regexp pattern
39+ void setVolumeColor (const char * pattern, int lineColor, int fillColor);
40+ inline void setVolumeColor (const char * pattern, int color)
41+ {
42+ setVolumeColor (pattern, color, color);
43+ }
44+
45+ // / get a radlen radiograph of a given detection element within box with the given granularity
46+ TH2 * getRadio (int detElemId, float xmin, float ymin, float xmax, float ymax, float xstep, float ystep, float thickness = 5 /* cm */ );
47+
48+ class Dummy
49+ {
50+ // to force Root produce a dictionary for namespace test (seems it is doing it fully if there are only functions in the namespace)
51+ };
52+ } // namespace test
53+ } // namespace mch
54+ } // namespace o2
55+
56+ #endif
0 commit comments