ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_EdgeMethod Class Reference

#include <ALFA_EdgeMethod.h>

Inheritance diagram for ALFA_EdgeMethod:
Collaboration diagram for ALFA_EdgeMethod:

Public Types

typedef std::pair< std::pair< Float_t, Bool_t >, Bool_t > Edge
typedef std::pair< std::pair< Float_t, Float_t >, UInt_t > Corridor
typedef std::pair< Corridor, CorridorTrack

Public Member Functions

 ALFA_EdgeMethod ()
 ALFA_EdgeMethod (Bool_t bOpt_Sisters, Bool_t bOpt_UseGaps)
 ~ALFA_EdgeMethod ()
void Initialize (Int_t iRPot, Float_t faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], Float_t fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], const std::list< MDHIT > &ListMDHits)
Bool_t EdgeMethod (UInt_t no_Detector, std::vector< Track > &tracks)
void selectedFibers (UInt_t no_Detector, Track &track, Int_t *selectedFib)
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Private Member Functions

void findEdges (UInt_t no_Detector, UInt_t no_Orient, std::vector< Edge > &edges)
void findCorridors (std::vector< Edge > &edges, std::vector< Corridor > &corridors)
Bool_t testTrack ()
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)
Bool_t iterNext (UInt_t no_Detector, UInt_t no_Orient, Float_t pos, Int_t level, Corridor &corr)
Bool_t iterationNext (UInt_t no_Detector, std::vector< Track > &tracks)
void readUVONE (Int_t no_Detector, Double_t u_pos=91.0, Double_t v_pos=-91.0)
void initMessaging () const
 Initialize our message level and MessageSvc.

Static Private Member Functions

static Bool_t functionSortEdges (Edge edg1, Edge edg2)
static Bool_t functionSortCorrsOne (Corridor corr1, Corridor corr2)
static Bool_t functionSortTracks (Track track1, Track track2)

Private Attributes

