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

Contents of /PamCut/Collections/EffBetaCollection/EffBetaCollection.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Sep 5 12:57:56 2011 UTC (13 years, 3 months ago) by pam-fi
Branch: MAIN
CVS Tags: V9, HEAD
Added to repository.

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 }

  ViewVC Help
Powered by ViewVC 1.1.23