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

Contents of /PamCut/TofCuts/TofTopS1Cut/TofTopS1Cut.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
Error occurred while calculating annotation data.
First import

1 /*
2 * TofTopS1Cut.cpp
3 *
4 * Created on: 13-mar-2009
5 * Author: Sergio Ricciarini, Nicola Mori
6 */
7
8 /*! @file TofTopS1Cut.cpp The TofTopS1Cut class implementation file */
9
10 #include "TofTopS1Cut.h"
11
12 int TofTopS1Cut::Check(PamLevel2 *event) {
13
14 // Array initialization
15 for (int ipl = 0; ipl < 2; ipl++) {
16 _nHitPmtPl[ipl] = 0;
17 }
18
19 Int_t pmtId = -1;
20 Int_t layerId = 10; // valid values are 0 to 5
21
22 // Compute the number of hit PMT on each plane
23 for (int ih = 0; ih < event->GetToFLevel2()->npmt(); ih++) { // Int_t mandatory
24 pmtId = event->GetToFLevel2()->GetToFPMT(ih)->pmt_id;
25 layerId = event->GetToFLevel2()->GetPlaneIndex(pmtId);
26 if (0 <= layerId && layerId < 2)
27 _nHitPmtPl[layerId]++;
28 }
29
30 // CUT on hit PMTs
31 for (int ipl = 0; ipl < 2; ipl++) { // check done only for S1 layers
32 if (!(_nHitPmtPl[ipl] < 3))
33 return 0;
34 }
35
36 return CUTOK;
37 }

  ViewVC Help
Powered by ViewVC 1.1.23