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

Diff of /PamCut/TofCuts/TofDedxHeCut/TofDedxHeCut.cpp

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

revision 1.3 by pam-fi, Tue Sep 22 10:24:26 2009 UTC revision 1.4 by pam-fi, Tue Jan 3 08:57:21 2012 UTC
# Line 17  const float TofDedxHeCut::_S31_SA_params Line 17  const float TofDedxHeCut::_S31_SA_params
17  const float TofDedxHeCut::_S32_SA_params[] = { 0.48, 0.024, -2.4, 3.4, 2.5, 0.64, -0.0071, 3.2, 1.3, 2.3 };  const float TofDedxHeCut::_S32_SA_params[] = { 0.48, 0.024, -2.4, 3.4, 2.5, 0.64, -0.0071, 3.2, 1.3, 2.3 };
18    
19  TofDedxHeCut::TofDedxHeCut(const char *cutName, unsigned int layer, bool standAlone) :  TofDedxHeCut::TofDedxHeCut(const char *cutName, unsigned int layer, bool standAlone) :
20    PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) {      PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) {
21    
22    switch (_layer) {    switch (_layer) {
23    case S11:    case S11:
# Line 47  TofDedxHeCut::TofDedxHeCut(const char *c Line 47  TofDedxHeCut::TofDedxHeCut(const char *c
47  int TofDedxHeCut::Check(PamLevel2 *event) {  int TofDedxHeCut::Check(PamLevel2 *event) {
48    
49    static int trkSeqNo;    static int trkSeqNo;
50      static int idx;
51    if (_standAlone)    if (_standAlone)
52      trkSeqNo = 0;      trkSeqNo = -1;
53    else {    else
54      for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {      trkSeqNo = event->GetTrack(0)->GetTrkTrack()->GetSeqNo();
55        if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo())  
56          trkSeqNo = i;    for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) {
57      }      if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == trkSeqNo)
58          idx = i;
59    }    }
60    
61    float beta = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12];    float beta = event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12];
62    
63    static unsigned int auxLayer;    static unsigned int auxLayer;
64    static float dEdx;    static float dEdx;
# Line 70  int TofDedxHeCut::Check(PamLevel2 *event Line 72  int TofDedxHeCut::Check(PamLevel2 *event
72    while (auxLayer > 0) {    while (auxLayer > 0) {
73      if ((auxLayer & 0x1) == 1) {      if ((auxLayer & 0x1) == 1) {
74        //cout << auxLayer << "  " << currLayer << endl;        //cout << auxLayer << "  " << currLayer << endl;
75        dEdx += event->GetToFLevel2()->GetdEdx(trkSeqNo, currLayer, 100);        dEdx += event->GetToFLevel2()->GetdEdx(idx, currLayer, 100);
76        nLayers++;        nLayers++;
77      }      }
78      currLayer++;      currLayer++;

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

  ViewVC Help
Powered by ViewVC 1.1.23