ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
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. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

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. More...
 

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. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

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 }

◆ ~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 276 of file ALFA_EdgeMethod.cxx.

277 {
278  ATH_MSG_DEBUG("begin ALFA_EdgeMethod::EdgeMethod()");
279 
280  if(!iterationOne(no_Detector, tracks )) return kFALSE;
281  if(!iterationNext(no_Detector, tracks )) return kFALSE;
282  if(!iterationNext(no_Detector, tracks )) return kFALSE;
283 
284  for(UInt_t i = 0; i < tracks.size(); i++){
285  for(UInt_t j = i+1; j < tracks.size(); j++){
286  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 ){
287  tracks.erase( tracks.begin() + j );
288  j--;
289  }
290  }
291  }
292 
293  ATH_MSG_DEBUG("end ALFA_EdgeMethod::EdgeMethod()");
294  return kTRUE;
295 }

◆ 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.empty() ){
150  for(UInt_t i = 0; i < corridors.size()-1; i++){
151  if( std::abs( corridors.at(i).first.first - corridors.at(i+1).first.first ) < 0.480){
152  if( corridors.at(i).second > corridors.at(i+1).second ){
153  corridors.erase(corridors.begin()+i+1);
154  i--;
155  } else if ( corridors.at(i).second < corridors.at(i+1).second ){
156  corridors.erase(corridors.begin()+i);
157  i--;
158  }
159  }
160  }
161  }
162 
163 }

◆ 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 }

◆ 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 }

◆ 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  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ iterationNext()

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

Definition at line 253 of file ALFA_EdgeMethod.cxx.

254 {
255  ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterationNext()");
256 
257  Corridor corr_U;
258  Corridor corr_V;
259  Bool_t rem;
260 
261  for(UInt_t i = 0; i < tracks.size(); i++){
262  readUVONE(no_Detector, tracks.at(i).first.first.first, tracks.at(i).second.first.first );
263  rem = iterNext(no_Detector, 0, tracks.at(i).first.first.first, tracks.at(i).first.second, corr_U) && iterNext(no_Detector, 1, tracks.at(i).second.first.first, tracks.at(i).second.second, corr_V);
264  if( rem && testTrack(/*corr_U, corr_V*/) ){
265  tracks.at(i) = make_pair( corr_U, corr_V );
266  } else {
267  tracks.erase(tracks.begin()+i);
268  i--;
269  }
270  }
271 
272  if( tracks.empty() ) return kFALSE;
273  return kTRUE;
274 }

◆ iterationOne()

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

Definition at line 207 of file ALFA_EdgeMethod.cxx.

208 {
209  ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterationOne()");
210 
211  tracks.clear();
212  readUVONE(no_Detector);
213 
214  std::vector< Corridor > corr_U;
215  std::vector< Corridor > corr_V;
216  if( !iterOne(no_Detector, 0, corr_U) || !iterOne(no_Detector, 1, corr_V) ) return kFALSE;
217 
218  for(auto & i : corr_U){
219  for(auto & j : corr_V){
220  if( testTrack( /*corr_U.at(i), corr_V.at(j)*/ ) ){
221  tracks.emplace_back( i, j );
222  }
223  }
224  }
225 
226  if( tracks.empty() ) return kFALSE;
227  sort( tracks.begin(), tracks.end(), functionSortTracks );
228  if( tracks.size() > 10 ){
229  tracks.resize(10);
230  }
231  return kTRUE;
232 }

◆ 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 234 of file ALFA_EdgeMethod.cxx.

235 {
236  ATH_MSG_DEBUG("begin ALFA_EdgeMethod::iterNext()");
237 
238  std::vector< Edge > edges;
239  findEdges( no_Detector, no_Orient, edges);
240  sort( edges.begin(), edges.end(), functionSortEdges );
241 
242  std::vector< Corridor > corridors;
243  findCorridors(edges, corridors);
244  if( corridors.empty() ) return kFALSE;
245 
246  sort( corridors.begin(), corridors.end(), CSortCorrsNext(pos));
247  if( std::abs( pos - corridors.front().first.first ) > 0.480 || std::abs( level - (Int_t)corridors.front().second ) > 1 ) return kFALSE;
248 
249  corr = corridors.front();
250  return kTRUE;
251 }

◆ iterOne()

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

Definition at line 172 of file ALFA_EdgeMethod.cxx.

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

◆ 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 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ 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 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ 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_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ 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 442 of file ALFA_EdgeMethod.cxx.

443 {
444  ATH_MSG_DEBUG("begin ALFA_EdgeMethod::readUVONE()");
445 
446  for(Int_t no_Layer=0; no_Layer<20; no_Layer++){
447  if(m_faMD[no_Detector][no_Layer][0]<0){
448  for(Int_t no_Fiber=0; no_Fiber<64; no_Fiber++){
449  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]);
450  }
451  } else {
452  for(Int_t no_Fiber=0; no_Fiber<64; no_Fiber++){
453  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]);
454  }
455  }
456  }
457 }

◆ selectedFibers()

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

Definition at line 298 of file ALFA_EdgeMethod.cxx.

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

◆ 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 165 of file ALFA_EdgeMethod.cxx.

166 {
167  ATH_MSG_DEBUG("begin ALFA_EdgeMethod::testTrack()");
168 
169  return kTRUE;
170 }

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.

◆ 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.

◆ 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:
ALFA_EdgeMethod::findEdges
void findEdges(UInt_t no_Detector, UInt_t no_Orient, std::vector< Edge > &edges)
Definition: ALFA_EdgeMethod.cxx:76
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
max
#define max(a, b)
Definition: cfImp.cxx:41
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
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
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
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
ALFA_EdgeMethod::m_fbMD
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_EdgeMethod.h:83
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
lumiFormat.i
int i
Definition: lumiFormat.py:85
ALFA_EdgeMethod::m_uv_geo
Double_t m_uv_geo[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_EdgeMethod.h:87
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ALFA_EdgeMethod::iterOne
Bool_t iterOne(UInt_t no_Detector, UInt_t no_Orient, std::vector< Corridor > &corridors)
Definition: ALFA_EdgeMethod.cxx:172
ALFALAYERSCNT
#define ALFALAYERSCNT
Definition: ALFA_constants.h:8
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
WriteCellNoiseToCool.nF
nF
Definition: WriteCellNoiseToCool.py:541
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
ALFA_EdgeMethod::ALFA_EdgeMethod
ALFA_EdgeMethod()
Definition: ALFA_EdgeMethod.cxx:10
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::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
ALFA_EdgeMethod::m_iMultiMD
Int_t m_iMultiMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT]
Definition: ALFA_EdgeMethod.h:85
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
ALFA_EdgeMethod::functionSortEdges
static Bool_t functionSortEdges(Edge edg1, Edge edg2)
Definition: ALFA_EdgeMethod.cxx:61
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
ALFA_EdgeMethod::findCorridors
void findCorridors(std::vector< Edge > &edges, std::vector< Corridor > &corridors)
Definition: ALFA_EdgeMethod.cxx:101
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
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