Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TpcClusterZCrossingCorrection.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TpcClusterZCrossingCorrection.cc
1
7
#include "
TpcClusterZCrossingCorrection.h
"
8
9
#include <cmath>
10
#include <iostream>
11
#include <climits>
12
13
float
TpcClusterZCrossingCorrection::_vdrift
= 8.0e-03;
// default value, override from macro
14
15
TpcClusterZCrossingCorrection::TpcClusterZCrossingCorrection
()
16
{ }
17
18
float
TpcClusterZCrossingCorrection::correctZ
(
float
zinit,
unsigned
int
side,
short
int
crossing)
const
19
{
20
if
(crossing == SHRT_MAX)
return
NAN;
21
22
float
z_bunch_separation =
_time_between_crossings
*
_vdrift
;
23
24
// +ve crossing occurs in the future relative to time zero
25
// -ve z side (south, side 0), cluster arrives late, so z seems more positive
26
// +ve z side (north, side 1), cluster arrives late, so z seems more negative
27
float
corrected_z;
28
if
(side == 0)
29
corrected_z = zinit - (float) crossing * z_bunch_separation;
30
else
31
corrected_z = zinit + (float) crossing * z_bunch_separation;
32
33
// std::cout << " crossing " << crossing << " _vdrift " << _vdrift << " zinit " << zinit << " side " << side << " corrected_z " << corrected_z << std::endl;
34
35
return
corrected_z;
36
}
37
38
coresoftware
blob
master
offline
packages
tpc
TpcClusterZCrossingCorrection.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:08
using
1.8.2 with
sPHENIX GitHub integration