/[PAMELA software]/PamCut/CollectionActions/Histo1DActions/TrkSigmaDeflHistoAction/TrkSigmaDeflHistoAction.cpp
ViewVC logotype

Diff of /PamCut/CollectionActions/Histo1DActions/TrkSigmaDeflHistoAction/TrkSigmaDeflHistoAction.cpp

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

revision 1.1 by pam-fi, Fri Sep 25 15:36:43 2009 UTC revision 1.2 by pam-fi, Mon May 3 14:33:48 2010 UTC
# Line 9  Line 9 
9    
10  #include "TrkSigmaDeflHistoAction.h"  #include "TrkSigmaDeflHistoAction.h"
11    
12  TrkSigmaDeflHistoAction::TrkSigmaDeflHistoAction(const char *actionName,  TString outFileBase,  TrkSigmaDeflHistoAction::TrkSigmaDeflHistoAction(const char *actionName, TString outFileBase, TString mode,
13      TString mode, bool outRoot, bool outText, TString title) :      float sigmaDeflFactor, bool outRoot, bool outText, TString title) :
14    Histo1DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText) {    Histo1DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText), _sigmaDeflFactor(sigmaDeflFactor) {
15  }  }
16    
17  void TrkSigmaDeflHistoAction::OnGood(PamLevel2 *event) {  void TrkSigmaDeflHistoAction::OnGood(PamLevel2 *event) {
# Line 21  void TrkSigmaDeflHistoAction::OnGood(Pam Line 21  void TrkSigmaDeflHistoAction::OnGood(Pam
21    // Bin filling: sigmaDefl must be less than (<) 1/(bin maximum)    // Bin filling: sigmaDefl must be less than (<) 1/(bin maximum)
22    
23    UInt_t i = 0;    UInt_t i = 0;
24    while ((sigmaDefl < 1. / _bins[i + 1]) && (i <= _bins.size() - 1)) { // rigidity bin i maximum = _binning[i+1]. Exit while loop when i exceeds the bin number = _binning.size()-1    while ((sigmaDefl * _sigmaDeflFactor < 1. / _bins[i + 1]) && (i <= _bins.size() - 1)) { // rigidity bin i maximum = _binning[i+1]. Exit while loop when i exceeds the bin number = _binning.size()-1
25      _histo[i]++;      _histo[i]++;
26      i++;      i++;
27    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.23