/[PAMELA software]/PamCut/TrkCuts/TrkPhSinCut/TrkPhSinCut.cpp
ViewVC logotype

Annotation of /PamCut/TrkCuts/TrkPhSinCut/TrkPhSinCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide 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.2: +10 -15 lines
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 pam-fi 1.1 /*
2     * TrkPhSinCut.cpp
3     *
4     * Created on: 13-mar-2009
5     * Author: Sergio Ricciarini, Nicola Mori
6     */
7    
8     /*! @file TrkPhSinCut.cpp The TrkPhSinCut class implementation file */
9    
10     #include "TrkPhSinCut.h"
11    
12     int TrkPhSinCut::Check(PamLevel2 *event) {
13    
14 pam-fi 1.3 if (!(event->GetNTracks(trkAlg) == 1))
15 pam-fi 1.1 return 0; // one track exists (physical or not)
16    
17 pam-fi 1.3
18 pam-fi 1.1 // selection of the physical track (see TrkId below)
19     event->SetSortingMethod(_sortingMethod);
20 pam-fi 1.3 PamTrack *pamTrack = event->GetTrack(0,trkAlg);
21     // PamTrack *pamTrack = event->GetTrackOld(0);
22     // event->GetTrack(0,trkAlg)->Copy(*pamTrack); //fondamentale per i tagli successivi?!?!
23 pam-fi 1.1
24 pam-fi 1.3 // return 0;
25 pam-fi 1.1
26 pam-fi 1.3
27     ExtTrack* trkTrack = pamTrack->GetExtTrack();
28     // TrkTrack* trkTrack = pamTrack->GetTrkTrack();
29     if(!trkTrack)return 0;
30 pam-fi 1.1
31 pam-fi 1.2 // Check if good clusters have meaningful energy releases
32     for (unsigned int ip = 0; ip < 6; ip++) {
33     if (trkTrack->XGood(ip) == 1 && trkTrack->GetDEDX(ip, 0) <= 0.)
34     trkTrack->xgood[ip] = 0; // Set it to bad
35     if (trkTrack->YGood(ip) == 1 && trkTrack->GetDEDX(ip, 1) <= 0.)
36     trkTrack->ygood[ip] = 0; // Set it to bad
37     }
38    
39 pam-fi 1.1 if (!(trkTrack->nstep < 100 && trkTrack->chi2 > 0.))
40     return 0; // check that the track is meaningful
41    
42     return CUTOK;
43    
44     }

  ViewVC Help
Powered by ViewVC 1.1.23