Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:17

0001 #ifndef ALIGNMENTDEFS_H
0002 #define ALIGNMENTDEFS_H
0003 
0004 #include <trackbase/ActsGeometry.h>
0005 #include <trackbase/TrkrDefs.h>
0006 
0007 namespace AlignmentDefs
0008 {
0009   enum mvtxGrp
0010   {
0011     snsr,
0012     stv,
0013     mvtxlyr,
0014     clamshl
0015   };
0016 
0017   enum inttGrp
0018   {
0019     chp,
0020     lad,
0021     inttlyr,
0022     inttbrl
0023   };
0024 
0025   enum tpcGrp
0026   {
0027     htst,
0028     sctr,
0029     tp
0030   };
0031   enum mmsGrp
0032   {
0033     tl,
0034     mm
0035   };
0036 
0037   static constexpr int NGLVTX = 3;
0038   static constexpr int NGL = 6;
0039   static constexpr int NLC = 5;
0040 
0041   //! Map relating Acts::VolumeID to sPHENIX layer
0042   static const std::map<unsigned int, unsigned int> base_layer_map = {{10, 0}, {12, 3}, {14, 7}, {16, 55}};
0043   static constexpr int nsensors_stave[7] = {9, 9, 9, 4, 4, 4, 4};
0044   static constexpr int nstaves_layer_intt[4] = {12, 12, 16, 16};
0045   static constexpr int nstaves_layer_mvtx[3] = {12, 16, 20};
0046 
0047   static constexpr int clamshell_stave_list[3][2][10] = {  // [layer][clamshell][stave]
0048       {{3, 4, 5, 6, 7, 8, 0, 0, 0, 0},
0049        {0, 1, 2, 9, 10, 11, 0, 0, 0, 0}},
0050       {{4, 5, 6, 7, 8, 9, 10, 11, 0, 0},
0051        {0, 1, 2, 3, 12, 13, 14, 15, 0, 0}},
0052       {{5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
0053        {0, 1, 2, 3, 4, 15, 16, 17, 18, 19}}};
0054 
0055   static constexpr int glbl_vtx_label[NGLVTX] = {60000000, 60000001, 60000002};
0056 
0057   int getTpcRegion(int layer);
0058   void getMvtxGlobalLabels(const Surface& surf, int glbl_label[], mvtxGrp grp);
0059   void getMvtxGlobalLabels(const Surface& surf, TrkrDefs::cluskey cluskey, int glbl_label[], mvtxGrp grp);
0060   void getInttGlobalLabels(const Surface& surf, int glbl_label[], inttGrp grp);
0061   void getInttGlobalLabels(const Surface& surf, TrkrDefs::cluskey cluskey, int glbl_label[], inttGrp grp);
0062   void getTpcGlobalLabels(const Surface& surf, TrkrDefs::cluskey cluskey, int glbl_label[], tpcGrp grp);
0063   void getMMGlobalLabels(const Surface& surf, int glbl_label[], mmsGrp grp);
0064   int getMvtxClamshell(int layer, int stave);
0065 
0066   std::vector<int> getAllMvtxGlobalLabels(int grp);
0067   std::vector<int> getAllInttGlobalLabels(int grp);
0068   std::vector<int> getAllTpcGlobalLabels(int grp);
0069   std::vector<int> makeLabelsFromBase(std::vector<int>& label_base);
0070 
0071   int getLabelBase(Acts::GeometryIdentifier id, TrkrDefs::cluskey cluskey, int group);
0072 
0073   void printBuffers(int index, Acts::Vector2 residual,
0074                     Acts::Vector2 clus_sigma, float lcl_derivative[],
0075                     float glbl_derivative[], int glbl_label[]);
0076 
0077 }  // namespace AlignmentDefs
0078 #endif