25 for (
unsigned int i = 0;
i <
size(); ++
i)
26 (*
this)[
i]->set_geometry(
geo);
35 ATH_MSG_ERROR(
"now in TFCSParametrizationBase::simulate(). This should "
36 "normally not happen");
54 bool shortprint =
opt.Index(
"short") >= 0;
56 TString optprint =
opt;
57 optprint.ReplaceAll(
"short",
"");
92 for (
unsigned int i = 0;
i <
size(); ++
i)
97 auto checkexist = dup.find(param);
98 if (checkexist != dup.end()) {
100 << param->GetName());
101 if (checkexist->second.replace) {
104 << refparam <<
"=" << refparam->GetName()
105 <<
", duplicate is " << param <<
"=" << param->GetName()
106 <<
" index " <<
i <<
" of " <<
this);
107 dup[refparam].mother.push_back(
this);
108 dup[refparam].index.push_back(
i);
114 for (
auto &
ref : dup) {
117 if (param == refparam)
120 if (refparam ==
nullptr)
123 if (
ref.second.replace)
126 if (*param == *refparam) {
128 << refparam <<
"=" << refparam->GetName()
129 <<
", duplicate is " << param <<
"=" << param->GetName()
130 <<
" index " <<
i <<
" of " <<
this);
131 dup[param].replace = refparam;
132 dup[refparam].mother.push_back(
this);
133 dup[refparam].index.push_back(
i);
146 std::set<TFCSParametrizationBase *> dellist;
147 for (
auto &dupiter : dupclasses) {
149 for (
auto onedup : dup) {
150 if (onedup.second.mother.empty())
154 for (
unsigned int i = 0;
i < onedup.second.mother.size(); ++
i) {
155 int index = onedup.second.index[
i];
158 unsigned int delcount = dup[delparam].mother.
size();
161 << delparam <<
"=" << delparam->GetName() <<
" index "
162 <<
index <<
" of " << mother <<
", has " << delcount
163 <<
" other replacements attached. Deleting");
165 dellist.insert(delparam);
168 << delparam <<
"=" << delparam->GetName() <<
" index "
169 <<
index <<
" of " << mother <<
", has " << delcount
170 <<
" other replacements attached. Skipping");
180 std::map<std::string, int> ndel;
181 for (
auto *delparam : dellist) {
183 bool present = dup2.find(delparam) != dup2.end();
186 << delparam->GetName()
187 <<
" still referenced somewhere!");
190 << delparam->GetName());
191 ++ndel[delparam->ClassName()];
195 for (
auto &del : ndel)
196 ATH_MSG_INFO(
"Deleted " << del.second <<
" duplicate objects of class "
201 for (
unsigned int i = 0;
i <
size(); ++
i)
213 void TFCSParametrizationBase::Copy2GPU() {
214 for (
unsigned int i = 0;
i <
size(); ++
i) {
218 TString
name = param->ClassName();
219 if (
name.EqualTo(
"TFCSLateralShapeParametrizationHitChain")) {
221 for (
size_t ichain = 0; ichain <
size; ++ichain) {
224 TString hitsimname = hitsim->ClassName();
225 if (hitsimname.EqualTo(
"TFCSHistoLateralShapeParametrization")) {
227 }
else if (hitsimname.EqualTo(
"TFCSHitCellMappingWiggle")) {
229 }
else if (hitsimname.EqualTo(
"TFCSHistoLateralShapeGausLogWeight")) {