| 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 |
} |