CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
CocoaToDDLMgr Class Reference

#include <CocoaToDDLMgr.h>

Public Member Functions

ALIint buildRotationNumber (OpticalObject *opto)
 
 CocoaToDDLMgr ()
 
void lv (OpticalObject *opto)
 
void ma (CocoaMaterialElementary *ma)
 
ALIbool materialIsRepeated (CocoaMaterialElementary *ma)
 
void measurementsAsSpecPars ()
 
void newPartPost (std::string name, std::string extension)
 
void newPartPre (std::string name)
 
void newSectPost (std::string name)
 
void newSectPost_lv (std::string name)
 
void newSectPost_ma (std::string name)
 
void newSectPost_pv (std::string name)
 
void newSectPost_ro (std::string name)
 
void newSectPost_so (std::string name)
 
void newSectPost_specPar (std::string name)
 
void newSectPre (std::string name, std::string type)
 
void newSectPre_lv (std::string name)
 
void newSectPre_ma (std::string name)
 
void newSectPre_pv (std::string name)
 
void newSectPre_ro (std::string name)
 
void newSectPre_so (std::string name)
 
void newSectPre_specPar (std::string name)
 
void pv (OpticalObject *opto)
 
void ro (const CLHEP::HepRotation &ro, int n)
 
std::string scrubString (const std::string &s)
 
void so (OpticalObject *opto)
 
void specPar (OpticalObject *opto)
 
void writeDDDFile (ALIstring filename)
 
void writeHeader (ALIstring filename)
 
void writeLogicalVolumes ()
 
void writeMaterials ()
 
void writePhysicalVolumes ()
 
void writeRotations ()
 
void writeSolids ()
 
void writeSpecPars ()
 
void writeSpecParsCocoa ()
 
 ~CocoaToDDLMgr ()
 

Static Public Member Functions

static CocoaToDDLMgrgetInstance ()
 

Private Attributes

ALIFileOut file_
 
std::string filename_
 
std::vector
< CocoaMaterialElementary * > 
theMaterialList
 
std::vector< CLHEP::HepRotation > theRotationList
 

Static Private Attributes

static CocoaToDDLMgrinstance = nullptr
 

Detailed Description

Definition at line 25 of file CocoaToDDLMgr.h.

Constructor & Destructor Documentation

CocoaToDDLMgr::CocoaToDDLMgr ( )
inline

Definition at line 28 of file CocoaToDDLMgr.h.

Referenced by getInstance().

28 {};
CocoaToDDLMgr::~CocoaToDDLMgr ( )
inline

Definition at line 29 of file CocoaToDDLMgr.h.

29 {};

Member Function Documentation

ALIint CocoaToDDLMgr::buildRotationNumber ( OpticalObject opto)

Definition at line 741 of file CocoaToDDLMgr.cc.

References OpticalObject::rmLocal(), and theRotationList.

Referenced by pv().

741  {
742  ALIint rotnum = -1;
743 
744  if (opto->rmLocal().isIdentity())
745  return rotnum;
746 
747  std::vector<CLHEP::HepRotation>::const_iterator ite;
748 
749  int nc = 0;
750  for (ite = theRotationList.begin(); ite != theRotationList.end(); ++ite) {
751  if ((*ite) == opto->rmLocal()) {
752  rotnum = nc;
753  break;
754  }
755  nc++;
756  }
757 
758  if (rotnum == -1) {
759  theRotationList.push_back(opto->rmLocal());
760  rotnum = theRotationList.size() - 1;
761  }
762 
763  return rotnum;
764 }
const CLHEP::HepRotation rmLocal() const
int ALIint
Definition: CocoaGlobals.h:15
std::vector< CLHEP::HepRotation > theRotationList
Definition: CocoaToDDLMgr.h:77
CocoaToDDLMgr * CocoaToDDLMgr::getInstance ( )
static

Definition at line 23 of file CocoaToDDLMgr.cc.

References CocoaToDDLMgr(), and instance.

23  {
24  if (!instance) {
25  instance = new CocoaToDDLMgr;
26  }
27  return instance;
28 }
static CocoaToDDLMgr * instance
Definition: CocoaToDDLMgr.h:71
void CocoaToDDLMgr::lv ( OpticalObject opto)

Definition at line 425 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, file_, OpticalObject::getMaterial(), CocoaMaterialElementary::getName(), OpticalObject::name(), mergeVDriftHistosByStation::name, OpticalObject::shortName(), AlCaHLTBitMon_QueryRunRegistry::string, and OpticalObject::type().

Referenced by writeLogicalVolumes().

425  {
426  std::string name = opto->shortName();
427  std::string rSolid = opto->shortName();
428  std::string sensitive = "unspecified";
429 
430  if (opto->type() == "system") {
431  file_ << " <LogicalPart name=\"" << name << "\" category=\"" << sensitive << "\">" << std::endl
432  << " <rSolid name=\"" << rSolid << "\"/>" << std::endl
433  << " <rMaterial name=\"Hydrogen\""
434  << "/>" << std::endl
435  << " </LogicalPart>" << std::endl;
436  return;
437  }
438 
439 #ifdef gdebug_v
440  cout << "xml:lv " << opto->name() << std::endl;
441 #endif
442  file_ << " <LogicalPart name=\"" << name << "\" category=\"" << sensitive << "\">" << std::endl
443  << " <rSolid name=\"" << rSolid << "\"/>" << std::endl
444  << " <rMaterial name=\"" << opto->getMaterial()->getName() << "\""
445  << "/>" << std::endl
446  << " </LogicalPart>" << std::endl;
447 }
CocoaMaterialElementary * getMaterial() const
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
const ALIstring shortName() const
tuple cout
Definition: gather_cfg.py:144
const ALIstring & name() const
Definition: OpticalObject.h:58
const ALIstring & type() const
Definition: OpticalObject.h:59
void CocoaToDDLMgr::ma ( CocoaMaterialElementary ma)

