本文整理汇总了C++中TGeoVolume::GetUniqueID方法的典型用法代码示例。如果您正苦于以下问题:C++ TGeoVolume::GetUniqueID方法的具体用法?C++ TGeoVolume::GetUniqueID怎么用?C++ TGeoVolume::GetUniqueID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGeoVolume
的用法示例。
在下文中一共展示了TGeoVolume::GetUniqueID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Form
TGeoHMatrix &KVSpectroDetector::GetActiveVolToFocalMatrix(Int_t i ) const{
// Returns the matrix which transforms coordinates form the reference
// frame of the active volume 'i' to the reference frame of the focal
// plan.
static TGeoHMatrix mm;
mm.Clear();
TGeoVolume *vol = (TGeoVolume *)fActiveVolumes->At(i);
if( vol ){
Int_t prev_id = gGeoManager->GetCurrentNodeId();
// To be sure that the matrices will be calculated again
gGeoManager->CdTop();
gGeoManager->CdNode( vol->GetUniqueID() );
// matrix 'volume to target'
TGeoMatrix *vol_to_tgt = gGeoManager->GetCurrentMatrix();
if( fFocalToTarget ) mm = fFocalToTarget->Inverse()*(*vol_to_tgt);
else mm = *vol_to_tgt;
mm.SetName( Form("%s_to_focal",vol->GetName()) );
// just to not create problems if this method is called during a tracking
gGeoManager->CdNode( prev_id );
}
else mm.SetName("Identity_matrix");
return mm;
}