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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Jul 8 14:00:22 2010 UTC (14 years, 5 months ago) by pam-fi
Branch: MAIN
CVS Tags: MergedFromV8_1, V9, HEAD
Changes since 1.2: +1 -1 lines
Merged from branch V8 (tag MergedToHEAD_1). Tag before the merge: BeforeMergingFromV8_1.

1 pam-fi 1.1 /*
2     * TrkSigmaDeflHistoAction.cpp
3     *
4     * Created on: 2009-06-17
5     * Author: S. Ricciarini
6     */
7    
8     /*! @file TrkSigmaDeflHistoAction.cpp The TrkSigmaDeflHistoAction class implementation file. */
9    
10     #include "TrkSigmaDeflHistoAction.h"
11    
12 pam-fi 1.2 TrkSigmaDeflHistoAction::TrkSigmaDeflHistoAction(const char *actionName, TString outFileBase, TString mode,
13     float sigmaDeflFactor, bool outRoot, bool outText, TString title) :
14 pam-fi 1.3 Histo1DAction<Float_t> (actionName, title, outFileBase, mode, outRoot, outText), _sigmaDeflFactor(sigmaDeflFactor) {
15 pam-fi 1.1 }
16    
17     void TrkSigmaDeflHistoAction::OnGood(PamLevel2 *event) {
18    
19     float sigmaDefl = pow(event->GetTrack(0)->GetTrkTrack()->coval[4][4], 0.5);
20    
21     // Bin filling: sigmaDefl must be less than (<) 1/(bin maximum)
22    
23     UInt_t i = 0;
24 pam-fi 1.2 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 pam-fi 1.1 _histo[i]++;
26     i++;
27     }
28    
29     }

  ViewVC Help
Powered by ViewVC 1.1.23