-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTStMuCutV0Jet.cxx
executable file
·168 lines (134 loc) · 4.78 KB
/
TStMuCutV0Jet.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
//////////////////////////////////////////////////////////
// //
// TStMuCutV0Jet Class //
// //
//////////////////////////////////////////////////////////
#include <iostream>
#include "TStMuCutV0Jet.h"
#include "StStrangeMuDstMaker/StV0MuDst.hh"
#include "StMuDSTMaker/COMMON/StMuDst.h"
#include "StMuDSTMaker/COMMON/StMuTrack.h"
ClassImp(TStMuCutV0Jet)
//______________________________________________________________________________
TStMuCutV0Jet::TStMuCutV0Jet():TObject()
{
//
// Default constructor
//
Reset();
}
//______________________________________________________________________________
void TStMuCutV0Jet::Reset()
{
//
// Resets the cut definition and the counters
//
fVerbose = kFALSE;
cutV0dcaV0Vertex= 999; // > cut
cutV0dcaPosVertex = -999; //< cut
cutV0dcaNegVertex = -999; // < cut
cutV0dcaPosNeg = 999; //> cut
cutV0PosHits = 0; // < cut
cutV0NegHits = 0; // < cut
cutV0DecayLength = 999; // < cut
cutV0NSigma = 999; // < cut
}
//______________________________________________________________________________
void TStMuCutV0Jet::SetStandardCutsAuAu()
{
cutV0dcaV0Vertex= 0.5; // > cut
cutV0dcaPosVertex = 1.3; //< cut
cutV0dcaNegVertex = 1.3; // < cut
cutV0dcaPosNeg = 0.8; //> cut
cutV0PosHits = 15; // < cut
cutV0NegHits = 15; // < cut
cutV0DecayLength = 0; // < cut
cutV0NSigma = 2; // < cut
}
//______________________________________________________________________________
void TStMuCutV0Jet::SetStandardCutspp()
{
cutV0dcaV0Vertex= 0.5; // > cut
cutV0dcaPosVertex = 1.3; //< cut
cutV0dcaNegVertex = 1.3; // < cut
cutV0dcaPosNeg = 0.8; //> cut
cutV0PosHits = 15; // < cut
cutV0NegHits = 15; // < cut
cutV0DecayLength = 3; // < cut
cutV0NSigma = 2; // < cut
}
//______________________________________________________________________________
Int_t TStMuCutV0Jet::CheckV0(StV0MuDst *V0, StMuDst *Mu)
{
if (fVerbose) cout<<"TStMuCutV0Jet::CheckV0"<<endl;
//Checks whether a given event passes the defined cuts
if( V0->topologyMapPos().numberOfHits(kTpcId) < cutV0PosHits){
if(fVerbose) printf("Event not accepted nHitsPos %d. ", V0->topologyMapPos().numberOfHits(kTpcId));
return kFALSE;
}
if( V0->topologyMapNeg().numberOfHits(kTpcId) < cutV0NegHits){
if(fVerbose) printf("Event not accepted nHitsNeg %d. ",V0->topologyMapNeg().numberOfHits(kTpcId));
return kFALSE;
}
if( V0->decayLengthV0() < cutV0DecayLength) {
if(fVerbose) printf("Event not accepted decaylength %f. ",V0->decayLengthV0());
return kFALSE;
}
if( V0->dcaV0Daughters() > cutV0dcaPosNeg){
if(fVerbose) printf("Event not accepted dcaPosNeg %f. ",V0->dcaV0Daughters());
return kFALSE;
}
if( V0->dcaV0ToPrimVertex() > cutV0dcaV0Vertex ) {
if(fVerbose) printf("Event not accepted dcaV0Vertex %f. ",V0->dcaV0ToPrimVertex());
return kFALSE;
}
if( V0->dcaPosToPrimVertex() < cutV0dcaPosVertex ){
if(fVerbose) printf("Event not accepted dcaPosVertex %f. ",V0->dcaPosToPrimVertex());
return kFALSE;
}
if( V0->dcaNegToPrimVertex() < cutV0dcaNegVertex ){
if(fVerbose) printf("Event not accepted dcaNegVertex %f. ",V0->dcaNegToPrimVertex());
return kFALSE;
}
// dEdx Cut
int iPos=0;
int iNeg=0;
int nGlobals = Mu->globalTracks()->GetEntries();
for( int i=0; i<nGlobals; i++){
if( iPos && iNeg) return kTRUE;
if( Mu->globalTracks(i)->id() == V0->keyNeg()){
iNeg = 1;
if( Mu->globalTracks(i)->nSigmaPion() > cutV0NSigma &&
Mu->globalTracks(i)->nSigmaProton() > cutV0NSigma){
if(fVerbose) printf("Event not accepted nSigma Neg");
return kFALSE;
}
}
if( Mu->globalTracks(i)->id() == V0->keyPos()){
iPos = 1;
if( Mu->globalTracks(i)->nSigmaPion() > cutV0NSigma &&
Mu->globalTracks(i)->nSigmaProton() > cutV0NSigma){
if(fVerbose) printf("Event not accepted nSigma Pos");
return kFALSE;
}
}
}
return kTRUE;
}
//______________________________________________________________________________
void TStMuCutV0Jet::PrintCutList()
{
//
// Prints the defined cuts
//
cout << endl;
cout << "Pico Jet Cuts: "<< endl;
cout << " V0 dca to primary vertex " << GetV0dcaV0Vertex() << endl;
cout << " Pos track dca to primary vertex " << GetV0dcaPosVertex() << endl;
cout << " Neg track dca to primary vertex " << GetV0dcaNegVertex() << endl;
cout << " dca between daughters " << GetV0dcaPosNeg() << endl;
cout << " Number of Pos track hits " << GetV0PosHits() << endl;
cout << " Number of Neg track hits" << GetV0NegHits() << endl;
cout << " V0decay length " << GetV0DecayLength() << endl;
cout << " NSigma of tracks from pion and proton band " << GetV0NSigma() << endl;
}