ATLAS Offline Software
Functions
TRT_RDO_Elements.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void set_vectors_of_collection_ids_and_size (std::vector< unsigned int > &element, std::vector< unsigned int > &nstraws, const unsigned int number_of_elements)
 

Function Documentation

◆ set_vectors_of_collection_ids_and_size()

void set_vectors_of_collection_ids_and_size ( std::vector< unsigned int > &  element,
std::vector< unsigned int > &  nstraws,
const unsigned int  number_of_elements 
)

Definition at line 1 of file TRT_RDO_Elements.h.

1  {
2 
3  // The transient model has a container holding collections (TRT detector elements/modules)
4  // and the collections hold channels (e.g. up to 24 straws in the TRT endcaps).
5  // Here we construct, for the whole detector, the ids of the collections (14912 TRT detector elements/modules)
6  // and the number of channels (straws) in each collection according to the numbering scheme in the TRT RDO container.
7  // A total 350848 straw ids can be defined using these two vectors since the id of each straw simply follows from the
8  // previous id starting from the id of the collection that contains it.
9 
10  /*
11  5120 endcap elements : 32(6*(15*1,17),7*(7*1,25),7*1,601)
12  4672 barrel elements : 64(18*1,14,23*1,9,29*1,931)
13  5120 endcap elements : 32(6*(15*1,17),7*(7*1,25),7*1,601)
14  ----
15  14912 << number_of_elements
16  ----
17  */
18 
19  element.resize(number_of_elements);
20  nstraws.resize(number_of_elements,24); // all endcap modules have 24 straws. The barrels will need a more detailed assignment.
21 
22  const unsigned int first_straw = 0x10000000u;
23  unsigned int i,j,k,n;
24  unsigned int c=0;
25 
26  n=0;
27  element[n++]=0;
28  for (i=0; i<32; i++) {
29  for (j=0; j<6; j++) { for (k=0; k<15; k++) { c++; element[n++]=c; }; c=c+17; element[n++]=c; }
30  for (j=0; j<7; j++) { for (k=0; k< 7; k++) { c++; element[n++]=c; }; c=c+25; element[n++]=c; }
31  for (j=0; j<7; j++) { c++; element[n++]=c; }; c=c+601; element[n++]=c;
32  }
33  for (i=0; i<64; i++) {
34  for (k=0; k<18; k++) { c++; element[n++]=c; }; c=c+14; element[n++]=c;
35  for (k=0; k<23; k++) { c++; element[n++]=c; }; c=c+9; element[n++]=c;
36  for (k=0; k<29; k++) { c++; element[n++]=c; }; c=c+931; element[n++]=c;
37  }
38  for (i=0; i<32; i++) {
39  for (j=0; j<6; j++) { for (k=0; k<15; k++) { c++; element[n++]=c; }; c=c+17; element[n++]=c; }
40  for (j=0; j<7; j++) { for (k=0; k< 7; k++) { c++; element[n++]=c; }; c=c+25; element[n++]=c; }
41  for (j=0; j<7; j++) { c++; element[n++]=c; }; c=c+601; if (n<number_of_elements) element[n++]=c;
42  } // the very last item in the pattern is dropped.
43 
44  // Finally convert from 22 bit to 32 bit form.
45  for (i=0; i<number_of_elements; i++) element[i] = (element[i]<<10)+first_straw;
46 
47  /*
48  5120 endcap elements : 24
49  4672 barrel elements : 64(15,4*16,5*17,5*18,3*19,18,19,5*20,5*21,5*22,5*23,2*24,2*23,4*24,5*25,5*26,5*27,5*28,4*29,28)
50  5120 endcap elements : 24
51  */
52  n=5120;
53  for (i=0; i<64; i++) {
54  nstraws[n++]=15;
55  for (j=0; j<4; j++) nstraws[n++]=16;
56  for (j=0; j<5; j++) nstraws[n++]=17;
57  for (j=0; j<5; j++) nstraws[n++]=18;
58  for (j=0; j<3; j++) nstraws[n++]=19;
59  nstraws[n++]=18; nstraws[n++]=19;
60  for (j=0; j<5; j++) nstraws[n++]=20;
61  for (j=0; j<5; j++) nstraws[n++]=21;
62  for (j=0; j<5; j++) nstraws[n++]=22;
63  for (j=0; j<5; j++) nstraws[n++]=23;
64  for (j=0; j<2; j++) nstraws[n++]=24;
65  for (j=0; j<2; j++) nstraws[n++]=23;
66  for (j=0; j<4; j++) nstraws[n++]=24;
67  for (j=0; j<5; j++) nstraws[n++]=25;
68  for (j=0; j<5; j++) nstraws[n++]=26;
69  for (j=0; j<5; j++) nstraws[n++]=27;
70  for (j=0; j<5; j++) nstraws[n++]=28;
71  for (j=0; j<4; j++) nstraws[n++]=29;
72  nstraws[n++]=28;
73  }
74 
75 /*
76  // DEBUG dump out all straw ids (32-bit representation; no information is lost)
77  unsigned int trt_strawid[350848];
78  unsigned int istraw=0;
79  for (unsigned int i=0; i<trt_number_of_collections; i++) {
80  trt_strawid[istraw++] = trt_collection_id[i];
81  for (unsigned int j=1; j<trt_collection_size[i]; j++) {
82  trt_strawid[istraw]=trt_strawid[istraw-1]+0x20u;
83  istraw++;
84  }
85  }
86  std::cout << "AJB DUMP number of straws is " << istraw << std::endl;
87  for (unsigned int k=0; k<350848; k++) std::cout << "AJB DUMP " << std::hex << trt_strawid[k] << std::endl;
88 */
89 
90 }
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
python.compressB64.c
def c
Definition: compressB64.py:93
fitman.k
k
Definition: fitman.py:528