ATLAS Offline Software
ALFA_EdgeMethod.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_EDGEMETHOD_H
6 #define ALFA_EDGEMETHOD_H
7 
8 #include <utility>
9 #include <vector>
10 
11 #include "Rtypes.h"
12 
14 
17 
18 
20 {
21 public:
23  ALFA_EdgeMethod(Bool_t bOpt_Sisters, Bool_t bOpt_UseGaps);
25 
26  void Initialize(Int_t iRPot, Float_t faMD[RPOTSCNT][ALFALAYERSCNT*ALFAPLATESCNT][ALFAFIBERSCNT], Float_t fbMD[RPOTSCNT][ALFALAYERSCNT*ALFAPLATESCNT][ALFAFIBERSCNT], const std::list<MDHIT> &ListMDHits);
27 
28 
29  // Typedef for Edge, Corridor and Track
30  typedef std::pair< std::pair< Float_t, Bool_t >, Bool_t > Edge; // typedef for fibers edges: <edge position, fiber side> (left edge -> kTRUE; right edge -> kFALSE)
31  typedef std::pair< std::pair< Float_t, Float_t >, UInt_t > Corridor; // typedef for corridors: <<position, width>, numbers of hits>
32  typedef std::pair< Corridor, Corridor > Track; // typedef for tracks: <corridors in u, corridors in v>
33 
34 
35 // void SetOptions(TString options = "");
36 
37 private:
38  // Sorting function:
39  // - sort edges according to positions
40  static Bool_t functionSortEdges( Edge edg1, Edge edg2 );
41  // - sort corridors according to number of hits, if equal: according to corridor width (used in first iteration)
42  static Bool_t functionSortCorrsOne( Corridor corr1, Corridor corr2 );
43  // - sort tracks according to number of hits
44  static Bool_t functionSortTracks( Track track1, Track track2 );
45 
46  // Find all edges of hit fibers and put them in vector &edges
47  void findEdges(UInt_t no_Detector, UInt_t no_Orient, std::vector< Edge > &edges);
48  // Find all possible corridors from finded &edges and put them in vector &corridors
49  void findCorridors(std::vector< Edge > &edges, std::vector< Corridor > &corridors);
50 
51  // Test if corridors can merge into one track
52  Bool_t testTrack(/*Corridor corr_U, Corridor corr_V*/);
53 
54 
55  // First iteration
56  // Look for corridors (in one orientation) and choose the best 5 using sorting @functionSortCorrsOne
57  Bool_t iterOne(UInt_t no_Detector, UInt_t no_Orient, std::vector< Corridor > &corridors );
58  // Execute @iterOne for both orientation, merge coridors in tracks, test them and choose the best 10 tracks
59  Bool_t iterationOne(UInt_t no_Detector, std::vector<Track> &tracks );
60 
61  // Second and third iteration
62  // Look for corridors (in one orientation) and choose the closest to previous using sorting @functionSortCorrsNext
63  Bool_t iterNext(UInt_t no_Detector, UInt_t no_Orient, Float_t pos, Int_t level, Corridor &corr);
64  // Execute @iterNext for both orientation, merge coridors in tracks and test them
65  Bool_t iterationNext(UInt_t no_Detector, std::vector<Track> &tracks );
66 
67 
68 public:
69  // Local reconstruction: execute @iterationOne, and twice @iterationNext
70  // Reconstruct the tracks and storage them in &tracks
71  Bool_t EdgeMethod(UInt_t no_Detector, std::vector<Track> &tracks);
72 
73 
74  // Additional function:
75  // - fill table Fib_SelMD (select the fibers with contain both coridors edge, not only positions)
76  void selectedFibers(UInt_t no_Detector, Track &track, Int_t * selectedFib);
77 
78 
79 private:
80  void readUVONE(Int_t no_Detector, Double_t u_pos = 91.0, Double_t v_pos = -91.0);
81 
82  Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT*ALFAPLATESCNT][ALFAFIBERSCNT]; //slope, offset and Z-pos for MD fibers [2*10][64]
86  //Geometry in u&v
88 
91 
92 };
93 
95 {
96 private:
97  Float_t m_fPosTr;
98 public:
99  CSortCorrsNext(const Float_t fPosTr);
101 };
102 
103 #endif // ALFA_EDGEMETHOD_H
ALFA_EdgeMethod::findEdges
void findEdges(UInt_t no_Detector, UInt_t no_Orient, std::vector< Edge > &edges)
Definition: ALFA_EdgeMethod.cxx:76
ALFA_EdgeMethod::readUVONE
void readUVONE(Int_t no_Detector, Double_t u_pos=91.0, Double_t v_pos=-91.0)
Definition: ALFA_EdgeMethod.cxx:442
ALFA_EdgeMethod::functionSortCorrsOne
static Bool_t functionSortCorrsOne(Corridor corr1, Corridor corr2)
Definition: ALFA_EdgeMethod.cxx:65
ALFAFIBERSCNT
#define ALFAFIBERSCNT
Definition: ALFA_constants.h:10
ALFA_EdgeMethod::m_bOpt_Sisters
Bool_t m_bOpt_Sisters
Definition: ALFA_EdgeMethod.h:89
ALFA_EdgeMethod::functionSortTracks
static Bool_t functionSortTracks(Track track1, Track track2)
Definition: ALFA_EdgeMethod.cxx:70
ALFA_EdgeMethod::Track
std::pair< Corridor, Corridor > Track
Definition: ALFA_EdgeMethod.h:32
RPOTSCNT
#define RPOTSCNT
Definition: ALFA_CLinkAlg.h:26
CSortCorrsNext
Definition: ALFA_EdgeMethod.h:95
ALFA_EdgeMethod::Corridor
std::pair< std::pair< Float_t, Float_t >, UInt_t > Corridor
Definition: ALFA_EdgeMethod.h:31
CSortCorrsNext::CSortCorrsNext
CSortCorrsNext(const Float_t fPosTr)
Definition: ALFA_EdgeMethod.cxx:461
CSortCorrsNext::m_fPosTr
Float_t m_fPosTr
Definition: ALFA_EdgeMethod.h:97
ALFA_EdgeMethod::m_bFiberHitsMD
Bool_t m_bFiberHitsMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_EdgeMethod.h:84
ALFA_EdgeMethod::iterationOne
Bool_t iterationOne(UInt_t no_Detector, std::vector< Track > &tracks)
Definition: ALFA_EdgeMethod.cxx:207
ALFA_EdgeMethod::EdgeMethod
Bool_t EdgeMethod(UInt_t no_Detector, std::vector< Track > &tracks)
Definition: ALFA_EdgeMethod.cxx:276
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
ALFA_EdgeMethod
Definition: ALFA_EdgeMethod.h:20
CSortCorrsNext::operator()
bool operator()(ALFA_EdgeMethod::Corridor corr1, ALFA_EdgeMethod::Corridor corr2) const
Definition: ALFA_EdgeMethod.cxx:467
ALFA_constants.h
ALFA_EdgeMethod::m_fbMD
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_EdgeMethod.h:83
ALFA_EdgeMethod::~ALFA_EdgeMethod
~ALFA_EdgeMethod()
Definition: ALFA_EdgeMethod.cxx:22
ALFA_EdgeMethod::m_uv_geo
Double_t m_uv_geo[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_EdgeMethod.h:87
ALFA_EdgeMethod::iterOne
Bool_t iterOne(UInt_t no_Detector, UInt_t no_Orient, std::vector< Corridor > &corridors)
Definition: ALFA_EdgeMethod.cxx:172
ALFA_EdgeMethod::Edge
std::pair< std::pair< Float_t, Bool_t >, Bool_t > Edge
Definition: ALFA_EdgeMethod.h:30
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
ALFA_EdgeMethod::selectedFibers
void selectedFibers(UInt_t no_Detector, Track &track, Int_t *selectedFib)
Definition: ALFA_EdgeMethod.cxx:298
ALFALAYERSCNT
#define ALFALAYERSCNT
Definition: ALFA_constants.h:8
ALFA_EdgeMethod::Initialize
void Initialize(Int_t iRPot, Float_t faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], Float_t fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], const std::list< MDHIT > &ListMDHits)
Definition: ALFA_EdgeMethod.cxx:27
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
ALFA_EdgeMethod::ALFA_EdgeMethod
ALFA_EdgeMethod()
Definition: ALFA_EdgeMethod.cxx:10
ALFA_UserObjects.h
ALFA_EdgeMethod::m_bOpt_UseGaps
Bool_t m_bOpt_UseGaps
Definition: ALFA_EdgeMethod.h:90
ALFA_EdgeMethod::m_faMD
Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_EdgeMethod.h:82
AthMessaging.h
ALFA_EdgeMethod::m_iMultiMD
Int_t m_iMultiMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT]
Definition: ALFA_EdgeMethod.h:85
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
ALFA_EdgeMethod::functionSortEdges
static Bool_t functionSortEdges(Edge edg1, Edge edg2)
Definition: ALFA_EdgeMethod.cxx:61
ALFA_EdgeMethod::findCorridors
void findCorridors(std::vector< Edge > &edges, std::vector< Corridor > &corridors)
Definition: ALFA_EdgeMethod.cxx:101
ALFA_EdgeMethod::testTrack
Bool_t testTrack()
Definition: ALFA_EdgeMethod.cxx:165
ALFAPLATESCNT
#define ALFAPLATESCNT
Definition: ALFA_constants.h:9
ALFA_EdgeMethod::iterationNext
Bool_t iterationNext(UInt_t no_Detector, std::vector< Track > &tracks)
Definition: ALFA_EdgeMethod.cxx:253
ALFA_EdgeMethod::iterNext
Bool_t iterNext(UInt_t no_Detector, UInt_t no_Orient, Float_t pos, Int_t level, Corridor &corr)
Definition: ALFA_EdgeMethod.cxx:234