Float_t m_faMD [RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Float_t m_fbMD [RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Bool_t m_bFiberHitsMD [RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Int_t m_iMultiMD [RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT]
Double_t m_uv_geo [RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Bool_t m_bOpt_Sisters
Bool_t m_bOpt_UseGaps
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Detailed Description

Definition at line 19 of file ALFA_EdgeMethod.h.

Member Typedef Documentation

◆ Corridor

typedef std::pair< std::pair< Float_t, Float_t >, UInt_t > ALFA_EdgeMethod::Corridor

Definition at line 31 of file ALFA_EdgeMethod.h.

◆ Edge

typedef std::pair< std::pair< Float_t, Bool_t >, Bool_t > ALFA_EdgeMethod::Edge

Definition at line 30 of file ALFA_EdgeMethod.h.

◆ Track

typedef std::pair< Corridor, Corridor > ALFA_EdgeMethod::Track

Definition at line 32 of file ALFA_EdgeMethod.h.

Constructor & Destructor Documentation

◆ ALFA_EdgeMethod() [1/2]

ALFA_EdgeMethod::ALFA_EdgeMethod ( )

Definition at line 10 of file ALFA_EdgeMethod.cxx.

10 :
11 ALFA_EdgeMethod(kFALSE, kFALSE)
12{
13}

◆ ALFA_EdgeMethod() [2/2]

ALFA_EdgeMethod::ALFA_EdgeMethod ( Bool_t bOpt_Sisters,
Bool_t bOpt_UseGaps )

Definition at line 15 of file ALFA_EdgeMethod.cxx.

15 :
16 AthMessaging("ALFA_EdgeMethod"),
17 m_bOpt_Sisters (bOpt_Sisters),
18 m_bOpt_UseGaps (bOpt_UseGaps)
19{
20}
AthMessaging()
Default constructor:

◆ ~ALFA_EdgeMethod()

ALFA_EdgeMethod::~ALFA_EdgeMethod ( )

Definition at line 22 of file ALFA_EdgeMethod.cxx.

23{
24
25}

Member Function Documentation

◆ EdgeMethod()

Bool_t ALFA_EdgeMethod::EdgeMethod ( UInt_t no_Detector,
std::vector< Track > & tracks )

Definition at line 284 of file ALFA_EdgeMethod.cxx.

285{
286 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::EdgeMethod()");
287
288 if(!iterationOne(no_Detector, tracks )) return kFALSE;
289 if(!iterationNext(no_Detector, tracks )) return kFALSE;
290 if(!iterationNext(no_Detector, tracks )) return kFALSE;
291
292 for(UInt_t i = 0; i < tracks.size(); i++){
293 for(UInt_t j = i+1; j < tracks.size(); j++){
294 if( std::abs( tracks.at(i).first.first.first - tracks.at(j).first.first.first) < 0.002 && std::abs( tracks.at(i).second.first.first - tracks.at(j).second.first.first ) < 0.002 ){
295 tracks.erase( tracks.begin() + j );
296 j--;
297 }
298 }
299 }
300
301 ATH_MSG_DEBUG("end ALFA_EdgeMethod::EdgeMethod()");
302 return kTRUE;
303}
#define ATH_MSG_DEBUG(x)
Bool_t iterationNext(UInt_t no_Detector, std::vector< Track > &tracks)
Bool_t iterationOne(UInt_t no_Detector, std::vector< Track > &tracks)

◆ findCorridors()

void ALFA_EdgeMethod::findCorridors ( std::vector< Edge > & edges,
std::vector< Corridor > & corridors )
private

Definition at line 101 of file ALFA_EdgeMethod.cxx.

102{
103 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::findCorridors()");
104
105 corridors.clear();
106
107 Int_t level = 0;
108 Int_t alive = 0;
109 Bool_t max = kFALSE;
110 Float_t leftEd = 9999.0;
111
112
113 for(UInt_t i = 0; i< (edges.size()-1); i++){
114 if( edges.at(i).first.second ){
115 level++;
116 if( edges.at(i).second ){
117 alive++;
118 }
119 if( edges.at(i+1).first.second ){
120 continue;
121 } else {
122 if( alive < 3 || max ){
123 continue;
124 } else {
125 leftEd = edges.at(i).first.first;
126 max = kTRUE;
127 }
128 }
129 } else {
130 level--;
131 if( edges.at(i).second ){
132 alive--;
133 }
134 if( max ){
135 if( edges.at(i+1).first.second ){
136 if( edges.at(i+2).first.second ){
137 corridors.emplace_back( make_pair( 0.5*(leftEd + edges.at(i).first.first), edges.at(i).first.first - leftEd), level+1 );
138 max = kFALSE;
139 }
140 continue;
141 } else {
142 corridors.emplace_back( make_pair( 0.5*(leftEd + edges.at(i).first.first), edges.at(i).first.first - leftEd), level+1 );
143 max = kFALSE;
144 }
145 }
146 }
147 }
148
149 if (corridors.size() >= 2) {
150 for (std::size_t i = 0; i + 1 < corridors.size(); /* no increment*/) {
151 auto& a = corridors[i];
152 auto& b = corridors[i + 1];
153 if (std::abs(a.first.first - b.first.first) < 0.480) {
154 if (a.second > b.second) {
155 corridors.erase(corridors.begin() + (i + 1)); // drop b
156 } else if (a.second < b.second) {
157 corridors.erase(corridors.begin() + i); // drop a
158 } else {
159 // equal "score": pick a rule; for example drop the later one
160 corridors.erase(corridors.begin() + (i + 1));
161 }
162 // no increment: re-check at same i with the new neighbor
163 } else {
164 ++i; // only advance when we kept both
165 }
166 }
167}
168}
static Double_t a
#define max(a, b)
Definition cfImp.cxx:41

◆ findEdges()

void ALFA_EdgeMethod::findEdges ( UInt_t no_Detector,
UInt_t no_Orient,
std::vector< Edge > & edges )
private

WITHOUT OR WITH ADJACENT

Definition at line 76 of file ALFA_EdgeMethod.cxx.

77{
78 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::findEdges()");
79
80 edges.clear();
81 UInt_t left;
82
83 for(UInt_t nL=no_Orient; nL<20; nL+=2){
84 for(UInt_t nF=0; nF<64; nF++){
85 if(m_bFiberHitsMD[no_Detector][nL][nF]){
86 left = nF;
87 while( nF!=63 && m_bFiberHitsMD[no_Detector][nL][nF+1]){nF++;}
88
89 if( m_iMultiMD[no_Detector][nL] > 3 ){
90 edges.emplace_back( make_pair( m_uv_geo[no_Detector][nL][left] - 0.240, kTRUE), kFALSE);
91 edges.emplace_back( make_pair( m_uv_geo[no_Detector][nL][nF] + 0.240, kFALSE), kFALSE);
92 } else {
93 edges.emplace_back( make_pair( m_uv_geo[no_Detector][nL][left] - 0.240, kTRUE), kTRUE);
94 edges.emplace_back( make_pair( m_uv_geo[no_Detector][nL][nF] + 0.240, kFALSE), kTRUE);
95 }
96 }
97 }
98 }
99}
Double_t m_uv_geo[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Int_t m_iMultiMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT]
Bool_t m_bFiberHitsMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]

◆ functionSortCorrsOne()

Bool_t ALFA_EdgeMethod::functionSortCorrsOne ( Corridor corr1,
Corridor corr2 )
staticprivate

Definition at line 65 of file ALFA_EdgeMethod.cxx.

65 {
66 if( corr1.second == corr2.second ) return ( corr1.first.second > corr2.first.second );
67 else return ( corr1.second > corr2.second );
68}

◆ functionSortEdges()

Bool_t ALFA_EdgeMethod::functionSortEdges ( Edge edg1,
Edge edg2 )
staticprivate

Definition at line 61 of file ALFA_EdgeMethod.cxx.

61 {
62 return ( edg1.first.first < edg2.first.first );
63}

◆ functionSortTracks()

Bool_t ALFA_EdgeMethod::functionSortTracks ( Track track1,
Track track2 )
staticprivate

Definition at line 70 of file ALFA_EdgeMethod.cxx.

70 {
71 if( track1.first.second + track1.second.second == track2.first.second + track2.second.second )
72 return track1.first.first.second + track1.second.first.second > track2.first.first.second + track2.second.first.second;
73 else return track1.first.second + track1.second.second > track2.first.second + track2.second.second;
74}

◆ Initialize()

void ALFA_EdgeMethod::Initialize ( Int_t iRPot,
Float_t faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT],
Float_t fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT],
const std::list< MDHIT > & ListMDHits )

Definition at line 27 of file ALFA_EdgeMethod.cxx.

28{
29 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::Initialize()");
30
31 for (Int_t iPot = 0; iPot < RPOTSCNT; iPot++)
32 {
33 for (Int_t iLayer = 0; iLayer < ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
34 {
35 for (Int_t iFiber = 0; iFiber < ALFAFIBERSCNT; iFiber++)
36 {
37 m_faMD[iPot][iLayer][iFiber] = faMD[iPot][iLayer][iFiber];
38 m_fbMD[iPot][iLayer][iFiber] = fbMD[iPot][iLayer][iFiber];
39 }
40 }
41 }
42
43 memset(&m_bFiberHitsMD, 0, sizeof(m_bFiberHitsMD));
44 memset(&m_iMultiMD, 0, sizeof(m_iMultiMD));
45 std::list<MDHIT>::const_iterator iter;
46 for (iter=ListMDHits.begin(); iter!=ListMDHits.end(); ++iter)
47 {
48 if (iRPot == (*iter).iRPot)
49 {
50 m_bFiberHitsMD[iRPot][(*iter).iPlate][(*iter).iFiber] = true;
51 m_iMultiMD[iRPot][(*iter).iPlate]++;
52 }
53 }
54
55
56 ATH_MSG_DEBUG("end ALFA_EdgeMethod::Initialize()");
57}
#define RPOTSCNT
#define ALFALAYERSCNT
#define ALFAPLATESCNT
#define ALFAFIBERSCNT
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ iterationNext()

Bool_t ALFA_EdgeMethod::iterationNext ( UInt_t no_Detector,
std::vector< Track > & tracks )
private

Definition at line 258 of file ALFA_EdgeMethod.cxx.

259{
260 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterationNext()");
261
262 Corridor corr_U;
263 Corridor corr_V;
264
265 for (std::size_t i = 0; i < tracks.size(); /* no increment*/) {
266 auto& tr = tracks[i];
267 readUVONE(no_Detector, tr.first.first.first, tr.second.first.first);
268 bool rem =
269 iterNext(no_Detector, 0, tr.first.first.first, tr.first.second, corr_U) &&
270 iterNext(no_Detector, 1, tr.second.first.first, tr.second.second, corr_V);
271 //
272 if (rem && testTrack(/*corr_U, corr_V*/)) {
273 tr = std::make_pair(corr_U, corr_V);
274 ++i; // advance only when we keep the element
275 } else {
276 tracks.erase(tracks.begin() + i); // don’t advance; next element overwrites
277 }
278}
279
280 if( tracks.empty() ) return kFALSE;
281 return kTRUE;
282}
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)
std::pair< std::pair< Float_t, Float_t >, UInt_t > Corridor

◆ iterationOne()

Bool_t ALFA_EdgeMethod::iterationOne ( UInt_t no_Detector,
std::vector< Track > & tracks )
private

Definition at line 212 of file ALFA_EdgeMethod.cxx.

213{
214 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterationOne()");
215
216 tracks.clear();
217 readUVONE(no_Detector);
218
219 std::vector< Corridor > corr_U;
220 std::vector< Corridor > corr_V;
221 if( !iterOne(no_Detector, 0, corr_U) || !iterOne(no_Detector, 1, corr_V) ) return kFALSE;
222
223 for(auto & i : corr_U){
224 for(auto & j : corr_V){
225 if( testTrack( /*corr_U.at(i), corr_V.at(j)*/ ) ){
226 tracks.emplace_back( i, j );
227 }
228 }
229 }
230
231 if( tracks.empty() ) return kFALSE;
232 sort( tracks.begin(), tracks.end(), functionSortTracks );
233 if( tracks.size() > 10 ){
234 tracks.resize(10);
235 }
236 return kTRUE;
237}
Bool_t iterOne(UInt_t no_Detector, UInt_t no_Orient, std::vector< Corridor > &corridors)
static Bool_t functionSortTracks(Track track1, Track track2)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ iterNext()

Bool_t ALFA_EdgeMethod::iterNext ( UInt_t no_Detector,
UInt_t no_Orient,
Float_t pos,
Int_t level,
Corridor & corr )
private

Definition at line 239 of file ALFA_EdgeMethod.cxx.

240{
241 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterNext()");
242
243 std::vector< Edge > edges;
244 findEdges( no_Detector, no_Orient, edges);
245 sort( edges.begin(), edges.end(), functionSortEdges );
246
247 std::vector< Corridor > corridors;
248 findCorridors(edges, corridors);
249 if( corridors.empty() ) return kFALSE;
250
251 sort( corridors.begin(), corridors.end(), CSortCorrsNext(pos));
252 if( std::abs( pos - corridors.front().first.first ) > 0.480 || std::abs( level - (Int_t)corridors.front().second ) > 1 ) return kFALSE;
253
254 corr = corridors.front();
255 return kTRUE;
256}
void findEdges(UInt_t no_Detector, UInt_t no_Orient, std::vector< Edge > &edges)
static Bool_t functionSortEdges(Edge edg1, Edge edg2)
void findCorridors(std::vector< Edge > &edges, std::vector< Corridor > &corridors)

◆ iterOne()

Bool_t ALFA_EdgeMethod::iterOne ( UInt_t no_Detector,
UInt_t no_Orient,
std::vector< Corridor > & corridors )
private

Definition at line 177 of file ALFA_EdgeMethod.cxx.

178{
179 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterOne()");
180
181 std::vector< Edge > edges;
182
183 findEdges( no_Detector, no_Orient, edges);
184 if( edges.empty() ) return kFALSE;
185 sort( edges.begin(), edges.end(), functionSortEdges );
186
187 findCorridors(edges, corridors);
188 if( corridors.empty() )
189 return kFALSE;
190
191 if(m_bOpt_Sisters){
192 // Cut for sisters
193 // Other corridors must have more than half of first corridor hits
194 UInt_t minHits = 0.5*corridors.front().second;
195 UInt_t maxCorr = 1;
196 while( maxCorr < corridors.size() && minHits < corridors.at(maxCorr).second ){
197 maxCorr++;
198 }
199 if( maxCorr != corridors.size() ){
200 corridors.resize( maxCorr );
201 }
202 }
203
204 sort( corridors.begin(), corridors.end(), functionSortCorrsOne );
205 if( corridors.size() > 5 ){
206 corridors.resize(5);
207 }
208 return kTRUE;
209}
static Bool_t functionSortCorrsOne(Corridor corr1, Corridor corr2)

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ readUVONE()

void ALFA_EdgeMethod::readUVONE ( Int_t no_Detector,
Double_t u_pos = 91.0,
Double_t v_pos = -91.0 )
private

Definition at line 450 of file ALFA_EdgeMethod.cxx.

451{
452 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::readUVONE()");
453
454 for(Int_t no_Layer=0; no_Layer<20; no_Layer++){
455 if(m_faMD[no_Detector][no_Layer][0]<0){
456 for(Int_t no_Fiber=0; no_Fiber<64; no_Fiber++){
457 m_uv_geo[no_Detector][no_Layer][no_Fiber]=(v_pos*(1+m_faMD[no_Detector][no_Layer][no_Fiber])-1.414213562373095*m_fbMD[no_Detector][no_Layer][no_Fiber])/(1-m_faMD[no_Detector][no_Layer][no_Fiber]);
458 }
459 } else {
460 for(Int_t no_Fiber=0; no_Fiber<64; no_Fiber++){
461 m_uv_geo[no_Detector][no_Layer][no_Fiber]=(u_pos*(1-m_faMD[no_Detector][no_Layer][no_Fiber])+1.414213562373095*m_fbMD[no_Detector][no_Layer][no_Fiber])/(1+m_faMD[no_Detector][no_Layer][no_Fiber]);
462 }
463 }
464 }
465}

◆ selectedFibers()

void ALFA_EdgeMethod::selectedFibers ( UInt_t no_Detector,
Track & track,
Int_t * selectedFib )

Definition at line 306 of file ALFA_EdgeMethod.cxx.

307{
308 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::selectedFibers()");
309
310 readUVONE(no_Detector, track.first.first.first, track.second.first.first );
311
312 UInt_t nF = 0;
313 for(UInt_t nL = 0; nL < 20; nL+=2){
314 selectedFib[nL] = 9999;
315 while( nF != 63 && (m_uv_geo[no_Detector][nL][nF] + 0.2401) <= (track.first.first.first + 0.5 * track.first.first.second) ){
316 nF++;
317 }
318
319 if( (m_uv_geo[no_Detector][nL][nF]-0.2401) <= track.first.first.first - 0.5 * track.first.first.second ){
320 if( m_bFiberHitsMD[no_Detector][nL][nF] ){
321 selectedFib[nL] = nF;
322 } else {
323 selectedFib[nL] = nF + 9000;
324 }
325 } else {
326 if( nF != 0 && m_bFiberHitsMD[no_Detector][nL][nF] && m_bFiberHitsMD[no_Detector][nL][nF-1] ){
327 selectedFib[nL] = nF + 2999;
328 } else if( (m_uv_geo[no_Detector][nL][nF]-0.2401) <= track.first.first.first + 0.5 * track.first.first.second && m_bFiberHitsMD[no_Detector][nL][nF] ){
329 selectedFib[nL] = nF + 2000;
330 } else if ( nF != 0 && (m_uv_geo[no_Detector][nL][nF-1]+0.2401) <= track.first.first.first - 0.5 * track.first.first.second && m_bFiberHitsMD[no_Detector][nL][nF-1] ){
331 selectedFib[nL] = nF + 999;
332 } else {
333 selectedFib[nL] = nF + 9000;
334 }
335 }
336
337 nF > 4 ? nF -= 5 : nF = 0;
338 }
339
340 nF = 0;
341 for(UInt_t nL = 1; nL < 20; nL+=2){
342 selectedFib[nL] = 9999;
343 while( nF != 63 && (m_uv_geo[no_Detector][nL][nF] + 0.2401) <= track.second.first.first + 0.5 * track.second.first.second ){
344 nF++;
345 }
346
347 if( (m_uv_geo[no_Detector][nL][nF]-0.2401) <= track.second.first.first - 0.5 * track.second.first.second ){
348 if( m_bFiberHitsMD[no_Detector][nL][nF] ){
349 selectedFib[nL] = nF;
350 } else {
351 selectedFib[nL] = nF + 9000;
352 }
353 } else {
354 if( nF != 0 && m_bFiberHitsMD[no_Detector][nL][nF] && m_bFiberHitsMD[no_Detector][nL][nF-1] ){
355 selectedFib[nL] = nF + 2999;
356 } else if( (m_uv_geo[no_Detector][nL][nF]-0.2401) <= track.second.first.first + 0.5 * track.second.first.second && m_bFiberHitsMD[no_Detector][nL][nF] ){
357 selectedFib[nL] = nF + 2000;
358 } else if ( nF != 0 && (m_uv_geo[no_Detector][nL][nF-1]+0.2401) <= track.second.first.first - 0.5 * track.second.first.second && m_bFiberHitsMD[no_Detector][nL][nF-1] ){
359 selectedFib[nL] = nF + 999;
360 } else {
361 selectedFib[nL] = nF + 9000;
362 }
363 }
364
365 nF > 4 ? nF -= 5 : nF = 0;
366 }
367
368 if(m_bOpt_UseGaps){
369 Int_t fLow, fCur;
370 Float_t fLeft, fRight;
371
372 for(UInt_t nL = 0; nL < 16; nL+=2){
373 fLow = selectedFib[nL]%1000;
374// if( fLow > 0 && fLow < 63 && selectedFib[nL] < 8000 && selectedFib[nL+2] > 8000 && selectedFib[nL+4] < 8000 ){
375 if( fLow > 1 && fLow < 62 && selectedFib[nL] < 8000 && selectedFib[nL+2] > 8000 && selectedFib[nL+4] < 8000 ){
376 if( m_uv_geo[no_Detector][nL][fLow] > m_uv_geo[no_Detector][nL+2][fLow] ){
377 if( m_uv_geo[no_Detector][nL][fLow] > m_uv_geo[no_Detector][nL+2][fLow+1] ){
378 fCur = fLow+1;
379 } else {
380 fCur = fLow;
381 }
382 } else {
383 if( m_uv_geo[no_Detector][nL][fLow] > m_uv_geo[no_Detector][nL+2][fLow-1] ){
384 fCur = fLow-1;
385 } else {
386 fCur = fLow-2;
387 }
388 }
389 fLeft = m_uv_geo[no_Detector][nL+2][fCur] + 0.2399;
390 fRight = m_uv_geo[no_Detector][nL+2][fCur+1] - 0.2401;
391
392 if( fLeft < fRight ){
393
394 if( fLeft > track.first.first.first - 0.5 * track.first.first.second && fLeft < track.first.first.first + 0.5 * track.first.first.second ){
395 track.first.first.first = 0.5 * ( track.first.first.first + 0.5 * track.first.first.second + fLeft );
396 track.first.first.second = 2 * ( track.first.first.first - fLeft );
397 }
398
399 if( fRight > track.first.first.first - 0.5 * track.first.first.second && fRight < track.first.first.first + 0.5 * track.first.first.second ){
400 track.first.first.first = 0.5 * ( track.first.first.first - 0.5 * track.first.first.second + fRight );
401 track.first.first.second = 2 * ( fRight - track.first.first.first );
402 }
403 }
404 nL += 2;
405 }
406 }
407
408 for(UInt_t nL = 1; nL < 17; nL+=2){
409 fLow = selectedFib[nL]%1000;
410// if( fLow > 0 && fLow < 63 && selectedFib[nL] < 8000 && selectedFib[nL+2] > 8000 && selectedFib[nL+4] < 8000 ){
411 if( fLow > 1 && fLow < 62 && selectedFib[nL] < 8000 && selectedFib[nL+2] > 8000 && selectedFib[nL+4] < 8000 ){
412 if( m_uv_geo[no_Detector][nL][fLow] > m_uv_geo[no_Detector][nL+2][fLow] ){
413 if( m_uv_geo[no_Detector][nL][fLow] > m_uv_geo[no_Detector][nL+2][fLow+1] ){
414 fCur = fLow+1;
415 } else {
416 fCur = fLow;
417 }
418 } else {
419 if( m_uv_geo[no_Detector][nL][fLow] > m_uv_geo[no_Detector][nL+2][fLow-1] ){
420 fCur = fLow-1;
421 } else {
422 fCur = fLow-2;
423 }
424 }
425 fLeft = m_uv_geo[no_Detector][nL+2][fCur] + 0.2399;
426 fRight = m_uv_geo[no_Detector][nL+2][fCur+1] - 0.2401;
427 if( fLeft < fRight ){
428
429 if( fLeft > track.second.first.first - 0.5 * track.second.first.second && fLeft < track.second.first.first + 0.5 * track.second.first.second ){
430 track.second.first.first = 0.5 * ( track.second.first.first + 0.5 * track.second.first.second + fLeft );
431 track.second.first.second = 2 * ( track.second.first.first - fLeft );
432 }
433
434 if( fRight > track.second.first.first - 0.5 * track.second.first.second && fRight < track.second.first.first + 0.5 * track.second.first.second ){
435 track.second.first.first = 0.5 * ( track.second.first.first - 0.5 * track.second.first.second + fRight );
436 track.second.first.second = 2 * ( fRight - track.second.first.first );
437 }
438 }
439
440 nL += 2;
441 }
442 }
443 }
444}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ testTrack()

Bool_t ALFA_EdgeMethod::testTrack ( )
private

Definition at line 170 of file ALFA_EdgeMethod.cxx.

171{
172 ATH_MSG_DEBUG("begin ALFA_EdgeMethod::testTrack()");
173
174 return kTRUE;
175}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_bFiberHitsMD

Bool_t ALFA_EdgeMethod::m_bFiberHitsMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
private

Definition at line 84 of file ALFA_EdgeMethod.h.

◆ m_bOpt_Sisters

Bool_t ALFA_EdgeMethod::m_bOpt_Sisters
private

Definition at line 89 of file ALFA_EdgeMethod.h.

◆ m_bOpt_UseGaps

Bool_t ALFA_EdgeMethod::m_bOpt_UseGaps
private

Definition at line 90 of file ALFA_EdgeMethod.h.

◆ m_faMD

Float_t ALFA_EdgeMethod::m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
private

Definition at line 82 of file ALFA_EdgeMethod.h.

◆ m_fbMD

Float_t ALFA_EdgeMethod::m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
private

Definition at line 83 of file ALFA_EdgeMethod.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_iMultiMD

Int_t ALFA_EdgeMethod::m_iMultiMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT]
private

Definition at line 85 of file ALFA_EdgeMethod.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_uv_geo

Double_t ALFA_EdgeMethod::m_uv_geo[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
private

Definition at line 87 of file ALFA_EdgeMethod.h.


The documentation for this class was generated from the following files: