CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
DTExpandMap Class Reference

#include <DTExpandMap.h>

Static Public Member Functions

static void expandSteering (std::ifstream &file)
 

Detailed Description

Description: Class to build full readout map from compact map

Date:
2009/03/19 12:00:00
Revision:
1.1
Author
Paolo Ronchese INFN Padova

See header file for a description of this class.

Date:
2009/03/26 14:11:04
Revision:
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 29 of file DTExpandMap.h.

Member Function Documentation

void DTExpandMap::expandSteering ( std::ifstream &  file)
static

Definition at line 83 of file DTExpandMap.cc.

References gather_cfg::cout, def, DTMapEntry::k1, DTMapEntry::k2, relval_steps::k2, DTMapEntry::k3, DTMapEntry::k4, DTMapEntry::k5, relval_steps::key, DTMapEntry::v1, DTMapEntry::v2, DTMapEntry::v3, DTMapEntry::v4, DTMapEntry::v5, and DTMapEntry::v6.

83  {
84 
85  std::vector<int> key;
86  int k1;
87  int k2;
88  int k3;
89  int k4;
90  int k5;
91  int v1;
92  int v2;
93  int v3;
94  int v4;
95  int v5;
96  int v6;
97 
98  std::vector<DTMapEntry> entryList;
99  while ( file >> k1 >> k2 >> k3 >> k4 >> k5
100  >> v1 >> v2 >> v3 >> v4 >> v5 >> v6 ) {
101  std::vector<int> key;
102  key.push_back( k1 );
103  key.push_back( k2 );
104  key.push_back( k3 );
105  key.push_back( k4 );
106  key.push_back( k5 );
107  DTMapEntry currentEntry( k1, k2, k3, k4, k5,
108  v1, v2, v3, v4, v5, v6 );
109  entryList.push_back( currentEntry );
110  }
111 
112  int ddu;
113  int ros;
114  int rch;
115  int tdc;
116  int tch;
117  int whe;
118  int sta;
119  int sec;
120  int rob;
121  int qua;
122  int lay;
123  int cel;
124  int mt1;
125  int mi1;
126  int mt2;
127  int mi2;
128  int def;
129  int wha;
130  int sea;
131  std::vector<DTMapEntry>::const_iterator iter = entryList.begin();
132  std::vector<DTMapEntry>::const_iterator iend = entryList.end();
133  std::vector<DTMapEntry>::const_iterator iros = entryList.end();
134  std::vector<DTMapEntry>::const_iterator irob = entryList.end();
135  while ( iter != iend ) {
136  const DTMapEntry& rosEntry( *iter++ );
137  if ( rosEntry.k1 > 0x3fffffff ) continue;
138  ddu = rosEntry.k1;
139  ros = rosEntry.k2;
140  whe = rosEntry.v1;
141  def = rosEntry.v2;
142  sec = rosEntry.v3;
143  rob = rosEntry.v4;
144  mt1 = rosEntry.v5;
145  mi1 = rosEntry.v6;
146  iros = entryList.begin();
147  while ( iros != iend ) {
148  wha = whe;
149  sea = sec;
150  const DTMapEntry& rchEntry( *iros++ );
151  if ( ( rchEntry.k1 != mt1 ) ||
152  ( rchEntry.k2 != mi1 ) ) continue;
153  rch = rchEntry.k3;
154  if ( rchEntry.v1 != def ) wha = rchEntry.v1;
155  sta = rchEntry.v2;
156  if ( rchEntry.v3 != def ) sea = rchEntry.v3;
157  rob = rchEntry.v4;
158  mt2 = rchEntry.v5;
159  mi2 = rchEntry.v6;
160  irob = entryList.begin();
161  while ( irob != iend ) {
162  const DTMapEntry& robEntry( *irob++ );
163  if ( ( robEntry.k1 != mt2 ) ||
164  ( robEntry.k2 != mi2 ) ) continue;
165  if ( robEntry.k3 != rob ) {
166  std::cout << "ROB mismatch " << rob << " "
167  << robEntry.k3 << std::endl;
168  }
169  tdc = robEntry.k4;
170  tch = robEntry.k5;
171  qua = robEntry.v4;
172  lay = robEntry.v5;
173  cel = robEntry.v6;
174  std::cout << ddu << " "
175  << ros << " "
176  << rch << " "
177  << tdc << " "
178  << tch << " "
179  << wha << " "
180  << sta << " "
181  << sea << " "
182  << qua << " "
183  << lay << " "
184  << cel << std::endl;
185  }
186  }
187  }
188 
189  return;
190 
191 }
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
tuple cout
Definition: gather_cfg.py:121
JetCorrectorParameters::Definitions def
Definition: classes.h:6