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

Contents of /PamCut/CollectionActions/TrkSigmaDeflHistoAction/TrkSigmaDeflHistoAction.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Sep 25 15:39:34 2009 UTC (15 years, 4 months ago) by pam-fi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Removed from repository (switch to the new Histo1DAction and Histo2DAction framework)

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 TrkSigmaDeflHistoAction::TrkSigmaDeflHistoAction(const char *actionName, std::vector<float> binning) :
13 CollectionAction(actionName), _binning(binning), _histogram(binning.size() - 1, 0) {
14 }
15
16 void TrkSigmaDeflHistoAction::OnGood(PamLevel2 *event){
17
18 float sigmaDefl = pow(event->GetTrack(0)->GetTrkTrack()->coval[4][4],0.5);
19
20 // Bin filling: sigmaDefl must be less than (<) 1/(bin maximum)
21
22 UInt_t i = 0;
23 while ((sigmaDefl < 1./_binning[i+1]) && (i<=_binning.size()-1)) { // rigidity bin i maximum = _binning[i+1]. Exit while loop when i exceeds the bin number = _binning.size()-1
24 _histogram[i]++;
25 i++;
26 }
27
28 }

  ViewVC Help
Powered by ViewVC 1.1.23