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

Annotation of /PamCut/CollectionActions/Histo2DActions/GPYVsXT2HistoAction/GPYVsXT2HistoAction.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri May 27 14:05:00 2011 UTC (13 years, 7 months ago) by pam-fi
Branch: MAIN
CVS Tags: V9, HEAD
Added to repository.

1 pam-fi 1.1 /*
2     * GPYVsXT2HistoAction.cpp
3     *
4     * Created on: 01/jun/2010
5     * Author: Sergio Ricciarini
6     */
7    
8     /*! @file GPYVsXT2HistoAction.cpp The GPYVsXT2HistoAction class implementation file. */
9    
10     #include "GPYVsXT2HistoAction.h"
11    
12     GPYVsXT2HistoAction::GPYVsXT2HistoAction(const char *actionName, TString outFileBase, TString mode,
13     bool outRoot, bool outText, TString title) :
14     Histo2DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText) {
15    
16     SetXAxis("X (cm)",100,TrkParams::xGF_min[6],TrkParams::xGF_max[6]); // Default X axis for T2 (igf=6)
17     SetYAxis("Y (cm)",100,TrkParams::yGF_min[6],TrkParams::yGF_max[6]); // Default Y axis for T2 (igf=6)
18    
19     }
20    
21     void GPYVsXT2HistoAction::OnGood(PamLevel2 *event) {
22    
23     for(Int_t h=0; h<=event->GetGPamela()->Nthspe; h++) {
24     if (event->GetGPamela()->Iparspe[h] < 100) { // primary particle (NOTE: 100)
25     if (event->GetGPamela()->Itrpb[h] == 2) { // hit TRK plane (1 to 6)
26     Float_t x = (event->GetGPamela()->Xinspe[h]+event->GetGPamela()->Xoutspe[h])/2.;
27     Float_t y = (event->GetGPamela()->Yinspe[h]+event->GetGPamela()->Youtspe[h])/2.;
28    
29     Fill(x,y);
30    
31     break;
32     }
33     }
34     }
35    
36     }

  ViewVC Help
Powered by ViewVC 1.1.23