Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:32

0001 //   COCOA class header file

0002 //Id:  CocoaToDDLMgr.h

0003 //CAT: Model

0004 //

0005 //   Class to manage the sets of fitted entries (one set per each measurement data set)

0006 //

0007 //   History: v1.0

0008 //   Pedro Arce

0009 
0010 #ifndef _CocoaToDDLMgr_HH
0011 #define _CocoaToDDLMgr_HH
0012 
0013 #include <map>
0014 //#include <fstream>

0015 #include "Alignment/CocoaUtilities/interface/ALIFileOut.h"
0016 
0017 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0018 
0019 #include "CLHEP/Vector/Rotation.h"
0020 
0021 class CocoaMaterialElementary;
0022 class CocoaSolidShape;
0023 class OpticalObject;
0024 
0025 class CocoaToDDLMgr {
0026 public:
0027   //---------- Constructors / Destructor

0028   CocoaToDDLMgr(){};
0029   ~CocoaToDDLMgr(){};
0030   static CocoaToDDLMgr* getInstance();
0031 
0032   void writeDDDFile(ALIstring filename);
0033   void writeHeader(ALIstring filename);
0034   void writeMaterials();
0035   void writeSolids();
0036   void writeLogicalVolumes();
0037   void writePhysicalVolumes();
0038   void writeRotations();
0039   void writeSpecPars();
0040   void measurementsAsSpecPars();
0041 
0042   void newPartPre(std::string name);
0043   void newPartPost(std::string name, std::string extension);
0044   void newSectPre_ma(std::string name);
0045   void ma(CocoaMaterialElementary* ma);
0046   void newSectPost_ma(std::string name);
0047   void newSectPre_so(std::string name);
0048   void so(OpticalObject* opto);
0049   void newSectPost_so(std::string name);
0050   void newSectPre_lv(std::string name);
0051   void lv(OpticalObject* opto);
0052   void newSectPost_lv(std::string name);
0053   void newSectPre_pv(std::string name);
0054   void pv(OpticalObject* opto);
0055   void newSectPost_pv(std::string name);
0056   void newSectPre_ro(std::string name);
0057   void ro(const CLHEP::HepRotation& ro, int n);
0058   void newSectPost_ro(std::string name);
0059   void newSectPre_specPar(std::string name);
0060   void specPar(OpticalObject* opto);
0061   void writeSpecParsCocoa();
0062   void newSectPost_specPar(std::string name);
0063   void newSectPre(std::string name, std::string type);
0064   void newSectPost(std::string name);
0065   ALIbool materialIsRepeated(CocoaMaterialElementary* ma);
0066   ALIint buildRotationNumber(OpticalObject* opto);
0067 
0068   std::string scrubString(const std::string& s);
0069 
0070 private:
0071   static CocoaToDDLMgr* instance;
0072 
0073   ALIFileOut file_;
0074   std::string filename_;
0075 
0076   std::vector<CocoaMaterialElementary*> theMaterialList;
0077   std::vector<CLHEP::HepRotation> theRotationList;
0078 };
0079 #endif