ATLAS Offline Software
Loading...
Searching...
No Matches
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{
21public:
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
37private:
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
68public:
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
79private:
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{
96private:
97 Float_t m_fPosTr;
98public:
99 CSortCorrsNext(const Float_t fPosTr);
101};
102
103#endif // ALFA_EDGEMETHOD_H
#define RPOTSCNT
#define ALFALAYERSCNT
#define ALFAPLATESCNT
#define ALFAFIBERSCNT
Double_t m_uv_geo[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Bool_t iterationNext(UInt_t no_Detector, std::vector< Track > &tracks)
Int_t m_iMultiMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT]
void readUVONE(Int_t no_Detector, Double_t u_pos=91.0, Double_t v_pos=-91.0)
Bool_t iterNext(UInt_t no_Detector, UInt_t no_Orient, Float_t pos, Int_t level, Corridor &corr)
static Bool_t functionSortCorrsOne(Corridor corr1, Corridor corr2)
void findEdges(UInt_t no_Detector, UInt_t no_Orient, std::vector< Edge > &edges)
static Bool_t functionSortEdges(Edge edg1, Edge edg2)
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Bool_t m_bFiberHitsMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
std::pair< std::pair< Float_t, Float_t >, UInt_t > Corridor
void selectedFibers(UInt_t no_Detector, Track &track, Int_t *selectedFib)
void Initialize(Int_t iRPot, Float_t faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], Float_t fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], const std::list< MDHIT > &ListMDHits)
std::pair< std::pair< Float_t, Bool_t >, Bool_t > Edge
void findCorridors(std::vector< Edge > &edges, std::vector< Corridor > &corridors)
Bool_t EdgeMethod(UInt_t no_Detector, std::vector< Track > &tracks)
Bool_t iterOne(UInt_t no_Detector, UInt_t no_Orient, std::vector< Corridor > &corridors)
Bool_t iterationOne(UInt_t no_Detector, std::vector< Track > &tracks)
static Bool_t functionSortTracks(Track track1, Track track2)
Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
CSortCorrsNext(const Float_t fPosTr)
bool operator()(ALFA_EdgeMethod::Corridor corr1, ALFA_EdgeMethod::Corridor corr2) const