Browse Source

Changed default bad FHCal nodules in AcceptanceFilter, added utility function to get (X,Y) coordinates for FHCal modules

PeterParfenov 2 years ago
parent
commit
5955af026a
3 changed files with 31 additions and 1 deletions
  1. 1 0
      MpdFlow.LinkDef.h
  2. 27 0
      utils/mfNamespace.cxx
  3. 3 1
      utils/mfNamespace.h

+ 1 - 0
MpdFlow.LinkDef.h

@@ -21,6 +21,7 @@
 
 #pragma link C++ namespace mfEp;
 #pragma link C++ function mfEp::GetFHCalPhi(int);
+#pragma link C++ function mfEp::GetFHCalCoord(int);
 
 #pragma link C++ namespace mfRes;
 #pragma link C++ function mfRes::ResEventPlane(double,double);

+ 27 - 0
utils/mfNamespace.cxx

@@ -91,6 +91,33 @@ double mfEp::GetFHCalPhi(int iModule)
   return phi;
 }
 
+std::pair<double, double> mfEp::GetFHCalCoord(int iModule)
+{
+  std::pair<double, double> coord = {-999., -999.};
+  const int Nmodules = 45;
+  int xAxisSwitch = (iModule < Nmodules) ? 1 : -1;
+  int module = (iModule < Nmodules) ? iModule : iModule - Nmodules;
+  double x, y;
+  if (module >= 0 && module <= 4)
+  {
+    y = 45.;
+    x = (module - 2) * 15.;
+  }
+  else if ((module >= 5) && (module <= 39))
+  {
+    y = (3 - (module + 2) / 7) * 15.;
+    x = (3 - (module + 2) % 7) * 15.;
+  }
+  else if ((module >= 40) && (module <= 44))
+  {
+    y = -45.;
+    x = (module - 42) * 15.;
+  }
+
+  coord = {x * xAxisSwitch, y};
+  return coord;
+}
+
 float mfEp::RangeAngle_02Pi(float phi, float harm)
 {
   TVector2 vect;

+ 3 - 1
utils/mfNamespace.h

@@ -1,6 +1,7 @@
 #ifndef MPD_FLOW_NAMESPACE_H
 #define MPD_FLOW_NAMESPACE_H
 
+#include <iostream>
 #include <vector>
 
 namespace mfdca
@@ -53,6 +54,7 @@ namespace mfEp
 
   const int Nmodules = 45;
   double GetFHCalPhi(int iModule);
+  std::pair<double, double> GetFHCalCoord(int iModule);
   float RangeAngle_02Pi(float phi, float harm = 1.); // make it from 0 to 2*Pi
   float RangeAngle(float phi, float harm = 1.);      // make it from -Pi to Pi
 
@@ -99,7 +101,7 @@ namespace mfAcceptance
   const float AcceptanceTpcPhiMax = 0.78539816; // 45 deg
 
   // Bad FHCal modules (not 22, 67)
-  const std::vector<int> AcceptanceFHCalModules = {13, 50};
+  const std::vector<int> AcceptanceFHCalModules = {15, 73};
 }
 
 #endif