g*cm3;

Definition at line 198 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, file_, CocoaMaterialElementary::getA(), CocoaMaterialElementary::getDensity(), CocoaMaterialElementary::getName(), CocoaMaterialElementary::getSymbol(), CocoaMaterialElementary::getZ(), theMaterialList, and UC.

Referenced by materialIsRepeated(), and writeMaterials().

198  {
199  theMaterialList.push_back(ma);
200 
201 #ifdef gdebug
202  cout << " ma:" << ma->getName() << std::endl;
203 #endif
204 
205  ALIfloat density = ma->getDensity();
206 
207  // start tag
208  file_ << " <ElementaryMaterial";
209  ALIstring cSymbol = ma->getSymbol();
210 
211  // name attribute
212  file_ << " name=\"" << ma->getName() << "\"";
213 
214  // put out common attributes
215  // file_ << " density=\"" << UnitConverter(density,"Volumic Mass") << "\"";
216  file_ << " density=\"" << UC(density, "Volumic Mass") << "\"";
217  file_ << " symbol=\"" << ma->getSymbol() << "\"";
218 
219  // finish last two attributes and end material element
220  file_ << " atomicWeight=\"" << (ma->getA()) << "*g/mole\""
221  << " atomicNumber=\"" << ma->getZ() << "\""
222  << "/>" << std::endl;
223 }
float ALIfloat
Definition: CocoaGlobals.h:13
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
std::vector< CocoaMaterialElementary * > theMaterialList
Definition: CocoaToDDLMgr.h:76
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
std::string ALIstring
Definition: CocoaGlobals.h:9
tuple cout
Definition: gather_cfg.py:144
ALIbool CocoaToDDLMgr::materialIsRepeated ( CocoaMaterialElementary ma)

Definition at line 698 of file CocoaToDDLMgr.cc.

References ma(), and theMaterialList.

Referenced by writeMaterials().

698  {
699  ALIbool isRepeated = false;
700  std::vector<CocoaMaterialElementary*>::const_iterator ite;
701 
702  for (ite = theMaterialList.begin(); ite != theMaterialList.end(); ++ite) {
703  if (*(*ite) == *ma) {
704  isRepeated = true;
705  break;
706  }
707  }
708 
709  return isRepeated;
710 }
bool ALIbool
Definition: CocoaGlobals.h:19
std::vector< CocoaMaterialElementary * > theMaterialList
Definition: CocoaToDDLMgr.h:76
void ma(CocoaMaterialElementary *ma)
void CocoaToDDLMgr::measurementsAsSpecPars ( )

Definition at line 617 of file CocoaToDDLMgr.cc.

References Measurement::dim(), file_, cuy::ii, Model::MeasurementList(), OpticalObject::name(), Measurement::name(), Measurement::OptONameList(), Measurement::sigma(), AlCaHLTBitMon_QueryRunRegistry::string, Measurement::type(), Measurement::value(), Measurement::valueIsSimulated(), and Measurement::valueType().

Referenced by writeSpecPars().

617  {
618  std::vector<Measurement*> measlist = Model::MeasurementList();
619  std::vector<Measurement*>::iterator mite;
620  std::vector<ALIstring>::iterator site;
621  std::multimap<OpticalObject*, Measurement*> optoMeasMap;
622  for (mite = measlist.begin(); mite != measlist.end(); ++mite) {
623  auto& optolist = (*mite)->OptOList();
624  OpticalObject* opto = optolist[optolist.size() - 1];
625  optoMeasMap.insert(std::multimap<OpticalObject*, Measurement*>::value_type(opto, *mite));
626  }
627 
628  typedef std::multimap<OpticalObject*, Measurement*>::const_iterator itemom;
629  itemom omite;
630  std::pair<itemom, itemom> omitep;
631  itemom omite2, omite3;
632 
633  for (omite = optoMeasMap.begin(); omite != optoMeasMap.end(); ++omite) {
634  omitep = optoMeasMap.equal_range((*omite).first);
635  if (omite != optoMeasMap.begin() && (*omite).first == (*omite3).first)
636  continue; // check that it is not the same OptO than previous one
637  omite3 = omite;
638  for (omite2 = omitep.first; omite2 != omitep.second; ++omite2) {
639  OpticalObject* opto = (*(omite2)).first;
640  Measurement* meas = (*(omite2)).second;
641  std::vector<ALIstring> namelist = meas->OptONameList();
642  if (omite2 == omitep.first) {
643  file_ << " <SpecPar name=\"" << meas->name() << "_MEASUREMENT\">" << std::endl;
644  file_ << " <PartSelector path=\"/" << opto->name() << "\"/> " << std::endl;
645  }
646 
647  file_ << " <Parameter name=\"" << std::string("meas_name") << "\" value=\"" << meas->name()
648  << "\" eval=\"false\" /> " << std::endl;
649  file_ << " <Parameter name=\"" << std::string("meas_type") << "\" value=\"" << meas->type()
650  << "\" eval=\"false\" /> " << std::endl;
651  for (site = namelist.begin(); site != namelist.end(); ++site) {
652  file_ << " <Parameter name=\"" << std::string("meas_object_name_") + meas->name() << "\" value=\"" << (*site)
653  << "\" eval=\"false\" /> " << std::endl;
654  }
655  for (ALIuint ii = 0; ii < meas->dim(); ii++) {
656  file_ << " <Parameter name=\"" << std::string("meas_value_name_") + meas->name() << "\" value=\""
657  << meas->valueType(ii) << "\" eval=\"false\" /> " << std::endl;
658  file_ << " <Parameter name=\"" << std::string("meas_value_") + meas->name() << "\" value=\""
659  << meas->value(ii) << "\" eval=\"true\" /> " << std::endl;
660  file_ << " <Parameter name=\"" << std::string("meas_sigma_") + meas->name() << "\" value=\""
661  << meas->sigma(ii) << "\" eval=\"true\" /> " << std::endl;
662  file_ << " <Parameter name=\"" << std::string("meas_is_simulated_value_") + meas->name() << "\" value=\""
663  << meas->valueIsSimulated(ii) << "\" eval=\"true\" /> " << std::endl;
664  }
665  }
666  file_ << " </SpecPar>" << std::endl;
667  }
668 }
bool valueIsSimulated(ALIint coor)
Definition: Measurement.h:156
const ALIuint dim() const
Definition: Measurement.h:82
const ALIstring valueType(ALIuint ii) const
Definition: Measurement.h:116
int ii
Definition: cuy.py:589
const ALIdouble * sigma() const
Definition: Measurement.h:112
const std::vector< ALIstring > & OptONameList() const
Definition: Measurement.h:99
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
const ALIdouble * value() const
Definition: Measurement.h:109
const ALIstring & type() const
Definition: Measurement.h:84
const ALIstring & name() const
Definition: Measurement.h:86
const ALIstring & name() const
Definition: OpticalObject.h:58
static std::vector< Measurement * > & MeasurementList()
Definition: Model.h:88
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void CocoaToDDLMgr::newPartPost ( std::string  name,
std::string  extension 
)

