CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 = 0
 

Detailed Description

Definition at line 26 of file CocoaToDDLMgr.h.

Constructor & Destructor Documentation

CocoaToDDLMgr::CocoaToDDLMgr ( )
inline

Definition at line 31 of file CocoaToDDLMgr.h.

Referenced by getInstance().

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

Definition at line 32 of file CocoaToDDLMgr.h.

32 { };

Member Function Documentation

ALIint CocoaToDDLMgr::buildRotationNumber ( OpticalObject opto)

Definition at line 821 of file CocoaToDDLMgr.cc.

References OpticalObject::rmLocal(), and theRotationList.

Referenced by pv().

822 {
823  ALIint rotnum = -1;
824 
825  if(opto->rmLocal().isIdentity() ) return rotnum;
826 
827  std::vector<CLHEP::HepRotation>::const_iterator ite;
828 
829  int nc = 0;
830  for( ite = theRotationList.begin(); ite != theRotationList.end(); ite++) {
831  if( (*ite) == opto->rmLocal() ) {
832  rotnum = nc;
833  break;
834  }
835  nc++;
836  }
837 
838  if( rotnum == -1 ) {
839  theRotationList.push_back( opto->rmLocal() );
840  rotnum = theRotationList.size()-1;
841  }
842 
843  return rotnum;
844 
845 }
const CLHEP::HepRotation rmLocal() const
int ALIint
Definition: CocoaGlobals.h:15
std::vector< CLHEP::HepRotation > theRotationList
Definition: CocoaToDDLMgr.h:80
CocoaToDDLMgr * CocoaToDDLMgr::getInstance ( )
static

Definition at line 25 of file CocoaToDDLMgr.cc.

References CocoaToDDLMgr(), and instance.

26 {
27  if(!instance) {
28  instance = new CocoaToDDLMgr;
29  }
30  return instance;
31 }
static CocoaToDDLMgr * instance
Definition: CocoaToDDLMgr.h:74
void CocoaToDDLMgr::lv ( OpticalObject opto)

Definition at line 471 of file CocoaToDDLMgr.cc.

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

Referenced by writeLogicalVolumes().

472 {
473  std::string name = opto->shortName();
474  std::string rSolid = opto->shortName();
475  std::string sensitive = "unspecified";
476 
477  if( opto->type() == "system" ){
478  file_ << " <LogicalPart name=\""
479  << name << "\" category=\"" << sensitive << "\">" << std::endl
480  << " <rSolid name=\"" << rSolid << "\"/>" << std::endl
481  << " <rMaterial name=\"Hydrogen\""
482  << "/>" << std::endl
483  << " </LogicalPart>" << std::endl;
484  return;
485  }
486 
487 #ifdef gdebug_v
488  cout << "xml:lv " << opto->name() << std::endl;
489 #endif
490  file_ << " <LogicalPart name=\""
491  << name << "\" category=\"" << sensitive << "\">" << std::endl
492  << " <rSolid name=\"" << rSolid << "\"/>" << std::endl
493  << " <rMaterial name=\"" << opto->getMaterial()->getName() << "\""
494  << "/>" << std::endl
495  << " </LogicalPart>" << std::endl;
496 }
CocoaMaterialElementary * getMaterial() const
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
const ALIstring shortName() const
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
const ALIstring & type() const
Definition: OpticalObject.h:61
void CocoaToDDLMgr::ma ( CocoaMaterialElementary ma)

g*cm3;

Definition at line 226 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().

227 {
228  theMaterialList.push_back( ma );
229 
230 #ifdef gdebug
231  cout << " ma:" << ma->getName() << std::endl;
232 #endif
233 
234  ALIfloat density = ma->getDensity();
235 
236  // start tag
237  file_ << " <ElementaryMaterial";
238  ALIstring cSymbol = ma->getSymbol();
239 
240  // name attribute
241  file_ << " name=\"" << ma->getName() << "\"";
242 
243  // put out common attributes
244  // file_ << " density=\"" << UnitConverter(density,"Volumic Mass") << "\"";
245  file_ << " density=\"" << UC(density,"Volumic Mass") << "\"";
246  file_ << " symbol=\"" << ma->getSymbol() << "\"";
247 
248 
249  // finish last two attributes and end material element
250  file_ << " atomicWeight=\"" << (ma->getA()) << "*g/mole\""
251  << " atomicNumber=\"" << ma->getZ() << "\""
252  << "/>" << std::endl;
253 
254 }
float ALIfloat
Definition: CocoaGlobals.h:13
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
std::vector< CocoaMaterialElementary * > theMaterialList
Definition: CocoaToDDLMgr.h:79
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
std::string ALIstring
Definition: CocoaGlobals.h:9
tuple cout
Definition: gather_cfg.py:121
ALIbool CocoaToDDLMgr::materialIsRepeated ( CocoaMaterialElementary ma)

Definition at line 774 of file CocoaToDDLMgr.cc.

References ma(), and theMaterialList.

Referenced by writeMaterials().

