1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* EffBetaCollection.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 20/jul/2011 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file EffBetaCollection.cpp The EffBetaCollection class implementation file. */ |
9 |
|
|
|
10 |
|
|
#include "EffBetaCollection.h" |
11 |
|
|
|
12 |
|
|
EffBetaCollection::EffBetaCollection(const char *collectionName, TString outFileBase, TString rigBinsFile, |
13 |
|
|
bool standAlone, int errMethod, bool owns) : |
14 |
|
|
BinnedEffCollection(collectionName, outFileBase, rigBinsFile, errMethod, owns), _standAlone(standAlone) { |
15 |
|
|
} |
16 |
|
|
|
17 |
|
|
float EffBetaCollection::GetBinValue(PamLevel2 *event) { |
18 |
|
|
|
19 |
|
|
static int trkSeqNo; |
20 |
|
|
if (_standAlone) |
21 |
|
|
trkSeqNo = 0; |
22 |
|
|
else { |
23 |
|
|
for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { |
24 |
|
|
if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo()) |
25 |
|
|
trkSeqNo = i; |
26 |
|
|
} |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
float beta = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12]; |
30 |
|
|
|
31 |
|
|
return beta; |
32 |
|
|
} |