Definition at line 183 of file CocoaToDDLMgr.cc.

References file_.

Referenced by writeDDDFile().

183  {
184  file_ << std::endl << "</DDDefinition>" << std::endl;
185  file_.close();
186 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
void CocoaToDDLMgr::newPartPre ( std::string  name)

Definition at line 165 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, file_, filename_, and mergeVDriftHistosByStation::name.

Referenced by writeHeader().

165  {
166  filename_ = name;
167  file_.open(filename_.c_str());
168  file_.precision(8);
169  file_ << "<?xml version=\"1.0\"?>" << std::endl;
170 
171  // all files get schema references and namespaces.
172  file_ << "<DDDefinition xmlns=\"http://www.cern.ch/cms/DDL\""
173  << " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
174  << " xsi:schemaLocation=\"http://www.cern.ch/cms/DDL ../../DDLSchema/DDLSchema.xsd\">" << std::endl
175  << std::endl;
176 
177 #ifdef gdebug
178  cout << "part-pre:" << name << std::endl;
179 #endif
180 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
std::string filename_
Definition: CocoaToDDLMgr.h:74
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::newSectPost ( std::string  name)

Definition at line 695 of file CocoaToDDLMgr.cc.

References file_.

Referenced by newSectPost_lv(), newSectPost_ma(), newSectPost_pv(), newSectPost_ro(), newSectPost_so(), and newSectPost_specPar().

695 { file_ << "</" << name << ">" << std::endl << std::endl; }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
void CocoaToDDLMgr::newSectPost_lv ( std::string  name)

Definition at line 450 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writeLogicalVolumes().

450  {
451 #ifdef gdebug
452  cout << " sect-lv-post:" << name << '-' << std::endl;
453 #endif
454  newSectPost("LogicalPartSection");
455 }
tuple cout
Definition: gather_cfg.py:144
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_ma ( std::string  name)

Definition at line 226 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writeMaterials().

226  {
227 #ifdef gdebug
228  cout << " sect-mat-post:" << name << '-' << std::endl;
229 #endif
230  newSectPost("MaterialSection");
231 }
tuple cout
Definition: gather_cfg.py:144
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_pv ( std::string  name)

Definition at line 506 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writePhysicalVolumes().

506  {
507 #ifdef gdebug
508  cout << " sect-pv-post:" << name << '-' << std::endl;
509 #endif
510  newSectPost("PosPartSection");
511 }
tuple cout
Definition: gather_cfg.py:144
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_ro ( std::string  name)

Definition at line 544 of file CocoaToDDLMgr.cc.

References newSectPost().

Referenced by writeRotations().

544 { newSectPost("RotationSection"); }
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_so ( std::string  name)

Definition at line 408 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writeSolids().

408  {
409 #ifdef gdebug
410  cout << " sect-so-post:" << name << '-' << std::endl;
411 #endif
412  newSectPost("SolidSection");
413 }
tuple cout
Definition: gather_cfg.py:144
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_specPar ( std::string  name)

Definition at line 685 of file CocoaToDDLMgr.cc.

References newSectPost().

Referenced by writeSpecPars().

685 { newSectPost("SpecParSection"); }
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPre ( std::string  name,
std::string  type 
)

Definition at line 690 of file CocoaToDDLMgr.cc.

References file_.

Referenced by newSectPre_lv(), newSectPre_ma(), newSectPre_pv(), newSectPre_ro(), and newSectPre_so().

690  {
691  file_ << "<" << type << " label=\"" << name << "\">" << std::endl;
692 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
void CocoaToDDLMgr::newSectPre_lv ( std::string  name)

Definition at line 417 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, filename_, newSectPre(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by writeLogicalVolumes().

417  {
418 #ifdef gdebug
419  cout << " sect-lv-pre:" << name << '-' << std::endl;
420 #endif
421  newSectPre(filename_, std::string("LogicalPartSection"));
422 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:74
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::newSectPre_ma ( std::string  name)

Definition at line 190 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, filename_, newSectPre(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by writeMaterials().

190  {
191 #ifdef gdebug
192  std::cout << " sect-mat-pre:" << name << '-' << std::endl;
193 #endif
194  newSectPre(filename_, std::string("MaterialSection"));
195 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:74
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::newSectPre_pv ( std::string  name)

Definition at line 459 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, filename_, newSectPre(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by writePhysicalVolumes().

459  {
460 #ifdef gdebug
461  cout << " sect-pv-pre:" << name << '-' << std::endl;
462 #endif
463  newSectPre(filename_, std::string("PosPartSection"));
464 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:74
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::newSectPre_ro ( std::string  name)

Definition at line 515 of file CocoaToDDLMgr.cc.

References filename_, newSectPre(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by writeRotations().

515 { newSectPre(filename_, std::string("RotationSection")); }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:74
void CocoaToDDLMgr::newSectPre_so ( std::string  name)

Definition at line 235 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, filename_, newSectPre(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by writeSolids().

235  {
236 #ifdef gdebug
237  cout << " sect-so-pre:" << name << '-' << std::endl;
238 #endif
239  newSectPre(filename_, std::string("SolidSection"));
240 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:74
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::newSectPre_specPar ( std::string  name)

Definition at line 548 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, file_, and filename_.

Referenced by writeSpecPars().

548  {
549 #ifdef gdebug
550  cout << " sect-lv-pre:" << name << '-' << std::endl;
551 #endif
552  //- newSectPre(filename_,std::string("SpecParSection"));
553  file_ << "<SpecParSection label=\"" << filename_ << "\" eval=\"true\">" << std::endl;
554 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
std::string filename_
Definition: CocoaToDDLMgr.h:74
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::pv ( OpticalObject opto)

Definition at line 467 of file CocoaToDDLMgr.cc.

References buildRotationNumber(), OpticalObject::centreLocal(), gather_cfg::cout, file_, OpticalObject::name(), OpticalObject::parent(), OpticalObject::shortName(), submitPVValidationJobs::t, and UC.

Referenced by writePhysicalVolumes().

467  {
468 #ifdef gdebug_v
469  cout << " pv:" << opto->name() << ':' << opto->parent()->name() << std::endl;
470 #endif
471 
472  // file_ << " <PosPart copyNumber=\"" << pv->GetCopyNo() << "\">" << std::endl;
473  file_ << " <PosPart copyNumber=\""
474  << "1"
475  << "\">" << std::endl;
476  file_ << " <rParent name=\"";
477 
478  //t if (file!=filename_) file_ << file << ":";
479 
480  file_ << opto->parent()->shortName() << "\"/>" << std::endl;
481 
482  file_ << " <rChild name=\"";
483  //t if (file_d != filename_) file_<< file_d << ":";
484  file_ << opto->shortName();
485  file_ << "\"/>" << std::endl;
486 
487  int rotNumber = buildRotationNumber(opto);
488  //CocoaDDLRotation* rot = buildRotationNotRepeated( opto );
489 
490  if (rotNumber != -1)
491  file_ << " <rRotation name=\"R" << rotNumber << "\"/>" << std::endl;
492 
493  CLHEP::Hep3Vector t = opto->centreLocal();
494  if (t != CLHEP::Hep3Vector()) { //if (0,0,0) write nothing
495  const CLHEP::Hep3Vector t = opto->centreLocal();
496 
497  file_ << " <Translation x=\"" << UC(t[0], "Length") << "\""
498  << " y=\"" << UC(t[1], "Length") << "\""
499  << " z=\"" << UC(t[2], "Length") << "\" />" << std::endl;
500  }
501 
502  file_ << " </PosPart>" << std::endl;
503 }
const CLHEP::Hep3Vector centreLocal() const
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
const OpticalObject * parent() const
Definition: OpticalObject.h:60
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
const ALIstring shortName() const
ALIint buildRotationNumber(OpticalObject *opto)
tuple cout
Definition: gather_cfg.py:144
const ALIstring & name() const
Definition: OpticalObject.h:58
void CocoaToDDLMgr::ro ( const CLHEP::HepRotation &  ro,
int  n 
)

Definition at line 519 of file CocoaToDDLMgr.cc.

References file_, identity(), GlobalPosition_Frontier_DevDB_cff::tag, and UC.

Referenced by writeRotations().

519  {
520  CLHEP::HepRotation roinv = inverseOf(ro);
521  //- G4ThreeVector v(1.,1.,1.);
522  //- G4ThreeVector a;
523  //- a = (*ro)*v;
524  bool identity = false;
525  ALIstring tag = " <Rotation name=\"R";
526  identity = roinv.isIdentity();
527 
528  //---- DDD convention is to use the inverse matrix, COCOA is the direct one!!!
529  if (!identity) {
530  file_ << tag << n << "\"";
531  file_ << " phiX=\"" << UC(roinv.phiX(), "Angle") << "\""
532  << " thetaX=\"" << UC(roinv.thetaX(), "Angle") << "\""
533  << " phiY=\"" << UC(roinv.phiY(), "Angle") << "\""
534  << " thetaY=\"" << UC(roinv.thetaY(), "Angle") << "\""
535  << " phiZ=\"" << UC(roinv.phiZ(), "Angle") << "\""
536  << " thetaZ=\"" << UC(roinv.thetaZ(), "Angle")
537  << "\""
538  //<< " angleUnit=\"degree\"/>"
539  << " />" << std::endl;
540  }
541 }
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
T identity(T t)
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
void ro(const CLHEP::HepRotation &ro, int n)
std::string ALIstring
Definition: CocoaGlobals.h:9
std::string CocoaToDDLMgr::scrubString ( const std::string &  s)

Definition at line 713 of file CocoaToDDLMgr.cc.

References runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

713  {
714  std::string::const_iterator ampat;
715  static const std::string amp = "_"; //"&amp;";
716  std::string ret = "";
717  for (ampat = s.begin(); ampat != s.end(); ++ampat) {
718  if (*ampat == '&')
719  ret = ret + amp;
720  else if (*ampat == '/')
721  ret = ret + ";";
722  else if (*ampat == ':')
723  ret = ret + '_';
724  else
725  ret = ret + *ampat;
726  }
727  // this works when used alone. when in this file it fails. i don't know why.
728  //for (ampat = s.begin(); ampat != s.end(); ampat++)
729  // {
730  // if (*ampat == '&'){
731  // s.insert(ampat+1, amp.begin(), amp.end());
732  // }
733  // }
734  // replace(s.begin(), s.end(), '/', ';');
735  //return s;
736  //cout << "AMP: " << ret << endl;
737  return ret;
738 }
tuple ret
prodAgent to be discontinued
void CocoaToDDLMgr::so ( OpticalObject opto)

Definition at line 243 of file CocoaToDDLMgr.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, cppFunctionSkipper::exception, file_, CocoaSolidShapeTubs::getDeltaPhiAngle(), CocoaSolidShapeTubs::getInnerRadius(), CocoaSolidShapeTubs::getOuterRadius(), CocoaSolidShapeTubs::getStartPhiAngle(), CocoaSolidShape::getType(), CocoaSolidShapeBox::getXHalfLength(), CocoaSolidShapeBox::getYHalfLength(), CocoaSolidShapeBox::getZHalfLength(), CocoaSolidShapeTubs::getZHalfLength(), ALIFileOut::name(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and UC.

Referenced by writeSolids().

243  {
244  std::cout << " CocoaToDDLMgr::so( " << opto;
245  std::cout << " " << opto->shortName() << std::endl;
246 
247  std::string name = opto->shortName();
248 
249  if (opto->type() == "system") {
250  // file_ << " <Box name=\"" << name << "\"";
251  file_ << " <Box name=\"" << opto->name() << "\"";
252  file_ << " dx=\"10.*m"
253  << "\" dy=\"10.*m"
254  << "\" dz=\"10.*m"
255  << "\"/>" << std::endl;
256  return;
257  }
258 
259  CocoaSolidShape* so = opto->getSolidShape();
260 
261  std::cout << " CocoaToDDLMgr::so( so " << so << std::endl;
262  std::string solidType = so->getType();
263 
264  if (solidType == "Box") {
265  file_ << " <" << solidType << " name=\"" << name << "\"";
266  CocoaSolidShapeBox* sb = dynamic_cast<CocoaSolidShapeBox*>(so);
267  file_ << " dx=\"" << UC(sb->getXHalfLength(), "Length") << "\" dy=\"" << UC(sb->getYHalfLength(), "Length")
268  << "\" dz=\"" << UC(sb->getZHalfLength(), "Length") << "\"/>" << std::endl;
269  } else if (solidType == "Tubs") {
270  CocoaSolidShapeTubs* tu = dynamic_cast<CocoaSolidShapeTubs*>(so);
271  file_ << " <" << solidType << " name=\"" << name << "\""
272  << " rMin=\"" << UC(tu->getInnerRadius(), "Length") << "\""
273  << " rMax=\"" << UC(tu->getOuterRadius(), "Length") << "\""
274  << " dz=\"" << UC(tu->getZHalfLength(), "Length") << "\""
275  << " startPhi=\"" << UC(tu->getStartPhiAngle(), "Angle") << "\""
276  << " deltaPhi=\"" << UC(tu->getDeltaPhiAngle(), "Angle") << "\""
277  << "/>" << std::endl;
278  }
279  /* else if (solidType == "Cons")
280  {
281  G4Cons * cn = dynamic_cast < G4Cons * > (so);
282  file_ << " <" << solidType
283  << " name=\"" << name << "\""
284  << " dz=\"" << UC(cn->getZHalfLength(),"Length") << "\""
285  << " rMin1=\"" << UC(cn->getInnerRadiusMinusZ(),"Length") << "\""
286  << " rMax1=\"" << UC(cn->getOuterRadiusMinusZ(),"Length") << "\""
287  << " rMin2=\"" << UC(cn->getInnerRadiusPlusZ(),"Length") << "\""
288  << " rMax2=\"" << UC(cn->getOuterRadiusPlusZ(),"Length") << "\""
289  << " startPhi=\"" << UC(cn->getStartPhiAngle(),"Angle") << "\""
290  << " deltaPhi=\"" << UC(cn->getDeltaPhiAngle(),"Angle") << "\""
291  //<< " lengthUnit=\"mm\" angleUnit=\"degree\"/>"
292  << " />" << std::endl;
293  }
294  else if (solidType == "Polycone")
295  {
296  G4Polycone * pc = dynamic_cast < G4Polycone * > (so);
297  file_ << " <Polycone name=\"" << name<< "\"";
298  bool isOpen = pc->IsOpen();
299  G4int numRZCorner = (dynamic_cast < G4Polycone * > (so))->getNumRZCorner();
300 
301  file_ << " startPhi=\"" << UC(pc->getStartPhi(),"Angle") << "\""
302  //<< " deltaPhi=\"" << UC(fabs((pc->getEndPhi()/deg - pc->getStartPhi()/deg))*deg,"Angle") << "\""
303  //<< " deltaPhi=\"" << UC(pc->getEndPhi(),"Angle") << "\""
304  << " deltaPhi=\"" << UC(pc->original_parameters->Opening_angle,"Angle") << "\""
305  //<< " angleUnit=\"degree\">"
306  << " >" << std::endl;
307 
308  G4PolyconeSideRZ rz;
309 
310  //liendl: FIXME put a switch which decides whether RZ or Rmin,Rmax,Z types should
311  // by generated ....
312  //outPolyZSections(rz, (dynamic_cast < G4Polycone * > (so)), numRZCorner);
313  G4double * zVal;
314  G4double * rmin;
315  G4double * rmax;
316  G4int zPlanes;
317  zPlanes = pc->original_parameters->Num_z_planes;
318  zVal = pc->original_parameters->Z_values;
319  rmin = pc->original_parameters->Rmin;
320  rmax = pc->original_parameters->Rmax;
321  outPolySections(zPlanes, zVal, rmin, rmax);
322  file_ << " </Polycone> " << std::endl;
323  }
324  else if (solidType == "Polyhedra")
325  {
326  // bool isOpen = (dynamic_cast < G4Polyhedra * > (so))->IsOpen();
327  G4Polyhedra * ph = (dynamic_cast < G4Polyhedra * > (so));
328  G4int numRZCorner = ph->getNumRZCorner();
329 
330  file_ << " <Polyhedra name=\"" << name<< "\""
331  << " numSide=\"" << ph->getNumSide() << "\""
332  << " startPhi=\"" << UC(ph->getStartPhi(),"Angle") << "\""
333  //<< " deltaPhi=\"" << UC(fabs((ph->getEndPhi()/deg - ph->getStartPhi()/deg))*deg,"Angle") << "\""
334  << " deltaPhi=\"" << UC(ph->original_parameters->Opening_angle,"Angle") << "\""
335  << " >" << std::endl;
336 
337  G4PolyhedraSideRZ rz;
338  //liendl: FIXME put a switch which decides whether RZ or Rmin,Rmax,Z types should
339  // by generated ....
340  // outPolyZSections(rz, (dynamic_cast < G4Polyhedra * > (so)), numRZCorner);
341  G4double * zVal;
342  G4double * rmin;
343  G4double * rmax;
344  // convertRad of ctor of G4Polyhedra(..) ....
345  G4double strangeG3G4Factor = cos(0.5*ph->original_parameters->Opening_angle/G4double(ph->getNumSide()));
346  G4int zPlanes;
347  zPlanes = ph->original_parameters->Num_z_planes;
348  zVal = ph->original_parameters->Z_values;
349  rmin = ph->original_parameters->Rmin;
350  rmax = ph->original_parameters->Rmax;
351  for (int i=0; i<zPlanes;++i) {
352  *(rmin+i) = *(rmin+i) * strangeG3G4Factor;
353  *(rmax+i) = *(rmax+i) * strangeG3G4Factor;
354  }
355  outPolySections(zPlanes, zVal, rmin, rmax);
356 
357  file_ << " </Polyhedra>" << std::endl;
358  }
359  else if (solidType == "Trapezoid")
360  {
361  // DDL fields
362  // ALP1, ALP2, Bl1, Bl2, Dz, H1, H2, Phi, Thet, TL1, TL2, lengthUnit, angleUnit
363  // Phi and Theta are !NOT!optional.
364  G4Trap * trp = dynamic_cast < G4Trap * > (so);
365  G4ThreeVector symAxis(trp->getSymAxis());
366  double theta, phi;
367  theta = symAxis.theta();
368  phi = symAxis.phi();
369 
370  file_ << " <" << solidType
371  << " name=\"" << name << "\""
372  << " dz=\"" << UC(trp->getZHalfLength(),"Length") << "\""
373  << " alp1=\"" << UC(atan(trp->getTanAlpha1()/rad),"Angle") << "\""
374  << " bl1=\"" << UC(trp->getXHalfLength1(),"Length") << "\""
375  << " tl1=\"" << UC(trp->getXHalfLength2(),"Length") << "\""
376  << " h1=\"" << UC(trp->getYHalfLength1(),"Length") << "\""
377  << " alp2=\"" << UC(atan(trp->getTanAlpha2()/rad),"Angle") << "\""
378  << " bl2=\"" << UC(trp->getXHalfLength3(),"Length") << "\""
379  << " tl2=\"" << UC(trp->getXHalfLength4(),"Length") << "\""
380  << " h2=\"" << UC(trp->getYHalfLength2(),"Length") << "\""
381  << " phi=\"" << UC(phi,"Angle") << "\""
382  << " theta=\"" << UC(theta,"Angle") << "\""
383  << " />" << std::endl ;
384  }
385  else if (solidType == "Trd1")
386  {
387  G4Trd * tr = dynamic_cast < G4Trd * > (so);
388  file_ << " <" << solidType
389  << " name=\"" << name << "\""
390  << " dz=\"" << UC(tr->getZHalfLength(),"Length") << "\""
391  << " dy1=\"" << UC(tr->getYHalfLength1(),"Length") << "\""
392  << " dy2=\"" << UC(tr->getYHalfLength2(),"Length")<< "\""
393  << " dx1=\"" << UC(tr->getXHalfLength1(),"Length") << "\""
394  << " dx2=\"" << UC(tr->getXHalfLength2(),"Length") << "\""
395  //<< " lengthUnit=\"mm\"/>"
396  << " />" << std::endl;
397  }
398  */
399  else {
400  std::cerr << " <!-- NOT HANDLED: " << solidType << " name=\"" << name << "\""
401  << ">" << std::endl
402  << " </" << solidType << "> -->" << std::endl;
403  std::exception();
404  }
405 }
ALIfloat getOuterRadius() const
const ALIstring & name()
Definition: ALIFileOut.h:31
ALIfloat getStartPhiAngle() const
ALIstring getType() const
ALIfloat getZHalfLength() const
ALIfloat getDeltaPhiAngle() const
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
ALIfloat getYHalfLength() const
ALIfloat getInnerRadius() const
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
ALIfloat getXHalfLength() const
void so(OpticalObject *opto)
tuple cout
Definition: gather_cfg.py:144
ALIfloat getZHalfLength() const
void CocoaToDDLMgr::specPar ( OpticalObject opto)

Definition at line 557 of file CocoaToDDLMgr.cc.

References OpticalObject::CoordinateEntryList(), OpticalObject::ExtraEntryList(), file_, OpticalObject::getCmsswID(), cuy::ii, Entry::name(), OpticalObject::name(), Entry::quality(), Entry::sigma(), AlCaHLTBitMon_QueryRunRegistry::string, Entry::type(), OpticalObject::type(), UC, and Entry::value().

Referenced by writeSpecPars().

557  {
558  file_ << " <SpecPar name=\"" << opto->name() << "_PARAMS\">" << std::endl;
559  file_ << " <PartSelector path=\"/" << opto->name() << "\"/> " << std::endl;
560  file_ << " <Parameter name=\"cocoa_type\""
561  << " value=\"" << opto->type() << "\" eval=\"false\" /> " << std::endl;
562  file_ << " <Parameter name=\"cmssw_ID\""
563  << " value=\"" << opto->getCmsswID() << "\" /> " << std::endl;
564 
565  const std::vector<Entry*>& coord = opto->CoordinateEntryList();
566  for (int ii = 3; ii < 6; ii++) {
567  Entry* ent = coord[ii];
568  file_ << " <Parameter name=\"" << ent->name() + std::string("_value") << "\" value=\"";
569  file_ << UC(ent->value(), "Angle");
570  file_ << "\" /> " << std::endl;
571  }
572  for (int ii = 0; ii < 6; ii++) {
573  Entry* ent = coord[ii];
574  file_ << " <Parameter name=\"" << ent->name() + std::string("_sigma") << "\" value=\"";
575  if (ii < 3) {
576  file_ << UC(ent->sigma(), "Length");
577  } else {
578  file_ << UC(ent->sigma(), "Angle");
579  }
580  file_ << "\" /> " << std::endl;
581  file_ << " <Parameter name=\"" << ent->name() + std::string("_quality") << "\" value=\"" << ent->quality()
582  << "\" /> " << std::endl;
583  }
584 
585  const std::vector<Entry*>& extraEnt = opto->ExtraEntryList();
586  for (ALIuint ii = 0; ii < extraEnt.size(); ii++) {
587  Entry* ent = extraEnt[ii];
588  file_ << " <Parameter name=\"extra_entry\" value=\"" << ent->name() << "\" eval=\"false\" /> " << std::endl;
589  file_ << " <Parameter name=\"dimType\" value=\"" << ent->type() << "\" eval=\"false\" /> " << std::endl;
590  file_ << " <Parameter name=\"value\" value=\"";
591  if (ent->type() == "nodim") {
592  file_ << ent->value();
593  } else if (ent->type() == "length") {
594  file_ << UC(ent->value(), "Length");
595  } else if (ent->type() == "angle") {
596  file_ << UC(ent->value(), "Angle");
597  }
598  file_ << "\" eval=\"true\" /> " << std::endl;
599 
600  file_ << " <Parameter name=\"sigma\" value=\"";
601  if (ent->type() == "nodim") {
602  file_ << ent->sigma();
603  } else if (ent->type() == "length") {
604  file_ << UC(ent->sigma(), "Length");
605  } else if (ent->type() == "angle") {
606  file_ << UC(ent->sigma(), "Angle");
607  }
608  file_ << "\" eval=\"true\" /> " << std::endl;
609 
610  file_ << " <Parameter name=\"quality\" value=\"" << ent->quality() << "\" eval=\"true\" /> " << std::endl;
611  }
612 
613  file_ << " </SpecPar>" << std::endl;
614 }
const ALIuint getCmsswID() const
Definition: OpticalObject.h:97
const ALIstring & type() const
Definition: Entry.h:52
Definition: Entry.h:18
ALIdouble value() const
Definition: Entry.h:53
int ii
Definition: cuy.py:589
const std::vector< Entry * > & CoordinateEntryList() const
Definition: OpticalObject.h:63
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73
const ALIstring & name() const
Definition: Entry.h:50
ALIint quality() const
Definition: Entry.h:57
const ALIstring & name() const
Definition: OpticalObject.h:58
const std::vector< Entry * > & ExtraEntryList() const
Definition: OpticalObject.h:65
unsigned int ALIuint
Definition: CocoaGlobals.h:17
const ALIstring & type() const
Definition: OpticalObject.h:59
ALIdouble sigma() const
Definition: Entry.h:55
void CocoaToDDLMgr::writeDDDFile ( ALIstring  filename)

Definition at line 31 of file CocoaToDDLMgr.cc.

References newPartPost(), writeHeader(), writeLogicalVolumes(), writeMaterials(), writePhysicalVolumes(), writeRotations(), writeSolids(), and writeSpecPars().

31  {
32  //---- Write header
34 
35  //---- Write materials
37 
38  //---- Write solids
39  writeSolids();
40 
41  //---- Write logical volumes
43 
44  //---- Write physical volumes
46 
47  //---- Write rotations
49 
50  //---- Write SpecPar's
51  writeSpecPars();
52 
53  newPartPost(filename, "");
54 }
void writeRotations()
void writeLogicalVolumes()
void writeHeader(ALIstring filename)
void writeSolids()
void newPartPost(std::string name, std::string extension)
void writeMaterials()
void writePhysicalVolumes()
void writeSpecPars()
tuple filename
Definition: lut2db_cfg.py:20
void CocoaToDDLMgr::writeHeader ( ALIstring  filename)

Definition at line 57 of file CocoaToDDLMgr.cc.

References newPartPre().

Referenced by writeDDDFile().

57 { newPartPre(filename); }
void newPartPre(std::string name)
tuple filename
Definition: lut2db_cfg.py:20
void CocoaToDDLMgr::writeLogicalVolumes ( )

Definition at line 99 of file CocoaToDDLMgr.cc.

References lv(), newSectPost_lv(), newSectPre_lv(), and Model::OptOList().

Referenced by writeDDDFile().

99  {
100  newSectPre_lv("");
101 
102  auto& optolist = Model::OptOList();
103  for (auto ite = optolist.begin(); ite != optolist.end(); ite++) {
104  bool alreadyWritten = false;
105  for (auto ite2 = optolist.begin(); ite2 != ite; ite2++) {
106  if ((*ite)->shortName() == (*ite2)->shortName()) {
107  alreadyWritten = true;
108  }
109  }
110  if (!alreadyWritten)
111  lv(*ite);
112  }
113 
114  newSectPost_lv("");
115 }
void newSectPre_lv(std::string name)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:84
void lv(OpticalObject *opto)
void newSectPost_lv(std::string name)
void CocoaToDDLMgr::writeMaterials ( )

Definition at line 60 of file CocoaToDDLMgr.cc.

References ma(), materialIsRepeated(), newSectPost_ma(), newSectPre_ma(), and Model::OptOList().

Referenced by writeDDDFile().

60  {
61  newSectPre_ma("");
62  auto& optolist = Model::OptOList();
63  for (auto ite = optolist.begin(); ite != optolist.end(); ite++) {
64  if ((*ite)->type() == "system")
65  continue;
66  CocoaMaterialElementary* mat = (*ite)->getMaterial();
67  //- std::cout << " mat of opto " << (*ite)->name() << " = " << mat->getName() << std::endl;
68  if (mat) {
69  if (!materialIsRepeated(mat))
70  ma(mat);
71  }
72  }
73 
74  newSectPost_ma("");
75 }
ALIbool materialIsRepeated(CocoaMaterialElementary *ma)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:84
void newSectPre_ma(std::string name)
void ma(CocoaMaterialElementary *ma)
void newSectPost_ma(std::string name)
void CocoaToDDLMgr::writePhysicalVolumes ( )

Definition at line 118 of file CocoaToDDLMgr.cc.

References newSectPost_pv(), newSectPre_pv(), Model::OptOList(), and pv().

Referenced by writeDDDFile().

118  {
119  newSectPre_pv("");
120 
121  auto& optolist = Model::OptOList();
122  for (auto ite = optolist.begin(); ite != optolist.end(); ite++) {
123  if ((*ite)->type() == "system")
124  continue;
125  pv(*ite);
126  }
127 
128  newSectPost_pv("");
129 }
void newSectPost_pv(std::string name)
void pv(OpticalObject *opto)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:84
void newSectPre_pv(std::string name)
void CocoaToDDLMgr::writeRotations ( )

Definition at line 132 of file CocoaToDDLMgr.cc.

References newSectPost_ro(), newSectPre_ro(), ro(), and theRotationList.

Referenced by writeDDDFile().

132  {
133  newSectPre_ro("");
134  std::vector<CLHEP::HepRotation>::const_iterator ite;
135  int nc = 0;
136  for (ite = theRotationList.begin(); ite != theRotationList.end(); ++ite) {
137  //- std::cout << nc << " rot size " << theRotationList.size() << std::endl;
138  ro(*ite, nc);
139  nc++;
140  }
141  newSectPost_ro("");
142 }
void newSectPost_ro(std::string name)
std::vector< CLHEP::HepRotation > theRotationList
Definition: CocoaToDDLMgr.h:77
void ro(const CLHEP::HepRotation &ro, int n)
void newSectPre_ro(std::string name)
void CocoaToDDLMgr::writeSolids ( )

Definition at line 78 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, newSectPost_so(), newSectPre_so(), Model::OptOList(), and so().

Referenced by writeDDDFile().

78  {
79  newSectPre_so("");
80 
81  auto& optolist = Model::OptOList();
82  for (auto ite = optolist.begin(); ite != optolist.end(); ite++) {
83  bool alreadyWritten = false;
84  for (auto ite2 = optolist.begin(); ite2 != ite; ite2++) {
85  if ((*ite)->shortName() == (*ite2)->shortName()) {
86  alreadyWritten = true;
87  }
88  }
89  std::cout << " CocoaToDDLMgr::writeSolids() " << alreadyWritten << *ite;
90  std::cout << (*ite)->name() << std::endl;
91  if (!alreadyWritten)
92  so(*ite);
93  }
94 
95  newSectPost_so("");
96 }
void newSectPre_so(std::string name)
void newSectPost_so(std::string name)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:84
void so(OpticalObject *opto)
tuple cout
Definition: gather_cfg.py:144
void CocoaToDDLMgr::writeSpecPars ( )

Definition at line 145 of file CocoaToDDLMgr.cc.

References measurementsAsSpecPars(), newSectPost_specPar(), newSectPre_specPar(), Model::OptOList(), specPar(), and writeSpecParsCocoa().

Referenced by writeDDDFile().

145  {
146  newSectPre_specPar("");
147 
148  auto& optolist = Model::OptOList();
149  for (auto ite = optolist.begin(); ite != optolist.end(); ite++) {
150  if ((*ite)->type() == "system")
151  continue;
152  specPar(*ite);
153  }
154 
156 
157  //---- Write Measurements's
159 
161 }
void specPar(OpticalObject *opto)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:84
void writeSpecParsCocoa()
void measurementsAsSpecPars()
void newSectPost_specPar(std::string name)
void newSectPre_specPar(std::string name)
void CocoaToDDLMgr::writeSpecParsCocoa ( )

Definition at line 671 of file CocoaToDDLMgr.cc.

References file_, ALIFileOut::name(), and Model::OptOList().

Referenced by writeSpecPars().

671  {
672  file_ << "<!-- Define volumes as COCOA objects --> " << std::endl << " <SpecPar name=\"COCOA\"> " << std::endl;
673 
674  auto& optolist = Model::OptOList();
675  for (auto ite = optolist.begin(); ite != optolist.end(); ite++) {
676  if ((*ite)->type() == "system")
677  continue;
678  file_ << " <PartSelector path=\"/" << (*ite)->name() << "\"/> " << std::endl;
679  }
680 
681  file_ << " <String name=\"COCOA\" value=\"COCOA\"/> " << std::endl << " </SpecPar> " << std::endl;
682 }
const ALIstring & name()
Definition: ALIFileOut.h:31
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:84
ALIFileOut file_
Definition: CocoaToDDLMgr.h:73

Member Data Documentation

ALIFileOut CocoaToDDLMgr::file_
private
std::string CocoaToDDLMgr::filename_
private
CocoaToDDLMgr * CocoaToDDLMgr::instance = nullptr
staticprivate

Definition at line 71 of file CocoaToDDLMgr.h.

Referenced by getInstance(), and production_tasks.Task::getname().

std::vector<CocoaMaterialElementary*> CocoaToDDLMgr::theMaterialList
private

Definition at line 76 of file CocoaToDDLMgr.h.

Referenced by ma(), and materialIsRepeated().

std::vector<CLHEP::HepRotation> CocoaToDDLMgr::theRotationList
private

Definition at line 77 of file CocoaToDDLMgr.h.

Referenced by buildRotationNumber(), and writeRotations().