/[PAMELA software]/PamCut/TrkCuts/TrkDedxHCut/TrkDedxHCut.cpp
ViewVC logotype

Contents of /PamCut/TrkCuts/TrkDedxHCut/TrkDedxHCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Mar 18 14:46:11 2010 UTC (14 years, 9 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9
Branch point for: V8
Changes since 1.1: +38 -44 lines
New upper limit for the selection band (compatible with He lower limit).

1 /*
2 * TrkDedxHCut.cpp
3 *
4 * Created on: 15-mar-2010
5 * Author: S. Ricciarini
6 */
7
8 /*! @file TrkDedxHCut.cpp The TrkDedxHCut class implementation file */
9
10 #include "TrkDedxHCut.h"
11
12 const Double_t TrkDedxHCut::_xLow[] = { 0.126414, 0.140142, 0.152714, 0.165854, 0.178357, 0.194244, 0.211669, 0.242859,
13 0.264646, 0.293385, 0.314258, 0.360565, 0.392911, 0.450807, 0.508423, 0.603735, 0.680897, 0.754838, 0.851312,
14 1.00032, 1.36201, 1.37, 1000. }; // _nLow=23 elements
15
16 const Double_t TrkDedxHCut::_yLow[] = { 18.9221, 16.0752, 14.2214, 12.6324, 11.2421, 9.71928, 8.1965, 6.93856, 6.14407,
17 5.15095, 4.6875, 3.8268, 3.49576, 2.89989, 2.56886, 2.17161, 1.90678, 1.70816, 1.50953, 1.27754, 0.715042, 0, 0 }; // _nLow=23 elements
18
19 Int_t TrkDedxHCut::Check(PamLevel2 *event) {
20
21 TrkTrack *trkTrack = event->GetTrack(0)->GetTrkTrack();
22
23 Float_t rigMod = trkTrack->GetRigidity();
24 Float_t dedx = trkTrack->GetDEDX();
25
26 if (rigMod < 0.126414)
27 return 0; // a proton below 126.414 MV is rejected
28
29 // lower limit taken from N. De Simone (interpolation of _xLow)
30
31 for (Int_t i = 0; i < _nLow - 1; i++) {
32 if (_xLow[i] <= rigMod && rigMod < _xLow[i + 1]) {
33 Double_t slope = (_yLow[i + 1] - _yLow[i]) / (_xLow[i + 1] - _xLow[i]);
34 Double_t y = _yLow[i] + slope * (rigMod - _xLow[i]);
35
36 if (dedx < y)
37 return 0;
38 }
39 }
40
41 // higher limit taken from N. Mori lower limit for Helium
42
43 // Compute dE/dx for X and Y separately
44 Float_t totReleaseX = 0.;
45 Float_t totReleaseY = 0.;
46 Int_t nX = 0, nY = 0;
47 Float_t dEdxView = 0;
48
49 for (Int_t ip = 0; ip < 6; ip++) {
50 // X view
51 dEdxView = trkTrack->GetDEDX(ip, 0);
52 if (dEdxView > 0 && trkTrack->XGood(ip)) {
53 totReleaseX += dEdxView;
54 nX++;
55 }
56 // Y view
57 dEdxView = trkTrack->GetDEDX(ip, 1);
58 if (dEdxView > 0 && trkTrack->YGood(ip)) {
59 totReleaseY += dEdxView;
60 nY++;
61 }
62 }
63
64 Float_t dEdxX = totReleaseX / nX; // nX assumed > 0
65 Float_t dEdxY = totReleaseY / nY; // nY assumed > 0
66
67 Float_t denHigh = pow(rigMod, 1.8); // The power of the denominator is the same for X and Y (with current calibration)
68 if (dEdxX > 3.7 + 4.6 / denHigh) {
69 return 0;
70 }
71 if (dEdxY > 3.3 + 4.9 / denHigh) {
72 return 0;
73 }
74
75 return CUTOK;
76
77 }

  ViewVC Help
Powered by ViewVC 1.1.23