CMS 3D CMS Logo

TotemRPOrganization.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Forward
4 // Class : TotemRPOrganization
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author:
10 // Created: Tue May 16 10:14:34 CEST 2006
11 //
12 
13 // system include files
14 
15 // user include files
19 
20 #include "G4VPhysicalVolume.hh"
21 #include "G4VTouchable.hh"
22 
23 //
24 // constructors and destructor
25 //
27 
28  edm::LogInfo("ForwardSim") << "Creating TotemRPOrganization";
29 }
30 
32 }
33 
34 //
35 // member functions
36 //
37 
38 uint32_t TotemRPOrganization :: getUnitID(const G4Step* aStep) const {
39 
40  G4VPhysicalVolume* physVol;
41  int32_t UNITA=0;
42  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
43  int ii =0;
44  for( ii = 0; ii < touch->GetHistoryDepth(); ii++ ){
45  physVol = touch->GetVolume(ii);
46 
47 #ifdef SCRIVI
48  LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level="
49  << ii << ", physVol->GetCopyNo()="
50  << physVol->GetCopyNo();
51 #endif
52  }
53  physVol= touch->GetVolume(0);//aStep->GetPreStepPoint()->GetPhysicalVolume();
54 
55  if(physVol->GetName() == "myRP") UNITA=(touch->GetVolume(5)->GetCopyNo())*1111;
56 
57 #ifdef SCRIVI
58  LogDebug("ForwardSim") << "\nUNITA-RP " << UNITA << "\n\n";
59 #endif
60  return UNITA;
61 }
#define LogDebug(id)
uint32_t getUnitID(const G4Step *aStep) const override
ii
Definition: cuy.py:590