@@ -61,10 +61,17 @@ Detector::Detector(bool active)
6161
6262 LOGP (info, " Summary of TRK configuration:" );
6363 for (auto & layer : mLayers ) {
64- LOGP (info, " Layer: {} name: {} r: {} cm | z: {} cm | thickness: {} cm" , layer. getNumber (), layer. getName (), layer. getInnerRadius (), layer. getZ (), layer. getChipThickness ());
64+ LOGP (info, " Layer: {} name: {} r: {} cm | z: {} cm | thickness: {} cm" , layer-> getNumber (), layer-> getName (), layer-> getInnerRadius (), layer-> getZ (), layer-> getChipThickness ());
6565 }
6666}
6767
68+ Detector::Detector (const Detector& other)
69+ : o2::base::DetImpl<Detector>(other),
70+ mTrackData (),
71+ mHits (o2::utils::createSimVector<o2::trk::Hit>())
72+ {
73+ }
74+
6875Detector::~Detector ()
6976{
7077 if (mHits ) {
@@ -88,26 +95,28 @@ void Detector::configMLOT()
8895 const float thick = 100 .e -3 ;
8996
9097 switch (trkPars.layoutMLOT ) {
91- case kCylindrical :
98+ case kCylindrical : {
9299 const std::vector<float > length{128 .35f , 128 .35f , 128 .35f , 128 .35f , 128 .35f , 256 .7f , 256 .7f , 256 .7f };
93100 LOGP (warning, " Loading cylindrical configuration for ALICE3 TRK" );
94101 for (int i{0 }; i < 8 ; ++i) {
95102 std::string name = GeometryTGeo::getTRKLayerPattern () + std::to_string (i);
96- mLayers .push_back (std::make_unique<TRKCylindricalLayer>(i, name, rInn[i], length[i], thick));
103+ mLayers .push_back (std::make_unique<TRKCylindricalLayer>(i, name, rInn[i], length[i], thick, MatBudgetParamMode::Thickness ));
97104 }
98105 break ;
99- case kSegmented :
106+ }
107+ case kSegmented : {
100108 const std::vector<int > nMods{10 , 10 , 10 , 10 , 10 , 20 , 20 , 20 };
101109 LOGP (warning, " Loading segmented configuration for ALICE3 TRK" );
102110 for (int i{0 }; i < 8 ; ++i) {
103111 std::string name = GeometryTGeo::getTRKLayerPattern () + std::to_string (i);
104112 if (i < 4 ) {
105- mLayers .push_back (std::make_unique<TRKMLLayer>(i, name, rInn[i], nMods[i], thick));
113+ mLayers .push_back (std::make_unique<TRKMLLayer>(i, name, rInn[i], nMods[i], thick, MatBudgetParamMode::Thickness ));
106114 } else {
107- mLayers .push_back (std::make_unique<TRKOTLayer>(i, name, rInn[i], nMods[i], thick));
115+ mLayers .push_back (std::make_unique<TRKOTLayer>(i, name, rInn[i], nMods[i], thick, MatBudgetParamMode::Thickness ));
108116 }
109117 }
110118 break ;
119+ }
111120 default :
112121 LOGP (fatal, " Unknown option {} for configMLOT" , static_cast <int >(trkPars.layoutMLOT ));
113122 break ;
@@ -146,14 +155,14 @@ void Detector::configFromFile(std::string fileName)
146155 std::string name = GeometryTGeo::getTRKLayerPattern () + std::to_string (layerCount);
147156 switch (trkPars.layoutMLOT ) {
148157 case kCylindrical :
149- mLayers .push_back (std::make_unique<TRKCylindricalLayer>(layerCount, name, tmpBuff[0 ], tmpBuff[1 ], tmpBuff[2 ]));
158+ mLayers .push_back (std::make_unique<TRKCylindricalLayer>(layerCount, name, tmpBuff[0 ], tmpBuff[1 ], tmpBuff[2 ], MatBudgetParamMode::Thickness ));
150159 break ;
151160 case kSegmented : {
152161 int nMods = static_cast <int >(tmpBuff[1 ]);
153162 if (layerCount < 4 ) {
154- mLayers .push_back (std::make_unique<TRKMLLayer>(layerCount, name, tmpBuff[0 ], nMods, tmpBuff[2 ]));
163+ mLayers .push_back (std::make_unique<TRKMLLayer>(layerCount, name, tmpBuff[0 ], nMods, tmpBuff[2 ], MatBudgetParamMode::Thickness ));
155164 } else {
156- mLayers .push_back (std::make_unique<TRKOTLayer>(layerCount, name, tmpBuff[0 ], nMods, tmpBuff[2 ]));
165+ mLayers .push_back (std::make_unique<TRKOTLayer>(layerCount, name, tmpBuff[0 ], nMods, tmpBuff[2 ], MatBudgetParamMode::Thickness ));
157166 }
158167 break ;
159168 }
@@ -171,8 +180,8 @@ void Detector::configToFile(std::string fileName)
171180 LOGP (info, " Exporting TRK Detector layout to {}" , fileName);
172181 std::ofstream conFile (fileName.c_str (), std::ios::out);
173182 conFile << " /// TRK configuration file: inn_radius z_length lay_thickness" << std::endl;
174- for (auto layer : mLayers ) {
175- conFile << layer. getInnerRadius () << " \t " << layer. getZ () << " \t " << layer. getChipThickness () << std::endl;
183+ for (const auto & layer : mLayers ) {
184+ conFile << layer-> getInnerRadius () << " \t " << layer-> getZ () << " \t " << layer-> getChipThickness () << std::endl;
176185 }
177186}
178187
@@ -237,7 +246,7 @@ void Detector::createGeometry()
237246 vTRK->SetTitle (vstrng);
238247
239248 for (auto & layer : mLayers ) {
240- layer. createLayer (vTRK);
249+ layer-> createLayer (vTRK);
241250 }
242251
243252 // Add service for inner tracker
0 commit comments