Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:13:03

0001 #ifndef EpInfo_H
0002 #define EpInfo_H
0003 
0004 #define _EpOrderMax 3   // maximum order of EP to worry about.
0005 
0006 #include "TVector2.h"
0007 
0008 /// the class EpInfo has only public members.
0009 /// No need to hide information.  Indeed, it's really only a struct,
0010 /// with the possibility to create some methods.
0011 class EpInfo{
0012 
0013   // making EpFinder a "friend class" just gives it direct access to the arrays.
0014   // But the general User is required to use accessors, since the numbering/index convention can be confusing
0015   friend class EpFinder;
0016 
0017  public:
0018   EpInfo();
0019   ~EpInfo(){/* no op */};
0020 
0021   // in the below, when it says "of order," then "order" begins at 1.  E.g. order=2 means second-order q vector
0022 
0023   //-----------------------------------------------------------------------------------------
0024   /// Raw (no phi-weighting) Q vector 
0025   /// \parameter order     order of the Q-vector.  Begins at unity (order=1 means first-order Q)
0026   TVector2 RawQ(int order);
0027  
0028   //-----------------------------------------------------------------------------------------
0029   /// Phi weighted Q vector 
0030   /// \parameter order     order of the Q-vector.  Begins at unity (order=1 means first-order Q)
0031   TVector2 PhiWeightedQ(int order);
0032 
0033   //-----------------------------------------------------------------------------------------
0034   /// Raw (no phi-weighting, no shifting) Event plane angle 
0035   /// \parameter order     order of the Q-vector.  Begins at unity (order=1 means first-order Q)
0036   double RawPsi(int order);
0037 
0038   //-----------------------------------------------------------------------------------------
0039   /// Phi-weighted (but not shift flattened) Event plane angle 
0040   /// \parameter order     order of the Q-vector.  Begins at unity (order=1 means first-order Q)
0041   double PhiWeightedPsi(int order);
0042 
0043   //-----------------------------------------------------------------------------------------
0044   /// Phi-weighted and shift-corrected Event plane angle 
0045   /// \parameter order     order of the Q-vector.  Begins at unity (order=1 means first-order Q)
0046   double PhiWeightedAndShiftedPsi(int order);
0047 
0048   //-----------------------------------------------------------------------------------------
0049   /// The sum of weights used to calculate Q-vector, for entire detector.  This is RAW, not phi-weighted
0050   /// This is useful if one wants to un-normalize the Q-vector
0051   /// ** note that this depends on "order," because the eta-weighting or ring-weighting can depend on order (user sets it)
0052   /// ** this stands in contrast to the ring-by-ring Qvectors, which do not depend on order.
0053   /// \parameter order     order of the EP.  Begins at unity (order=1 means first-order EP)
0054   double SWRaw(int order);
0055 
0056   //-----------------------------------------------------------------------------------------
0057   /// The sum of weights used to calculate Q-vector, for entire detector.  This is phi-weighted
0058   /// This is useful if one wants to un-normalize the Q-vector
0059   /// ** note that this depends on "order," because the eta-weighting or ring-weighting can depend on order (user sets it)
0060   /// ** this stands in contrast to the ring-by-ring Qvectors, which do not depend on order.
0061   /// \parameter order     order of the EP.  Begins at unity (order=1 means first-order EP)
0062   double SWPhiWeighted(int order);
0063 
0064  private:
0065 
0066   bool ArgumentOutOfBounds(int order);              /// protection against user selecting "order=0" or order that has not been defined
0067 
0068   double Range(double psi, int order);                     /// puts angle psi into range (0,2pi/n)
0069 
0070   double QrawOneSide[_EpOrderMax][2];           /// indices: [order][x,y]
0071   double QphiWeightedOneSide[_EpOrderMax][2];   /// indices: [order][x,y]
0072   double PsiRaw[_EpOrderMax];                   /// indices: [order]
0073   double PsiPhiWeighted[_EpOrderMax];           /// indices: [order]
0074   double PsiPhiWeightedAndShifted[_EpOrderMax]; /// indices: [order]
0075   double WheelSumWeightsRaw[_EpOrderMax];       /// indices: [order]
0076   double WheelSumWeightsPhiWeighted[_EpOrderMax]; /// indices: [order]
0077 
0078 };
0079 
0080 #endif