| 1 |
/* |
| 2 |
* TrkDedxVsBetaHistoAction.cpp |
| 3 |
* |
| 4 |
* Created on: 9-giu-2009 |
| 5 |
* Author: Nicola Mori |
| 6 |
*/ |
| 7 |
|
| 8 |
/*! @file TrkDedxVsBetaHistoAction.cpp The TrkDedxVsBetaHistoAction class implementation file. */ |
| 9 |
|
| 10 |
#include "TrkDedxVsBetaHistoAction.h" |
| 11 |
|
| 12 |
TrkDedxVsBetaHistoAction::TrkDedxVsBetaHistoAction(const char *actionName, TString outFileBase, TString mode, |
| 13 |
int whichBeta, bool outRoot, bool outText, TString title) : |
| 14 |
Histo2DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText), _whichBeta(whichBeta) { |
| 15 |
|
| 16 |
} |
| 17 |
|
| 18 |
void TrkDedxVsBetaHistoAction::OnGood(PamLevel2 *event) { |
| 19 |
|
| 20 |
float beta = 0; |
| 21 |
if (_whichBeta == BETA12) |
| 22 |
beta = event->GetTrack(0)->GetToFTrack()->beta[12]; |
| 23 |
else if (_whichBeta == BETABEST) |
| 24 |
beta = event->GetToFLevel2()->CalcBeta(event->GetTrack(0)->GetToFTrack()->trkseqno, 3.0, 20.0, 3.0); |
| 25 |
else if (_whichBeta == BETA12_STANDALONE) |
| 26 |
beta = event->GetToFLevel2()->CalcBeta(0, 10.0, 10.0, 20.0); |
| 27 |
else if (_whichBeta == BETABEST_STANDALONE) |
| 28 |
beta = event->GetToFLevel2()->CalcBeta(0, 3.0, 20.0, 3.0); |
| 29 |
|
| 30 |
Fill(beta, event->GetTrack(0)->GetTrkTrack()->GetDEDX()); |
| 31 |
} |