ATLAS Offline Software
Static Public Member Functions | Private Types | List of all members
SCT_ReClustering Class Reference

This performs reclustering after identifying dead or noisy channels. More...

#include <SCT_ReClustering.h>

Collaboration diagram for SCT_ReClustering:

Static Public Member Functions

static std::vector< std::vector< Identifier > > recluster (std::vector< std::vector< Identifier >> &, const SCT_ID &)
 called by SCT_ClusteringTool. More...
 

Private Types

typedef std::vector< IdentifierID_Vector
 
typedef std::vector< Identifier >::iterator Discont
 

Detailed Description

This performs reclustering after identifying dead or noisy channels.

Definition at line 22 of file SCT_ReClustering.h.

Member Typedef Documentation

◆ Discont

typedef std::vector<Identifier>::iterator SCT_ReClustering::Discont
private

Definition at line 32 of file SCT_ReClustering.h.

◆ ID_Vector

typedef std::vector<Identifier> SCT_ReClustering::ID_Vector
private

Definition at line 31 of file SCT_ReClustering.h.

Member Function Documentation

◆ recluster()

std::vector< std::vector< Identifier > > SCT_ReClustering::recluster ( std::vector< std::vector< Identifier >> &  ,
const SCT_ID  
)
static

called by SCT_ClusteringTool.

If some bad channel has broken the cluster (provided as a list of RDOs) in non-consecutive fragments, just split it.

Definition at line 24 of file SCT_ReClustering.cxx.

25  {
26 
27  /*
28  From SCT_ClusteringTool we have a matrix of identifiers - hits on
29  neighboring strips are grouped togther (vector of identifiers) and
30  these are grouped into one big vector (idGroups) for that event.
31  Most of these clusters are just single channels and are now
32  excluded if dead/noisy. In the rarer case of several neighbouring
33  channels being hit, the cluster gets split up into smaller clusters.
34  idGroups is then remade into newidGroups and the original destroyed
35  */
36  std::vector<ID_Vector> newidGroups;
37 
38  // Make a vector of iterators. These will point to any discontinuties
39  // in the vectors of identifiers
40  std::vector<Discont> discontV;
41 
42  // The vectors of identifiers are copied to new vectors of identifiers
43  // and the old ones destroyed
44  ID_Vector newvector;
45 
46  // Need one loop over the group members of idGroups
47  std::vector<ID_Vector>::iterator firstGroup = idGroups.begin();
48  std::vector<ID_Vector>::iterator lastGroup = idGroups.end();
49  for (; firstGroup != lastGroup; ++firstGroup) {
50 
51  // Need a second loop over the identifiers within each idGroups member
52  std::vector<Identifier>::iterator fst = (*firstGroup).begin();
53  std::vector<Identifier>::iterator lst = (*firstGroup).end();
55  int prev = sctID.strip(*fst);
56 
57  // ONE/3 Store an iterator pointing to 1st strip
58  discontV.clear();
59  discontV.push_back((*firstGroup).begin());
60 
61  // now look at rest of strips
62  prt = fst;
63  ++fst;
64  for (; fst != lst; ++fst) {
65  int current = sctID.strip(*fst);
66 
67  //**CHECK STRIPS ARE CONSECUTIVE**
68 
69  // TWO/3 If not store an iterator pointing either side of the
70  // discontinuity
71  if (current != prev + 1) {
72  discontV.push_back(prt);
73  discontV.push_back(fst);
74  prt = fst;
75  }
76  prev = current;
77  }
78  // THREE/3 Store an iterator pointing to last strip
79  discontV.push_back((*firstGroup).end() - 1);
80 
81  /*
82  Now we have a vector of pointers discontV to the first and last
83  member of each idGroups member and to any discontinuties within
84  */
85 
86  std::vector<Discont>::iterator fst_d = discontV.begin();
87  // NB: *fst_d refers to the element pointed to by fst_d, and that
88  // element is an iterator!
89 
90  // Copy the old vector of identifiers into however many new ones
91  // are needed. If there were no discontinutities, discontV is
92  // of size 2 so we are just making a copy
93  for (unsigned int sg = 1; sg < discontV.size(); sg += 2) {
94  newvector.clear();
95  newvector.assign(*fst_d, (*(fst_d + 1)) + 1);
96  newidGroups.push_back(newvector);
97  fst_d += 2;
98  }
99  }
100  // delete the old idGroups and return the new one
101  idGroups.clear();
102  newvector.clear();
103  return newidGroups;
104 }

The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
SCT_ReClustering::ID_Vector
std::vector< Identifier > ID_Vector
Definition: SCT_ReClustering.h:31