Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
_
a
c
d
e
f
l
m
o
p
s
t
u
v
+
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
SimG4CMS
PPS
src
PPSPixelOrganization.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: PPS
4
// Class : PPSPixelOrganization
5
//
6
// Implementation:
7
// <Notes on implementation>
8
//
9
10
// user include files
11
#include "
SimG4CMS/PPS/interface/PPSPixelOrganization.h
"
12
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
13
#include "
DataFormats/CTPPSDetId/interface/CTPPSPixelDetId.h
"
14
#include "G4VPhysicalVolume.hh"
15
#include "G4VTouchable.hh"
16
17
//
18
// constructors and destructor
19
//
20
PPSPixelOrganization ::PPSPixelOrganization
()
21
: currentUnitID_(0), currentArm_(0), currentStation_(0), currentRP_(0), currentPlane_(0) {
22
edm::LogVerbatim
(
"PPSSim"
) <<
"Creating PPSPixelOrganization"
;
23
}
24
25
//
26
// member functions
27
//
28
29
uint32_t
PPSPixelOrganization ::unitID
(
const
G4Step* aStep) {
30
const
G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
31
G4VPhysicalVolume* physVol = touch->GetVolume(0);
32
int
coNum = physVol->GetCopyNo();
33
edm::LogVerbatim
(
"PPSPixelSim"
) <<
"PPSPixelSim: PhysVol= "
<< physVol->GetName() <<
" coNum="
<< coNum;
34
currentPlane_
= coNum - 1;
35
36
G4VPhysicalVolume* physVolVac = touch->GetVolume(3);
37
if
(
nullptr
== physVolVac) {
38
edm::LogError
(
"PPSPixelSim"
) <<
"Physical volume RP_box_primary_vacuum not found for "
<< physVol->GetName()
39
<<
"; cannot determine CTPPSPixelDetId."
;
40
}
else
{
41
int
cpy_no = physVolVac->GetCopyNo();
42
currentArm_
= (cpy_no / 100) % 10;
43
currentStation_
= (cpy_no / 10) % 10;
44
currentRP_
= cpy_no % 10;
45
}
46
47
edm::LogVerbatim
(
"PPSPixelSim"
) <<
" arm="
<<
currentArm_
<<
" station="
<<
currentStation_
48
<<
" roman_pot="
<<
currentRP_
<<
" detector="
<<
currentPlane_
;
49
CTPPSPixelDetId
id
(
currentArm_
,
currentStation_
,
currentRP_
,
currentPlane_
);
50
uint32_t
kk
=
id
.rawId();
51
edm::LogVerbatim
(
"PPSPixelSim"
) <<
"PPSPixelSim: ID="
<<
kk
;
52
return
kk
;
53
}
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
PPSPixelOrganization::unitID
uint32_t unitID(const G4Step *aStep) override
Definition:
PPSPixelOrganization.cc:29
MessageLogger.h
PPSPixelOrganization::currentPlane_
int currentPlane_
Definition:
PPSPixelOrganization.h:40
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
PPSPixelOrganization.h
CTPPSPixelDetId
Definition:
CTPPSPixelDetId.h:16
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:29
PPSPixelOrganization::currentArm_
int currentArm_
Definition:
PPSPixelOrganization.h:37
PPSPixelOrganization::currentStation_
int currentStation_
Definition:
PPSPixelOrganization.h:38
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition:
GetRecoTauVFromDQM_MC_cff.py:84
CTPPSPixelDetId.h
PPSPixelOrganization::PPSPixelOrganization
PPSPixelOrganization()
Definition:
PPSPixelOrganization.cc:20
PPSPixelOrganization::currentRP_
int currentRP_
Definition:
PPSPixelOrganization.h:39
Generated for CMSSW Reference Manual by
1.8.14