1 |
|
////////////////////////////////////////////////////////// |
2 |
|
// Selection of events with single good tracks |
3 |
|
// (good fit, no albedo) with non-interacting pattern |
4 |
|
// in the calorimeter. |
5 |
|
////////////////////////////////////////////////////////// |
6 |
#if !defined(__CINT__) || defined(__MAKECINT__) |
#if !defined(__CINT__) || defined(__MAKECINT__) |
7 |
|
|
|
|
|
8 |
#include <TString.h> |
#include <TString.h> |
9 |
#include <TH1F.h> |
#include <TH1F.h> |
10 |
#include <TH2F.h> |
#include <TH2F.h> |
68 |
// ------------ |
// ------------ |
69 |
// single track |
// single track |
70 |
// ------------ |
// ------------ |
71 |
if( event->GetNTracks()!=1 ) return false; |
if( event->GetTrkLevel2()->GetNTracks()!=1 ) return false; |
72 |
|
|
73 |
// ------------ |
// ------------ |
74 |
// calorimeter |
// calorimeter |
79 |
// no single-PMT hits |
// no single-PMT hits |
80 |
// --------------------------- |
// --------------------------- |
81 |
if( |
if( |
82 |
event->GetNHitPaddles(0) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(0) == 1 && |
83 |
event->GetNHitPaddles(1) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(1) == 1 && |
84 |
event->GetNHitPaddles(2) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(2) == 1 && |
85 |
event->GetNHitPaddles(3) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(3) == 1 && |
86 |
event->GetNHitPaddles(4) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(4) == 1 && |
87 |
event->GetNHitPaddles(5) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(5) == 1 && |
88 |
event->npmt() == 12 && |
event->GetToFLevel2()->npmt() == 12 && |
89 |
true |
true |
90 |
){;;; |
){;;; |
91 |
}else return false; |
}else return false; |
129 |
PamTrack *track = event->GetTrack(0); |
PamTrack *track = event->GetTrack(0); |
130 |
bool TRACK__OK = false; |
bool TRACK__OK = false; |
131 |
if( |
if( |
132 |
track->chi2 >0 && |
track->GetTrkTrack()->chi2 >0 && |
133 |
track->GetNX()>=4 && |
track->GetTrkTrack()->GetNX()>=4 && |
134 |
track->GetNY()>=3 && |
track->GetTrkTrack()->GetNY()>=3 && |
135 |
((track->XGood(0) && track->XGood(5)) || (track->XGood(0) && track->XGood(4)) || (track->XGood(1) && track->XGood(5)) ) && |
((track->GetTrkTrack()->XGood(0) && track->GetTrkTrack()->XGood(5)) || (track->GetTrkTrack()->XGood(0) && track->GetTrkTrack()->XGood(4)) || (track->GetTrkTrack()->XGood(1) && track->GetTrkTrack()->XGood(5)) ) && |
136 |
track->beta[12]>0 && |
track->GetToFTrack()->beta[12]>0 && |
137 |
true |
true |
138 |
){ |
){ |
139 |
|
|
140 |
if(event->qtot>0){ |
if(event->GetCaloLevel2()->qtot>0){ |
141 |
if(track->qtrack/event->qtot <0.8)TRACK__OK = false; |
if(track->GetCaloTrack()->qtrack/event->GetCaloLevel2()->qtot <0.8)TRACK__OK = false; |
142 |
} |
} |
143 |
|
|
144 |
TRACK__OK = true; |
TRACK__OK = true; |
145 |
}; |
}; |
|
delete track; |
|
146 |
|
|
147 |
if(!TRACK__OK)return false; |
if(!TRACK__OK)return false; |
148 |
|
|