1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* EffBetaToRigCollection.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 12/lug/2011 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file EffBetaToRigCollection.cpp The EffBetaToRigCollection class implementation file. */ |
9 |
|
|
|
10 |
|
|
#include "EffBetaToRigCollection.h" |
11 |
|
|
|
12 |
|
|
EffBetaToRigCollection::EffBetaToRigCollection(const char *collectionName, TString outFileBase, TString rigBinsFile, |
13 |
|
|
float mass, float charge, int errMethod, bool owns) : |
14 |
|
|
BinnedEffCollection(collectionName, outFileBase, rigBinsFile, errMethod, owns), _mass(mass), _charge(charge) { |
15 |
|
|
} |
16 |
|
|
float EffBetaToRigCollection::GetBinValue(PamLevel2 *event) { |
17 |
|
|
|
18 |
|
|
float beta = event->GetToFLevel2()->GetToFTrkVar(0)->beta[12]; // beta standalone |
19 |
|
|
float gamma = sqrt(1 / (1 - beta * beta)); |
20 |
|
|
|
21 |
|
|
return _mass * gamma * beta / _charge; |
22 |
|
|
|
23 |
|
|
} |