/[PAMELA software]/PamCut/Collections/EffBetaToRigCollection/EffBetaToRigCollection.cpp
ViewVC logotype

Contents of /PamCut/Collections/EffBetaToRigCollection/EffBetaToRigCollection.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jul 12 17:36:32 2011 UTC (13 years, 5 months ago) by pam-fi
Branch: MAIN
CVS Tags: V9, HEAD
Added to repository.

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 }

  ViewVC Help
Powered by ViewVC 1.1.23