/[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.1.1.1.2.1 - (hide annotations) (download) (vendor branch)
Mon Jun 7 14:24:10 2010 UTC (14 years, 5 months ago) by pam-fi
Branch: V8
CVS Tags: MergedToHEAD_1, nuclei_reproc
Changes since 1.1.1.1: +11 -7 lines
Wrong cluster identification corrected: xgood and ygood for clusters with null energy release are set to 0.

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     if (!(event->GetTrkLevel2()->GetNTracks() == 1))
15     return 0; // one track exists (physical or not)
16    
17     // selection of the physical track (see TrkId below)
18     event->SetSortingMethod(_sortingMethod);
19     pamTrack = event->GetTrack(0);
20    
21     // NOTE: pamtrack is null pointer if no physical track is selected; this is a redundant check to find bugs in the level2 (at least one physical track should always be present, given that GetNTracks()=1 according to the previous cut).
22     if (!pamTrack)
23     return 0; // redundant check
24    
25     trkTrack = pamTrack->GetTrkTrack();
26    
27 pam-fi 1.1.1.1.2.1 // Check if good clusters have meaningful energy releases
28     for (unsigned int ip = 0; ip < 6; ip++) {
29     if (trkTrack->XGood(ip) == 1 && trkTrack->GetDEDX(ip, 0) <= 0.)
30     trkTrack->xgood[ip] = 0; // Set it to bad
31     if (trkTrack->YGood(ip) == 1 && trkTrack->GetDEDX(ip, 1) <= 0.)
32     trkTrack->ygood[ip] = 0; // Set it to bad
33     }
34    
35 pam-fi 1.1 if (!(trkTrack->nstep < 100 && trkTrack->chi2 > 0.))
36     return 0; // check that the track is meaningful
37    
38 pam-fi 1.1.1.1.2.1 // identification of TRK-track TOF-index (this index is generally different from TRK-track TRK-index)
39 pam-fi 1.1 iTrackTof = -1000;
40 pam-fi 1.1.1.1.2.1 for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {
41     if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == trkTrack->GetSeqNo()) {
42 pam-fi 1.1 iTrackTof = i;
43     break;
44     }
45     }
46    
47     return CUTOK;
48    
49     }

  ViewVC Help
Powered by ViewVC 1.1.23