Commit 7ccc7b8a authored by adrien-matta's avatar adrien-matta
Browse files

* adding Power threshold to FDC2

parent ac7fa9c0
Pipeline #90758 passed with stages
in 13 minutes and 22 seconds
......@@ -48,6 +48,7 @@ ClassImp(TSamuraiFDC2Physics)
ToTThreshold = 180;
DriftLowThreshold=0.2;
DriftUpThreshold=9.4;
PowerThreshold=14;
}
///////////////////////////////////////////////////////////////////////////
......@@ -88,9 +89,13 @@ void TSamuraiFDC2Physics::BuildPhysicalEvent(){
VX0.clear();VX100.clear(),D.clear();
for(auto it = X.begin();it!=X.end();++it){
D[it->first]=m_reconstruction.BuildTrack2D(X[it->first],Z[it->first],R[it->first],X0,X100,a,b);
/* std::ofstream f("distance.txt", std::ios::app);
/* // for Debug, write a file of
{ std::ofstream f("distance.txt", std::ios::app);
f<< D[it->first] << endl;
f.close();*/
f.close();
}
*/
// very large a means track perpendicular to the chamber, what happen when there is pile up
if(abs(a)>1000)
PileUp++;
......@@ -118,7 +123,7 @@ void TSamuraiFDC2Physics::BuildPhysicalEvent(){
if(it1!=it2 && it1->first.first==it2->first.first){// different plane, same detector
m_reconstruction.ResolvePlane(it1->second,it1->first.second,it2->second,it2->first.second,P);
if(P.X()!=-10000 && D[it1->first]<200 && D[it2->first]<200){
if(P.X()!=-10000 && D[it1->first]<PowerThreshold&& D[it2->first]<PowerThreshold){
C[it1->first.first].push_back(P);
// Mean pos are weighted based on the the sum of distance from track
// to hit obtained during the minimisation
......@@ -136,7 +141,7 @@ void TSamuraiFDC2Physics::BuildPhysicalEvent(){
if(it1!=it2 && it1->first.first==it2->first.first){// different plane, same detector
m_reconstruction.ResolvePlane(it1->second,it1->first.second,it2->second,it2->first.second,P);
if(P.X()!=-10000&& D[it1->first]<200 && D[it2->first]<200)
if(P.X()!=-10000&& D[it1->first]<PowerThreshold && D[it2->first]<PowerThreshold)
C100[it1->first.first].push_back(P);
}
}
......
......@@ -120,7 +120,7 @@ class TSamuraiFDC2Physics : public TObject, public NPL::VDetector{
// since the calibration is a sigmoid there quite a few event at the edge
double DriftLowThreshold;//! Minimum Drift length to keep the hit
double DriftUpThreshold;//! Maximum Drift length to keep the hit
double PowerThreshold;//! Maximum P2 minimisation value to keep the track
void RemoveNoise();
// Construct the 2D track and ref position at Z=0 and Z=100 based on X,Z and Radius provided
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment