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

Contents of /PamCut/TofCuts/TofBetaRangeCut/TofBetaRangeCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Mar 25 17:38:08 2015 UTC (9 years, 8 months ago) by pam-fi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +29 -10 lines
Error occurred while calculating annotation data.
Port to 10th reduction.

Some cuts have been modified to use the extended track objects introduced with 10th reduction software. Some others have still to be ported.
Git ref: 4bd0c70baf73c56bddc08dca365cbff243ad8bc8
(Nicola)

1 /*
2 * TofBetaRangeCut.cpp
3 *
4 * Created on: 10-apr-2009
5 * Author: Sergio Ricciarini, Nicola Mori
6 */
7
8 /*! @file TofBetaRangeCut.cpp The TofBetaRangeCut class implementation file */
9
10 #include "TofBetaRangeCut.h"
11
12 int TofBetaRangeCut::Check(PamLevel2 *event) {
13
14 // float _beta = 0.;
15 // cout << _trackTof <<endl;
16
17 if(!event->GetToFLevel2())return 0;
18
19 ToFTrkVar *trackTof = NULL;
20
21 if(_trkId<0 ){
22 trackTof = event->GetToFLevel2()->GetToFStoredTrack(_trkId); //standalone
23 }else{
24 if( event->GetNTracks(_trkAlg) <= _trkId ){
25 cout << "TofBetaRangeCut: trk.ID = "<<_trkId<<", trk.ALG = "<<_trkAlg<<" _BUT_ n.tracks = "<<event->GetNTracks(_trkAlg)<<endl;
26 cout << "TofBetaRangeCut: inconsistent cut!!!"<<endl;
27 return 0;
28 }
29 trackTof = event->GetTrack(_trkId,_trkAlg)->GetToFTrack();
30 }
31
32 if(!trackTof){
33 cout << "TofBetaRangeCut: ToFTrkVar obj pt = "<<trackTof<<endl;
34 return 0;
35 }
36 ///////////////////////////
37
38 beta = trackTof->CalcBeta(_resMax,_qualCut,_chi2Cut);
39
40
41 if( ! (_minBeta < beta && beta < _maxBeta) ) {
42 return 0;
43 }
44
45 return CUTOK;
46
47 }

  ViewVC Help
Powered by ViewVC 1.1.23