1 |
/* |
2 |
* TofRigPHistoAction.cpp |
3 |
* |
4 |
* Created on: 2009-11-23 |
5 |
* Author: S. Ricciarini |
6 |
*/ |
7 |
|
8 |
/*! @file TofRigPHistoAction.cpp The TofRigPHistoAction class implementation file. */ |
9 |
|
10 |
#include "TofRigPHistoAction.h" |
11 |
|
12 |
void TofRigPHistoAction::OnGood(PamLevel2 *event) { |
13 |
|
14 |
Int_t iTrackTof=0; // index initialized (default) to 0 (TOF stand-alone track) |
15 |
|
16 |
if (! (_trackTof==0) ) { |
17 |
iTrackTof=*_trackTof; |
18 |
} |
19 |
|
20 |
Double_t _beta = event->GetToFLevel2()->CalcBeta(iTrackTof,_resMax,_qualCut,_chi2Cut); |
21 |
|
22 |
Double_t _mass_p=0.93827203; // GeV (pdg.web.cern.ch) |
23 |
|
24 |
if (-1.<_beta && _beta<1.) { |
25 |
|
26 |
Double_t rigMod = _mass_p*_beta/sqrt(1-pow(_beta,2)); // |rho| = (m/|Z|)*(beta/(sqrt(1-beta^2))) |
27 |
|
28 |
// cout << "beta " << _beta << " rigMod " << rigMod << endl; |
29 |
|
30 |
Fill(rigMod); |
31 |
|
32 |
|
33 |
} |
34 |
|
35 |
} |