775 {
776  ALIbool isRepeated = false;
777  std::vector<CocoaMaterialElementary*>::const_iterator ite;
778 
779  for(ite = theMaterialList.begin(); ite != theMaterialList.end(); ite++ ){
780  if( *(*ite) == *ma ){
781  isRepeated = true;
782  break;
783  }
784  }
785 
786  return isRepeated;
787 }
bool ALIbool
Definition: CocoaGlobals.h:19
std::vector< CocoaMaterialElementary * > theMaterialList
Definition: CocoaToDDLMgr.h:79
void ma(CocoaMaterialElementary *ma)
void CocoaToDDLMgr::measurementsAsSpecPars ( )

Definition at line 682 of file CocoaToDDLMgr.cc.

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

Referenced by writeSpecPars().

683 {
684 
685  std::vector< Measurement* > measlist = Model::MeasurementList();
686  std::vector< Measurement* >::iterator mite;
687  std::vector<ALIstring>::iterator site;
688  std::multimap<OpticalObject*,Measurement*> optoMeasMap;
689  for( mite = measlist.begin(); mite != measlist.end(); mite++ ) {
690  std::vector<OpticalObject*> optolist = (*mite)->OptOList();
691  OpticalObject* opto = optolist[optolist.size()-1];
692  optoMeasMap.insert( std::multimap<OpticalObject*,Measurement*>::value_type(opto, *mite) );
693  }
694 
695  typedef std::multimap<OpticalObject*,Measurement*>::const_iterator itemom;
696  itemom omite;
697  std::pair<itemom, itemom > omitep;
698  itemom omite2, omite3;
699 
700  for( omite = optoMeasMap.begin(); omite != optoMeasMap.end(); omite++ ){
701  omitep = optoMeasMap.equal_range( (*omite).first );
702  if( omite != optoMeasMap.begin() && (*omite).first == (*omite3).first ) continue; // check that it is not the same OptO than previous one
703  omite3 = omite;
704  for( omite2 = omitep.first; omite2 != omitep.second; omite2++ ){
705  OpticalObject* opto = (*(omite2)).first;
706  Measurement* meas = (*(omite2)).second;
707  std::vector<ALIstring> namelist = meas->OptONameList();
708  if( omite2 == omitep.first ){
709  file_ << " <SpecPar name=\"" << meas->name() << "_MEASUREMENT\">" << std::endl;
710  file_ << " <PartSelector path=\"/" << opto->name() << "\"/> " << std::endl;
711  }
712 
713  file_ << " <Parameter name=\"" << std::string("meas_name") << "\" value=\"" << meas->name() << "\" eval=\"false\" /> " << std::endl;
714  file_ << " <Parameter name=\"" << std::string("meas_type") << "\" value=\"" << meas->type() << "\" eval=\"false\" /> " << std::endl;
715  for( site = namelist.begin(); site != namelist.end(); site++ ){
716  file_ << " <Parameter name=\"" << std::string("meas_object_name_")+meas->name() << "\" value=\"" << (*site) << "\" eval=\"false\" /> " << std::endl;
717  }
718  for( ALIuint ii = 0; ii < meas->dim(); ii++ ){
719  file_ << " <Parameter name=\"" << std::string("meas_value_name_")+meas->name() << "\" value=\"" << meas->valueType(ii) << "\" eval=\"false\" /> " << std::endl;
720  file_ << " <Parameter name=\"" << std::string("meas_value_")+meas->name() << "\" value=\"" << meas->value(ii) << "\" eval=\"true\" /> " << std::endl;
721  file_ << " <Parameter name=\"" << std::string("meas_sigma_")+meas->name() << "\" value=\"" << meas->sigma(ii) << "\" eval=\"true\" /> " << std::endl;
722  file_ << " <Parameter name=\"" << std::string("meas_is_simulated_value_")+meas->name() << "\" value=\"" << meas->valueIsSimulated(ii) << "\" eval=\"true\" /> " << std::endl;
723  }
724 
725  }
726  file_ << " </SpecPar>" << std::endl;
727  }
728 }
bool valueIsSimulated(ALIint coor)
Definition: Measurement.h:205
const ALIuint dim() const
Definition: Measurement.h:82
const ALIstring valueType(ALIuint ii) const
Definition: Measurement.h:140
const ALIdouble * sigma() const
Definition: Measurement.h:132
const std::vector< ALIstring > & OptONameList() const
Definition: Measurement.h:105
Container::value_type value_type
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
const ALIdouble * value() const
Definition: Measurement.h:125
const ALIstring & type() const
Definition: Measurement.h:86
const ALIstring & name() const
Definition: Measurement.h:90
const ALIstring & name() const
Definition: OpticalObject.h:60
static std::vector< Measurement * > & MeasurementList()
Definition: Model.h:79
unsigned int ALIuint
Definition: CocoaGlobals.h:17
void CocoaToDDLMgr::newPartPost ( std::string  name,
std::string  extension 
)

Definition at line 208 of file CocoaToDDLMgr.cc.

References file_.

Referenced by writeDDDFile().

