/[PAMELA software]/PamCut/CollectionActions/Histo2DActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.cpp
ViewVC logotype

Diff of /PamCut/CollectionActions/Histo2DActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.cpp

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

revision 1.1.2.1 by pam-fi, Wed Dec 21 18:24:26 2011 UTC revision 1.2 by pam-fi, Thu Aug 12 15:11:33 2010 UTC
# Line 11  Line 11 
11    
12  TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, unsigned int layers, bool standAlone,  TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, unsigned int layers, bool standAlone,
13      TString outFileBase, TString mode, bool outRoot, bool outText, TString title) :      TString outFileBase, TString mode, bool outRoot, bool outText, TString title) :
14      Histo2DAction<Int_t>(actionName, title, outFileBase, mode, outRoot, outText), _layers(layers), _nLayers(0), _badEvents(    Histo2DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText), _layers(layers), _nLayers(0),
15          0), _standAlone(standAlone) {        _badEvents(0), _standAlone(standAlone) {
16    
   bool buildTitle = false;  
17    if (title == "") {    if (title == "") {
     buildTitle = true;  
18      title = "TOF dE/dx (";      title = "TOF dE/dx (";
19    }    }
20    if ((_layers & S11) == S11) {    if ((_layers & S11) == S11) {
21      if (buildTitle)      title += "S11";
       title += "S11";  
22      _nLayers++;      _nLayers++;
23    }    }
24    if ((_layers & S12) == S12) {    if ((_layers & S12) == S12) {
25      if (buildTitle) {      if (_nLayers > 0)
26        if (_nLayers > 0)        title += ",";
27          title += ",";      title += "S12";
       title += "S12";  
     }  
28      _nLayers++;      _nLayers++;
29    }    }
30    if ((_layers & S21) == S21) {    if ((_layers & S21) == S21) {
31      if (buildTitle) {      if (_nLayers > 0)
32        if (_nLayers > 0)        title += ",";
33          title += ",";      title += "S21";
       title += "S21";  
     }  
34      _nLayers++;      _nLayers++;
35    }    }
36    if ((_layers & S22) == S22) {    if ((_layers & S22) == S22) {
37      if (buildTitle) {      if (_nLayers > 0)
38        if (_nLayers > 0)        title += ",";
39          title += ",";      title += "S22";
       title += "S22";  
     }  
40      _nLayers++;      _nLayers++;
41    }    }
42    if ((_layers & S31) == S31) {    if ((_layers & S31) == S31) {
43      if (buildTitle) {      if (_nLayers > 0)
44        if (_nLayers > 0)        title += ",";
45          title += ",";      title += "S31";
       title += "S31";  
     }  
46      _nLayers++;      _nLayers++;
47    }    }
48    if ((_layers & S32) == S32) {    if ((_layers & S32) == S32) {
49      if (buildTitle) {      if (_nLayers > 0)
50        if (_nLayers > 0)        title += ",";
51          title += ",";      title += "S32";
       title += "S32";  
     }  
52      _nLayers++;      _nLayers++;
53    }    }
54    if (buildTitle)    title += ") Vs Beta";
     title += ") Vs Beta";  
55    
56      cout << _layers << "  " << _nLayers << endl;
57    SetTitle(title);    SetTitle(title);
58    
59  }  }
# Line 131  void TofDedxVsBetaHistoAction::OnGood(Pa Line 118  void TofDedxVsBetaHistoAction::OnGood(Pa
118        badLayers++;        badLayers++;
119    }    }
120    if (badLayers == 0) {    if (badLayers == 0) {
121      dEdx /= _nLayers - badLayers;      dEdx /= _nLayers;
122        cout << _nLayers << "  " << dEdx << endl;
123      Fill(event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12], dEdx);      Fill(event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12], dEdx);
124    }    }
125    else    else

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

  ViewVC Help
Powered by ViewVC 1.1.23