8 |
/*! @file MassVsRigHistoAction.cpp The MassVsRigHistoAction class implementation file. */ |
/*! @file MassVsRigHistoAction.cpp The MassVsRigHistoAction class implementation file. */ |
9 |
|
|
10 |
#include "MassVsRigHistoAction.h" |
#include "MassVsRigHistoAction.h" |
11 |
|
#include "TMath.h" |
12 |
|
|
13 |
MassVsRigHistoAction::MassVsRigHistoAction(const char *actionName, TString outFileBase, TString mode, |
MassVsRigHistoAction::MassVsRigHistoAction(const char *actionName, TString outFileBase, TString mode, |
14 |
bool outRoot, bool outText, TString title, Int_t Z, TString rigBinFile) : |
bool outRoot, bool outText, TString title, Int_t Z, TString rigBinFile) : |
18 |
|
|
19 |
void MassVsRigHistoAction::OnGood(PamLevel2 *event) { |
void MassVsRigHistoAction::OnGood(PamLevel2 *event) { |
20 |
Float_t betaev = event->GetTrack(0)->GetToFTrack()->beta[12]; |
Float_t betaev = event->GetTrack(0)->GetToFTrack()->beta[12]; |
|
if(betaev>1) betaev = 2-betaev; |
|
21 |
Float_t rigev = 1./event->GetTrack(0)->GetTrkTrack()->GetDeflection(); |
Float_t rigev = 1./event->GetTrack(0)->GetTrkTrack()->GetDeflection(); |
22 |
Float_t Mass = _Z*rigev*sqrt(pow(betaev,-2)-1); |
Float_t Mass = 0; |
23 |
|
if(TMath::Abs(betaev) <= 1.) Mass = _Z*rigev*sqrt(pow(betaev,-2)-1); |
24 |
|
else Mass = -_Z*rigev*sqrt(1-pow(betaev,-2)); |
25 |
Fill(rigev, Mass); |
Fill(rigev, Mass); |
26 |
} |
} |
27 |
|
|