GeoModel - GeoModelCore
GeoCountVolAction.cxx
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GeoModelKernel/GeoCountVolAction.h"
6 
7 GeoCountVolAction::GeoCountVolAction ()
8  : m_count (0)
9 {
10  setDepthLimit (1);
11 }
12 
13 GeoCountVolAction::~GeoCountVolAction()
14 {
15 }
16 
17 void GeoCountVolAction::handlePhysVol (const GeoPhysVol *)
18 {
19  //
20  // Do not count the top volume, this action counts only children!
21  //
22  if (getPath ()->getLength () > 1)
23  m_count++;
24 }
25 
26 void GeoCountVolAction::handleFullPhysVol (const GeoFullPhysVol *)
27 {
28  //
29  // Do not count the top volume, this action counts only children!
30  //
31  if (getPath ()->getLength () > 1)
32  m_count++;
33 }
34 
35 void GeoCountVolAction::handleSerialTransformer (const GeoSerialTransformer *st)
36 {
37  m_count += st->getNCopies ();
38 }
This class represent a physical volume whose absolute default and aligned positions are known and hel...
This class takes a physical volume and places it according to a transformation field, N times.
A GeoPhysVol is a physical volume for normal recursive access only. This means, normally, that it represents a piece of detector that nobody cares about except for tracing engines like GEANT. More specifically:
Definition: GeoPhysVol.h:31