CMS 3D CMS Logo

DDPosPart.cc File Reference

#include "DetectorDescription/Core/interface/DDPosPart.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include <utility>

Go to the source code of this file.

Functions

void DDpos (const DDLogicalPart &self, const DDLogicalPart &mother, int copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div)
void DDpos (const DDLogicalPart &self, const DDLogicalPart &mother, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div)
 root of the detector is never positioned using DDpos, it's implicitly declared by the first layer of daughters!


Function Documentation

void DDpos ( const DDLogicalPart self,
const DDLogicalPart mother,
int  copyno,
const DDTranslation trans,
const DDRotation rot,
const DDDivision div 
)

Definition at line 21 of file DDPosPart.cc.

References graph< N, E >::addEdge(), and DDCompactView::writeableGraph().

00027 {
00028   DDCompactView cpv(true); 
00029   graph_type & graph = cpv.writeableGraph();
00030 //   std::cout << "about to pos using int copy_no " << copyno << "  of  " << std::endl;
00031 //   std::cout << self << " in mother " << std::endl<< mother << std::endl;
00032 //   std::cout << "Rotation matrix " << std::endl << *(rot.rotation()) << std::endl;
00033   //DDTranslation * tt = new DDTranslation(trans);
00034   //DDPosData * pd = new DDPosData(*tt,rot,cpno);
00035   DDPosData * pd = new DDPosData(trans,rot,copyno,div);
00036   graph.addEdge(mother,self,pd);
00037 }

void DDpos ( const DDLogicalPart self,
const DDLogicalPart parent,
std::string  copyno,
const DDTranslation trans,
const DDRotation rot,
const DDDivision div = NULL 
)

root of the detector is never positioned using DDpos, it's implicitly declared by the first layer of daughters!

Function for building geometrical hierarchies The internal model of the geometrical hierarchy is an acylic directed multigraph. Users have access to it by consulting DDCompactView.

DDPos() is used to define 2 nodes (self and mother) and a connecting edge (the relative translations trans and rotation rot of self towards mother).

The root of the geometrical hierarchy is implicitly defined. It never shows up as a self parameter in DDPos().

Todo:
Check: After calling DDPos the user must not free allocated memory of trans .

Definition at line 7 of file DDPosPart.cc.

References DDpos().

Referenced by DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideSector(), DDHCalBarrelAlgo::constructInsideSector(), DDalgoPosPart(), DDpos(), DDEcalPreshowerAlgo::doLadders(), DDEcalPreshowerAlgo::doLayers(), DDEcalPreshowerAlgoTB::doLayers(), DDTECModuleAlgo::doPos(), DDEcalPreshowerAlgoTB::doSens(), DDEcalPreshowerAlgo::doSens(), DDEcalPreshowerAlgoTB::doWedges(), DDEcalEndcapAlgo::EECreateSC(), DDEcalEndcapAlgo::EEPositionCRs(), DDTrackerZPosAlgo::execute(), DDTBH4Algo::execute(), DDPixFwdBlades::execute(), DDHCalAngular::execute(), DDTECAxialCableAlgo::execute(), DDHCalTBCableAlgo::execute(), DDHCalXtalAlgo::execute(), DDHCalTBZposAlgo::execute(), DDTOBRadCableAlgo::execute(), DDDividedGeometryObject::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTECOptoHybAlgo::execute(), DDTECPhiAltAlgo::execute(), DDTrackerLinearXY::execute(), DDPixBarLayerAlgo::execute(), DDEcalBarrelAlgo::execute(), DDHCalTestBeamAlgo::execute(), DDTIDModuleAlgo::execute(), DDTOBRodAlgo::execute(), DDTECModuleAlgo::execute(), DDTIDAxialCableAlgo::execute(), DDTrackerPhiAltAlgo::execute(), DDTrackerXYZPosAlgo::execute(), DDHCalLinearXY::execute(), DDTrackerLinear::execute(), DDTIBLayerAlgo::execute(), DDEcalEndcapAlgo::execute(), DDTIDModulePosAlgo::execute(), DDTIDRingAlgo::execute(), DDTOBAxCableAlgo::execute(), DDHCalForwardAlgo::execute(), DDTrackerAngular::execute(), DDTrackerPhiAlgo::execute(), DDTIBRadCableAlgo_MTCC::execute(), DDTECCoolAlgo::execute(), DDTECPhiAlgo::execute(), DDStreamer::pos_read(), DDPersToDDDFactory::position(), DDLPosPart::processElement(), regressionTest_first(), presh_detectors::topHalfXPlane(), and DDEcalBarrelAlgo::web().

00013 {
00014 //   std::cout << "about to pos using string copy_no " << copyno << "  of  " << std::endl;
00015 //   std::cout << self << " in mother " << std::endl << mother << std::endl;
00016 //   std::cout << "Rotation matrix " << std::endl << *(rot.rotation()) << std::endl;
00017   int cpno = atoi(copyno.c_str());
00018   DDpos(self,mother,cpno,trans,rot,div);
00019 }


Generated on Tue Jun 9 17:52:36 2009 for CMSSW by  doxygen 1.5.4