/[PAMELA software]/PamCut/TofCuts/TofBetaRigCut/TofBetaRigCut.cpp
ViewVC logotype

Contents of /PamCut/TofCuts/TofBetaRigCut/TofBetaRigCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed May 27 13:30:09 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: DEV, MAIN
CVS Tags: v0r00, Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.1: +0 -0 lines
First import

1 /*
2 * TofBetaRigCut.cpp
3 *
4 * Created on: 13-mar-2009
5 * Author: Sergio Ricciarini, Nicola Mori
6 */
7
8 /*! @file TofBetaRigCut.cpp The TofBetaRigCut class implementation file */
9
10 #include "TofBetaRigCut.h"
11
12 int TofBetaRigCut::Check(PamLevel2 *event) {
13
14 TrkTrack *trkTrack = event->GetTrack(0)->GetTrkTrack();
15
16 Int_t seqno = trkTrack->GetSeqNo();
17 Int_t ntrack_tof = 0;
18 for (Int_t i = 0; i < event->GetToFLevel2()->ntrk(); i++) {
19 if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == seqno)
20 ntrack_tof = i;
21 }
22 Float_t betaModTof = fabs(event->GetToFLevel2()->CalcBeta(ntrack_tof, 10., 10., 20.)); // beta[12]
23
24 // Float_t rigMod = _mass*fabs(beta)*pow((1-pow(beta,2)),-0.5)/abs(_charge);
25
26 Float_t betaModTrk = (trkTrack->GetRigidity() * abs(_charge)) / pow(pow(trkTrack->GetRigidity() * _charge, 2) + pow(
27 _mass, 2), 0.5);
28
29 #ifdef DEBUGPAMCUT
30
31 h_trk_vs_tof_betamod[0]->Fill(betaModTof,betaModTrk);
32
33 #endif
34
35 if (fabs(betaModTof - betaModTrk) > _threshold * betaModTof) {
36 return 0;
37 }
38
39 #ifdef DEBUGPAMCUT
40
41 h_trk_vs_tof_betamod[1]->Fill(betaModTof,betaModTrk);
42
43 #endif
44
45 return CUTOK;
46 }

  ViewVC Help
Powered by ViewVC 1.1.23