StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StSpectraPool
StTrackMateMaker
getTpcDedx.cc
1
//
2
// getTpcDedx.cc
3
//
4
#include "StTrack.h"
5
#include "StContainers.h"
6
#include "StDedxPidTraits.h"
7
8
float
getTpcDedx(
StTrack
* trk) {
9
const
StSPtrVecTrackPidTraits& vec = trk->pidTraits();
10
const
StDedxPidTraits
* mTraits = 0;
11
for
(
unsigned
int
i=0; i<vec.size(); i++) {
12
const
StDedxPidTraits
*p =
dynamic_cast<
const
StDedxPidTraits
*
>
(vec[i]);
13
if
(p && p->detector() == kTpcId && p->method() == kTruncatedMeanId) mTraits = p;
14
}
15
if
(!mTraits)
return
0;
// no info available
16
17
return
mTraits->mean();
18
}
StTrack
Definition:
StTrack.h:198
StDedxPidTraits
Definition:
StDedxPidTraits.h:68
Generated by
1.8.5