Main Page
Namespaces
Classes
Package Documentation
DataFormats
SiStripCluster
interface
SiStripClusterTools.h
Go to the documentation of this file.
1
#ifndef DataFormatsSiStripClusterSiStripClusterTools_H
2
#define DataFormatsSiStripClusterSiStripClusterTools_H
3
4
#include "
DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h
"
5
#include "
DataFormats/SiStripDetId/interface/SiStripDetId.h
"
6
7
#include<numeric>
8
9
namespace
siStripClusterTools
{
10
11
// to be moved and optimized in TrackerCommon when TrackerTopology will support moduleGeometry
12
inline
float
sensorThicknessInverse
(
DetId
detid)
13
{
14
if
(detid.
subdetId
()>=
SiStripDetId::TIB
) {
15
SiStripDetId
siStripDetId = detid();
16
if
(siStripDetId.
subdetId
()==
SiStripDetId::TOB
)
return
1.
f
/0.047
f
;
17
if
(siStripDetId.
moduleGeometry
()==
SiStripDetId::W5
|| siStripDetId.
moduleGeometry
()==
SiStripDetId::W6
||
18
siStripDetId.
moduleGeometry
()==
SiStripDetId::W7
)
19
return
1.
f
/0.047
f
;
20
return
1.f/0.029f;
// so it is TEC ring 1-4 or TIB or TOB;
21
}
else
if
(detid.
subdetId
()==1)
return
1.
f
/0.0285
f
;
22
else
return
1.f/0.027f;
23
}
24
25
26
template
<
typename
Iter>
27
inline
float
chargePerCM
(
DetId
detid, Iter
a
, Iter
b
) {
28
return
float
(std::accumulate(a,b,
int
(0)))*
sensorThicknessInverse
(detid);
29
}
30
31
template
<
typename
Clus>
32
inline
float
chargePerCM
(
DetId
detid, Clus
const
&
cl
) {
33
return
cl.charge()*
sensorThicknessInverse
(detid);
34
}
35
36
37
template
<
typename
Clus>
38
inline
float
chargePerCM
(
DetId
detid, Clus
const
&
cl
,
LocalTrajectoryParameters
const
& tp) {
39
return
chargePerCM
(detid,cl)*tp.
absdz
();
40
}
41
42
template
<
typename
Clus>
43
inline
float
chargePerCM
(Clus
const
&
cl
,
LocalTrajectoryParameters
const
& tp,
float
invThick) {
44
return
cl.charge()*invThick*tp.
absdz
();
45
}
46
47
48
template
<
typename
Clus>
49
inline
float
chargePerCM
(
DetId
detid, Clus
const
&
cl
,
const
LocalVector
& ldir) {
50
return
chargePerCM
(detid,cl)*
std::abs
(ldir.
z
())/ldir.
mag
();
51
}
52
53
54
55
}
56
57
58
#endif // DataFormatsSiStripClusterSiStripClusterTools_H
59
SiStripDetId.h
SiStripDetId::W6
Definition:
SiStripDetId.h:37
LocalTrajectoryParameters.h
Vector3DBase
Definition:
Vector3DBase.h:9
siStripClusterTools::chargePerCM
float chargePerCM(DetId detid, Iter a, Iter b)
Definition:
SiStripClusterTools.h:27
SiStripDetId::TOB
Definition:
SiStripDetId.h:34
siStripClusterTools::sensorThicknessInverse
float sensorThicknessInverse(DetId detid)
Definition:
SiStripClusterTools.h:12
PV3DBase::mag
T mag() const
Definition:
PV3DBase.h:67
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition:
DetId.h:41
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
SiStripDetId::W5
Definition:
SiStripDetId.h:37
SiStripDetId::W7
Definition:
SiStripDetId.h:37
objects.autophobj.float
float
Definition:
autophobj.py:147
SiStripDetId
Detector identifier class for the strip tracker.
Definition:
SiStripDetId.h:17
DetId
Definition:
DetId.h:18
SiStripDetId::TIB
Definition:
SiStripDetId.h:34
b
double b
Definition:
hdecay.h:120
siStripClusterTools
Definition:
SiStripClusterTools.h:9
LocalTrajectoryParameters
Definition:
LocalTrajectoryParameters.h:25
a
double a
Definition:
hdecay.h:121
SiStripDetId::moduleGeometry
ModuleGeometry moduleGeometry() const
Definition:
SiStripDetId.h:106
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition:
GetRecoTauVFromDQM_MC_cff.py:38
LocalTrajectoryParameters::absdz
float absdz() const
Definition:
LocalTrajectoryParameters.h:168
Generated for CMSSW Reference Manual by
1.8.11