1 |
|
////////////////////////////////////////////////////////// |
2 |
|
// Selection of events with non-interacting pattern |
3 |
|
// in the calorimeter. |
4 |
|
// The selection is independent from the track variables |
5 |
|
// (for tracker-efficiency studies) |
6 |
|
////////////////////////////////////////////////////////// |
7 |
|
|
8 |
#if !defined(__CINT__) || defined(__MAKECINT__) |
#if !defined(__CINT__) || defined(__MAKECINT__) |
9 |
|
|
10 |
|
|
101 |
bool Select( PamLevel2* event ){ |
bool Select( PamLevel2* event ){ |
102 |
|
|
103 |
|
|
104 |
if(event->ntrk() ==0 )return false; |
if(event->GetTrkLevel2()->ntrk() ==0 )return false; |
105 |
|
|
106 |
// cout << event->nstrip << " "<<event->npmt() << " " << event->ntrk()<<endl; |
// cout << event->GetCaloLevel2()->nstrip << " "<<event->GetToFLevel2()->npmt() << " " << event->GetTrkLevel2()->ntrk()<<endl; |
107 |
// ----------------------------------------- |
// ----------------------------------------- |
108 |
// +++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++ |
109 |
// CALORIMETER CUTS |
// CALORIMETER CUTS |
110 |
// +++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++ |
111 |
// ----------------------------------------- |
// ----------------------------------------- |
112 |
|
|
113 |
// CaloAxis *x_axis = new CaloAxis(); |
CaloAxis *x_axis = new CaloAxis(); |
114 |
// CaloAxis *y_axis = new CaloAxis(); |
CaloAxis *y_axis = new CaloAxis(); |
115 |
|
|
116 |
// if(event->nstrip<60){ |
if(event->GetCaloLevel2()->nstrip<60){ |
117 |
|
|
118 |
// // -------------------------------- |
// -------------------------------- |
119 |
// // evaluate track axis |
// evaluate track axis |
120 |
// // -------------------------------- |
// -------------------------------- |
121 |
// float rcil = 1.;// tolerance (cm) |
float rcil = 1.;// tolerance (cm) |
122 |
// if( !x_axis->FitAxis(event->GetCaloLevel1(),0,rcil) )return 0; |
if( !x_axis->FitAxis(event->GetCaloLevel1(),0,rcil) )return 0; |
123 |
// if( !y_axis->FitAxis(event->GetCaloLevel1(),1,rcil) )return 0; |
if( !y_axis->FitAxis(event->GetCaloLevel1(),1,rcil) )return 0; |
124 |
|
|
125 |
// if(x_axis->GetN()<4 || y_axis->GetN()<4)return 0; |
if(x_axis->GetN()<4 || y_axis->GetN()<4)return 0; |
126 |
|
|
127 |
// float qtrack = x_axis->GetQaxis()+y_axis->GetQaxis(); |
float qtrack = x_axis->GetQaxis()+y_axis->GetQaxis(); |
128 |
// int ntrack = x_axis->GetN()+y_axis->GetN(); |
int ntrack = x_axis->GetN()+y_axis->GetN(); |
129 |
|
|
130 |
// float qstrip = qtrack/ntrack; |
float qstrip = qtrack/ntrack; |
131 |
|
|
132 |
// // -------------------------------- |
// -------------------------------- |
133 |
// // evaluate total energy release |
// evaluate total energy release |
134 |
// // -------------------------------- |
// -------------------------------- |
135 |
// float qtot = 0; |
float qtot = 0; |
136 |
// int ntot = 0; |
int ntot = 0; |
137 |
// qtot = event->qtot; |
qtot = event->GetCaloLevel2()->qtot; |
138 |
// ntot = event->nstrip; |
ntot = event->GetCaloLevel2()->nstrip; |
139 |
|
|
140 |
|
|
141 |
// float nratio = 0; |
float nratio = 0; |
142 |
// float qratio = 0; |
float qratio = 0; |
143 |
// if(ntot>0){ |
if(ntot>0){ |
144 |
// nratio = (float)ntrack/(float)ntot; |
nratio = (float)ntrack/(float)ntot; |
145 |
// qratio = qtrack/qtot; |
qratio = qtrack/qtot; |
146 |
// } |
} |
147 |
|
|
148 |
// // cout << qtrack << " " << ntrack << " "<< qtot << " "<<ntot<<endl; |
// cout << qtrack << " " << ntrack << " "<< qtot << " "<<ntot<<endl; |
149 |
// if(qratio < 0.8)return false; |
if(qratio < 0.8)return false; |
150 |
|
|
151 |
// }else return false; |
}else return false; |
152 |
|
|
153 |
// x_axis->Delete(); |
x_axis->Delete(); |
154 |
// y_axis->Delete(); |
y_axis->Delete(); |
155 |
|
|
156 |
// ----------------------------------------- |
// ----------------------------------------- |
157 |
// +++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++ |
159 |
// +++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++ |
160 |
// ----------------------------------------- |
// ----------------------------------------- |
161 |
|
|
162 |
// --------------------------- |
// --------------------------- |
163 |
// one hit paddle on S1 and S2 |
// one hit paddle on S1 and S2 |
164 |
// --------------------------- |
// --------------------------- |
165 |
// if( |
if( |
166 |
// event->GetNHitPaddles(0) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(0) == 1 && |
167 |
// event->GetNHitPaddles(1) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(1) == 1 && |
168 |
// event->GetNHitPaddles(2) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(2) == 1 && |
169 |
// event->GetNHitPaddles(3) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(3) == 1 && |
170 |
// event->GetNHitPaddles(4) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(4) == 1 && |
171 |
// event->GetNHitPaddles(5) == 1 && |
event->GetToFLevel2()->GetNHitPaddles(5) == 1 && |
172 |
// true |
true |
173 |
// ){;;; |
){;;; |
174 |
// }else return false; |
}else return false; |
175 |
|
|
176 |
// ----------------------------------------- |
// ----------------------------------------- |
177 |
// +++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++ |
178 |
// AC CUTS |
// AC CUTS |
179 |
// +++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++ |
180 |
// ----------------------------------------- |
// ----------------------------------------- |
181 |
// AcLevel2* ac = event->GetAcLevel2(); |
AcLevel2* ac = event->GetAcLevel2(); |
182 |
|
|
183 |
// if( IsHit("CARD1-M",ac) || IsHit("CARD1-E",ac) )return false; |
if( IsHit("CARD1-M",ac) || IsHit("CARD1-E",ac) )return false; |
184 |
// if( IsHit("CARD2-M",ac) || IsHit("CARD2-E",ac) )return false; |
if( IsHit("CARD2-M",ac) || IsHit("CARD2-E",ac) )return false; |
185 |
// if( IsHit("CARD3-M",ac) || IsHit("CARD3-E",ac) )return false; |
if( IsHit("CARD3-M",ac) || IsHit("CARD3-E",ac) )return false; |
186 |
// if( IsHit("CARD4-M",ac) || IsHit("CARD4-E",ac) )return false; |
if( IsHit("CARD4-M",ac) || IsHit("CARD4-E",ac) )return false; |
187 |
|
|
188 |
// if( IsHit("CAT1-M",ac) || IsHit("CAT1-E",ac) )return false; |
if( IsHit("CAT1-M",ac) || IsHit("CAT1-E",ac) )return false; |
189 |
// if( IsHit("CAT2-M",ac) || IsHit("CAT2-E",ac) )return false; |
if( IsHit("CAT2-M",ac) || IsHit("CAT2-E",ac) )return false; |
190 |
// if( IsHit("CAT3-M",ac) || IsHit("CAT3-E",ac) )return false; |
if( IsHit("CAT3-M",ac) || IsHit("CAT3-E",ac) )return false; |
191 |
// if( IsHit("CAT4-M",ac) || IsHit("CAT4-E",ac) )return false; |
if( IsHit("CAT4-M",ac) || IsHit("CAT4-E",ac) )return false; |
192 |
|
|
193 |
// if( IsHit("CAS1-M",ac) || IsHit("CAS1-E",ac) )return false; |
if( IsHit("CAS1-M",ac) || IsHit("CAS1-E",ac) )return false; |
194 |
// if( IsHit("CAS2-M",ac) || IsHit("CAS2-E",ac) )return false; |
if( IsHit("CAS2-M",ac) || IsHit("CAS2-E",ac) )return false; |
195 |
// if( IsHit("CAS3-M",ac) || IsHit("CAS3-E",ac) )return false; |
if( IsHit("CAS3-M",ac) || IsHit("CAS3-E",ac) )return false; |
196 |
// if( IsHit("CAS4-M",ac) || IsHit("CAS4-E",ac) )return false; |
if( IsHit("CAS4-M",ac) || IsHit("CAS4-E",ac) )return false; |
197 |
|
|
198 |
return true; |
return true; |
199 |
|
|