209 {
210  file_ << std::endl << "</DDDefinition>" << std::endl;
211  file_.close();
212 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
void CocoaToDDLMgr::newPartPre ( std::string  name)

Definition at line 189 of file CocoaToDDLMgr.cc.

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

Referenced by writeHeader().

190 {
191  filename_=name;
192  file_.open(filename_.c_str());
193  file_.precision(8);
194  file_ << "<?xml version=\"1.0\"?>" << std::endl;
195 
196  // all files get schema references and namespaces.
197  file_ << "<DDDefinition xmlns=\"http://www.cern.ch/cms/DDL\""
198  << " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
199  << " xsi:schemaLocation=\"http://www.cern.ch/cms/DDL ../../DDLSchema/DDLSchema.xsd\">"
200  << std::endl << std::endl;
201 
202  #ifdef gdebug
203  cout << "part-pre:" << name << std::endl;
204  #endif
205 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
std::string filename_
Definition: CocoaToDDLMgr.h:77
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::newSectPost ( std::string  name)

Definition at line 766 of file CocoaToDDLMgr.cc.

References file_.

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

767 {
768  file_ << "</" << name << ">" << std::endl << std::endl;
769 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
void CocoaToDDLMgr::newSectPost_lv ( std::string  name)

Definition at line 499 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writeLogicalVolumes().

500 {
501  #ifdef gdebug
502  cout << " sect-lv-post:" << name << '-'<< std::endl;
503  #endif
504  newSectPost("LogicalPartSection");
505 }
tuple cout
Definition: gather_cfg.py:121
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_ma ( std::string  name)

Definition at line 257 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writeMaterials().

258 {
259  #ifdef gdebug
260  cout << " sect-mat-post:" << name << '-' << std::endl;
261  #endif
262  newSectPost("MaterialSection");
263 }
tuple cout
Definition: gather_cfg.py:121
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_pv ( std::string  name)

Definition at line 559 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writePhysicalVolumes().

560 {
561  #ifdef gdebug
562  cout << " sect-pv-post:" << name << '-' << std::endl;
563  #endif
564  newSectPost("PosPartSection");
565 }
tuple cout
Definition: gather_cfg.py:121
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_ro ( std::string  name)

Definition at line 603 of file CocoaToDDLMgr.cc.

References newSectPost().

Referenced by writeRotations().

604 {
605  newSectPost("RotationSection");
606 }
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_so ( std::string  name)

Definition at line 451 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, and newSectPost().

Referenced by writeSolids().

452 {
453  #ifdef gdebug
454  cout << " sect-so-post:" << name << '-' << std::endl;
455  #endif
456  newSectPost("SolidSection");
457 }
tuple cout
Definition: gather_cfg.py:121
void newSectPost(std::string name)
void CocoaToDDLMgr::newSectPost_specPar ( std::string  name)

Definition at line 750 of file CocoaToDDLMgr.cc.

References newSectPost().

Referenced by writeSpecPars().

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

Definition at line 759 of file CocoaToDDLMgr.cc.

References file_.

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

760 {
761  file_ << "<" << type << " label=\"" << name << "\">" << std::endl;
762 }
type
Definition: HCALResponse.h:22
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
void CocoaToDDLMgr::newSectPre_lv ( std::string  name)

Definition at line 462 of file CocoaToDDLMgr.cc.

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

Referenced by writeLogicalVolumes().

463 {
464  #ifdef gdebug
465  cout << " sect-lv-pre:" << name << '-' << std::endl;
466  #endif
467  newSectPre(filename_,std::string("LogicalPartSection"));
468 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:77
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::newSectPre_ma ( std::string  name)

Definition at line 217 of file CocoaToDDLMgr.cc.

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

Referenced by writeMaterials().

218 {
219 #ifdef gdebug
220  std::cout << " sect-mat-pre:" << name << '-' << std::endl;
221 #endif
222  newSectPre(filename_,std::string("MaterialSection"));
223 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:77
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::newSectPre_pv ( std::string  name)

Definition at line 510 of file CocoaToDDLMgr.cc.

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

Referenced by writePhysicalVolumes().

511 {
512  #ifdef gdebug
513  cout << " sect-pv-pre:" << name << '-' << std::endl;
514  #endif
515  newSectPre(filename_,std::string("PosPartSection"));
516 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:77
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::newSectPre_ro ( std::string  name)

Definition at line 570 of file CocoaToDDLMgr.cc.

References filename_, and newSectPre().

Referenced by writeRotations().

571 {
572  newSectPre(filename_,std::string("RotationSection"));
573 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:77
void CocoaToDDLMgr::newSectPre_so ( std::string  name)

Definition at line 268 of file CocoaToDDLMgr.cc.

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

Referenced by writeSolids().

269 {
270  #ifdef gdebug
271  cout << " sect-so-pre:" << name << '-' << std::endl;
272  #endif
273  newSectPre(filename_,std::string("SolidSection"));
274 }
void newSectPre(std::string name, std::string type)
std::string filename_
Definition: CocoaToDDLMgr.h:77
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::newSectPre_specPar ( std::string  name)

Definition at line 611 of file CocoaToDDLMgr.cc.

References gather_cfg::cout, file_, and filename_.

Referenced by writeSpecPars().

612 {
613  #ifdef gdebug
614  cout << " sect-lv-pre:" << name << '-' << std::endl;
615  #endif
616  //- newSectPre(filename_,std::string("SpecParSection"));
617  file_ << "<SpecParSection label=\"" << filename_ << "\" eval=\"true\">" << std::endl;
618 
619 }
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
std::string filename_
Definition: CocoaToDDLMgr.h:77
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::pv ( OpticalObject opto)

Definition at line 519 of file CocoaToDDLMgr.cc.

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

Referenced by writePhysicalVolumes().

520 {
521  #ifdef gdebug_v
522  cout << " pv:" << opto->name()
523  << ':' << opto->parent()->name() << std::endl;
524  #endif
525 
526  // file_ << " <PosPart copyNumber=\"" << pv->GetCopyNo() << "\">" << std::endl;
527  file_ << " <PosPart copyNumber=\"" << "1" << "\">" << std::endl;
528  file_ << " <rParent name=\"";
529 
530  //t if (file!=filename_) file_ << file << ":";
531 
532  file_ << opto->parent()->shortName() << "\"/>" << std::endl;
533 
534  file_ << " <rChild name=\"";
535  //t if (file_d != filename_) file_<< file_d << ":";
536  file_ << opto->shortName();
537  file_ << "\"/>" << std::endl;
538 
539  int rotNumber = buildRotationNumber( opto );
540  //CocoaDDLRotation* rot = buildRotationNotRepeated( opto );
541 
542  if( rotNumber != -1 ) file_ << " <rRotation name=\"R" << rotNumber << "\"/>" << std::endl;
543 
544  CLHEP::Hep3Vector t = opto->centreLocal();
545  if(t != CLHEP::Hep3Vector()) { //if (0,0,0) write nothing
546  const CLHEP::Hep3Vector t = opto->centreLocal();
547 
548  file_ << " <Translation x=\"" << UC(t[0],"Length") << "\""
549  << " y=\"" << UC(t[1],"Length") << "\""
550  << " z=\"" << UC(t[2],"Length")<< "\" />"
551  << std::endl;
552  }
553 
554  file_ << " </PosPart>" << std::endl;
555 
556 }
const CLHEP::Hep3Vector centreLocal() const
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
const OpticalObject * parent() const
Definition: OpticalObject.h:62
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
const ALIstring shortName() const
ALIint buildRotationNumber(OpticalObject *opto)
tuple cout
Definition: gather_cfg.py:121
const ALIstring & name() const
Definition: OpticalObject.h:60
void CocoaToDDLMgr::ro ( const CLHEP::HepRotation &  ro,
int  n 
)

Definition at line 577 of file CocoaToDDLMgr.cc.

References file_, GlobalPosition_Frontier_DevDB_cff::tag, and UC.

Referenced by writeRotations().

578 {
579 
580  CLHEP::HepRotation roinv = inverseOf(ro);
581  //- G4ThreeVector v(1.,1.,1.);
582  //- G4ThreeVector a;
583  //- a = (*ro)*v;
584  bool identity = false;
585  ALIstring tag = " <Rotation name=\"R";
586  identity=roinv.isIdentity();
587 
588  //---- DDD convention is to use the inverse matrix, COCOA is the direct one!!!
589  if (! identity) {
590  file_ << tag << n << "\"";
591  file_ << " phiX=\"" << UC(roinv.phiX(),"Angle") << "\""
592  << " thetaX=\"" << UC(roinv.thetaX(),"Angle") << "\""
593  << " phiY=\"" << UC(roinv.phiY(),"Angle") << "\""
594  << " thetaY=\"" << UC(roinv.thetaY(),"Angle") << "\""
595  << " phiZ=\"" << UC(roinv.phiZ(),"Angle") << "\""
596  << " thetaZ=\"" << UC(roinv.thetaZ(),"Angle") << "\""
597  //<< " angleUnit=\"degree\"/>"
598  << " />" << std::endl;
599  }
600 }
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
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 790 of file CocoaToDDLMgr.cc.

References run_regression::ret.

791 {
792  std::string::const_iterator ampat;
793  static const std::string amp = "_"; //"&amp;";
794  std::string ret = "";
795  for (ampat = s.begin(); ampat != s.end(); ampat++)
796  {
797  if (*ampat == '&')
798  ret = ret + amp;
799  else if (*ampat == '/')
800  ret = ret + ";";
801  else if (*ampat == ':')
802  ret = ret + '_';
803  else
804  ret = ret + *ampat;
805  }
806  // this works when used alone. when in this file it fails. i don't know why.
807  //for (ampat = s.begin(); ampat != s.end(); ampat++)
808  // {
809  // if (*ampat == '&'){
810  // s.insert(ampat+1, amp.begin(), amp.end());
811  // }
812  // }
813  // replace(s.begin(), s.end(), '/', ';');
814  //return s;
815  //cout << "AMP: " << ret << endl;
816  return ret;
817 }
void CocoaToDDLMgr::so ( OpticalObject opto)

Definition at line 277 of file CocoaToDDLMgr.cc.

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

Referenced by writeSolids().

278 {
279  std::cout << " CocoaToDDLMgr::so( " << opto;
280 std::cout << " " << opto->shortName() << std::endl;
281 
282  std::string name = opto->shortName();
283 
284  if( opto->type() == "system" ){
285  // file_ << " <Box name=\"" << name << "\"";
286  file_ << " <Box name=\"" << opto->name() << "\"";
287  file_ << " dx=\"10.*m"
288  << "\" dy=\"10.*m"
289  << "\" dz=\"10.*m"
290  << "\"/>" << std::endl;
291  return;
292  }
293 
294  CocoaSolidShape* so = opto->getSolidShape();
295 
296  std::cout << " CocoaToDDLMgr::so( so " << so << std::endl;
297 std::string solidType = so->getType();
298 
299  if (solidType == "Box")
300  {
301  file_ << " <" << solidType << " name=\"" << name << "\"";
302  CocoaSolidShapeBox * sb = dynamic_cast<CocoaSolidShapeBox*>(so);
303  file_ << " dx=\"" << UC(sb->getXHalfLength(),"Length")
304  << "\" dy=\"" << UC(sb->getYHalfLength(),"Length")
305  << "\" dz=\"" << UC(sb->getZHalfLength(),"Length")
306  << "\"/>" << std::endl;
307  }
308  else if (solidType == "Tubs")
309  {
310  CocoaSolidShapeTubs * tu = dynamic_cast < CocoaSolidShapeTubs * > (so);
311  file_ << " <" << solidType
312  << " name=\"" << name << "\""
313  << " rMin=\"" << UC(tu->getInnerRadius(),"Length") << "\""
314  << " rMax=\"" << UC(tu->getOuterRadius(),"Length") << "\""
315  << " dz=\"" << UC(tu->getZHalfLength(),"Length") << "\""
316  << " startPhi=\"" << UC(tu->getStartPhiAngle(),"Angle") << "\""
317  << " deltaPhi=\"" << UC(tu->getDeltaPhiAngle(),"Angle") << "\""
318  << "/>" << std::endl;
319  }
320  /* else if (solidType == "Cons")
321  {
322  G4Cons * cn = dynamic_cast < G4Cons * > (so);
323  file_ << " <" << solidType
324  << " name=\"" << name << "\""
325  << " dz=\"" << UC(cn->getZHalfLength(),"Length") << "\""
326  << " rMin1=\"" << UC(cn->getInnerRadiusMinusZ(),"Length") << "\""
327  << " rMax1=\"" << UC(cn->getOuterRadiusMinusZ(),"Length") << "\""
328  << " rMin2=\"" << UC(cn->getInnerRadiusPlusZ(),"Length") << "\""
329  << " rMax2=\"" << UC(cn->getOuterRadiusPlusZ(),"Length") << "\""
330  << " startPhi=\"" << UC(cn->getStartPhiAngle(),"Angle") << "\""
331  << " deltaPhi=\"" << UC(cn->getDeltaPhiAngle(),"Angle") << "\""
332  //<< " lengthUnit=\"mm\" angleUnit=\"degree\"/>"
333  << " />" << std::endl;
334  }
335  else if (solidType == "Polycone")
336  {
337  G4Polycone * pc = dynamic_cast < G4Polycone * > (so);
338  file_ << " <Polycone name=\"" << name<< "\"";
339  bool isOpen = pc->IsOpen();
340  G4int numRZCorner = (dynamic_cast < G4Polycone * > (so))->getNumRZCorner();
341 
342  file_ << " startPhi=\"" << UC(pc->getStartPhi(),"Angle") << "\""
343  //<< " deltaPhi=\"" << UC(fabs((pc->getEndPhi()/deg - pc->getStartPhi()/deg))*deg,"Angle") << "\""
344  //<< " deltaPhi=\"" << UC(pc->getEndPhi(),"Angle") << "\""
345  << " deltaPhi=\"" << UC(pc->original_parameters->Opening_angle,"Angle") << "\""
346  //<< " angleUnit=\"degree\">"
347  << " >" << std::endl;
348 
349  G4PolyconeSideRZ rz;
350 
351  //liendl: FIXME put a switch which decides whether RZ or Rmin,Rmax,Z types should
352  // by generated ....
353  //outPolyZSections(rz, (dynamic_cast < G4Polycone * > (so)), numRZCorner);
354  G4double * zVal;
355  G4double * rmin;
356  G4double * rmax;
357  G4int zPlanes;
358  zPlanes = pc->original_parameters->Num_z_planes;
359  zVal = pc->original_parameters->Z_values;
360  rmin = pc->original_parameters->Rmin;
361  rmax = pc->original_parameters->Rmax;
362  outPolySections(zPlanes, zVal, rmin, rmax);
363  file_ << " </Polycone> " << std::endl;
364  }
365  else if (solidType == "Polyhedra")
366  {
367  // bool isOpen = (dynamic_cast < G4Polyhedra * > (so))->IsOpen();
368  G4Polyhedra * ph = (dynamic_cast < G4Polyhedra * > (so));
369  G4int numRZCorner = ph->getNumRZCorner();
370 
371  file_ << " <Polyhedra name=\"" << name<< "\""
372  << " numSide=\"" << ph->getNumSide() << "\""
373  << " startPhi=\"" << UC(ph->getStartPhi(),"Angle") << "\""
374  //<< " deltaPhi=\"" << UC(fabs((ph->getEndPhi()/deg - ph->getStartPhi()/deg))*deg,"Angle") << "\""
375  << " deltaPhi=\"" << UC(ph->original_parameters->Opening_angle,"Angle") << "\""
376  << " >" << std::endl;
377 
378  G4PolyhedraSideRZ rz;
379  //liendl: FIXME put a switch which decides whether RZ or Rmin,Rmax,Z types should
380  // by generated ....
381  // outPolyZSections(rz, (dynamic_cast < G4Polyhedra * > (so)), numRZCorner);
382  G4double * zVal;
383  G4double * rmin;
384  G4double * rmax;
385  // convertRad of ctor of G4Polyhedra(..) ....
386  G4double strangeG3G4Factor = cos(0.5*ph->original_parameters->Opening_angle/G4double(ph->getNumSide()));
387  G4int zPlanes;
388  zPlanes = ph->original_parameters->Num_z_planes;
389  zVal = ph->original_parameters->Z_values;
390  rmin = ph->original_parameters->Rmin;
391  rmax = ph->original_parameters->Rmax;
392  for (int i=0; i<zPlanes;++i) {
393  *(rmin+i) = *(rmin+i) * strangeG3G4Factor;
394  *(rmax+i) = *(rmax+i) * strangeG3G4Factor;
395  }
396  outPolySections(zPlanes, zVal, rmin, rmax);
397 
398  file_ << " </Polyhedra>" << std::endl;
399  }
400  else if (solidType == "Trapezoid")
401  {
402  // DDL fields
403  // ALP1, ALP2, Bl1, Bl2, Dz, H1, H2, Phi, Thet, TL1, TL2, lengthUnit, angleUnit
404  // Phi and Theta are !NOT!optional.
405  G4Trap * trp = dynamic_cast < G4Trap * > (so);
406  G4ThreeVector symAxis(trp->getSymAxis());
407  double theta, phi;
408  theta = symAxis.theta();
409  phi = symAxis.phi();
410 
411  file_ << " <" << solidType
412  << " name=\"" << name << "\""
413  << " dz=\"" << UC(trp->getZHalfLength(),"Length") << "\""
414  << " alp1=\"" << UC(atan(trp->getTanAlpha1()/rad),"Angle") << "\""
415  << " bl1=\"" << UC(trp->getXHalfLength1(),"Length") << "\""
416  << " tl1=\"" << UC(trp->getXHalfLength2(),"Length") << "\""
417  << " h1=\"" << UC(trp->getYHalfLength1(),"Length") << "\""
418  << " alp2=\"" << UC(atan(trp->getTanAlpha2()/rad),"Angle") << "\""
419  << " bl2=\"" << UC(trp->getXHalfLength3(),"Length") << "\""
420  << " tl2=\"" << UC(trp->getXHalfLength4(),"Length") << "\""
421  << " h2=\"" << UC(trp->getYHalfLength2(),"Length") << "\""
422  << " phi=\"" << UC(phi,"Angle") << "\""
423  << " theta=\"" << UC(theta,"Angle") << "\""
424  << " />" << std::endl ;
425  }
426  else if (solidType == "Trd1")
427  {
428  G4Trd * tr = dynamic_cast < G4Trd * > (so);
429  file_ << " <" << solidType
430  << " name=\"" << name << "\""
431  << " dz=\"" << UC(tr->getZHalfLength(),"Length") << "\""
432  << " dy1=\"" << UC(tr->getYHalfLength1(),"Length") << "\""
433  << " dy2=\"" << UC(tr->getYHalfLength2(),"Length")<< "\""
434  << " dx1=\"" << UC(tr->getXHalfLength1(),"Length") << "\""
435  << " dx2=\"" << UC(tr->getXHalfLength2(),"Length") << "\""
436  //<< " lengthUnit=\"mm\"/>"
437  << " />" << std::endl;
438  }
439  */
440  else
441  {
442  std::cerr << " <!-- NOT HANDLED: " << solidType << " name=\"" << name<< "\""
443  << ">" << std::endl
444  << " </" << solidType << "> -->" << std::endl;
445  std::exception();
446  }
447 
448 }
ALIfloat getOuterRadius() const
const ALIstring & name()
Definition: ALIFileOut.h:33
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:76
ALIfloat getXHalfLength() const
void so(OpticalObject *opto)
tuple cout
Definition: gather_cfg.py:121
ALIfloat getZHalfLength() const
void CocoaToDDLMgr::specPar ( OpticalObject opto)

Definition at line 623 of file CocoaToDDLMgr.cc.

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

Referenced by writeSpecPars().

624 {
625  file_ << " <SpecPar name=\"" << opto->name() << "_PARAMS\">" << std::endl;
626  file_ << " <PartSelector path=\"/" << opto->name() << "\"/> " << std::endl;
627  file_ << " <Parameter name=\"cocoa_type\"" << " value=\"" << opto->type() << "\" eval=\"false\" /> " << std::endl;
628  file_ << " <Parameter name=\"cmssw_ID\"" << " value=\"" << opto->getCmsswID() << "\" /> " << std::endl;
629 
630  const std::vector< Entry* > coord = opto->CoordinateEntryList();
631  for( int ii=3; ii<6; ii++ ){
632  Entry* ent = coord[ii];
633  file_ << " <Parameter name=\"" << ent->name()+std::string("_value") << "\" value=\"";
634  file_ << UC(ent->value(),"Angle");
635  file_ << "\" /> " << std::endl;
636  }
637  for( int ii=0; ii<6; ii++ ){
638  Entry* ent = coord[ii];
639  file_ << " <Parameter name=\"" << ent->name()+std::string("_sigma") << "\" value=\"";
640  if( ii < 3 ){
641  file_ << UC(ent->sigma(),"Length");
642  }else {
643  file_ << UC(ent->sigma(),"Angle");
644  }
645  file_ << "\" /> " << std::endl;
646  file_ << " <Parameter name=\"" << ent->name()+std::string("_quality") << "\" value=\"" << ent->quality() << "\" /> " << std::endl;
647  }
648 
649  const std::vector< Entry* > extraEnt = opto->ExtraEntryList();
650  for( ALIuint ii=0; ii<extraEnt.size(); ii++ ){
651  Entry* ent = extraEnt[ii];
652  file_ << " <Parameter name=\"extra_entry\" value=\"" << ent->name() << "\" eval=\"false\" /> " << std::endl;
653  file_ << " <Parameter name=\"dimType\" value=\"" << ent->type() << "\" eval=\"false\" /> " << std::endl;
654  file_ << " <Parameter name=\"value\" value=\"";
655  if( ent->type() == "nodim" ) {
656  file_ << ent->value();
657  }else if( ent->type() == "length" ) {
658  file_ << UC(ent->value(),"Length");
659  }else if( ent->type() == "angle" ) {
660  file_ << UC(ent->value(),"Angle");
661  }
662  file_ << "\" eval=\"true\" /> " << std::endl;
663 
664  file_ << " <Parameter name=\"sigma\" value=\"";
665  if( ent->type() == "nodim" ) {
666  file_ << ent->sigma();
667  }else if( ent->type() == "length" ) {
668  file_ << UC(ent->sigma(),"Length");
669  }else if( ent->type() == "angle" ) {
670  file_ << UC(ent->sigma(),"Angle");
671  }
672  file_ << "\" eval=\"true\" /> " << std::endl;
673 
674  file_ << " <Parameter name=\"quality\" value=\"" << ent->quality() << "\" eval=\"true\" /> " << std::endl;
675  }
676 
677  file_ << " </SpecPar>" << std::endl;
678 
679 }
const ALIuint getCmsswID() const
const ALIstring & type() const
Definition: Entry.h:54
Definition: Entry.h:18
const std::vector< Entry * > & ExtraEntryList() const
Definition: OpticalObject.h:69
ALIdouble value() const
Definition: Entry.h:55
const std::vector< Entry * > & CoordinateEntryList() const
Definition: OpticalObject.h:65
#define UC(val, category)
Definition: CocoaToDDLMgr.cc:9
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
const ALIstring & name() const
Definition: Entry.h:52
ALIint quality() const
Definition: Entry.h:59
const ALIstring & name() const
Definition: OpticalObject.h:60
unsigned int ALIuint
Definition: CocoaGlobals.h:17
const ALIstring & type() const
Definition: OpticalObject.h:61
ALIdouble sigma() const
Definition: Entry.h:57
void CocoaToDDLMgr::writeDDDFile ( ALIstring  filename)

Definition at line 34 of file CocoaToDDLMgr.cc.

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

35 {
36  //---- Write header
38 
39  //---- Write materials
41 
42  //---- Write solids
43  writeSolids();
44 
45  //---- Write logical volumes
47 
48  //---- Write physical volumes
50 
51  //---- Write rotations
53 
54  //---- Write SpecPar's
55  writeSpecPars();
56 
57  newPartPost( filename, "" );
58 
59 
60 }
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 63 of file CocoaToDDLMgr.cc.

References newPartPre().

Referenced by writeDDDFile().

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

Definition at line 110 of file CocoaToDDLMgr.cc.

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

Referenced by writeDDDFile().

111 {
112  newSectPre_lv("");
113 
114  static std::vector< OpticalObject* > optolist = Model::OptOList();
115  static std::vector< OpticalObject* >::const_iterator ite,ite2;
116  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
117  bool alreadyWritten = false;
118  for(ite2 = optolist.begin(); ite2 != ite; ite2++ ){
119  if( (*ite)->shortName() == (*ite2)->shortName() ) {
120  alreadyWritten = true;
121  }
122  }
123  if( !alreadyWritten ) lv( *ite );
124  }
125 
126  newSectPost_lv("");
127 
128 }
void newSectPre_lv(std::string name)
void lv(OpticalObject *opto)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
void newSectPost_lv(std::string name)
void CocoaToDDLMgr::writeMaterials ( )

Definition at line 69 of file CocoaToDDLMgr.cc.

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

Referenced by writeDDDFile().

70 {
71  newSectPre_ma("");
72  static std::vector< OpticalObject* > optolist = Model::OptOList();
73  static std::vector< OpticalObject* >::const_iterator ite;
74  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
75  if( (*ite)->type() == "system" ) continue;
76  CocoaMaterialElementary* mat = (*ite)->getMaterial();
77  //- std::cout << " mat of opto " << (*ite)->name() << " = " << mat->getName() << std::endl;
78  if( mat ) {
79  if( !materialIsRepeated( mat ) ) ma( mat );
80  }
81  }
82 
83  newSectPost_ma("");
84 }
ALIbool materialIsRepeated(CocoaMaterialElementary *ma)
void newSectPre_ma(std::string name)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
void ma(CocoaMaterialElementary *ma)
void newSectPost_ma(std::string name)
void CocoaToDDLMgr::writePhysicalVolumes ( )

Definition at line 131 of file CocoaToDDLMgr.cc.

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

Referenced by writeDDDFile().

132 {
133  newSectPre_pv("");
134 
135  static std::vector< OpticalObject* > optolist = Model::OptOList();
136  static std::vector< OpticalObject* >::const_iterator ite;
137  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
138  if( (*ite)->type() == "system" ) continue;
139  pv( *ite );
140  }
141 
142  newSectPost_pv("");
143 
144 }
void newSectPost_pv(std::string name)
void pv(OpticalObject *opto)
void newSectPre_pv(std::string name)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
void CocoaToDDLMgr::writeRotations ( )

Definition at line 148 of file CocoaToDDLMgr.cc.

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

Referenced by writeDDDFile().

149 {
150  newSectPre_ro("");
151  std::vector<CLHEP::HepRotation>::const_iterator ite;
152  int nc = 0;
153  for( ite = theRotationList.begin(); ite != theRotationList.end(); ite++) {
154  //- std::cout << nc << " rot size " << theRotationList.size() << std::endl;
155  ro( *ite, nc );
156  nc++;
157  }
158  newSectPost_ro("");
159 
160 }
void newSectPost_ro(std::string name)
std::vector< CLHEP::HepRotation > theRotationList
Definition: CocoaToDDLMgr.h:80
void ro(const CLHEP::HepRotation &ro, int n)
void newSectPre_ro(std::string name)
void CocoaToDDLMgr::writeSolids ( )

Definition at line 87 of file CocoaToDDLMgr.cc.

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

Referenced by writeDDDFile().

88 {
89  newSectPre_so("");
90 
91  static std::vector< OpticalObject* > optolist = Model::OptOList();
92  static std::vector< OpticalObject* >::const_iterator ite,ite2;
93  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
94  bool alreadyWritten = false;
95  for(ite2 = optolist.begin(); ite2 != ite; ite2++ ){
96  if( (*ite)->shortName() == (*ite2)->shortName() ) {
97  alreadyWritten = true;
98  }
99  }
100 std::cout << " CocoaToDDLMgr::writeSolids() " << alreadyWritten << *ite;
101 std::cout << (*ite)->name() << std::endl;
102  if( !alreadyWritten ) so( *ite );
103  }
104 
105  newSectPost_so("");
106 
107 }
void newSectPre_so(std::string name)
void newSectPost_so(std::string name)
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
void so(OpticalObject *opto)
tuple cout
Definition: gather_cfg.py:121
void CocoaToDDLMgr::writeSpecPars ( )

Definition at line 163 of file CocoaToDDLMgr.cc.

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

Referenced by writeDDDFile().

164 {
165  newSectPre_specPar("");
166 
167  static std::vector< OpticalObject* > optolist = Model::OptOList();
168  static std::vector< OpticalObject* >::const_iterator ite;
169  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
170  if( (*ite)->type() == "system" ) continue;
171  specPar( *ite );
172  }
173 
175 
176  //---- Write Measurements's
178 
179 
181 
182 
183 }
void specPar(OpticalObject *opto)
void writeSpecParsCocoa()
void measurementsAsSpecPars()
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71
void newSectPost_specPar(std::string name)
void newSectPre_specPar(std::string name)
void CocoaToDDLMgr::writeSpecParsCocoa ( )

Definition at line 732 of file CocoaToDDLMgr.cc.

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

Referenced by writeSpecPars().

733 {
734  file_ << "<!-- Define volumes as COCOA objects --> " << std::endl
735  << " <SpecPar name=\"COCOA\"> " << std::endl;
736 
737  static std::vector< OpticalObject* > optolist = Model::OptOList();
738  static std::vector< OpticalObject* >::const_iterator ite;
739  for(ite = optolist.begin(); ite != optolist.end(); ite++ ){
740  if( (*ite)->type() == "system" ) continue;
741  file_ << " <PartSelector path=\"/" << (*ite)->name() << "\"/> " << std::endl;
742  }
743 
744  file_ << " <String name=\"COCOA\" value=\"COCOA\"/> " << std::endl
745  << " </SpecPar> " << std::endl;
746 
747 }
const ALIstring & name()
Definition: ALIFileOut.h:33
ALIFileOut file_
Definition: CocoaToDDLMgr.h:76
static std::vector< OpticalObject * > & OptOList()
Definition: Model.h:71

Member Data Documentation

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

Definition at line 74 of file CocoaToDDLMgr.h.

Referenced by getInstance().

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

Definition at line 79 of file CocoaToDDLMgr.h.

Referenced by ma(), and materialIsRepeated().

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

Definition at line 80 of file CocoaToDDLMgr.h.

Referenced by buildRotationNumber(), and writeRotations().