Skip to content

Commit 6fbc0f9

Browse files
authored
add ITS sensors to parallel world (#13163)
* add possibility to use TGeo parallel world navigation * add virtual interface that allows detector to add volumes to parallel world * implement ITS parallel world
1 parent 63b85d4 commit 6fbc0f9

File tree

16 files changed

+186
-7
lines changed

16 files changed

+186
-7
lines changed

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/AlignParam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class AlignParam
136136
ClassDefNV(AlignParam, 1);
137137
};
138138

139-
}
140-
}
139+
} // namespace detectors
140+
} // namespace o2
141141

142142
#endif

Detectors/Base/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ o2_add_library(DetectorsBase
1414
src/GeometryManager.cxx
1515
src/MaterialManager.cxx
1616
src/MaterialManagerParam.cxx
17+
src/GeometryManagerParam.cxx
1718
src/Propagator.cxx
1819
src/MatLayerCyl.cxx
1920
src/MatLayerCylSet.cxx
@@ -51,6 +52,7 @@ o2_target_root_dictionary(DetectorsBase
5152
include/DetectorsBase/GeometryManager.h
5253
include/DetectorsBase/MaterialManager.h
5354
include/DetectorsBase/MaterialManagerParam.h
55+
include/DetectorsBase/GeometryManagerParam.h
5456
include/DetectorsBase/Propagator.h
5557
include/DetectorsBase/Ray.h
5658
include/DetectorsBase/MatCell.h

Detectors/Base/include/DetectorsBase/Detector.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ class Detector : public FairDetector
106106
/// declare alignable volumes of detector
107107
virtual void addAlignableVolumes() const;
108108

109+
/// fill parallel geometry with sensitive volumes of detector
110+
virtual void fillParallelWorld() const;
111+
109112
/// Sets per wrapper volume parameters
110113
virtual void defineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan);
111114

Detectors/Base/include/DetectorsBase/GeometryManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ class GeometryManager : public TObject
8686
double meanZ = 0.; // mean Z: sum(x_i*Z_i)/sum(x_i) [adimensional]
8787
double meanZ2A = 0.; // Z/A mean: sum(x_i*Z_i/A_i)/sum(x_i) [adimensional]
8888
double length = -1.; // length: sum(x_i) [cm]
89-
int nCross = 0;
90-
; // number of boundary crosses
89+
int nCross = 0; // number of boundary crosses
9190

9291
MatBudgetExt() = default;
9392
~MatBudgetExt() = default;
@@ -132,6 +131,7 @@ class GeometryManager : public TObject
132131
/// detector geometry. The output global matrix is stored in 'm'.
133132
/// Returns kFALSE in case TGeo has not been initialized or the volume path is not valid.
134133
static Bool_t getOriginalMatrixFromPath(const char* path, TGeoHMatrix& m);
134+
135135
private:
136136
/// sensitive volume identifier composed from (det_ID<<sDetOffset)|(sensid&sSensorMask)
137137
static constexpr UInt_t sDetOffset = 15; /// detector identifier will start from this bit
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
#ifndef DETECTORS_BASE_INCLUDE_GEOMETRYMANAGERPARAM_H_
13+
#define DETECTORS_BASE_INCLUDE_GEOMETRYMANAGERPARAM_H_
14+
15+
#include "CommonUtils/ConfigurableParam.h"
16+
#include "CommonUtils/ConfigurableParamHelper.h"
17+
18+
namespace o2
19+
{
20+
21+
struct GeometryManagerParam : public o2::conf::ConfigurableParamHelper<GeometryManagerParam> {
22+
bool useParallelWorld = false;
23+
bool usePwGeoBVH = false;
24+
bool usePwCaching = false;
25+
26+
O2ParamDef(GeometryManagerParam, "GeometryManagerParam");
27+
};
28+
29+
} // namespace o2
30+
31+
#endif /* DETECTORS_BASE_INCLUDE_GEOMETRYMANAGERPARAM_H_ */

Detectors/Base/src/Detector.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ void Detector::addAlignableVolumes() const
171171
LOG(warning) << "Alignable volumes are not yet defined for " << GetName();
172172
}
173173

174+
void Detector::fillParallelWorld() const
175+
{
176+
}
177+
174178
int Detector::registerSensitiveVolumeAndGetVolID(TGeoVolume const* vol)
175179
{
176180
// register this volume with FairRoot

Detectors/Base/src/DetectorsBaseLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#pragma link C++ class o2::base::GeometryManager::MatBudgetExt + ;
2727
#pragma link C++ class o2::base::MaterialManager + ;
2828
#pragma link C++ class o2::MaterialManagerParam + ;
29+
#pragma link C++ class o2::GeometryManagerParam + ;
2930
#pragma link C++ class o2::base::SimFieldUtils + ;
3031

3132
#pragma link C++ class o2::base::Ray + ;

Detectors/Base/src/GeometryManager.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/// \file GeometryManager.cxx
1313
/// \brief Implementation of the GeometryManager class
1414

15-
#include <fairlogger/Logger.h> // for LOG
16-
#include <TCollection.h> // for TIter
15+
#include <fairlogger/Logger.h> // for LOG
16+
#include <TCollection.h> // for TIter
1717
#include <TFile.h>
1818
#include <TGeoMatrix.h> // for TGeoHMatrix
1919
#include <TGeoNode.h> // for TGeoNode
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
#include "DetectorsBase/GeometryManagerParam.h"
13+
O2ParamImpl(o2::GeometryManagerParam);

Detectors/ITSMFT/ITS/simulation/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ o2_add_library(ITSSimulation
1313
SOURCES src/V11Geometry.cxx src/V1Layer.cxx src/V3Layer.cxx
1414
src/Detector.cxx src/V3Services.cxx src/V3Cage.cxx
1515
src/DescriptorInnerBarrelITS2.cxx src/ITSDataSimulator.cxx
16+
src/ITSSimParam.cxx
1617
PUBLIC_LINK_LIBRARIES O2::ITSBase O2::ITSMFTSimulation ROOT::Physics
1718
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Base> $<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Simulation>)
1819

@@ -24,7 +25,8 @@ o2_target_root_dictionary(ITSSimulation
2425
include/ITSSimulation/V3Cage.h
2526
include/ITSSimulation/V11Geometry.h
2627
include/ITSSimulation/V3Services.h
27-
include/ITSSimulation/DescriptorInnerBarrelITS2.h)
28+
include/ITSSimulation/DescriptorInnerBarrelITS2.h
29+
include/ITSSimulation/ITSSimParam.h)
2830

2931
o2_data_file(COPY data DESTINATION Detectors/ITS/simulation)
3032

0 commit comments

Comments
 (0)