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

Diff of /PamCut/TofCuts/TofDedxHCut/TofDedxHCut.cpp

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

revision 1.4 by pam-fi, Tue Nov 29 10:20:16 2011 UTC revision 1.5 by pam-fi, Tue Jan 3 08:57:21 2012 UTC
# Line 79  TofDedxHCut::TofDedxHCut(const char *cut Line 79  TofDedxHCut::TofDedxHCut(const char *cut
79  int TofDedxHCut::Check(PamLevel2 *event) {  int TofDedxHCut::Check(PamLevel2 *event) {
80    
81    static int trkSeqNo;    static int trkSeqNo;
82      static int idx;
83    if (_standAlone)    if (_standAlone)
84      trkSeqNo = 0;      trkSeqNo = -1;
85    else {    else
86      for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {      trkSeqNo = event->GetTrack(0)->GetTrkTrack()->GetSeqNo();
87        if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo())  
88          trkSeqNo = i;    for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {
89      }      if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == trkSeqNo)
90          idx = i;
91    }    }
92    
93    float beta = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12];    float beta = event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12];
94    
95    static unsigned int auxLayer;    static unsigned int auxLayer;
96    static float dEdx;    static float dEdx;
# Line 101  int TofDedxHCut::Check(PamLevel2 *event) Line 103  int TofDedxHCut::Check(PamLevel2 *event)
103    nLayers = 0;    nLayers = 0;
104    while (auxLayer > 0) {    while (auxLayer > 0) {
105      if ((auxLayer & 0x1) == 1) {      if ((auxLayer & 0x1) == 1) {
106        dEdx += event->GetToFLevel2()->GetdEdx(trkSeqNo, currLayer, 100);        dEdx += event->GetToFLevel2()->GetdEdx(idx, currLayer, 100);
107        nLayers++;        nLayers++;
108        // Patch to exclude S115b        // Patch to exclude S115b
109        if (currLayer == 0) {        if (currLayer == 0) {
110          ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo);          ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(idx);
111          bool has8 = false, has9 = false;          bool has8 = false, has9 = false;
112          float dedx9 = 0.;          float dedx9 = 0.;
113          for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) {          for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23