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

Diff of /PamCut/TofCuts/TofDedxS1Cut/TofDedxS1Cut.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pam-fi, Mon Sep 5 13:41:04 2011 UTC revision 1.3 by pam-fi, Tue Jan 3 08:57:21 2012 UTC
# Line 13  Line 13 
13    
14  int TofDedxS1Cut::Check(PamLevel2 *event) {  int TofDedxS1Cut::Check(PamLevel2 *event) {
15    
16    int trkSeqNo = 0;    int idx = 0;
17    for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {    for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {
18      if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo())      if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo())
19        trkSeqNo = i;        idx = i;
20    }    }
21    
22    float dEdx = 0;    float dEdx = 0;
23    int nLayers = 0;    int nLayers = 0;
24    float dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100);    float dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100);
25    
26    // Patch to exclude S115b    // Patch to exclude S115b
27    ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo);    ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(idx);
28    bool has8 = false, has9 = false;    bool has8 = false, has9 = false;
29    float dedx9 = 0.;    float dedx9 = 0.;
30    for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) {    for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) {
# Line 47  int TofDedxS1Cut::Check(PamLevel2 *event Line 47  int TofDedxS1Cut::Check(PamLevel2 *event
47      dEdx += dEdxLayer;      dEdx += dEdxLayer;
48      nLayers++;      nLayers++;
49    }    }
50    dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 1, 100);    dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 1, 100);
51    if (dEdxLayer > 0. && dEdxLayer < 4090) {    if (dEdxLayer > 0. && dEdxLayer < 4090) {
52      dEdx += dEdxLayer;      dEdx += dEdxLayer;
53      nLayers++;      nLayers++;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23