CMS 3D CMS Logo

MuonDTLocalMillepedeAlgorithm.cc
Go to the documentation of this file.
1 #include <fstream>
2 
3 #include "TFile.h"
4 #include "TTree.h"
5 #include "TKey.h"
6 #include "TMatrixD.h"
7 #include "TF1.h"
8 
9 
12 
13 
18 
19 
22 
35 
38 
39 // Constructor ----------------------------------------------------------------
40 
43 {
44 
45  edm::LogInfo("Alignment") << "[MuonDTLocalMillepedeAlgorithm] constructed.";
46 
47  //Parse parameters. In the future this section should be completed with more options
48  ntuplePath = cfg.getParameter<std::string>( "ntuplePath" );
49  numberOfRootFiles = cfg.getParameter<int>( "numberOfRootFiles" );
50  ptMax = cfg.getParameter<double>( "ptMax" );
51  ptMin = cfg.getParameter<double>( "ptMin" );
52  numberOfSigmasX = cfg.getParameter<double>( "numberOfSigmasX" );
53  numberOfSigmasDXDZ = cfg.getParameter<double>( "numberOfSigmasDXDZ" );
54  numberOfSigmasY = cfg.getParameter<double>( "numberOfSigmasY" );
55  numberOfSigmasDYDZ = cfg.getParameter<double>( "numberOfSigmasDYDZ" );
56  nPhihits = cfg.getParameter<double>( "nPhihits" );
57  nThetahits = cfg.getParameter<double>( "nThetahits" );
58  workingmode = cfg.getParameter<int>( "workingMode" );
59  nMtxSection = cfg.getParameter<int>( "nMtxSection" );
60 
61 
62  //The algorithm has three working modes:
63  //0.- aligment information is extracted from the events and stored in root files
64  //1.- The SLtoSl algorithm
65  //2.- The local MuonMillepede algorithm
66  if(workingmode == 0) {
67  edm::LogInfo("Alignment") << "[MuonDTLocalMillepedeAlgorithm] Running on production mode.";
68  char nameOfFile[200];
69  snprintf(nameOfFile, sizeof(nameOfFile), "%s/MyNtupleResidual.root", ntuplePath.c_str());
70  f = new TFile(nameOfFile, "RECREATE");
71  f->cd();
73  } else if (workingmode == 1) {
74  edm::LogInfo("Alignment") << "[MuonDTLocalMillepedeAlgorithm] Running SLToSL algorithm.";
75  } else {
76  edm::LogInfo("Alignment") << "[MuonDTLocalMillepedeAlgorithm] Running Local Millepede algorithm.";
77  }
78 
79 }
80 
81 
82 
83 
84 // Call at beginning of job ---------------------------------------------------
85 void
89 {
90 
91  // accessor Det->AlignableDet
92  if ( !muon )
94  else if ( !tracker )
96  else
98 
99  // set alignmentParameterStore
101 
102  // get alignables
104 
105 }
106 
107 
108 
109 // Call at end of job ---------------------------------------------------------
111 {
112 
113  //If workingmode equals 1 or 2, the algorithms are run before saving.
114  if(workingmode == 1) {
115  edm::LogInfo("Alignment") << "[MuonDTLocalMillepedeAlgorithm] Starting SLToSL algorithm";
117  } else if(workingmode >= 2) {
118  edm::LogInfo("Alignment") << "[MuonDTLocalMillepedeAlgorithm] Starting local MuonMillepede algorithm";
120  }
121 
122  if (workingmode==0) {
123  f->Write();
124  f->Close();
125  }
126 
127 }
128 
129 
130 
131 // Run the algorithm on trajectories and tracks -------------------------------
133 //void MuonDTLocalMillepedeAlgorithm::run( const edm::EventSetup& setup, const ConstTrajTrackPairCollection& tracks)
134 {
135 
136  //Only important in the production mode
137  if(workingmode != 0) return;
138 
139  const ConstTrajTrackPairCollection &tracks = eventInfo.trajTrackPairs();
140  for( ConstTrajTrackPairCollection::const_iterator it=tracks.begin();
141  it!=tracks.end();it++) {
142 
143  const Trajectory *traj = (*it).first;
144  const reco::Track *track = (*it).second;
145 
146  p = track->p();
147  pt = track->pt();
148  eta = track->eta();
149  phi = track->phi();
150  charge = track->charge();
151 
152 
153  if(pt < ptMin || pt > ptMax) continue;
154 
155  vector<const TransientTrackingRecHit*> hitvec;
156  vector<TrajectoryMeasurement> measurements = traj->measurements();
157 
158  //In this loop the measurements and hits are extracted and put into two vectors
159  int ch_muons = 0;
160  for (vector<TrajectoryMeasurement>::iterator im=measurements.begin();
161  im!=measurements.end(); im++) {
162  TrajectoryMeasurement meas = *im;
163  const TransientTrackingRecHit* hit = &(*meas.recHit());
164  //We are not very strict at this point
165  if (hit->isValid()) {
166  if(hit->det()->geographicalId().det() == 2 && hit->det()->geographicalId().subdetId() == 1) {
167  hitvec.push_back(hit);
168  ch_muons++;
169  }
170  }
171  }
172 
173 
174  vector<const TransientTrackingRecHit*>::const_iterator ihit=hitvec.begin();
175  //Information is stored temporally in the myTrack1D object, which is analyzed
176  //in the build4DSegments method in order to associate hits to segments.
177  int ch_counter = 0;
178  while (ihit != hitvec.end())
179  {
180  const GeomDet* det=(*ihit)->det();
181  if(det->geographicalId().det() == 2) {
182  if(det->geographicalId().subdetId() == 1) {
183  DTLayerId mLayer(det->geographicalId().rawId());
184  DTChamberId mChamber(mLayer.wheel(), mLayer.station(), mLayer.sector());
185  AlignableDet *aliDet = theAlignableDetAccessor->alignableDetFromDetId(mChamber);
186  myTrack1D.wh[ch_counter] = mLayer.wheel();
187  myTrack1D.st[ch_counter] = mLayer.station();
188  myTrack1D.sr[ch_counter] = mLayer.sector();
189  myTrack1D.sl[ch_counter] = mLayer.superlayer();
190  myTrack1D.la[ch_counter] = mLayer.layer();
191  myTrack1D.erx[ch_counter] = (*ihit)->localPositionError().xx();
192  align::GlobalPoint globhit = det->toGlobal((*ihit)->localPosition());
193  align::LocalPoint seghit = aliDet->surface().toLocal(globhit);
194  myTrack1D.xc[ch_counter] = seghit.x();
195  myTrack1D.yc[ch_counter] = seghit.y();
196  myTrack1D.zc[ch_counter] = seghit.z();
197  ch_counter++;
198  }
199  }
200  ihit++;
201  }
202  myTrack1D.nhits = ch_counter;
203  if(build4DSegments()) ttreeOutput->Fill();
204  }
205 
206 }
207 
208 
209 
210 //This method separates the hits depending on the chamber and builds the 4D segments
211 //through linear fits.
212 //It returns true if 4Dsegments were correctly built and false otherwise.
213 //--------------------------------------------------------------------------------------------------------------
215 
216  bool saveThis = false;
217 
218  //Set to 0
219  int id[20][5];
220  int numlayer[20][12];
221  for(int s = 0; s < 20; ++s) {
222  for(int k = 0; k < 5; ++k) id[s][k] = 0;
223  for(int k = 0; k < 12; ++k) numlayer[s][k] = 0;
224  }
225 
226 
227  int nChambers = 0;
228  for(int counter = 0; counter < myTrack1D.nhits; ++counter) {
229  bool isNew = true;
230  for(int counterCham = 0; counterCham < nChambers; counterCham++) {
231  if(myTrack1D.wh[counter] == id[counterCham][0] &&
232  myTrack1D.st[counter] == id[counterCham][1] &&
233  myTrack1D.sr[counter] == id[counterCham][2]) {
234  if(myTrack1D.sl[counter] == 2) {
235  id[counterCham][4]++;
236  } else {
237  id[counterCham][3]++;
238  }
239  for (int ila = 1; ila<=4; ila++)
240  if (myTrack1D.la[counter]==ila) {
241  int jla = (myTrack1D.sl[counter]-1)*4 + ila -1;
242  numlayer[counterCham][jla]++;
243  }
244  isNew = false;
245  }
246  }
247  if(isNew) {
248  id[nChambers][0] = myTrack1D.wh[counter];
249  id[nChambers][1] = myTrack1D.st[counter];
250  id[nChambers][2] = myTrack1D.sr[counter];
251  if(myTrack1D.sl[counter] == 2) {
252  id[nChambers][4]++;
253  } else {
254  id[nChambers][3]++;
255  }
256  for (int ila = 1; ila<=4; ila++)
257  if (myTrack1D.la[counter]==ila) {
258  int jla = (myTrack1D.sl[counter]-1)*4 + ila -1;
259  numlayer[nChambers][jla]++;
260  }
261  nChambers++;
262  }
263  }
264 
265  for (int iseg = 0; iseg<MAX_SEGMENT; iseg++)
266  for (int ihit = 0; ihit<MAX_HIT_CHAM; ihit++) {
267  xc[iseg][ihit] = -250.;
268  yc[iseg][ihit] = -250.;
269  zc[iseg][ihit] = -250.;
270  ex[iseg][ihit] = -250.;
271  xcp[iseg][ihit] = -250.;
272  ycp[iseg][ihit] = -250.;
273  excp[iseg][ihit] = -250.;
274  eycp[iseg][ihit] = -250.;
275  sl[iseg][ihit] = 0;
276  la[iseg][ihit] = 0;
277  }
278 
279  nseg = 0;
280  for(int counter = 0; counter < nChambers; ++counter) {
281 
282  bool GoodPhiChamber = true, GoodThetaChamber = true;
283  for (int ila = 1; ila<=12; ila++) {
284  if (numlayer[counter][ila-1]!=1 && (ila<5 || ila>8)) GoodPhiChamber = false;
285  if (numlayer[counter][ila-1]!=1 && (ila<9 || ila>4) && id[counter][1]!=4) GoodThetaChamber = false;
286  }
287 
288  if(id[counter][3] >= nPhihits && (id[counter][4] >= nThetahits || id[counter][1] == 4) &&
289  GoodPhiChamber && GoodThetaChamber) {
290 
291  TMatrixD phiProjection(2,2);
292  TMatrixD thetaProjection(2,2);
293  TMatrixD bphiProjection(2,1);
294  TMatrixD bthetaProjection(2,1);
295 
296  TMatrixD phiProjectionSL1(2,2);
297  TMatrixD bphiProjectionSL1(2,1);
298  TMatrixD phiProjectionSL3(2,2);
299  TMatrixD bphiProjectionSL3(2,1);
300 
301  float SL1_z_ave = 0;
302  float SL3_z_ave = 0;
303 
304  int numh1 = 0, numh2 = 0, numh3 = 0;
305  for(int counterH = 0; counterH < myTrack1D.nhits; ++counterH) {
306  if(myTrack1D.wh[counterH] == id[counter][0] && myTrack1D.st[counterH] == id[counter][1] &&
307  myTrack1D.sr[counterH] == id[counter][2]) {
308  if(myTrack1D.sl[counterH] == 2) {
309  numh2++;
310  thetaProjection(0,0) += 1.0/myTrack1D.erx[counterH];
311  thetaProjection(0,1) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
312  thetaProjection(1,0) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
313  thetaProjection(1,1) += myTrack1D.zc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
314  bthetaProjection(0,0) += myTrack1D.yc[counterH]/myTrack1D.erx[counterH];
315  bthetaProjection(1,0) += myTrack1D.yc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
316  } else {
317  phiProjection(0,0) += 1.0/myTrack1D.erx[counterH];
318  phiProjection(0,1) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
319  phiProjection(1,0) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
320  phiProjection(1,1) += myTrack1D.zc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
321  bphiProjection(0,0) += myTrack1D.xc[counterH]/myTrack1D.erx[counterH];
322  bphiProjection(1,0) += myTrack1D.xc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
323  if(myTrack1D.sl[counterH] == 1) {
324  numh1++;
325  phiProjectionSL1(0,0) += 1.0/myTrack1D.erx[counterH];
326  phiProjectionSL1(0,1) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
327  phiProjectionSL1(1,0) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
328  phiProjectionSL1(1,1) += myTrack1D.zc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
329  bphiProjectionSL1(0,0) += myTrack1D.xc[counterH]/myTrack1D.erx[counterH];
330  bphiProjectionSL1(1,0) += myTrack1D.xc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
331  SL1_z_ave += myTrack1D.zc[counterH];
332  } else {
333  numh3++;
334  phiProjectionSL3(0,0) += 1.0/myTrack1D.erx[counterH];
335  phiProjectionSL3(0,1) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
336  phiProjectionSL3(1,0) += myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
337  phiProjectionSL3(1,1) += myTrack1D.zc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
338  bphiProjectionSL3(0,0) += myTrack1D.xc[counterH]/myTrack1D.erx[counterH];
339  bphiProjectionSL3(1,0) += myTrack1D.xc[counterH]*myTrack1D.zc[counterH]/myTrack1D.erx[counterH];
340  SL3_z_ave += myTrack1D.zc[counterH];
341  }
342  }
343  }
344  }
345 
346  SL1_z_ave /= 4.0;
347  SL3_z_ave /= 4.0;
348 
349  if (phiProjection(0,0) != 0 && phiProjectionSL1(0,0) != 0 && phiProjectionSL3(0,0) != 0 &&
350  (thetaProjection(0,0) != 0 || id[counter][1] == 4)) {
351 
352  wh[nseg] = id[counter][0];
353  st[nseg] = id[counter][1];
354  sr[nseg] = id[counter][2];
355 
356  if(thetaProjection(0,0) != 0 && id[counter][1] != 4) { // Already asked (almost)
357  thetaProjection.Invert();
358  TMatrixD solution = thetaProjection*bthetaProjection;
359  ySl[nseg] = solution(0,0);
360  dydzSl[nseg] = solution(1,0);
361  eySl[nseg] = thetaProjection(0,0);
362  edydzSl[nseg] = thetaProjection(1,1);
363  eydydzSl[nseg] = thetaProjection(0,1);
364  }
365  phiProjection.Invert();
366  phiProjectionSL1.Invert();
367  phiProjectionSL3.Invert();
368  TMatrixD solution = phiProjection*bphiProjection;
369  TMatrixD solutionSL1 = phiProjectionSL1*bphiProjectionSL1;
370  TMatrixD solutionSL3 = phiProjectionSL3*bphiProjectionSL3;
371  xSl[nseg] = solution(0,0);
372  dxdzSl[nseg] = solution(1,0);
373  exSl[nseg] = phiProjection(0,0);
374  edxdzSl[nseg] = phiProjection(1,1);
375  exdxdzSl[nseg] = phiProjection(0,0);
376  xSlSL1[nseg] = solutionSL1(0,0);
377  dxdzSlSL1[nseg] = solutionSL1(1,0);
378  exSlSL1[nseg] = phiProjectionSL1(0,0);
379  edxdzSlSL1[nseg] = phiProjectionSL1(1,1);
380  exdxdzSlSL1[nseg] = phiProjectionSL1(0,0);
381  xSL1SL3[nseg] = solutionSL1(0,0) + SL3_z_ave * solutionSL1(1,0);
382  xSlSL3[nseg] = solutionSL3(0,0);
383  dxdzSlSL3[nseg] = solutionSL3(1,0);
384  exSlSL3[nseg] = phiProjectionSL3(0,0);
385  edxdzSlSL3[nseg] = phiProjectionSL3(1,1);
386  exdxdzSlSL3[nseg] = phiProjectionSL3(0,0);
387  xSL3SL1[nseg] = solutionSL3(0,0) + SL1_z_ave * solutionSL3(1,0);
388  int hitcounter = 0;
389  for(int counterH = 0; counterH < myTrack1D.nhits; ++counterH) {
390  if(myTrack1D.wh[counterH] == wh[nseg] && myTrack1D.st[counterH] == st[nseg] &&
391  myTrack1D.sr[counterH] == sr[nseg]) {
392  xc[nseg][hitcounter] = myTrack1D.xc[counterH];
393  yc[nseg][hitcounter] = myTrack1D.yc[counterH];
394  zc[nseg][hitcounter] = myTrack1D.zc[counterH];
395  ex[nseg][hitcounter] = myTrack1D.erx[counterH];
396  xcp[nseg][hitcounter] = xSl[nseg]+dxdzSl[nseg]*myTrack1D.zc[counterH];
397  ycp[nseg][hitcounter] = ySl[nseg]+dydzSl[nseg]*myTrack1D.zc[counterH];
398  excp[nseg][hitcounter] = exSl[nseg]*exSl[nseg]+ (edxdzSl[nseg]*edxdzSl[nseg])*myTrack1D.zc[counterH];
399  eycp[nseg][hitcounter] = eySl[nseg]*eySl[nseg]+ (edydzSl[nseg]*edydzSl[nseg])*myTrack1D.zc[counterH];
400  sl[nseg][hitcounter] = myTrack1D.sl[counterH];
401  la[nseg][hitcounter] = myTrack1D.la[counterH];
402  saveThis = true;
403  hitcounter++;
404  }
405  }
406  nphihits[nseg] = id[counter][3];
407  nthetahits[nseg] = id[counter][4];
408  nhits[nseg] = hitcounter;
409  nseg++;
410  }
411  }
412  }
413  return saveThis;
414 }
415 
416 
417 
418 //The tree structure is defined and the variables associated ---------------------------------
420 
421  ttreeOutput = new TTree("InfoTuple", "InfoTuple");
422 
423  ttreeOutput->Branch("p", &p, "p/F");
424  ttreeOutput->Branch("pt", &pt, "pt/F");
425  ttreeOutput->Branch("eta", &eta, "eta/F");
426  ttreeOutput->Branch("phi", &phi, "phi/F");
427  ttreeOutput->Branch("charge", &charge, "charge/F");
428  ttreeOutput->Branch("nseg", &nseg, "nseg/I");
429  ttreeOutput->Branch("nphihits", nphihits, "nphihits[nseg]/I");
430  ttreeOutput->Branch("nthetahits", nthetahits, "nthetahits[nseg]/I");
431  ttreeOutput->Branch("nhits", nhits, "nhits[nseg]/I");
432  ttreeOutput->Branch("xSl", xSl, "xSl[nseg]/F");
433  ttreeOutput->Branch("dxdzSl", dxdzSl, "dxdzSl[nseg]/F");
434  ttreeOutput->Branch("exSl", exSl, "exSl[nseg]/F");
435  ttreeOutput->Branch("edxdzSl", edxdzSl, "edxdzSl[nseg]/F");
436  ttreeOutput->Branch("exdxdzSl", edxdzSl, "exdxdzSl[nseg]/F");
437  ttreeOutput->Branch("ySl", ySl, "ySl[nseg]/F");
438  ttreeOutput->Branch("dydzSl", dydzSl, "dydzSl[nseg]/F");
439  ttreeOutput->Branch("eySl", eySl, "eySl[nseg]/F");
440  ttreeOutput->Branch("edydzSl", edydzSl, "edydzSl[nseg]/F");
441  ttreeOutput->Branch("eydydzSl", eydydzSl, "eydydzSl[nseg]/F");
442  ttreeOutput->Branch("xSlSL1", xSlSL1, "xSlSL1[nseg]/F");
443  ttreeOutput->Branch("dxdzSlSL1", dxdzSlSL1, "dxdzSlSL1[nseg]/F");
444  ttreeOutput->Branch("exSlSL1", exSlSL1, "exSlSL1[nseg]/F");
445  ttreeOutput->Branch("edxdzSlSL1", edxdzSlSL1, "edxdzSlSL1[nseg]/F");
446  ttreeOutput->Branch("xSL1SL3", xSL1SL3, "xSL1SL3[nseg]/F");
447  ttreeOutput->Branch("xSlSL3", xSlSL3, "xSlSL3[nseg]/F");
448  ttreeOutput->Branch("dxdzSlSL3", dxdzSlSL3, "dxdzSlSL3[nseg]/F");
449  ttreeOutput->Branch("exSlSL3", exSlSL3, "exSlSL3[nseg]/F");
450  ttreeOutput->Branch("edxdzSlSL3", edxdzSlSL3, "edxdzSlSL3[nseg]/F");
451  ttreeOutput->Branch("xSL3SL1", xSL3SL1, "xSL3SL1[nseg]/F");
452  ttreeOutput->Branch("xc", xc, "xc[nseg][14]/F");
453  ttreeOutput->Branch("yc", yc, "yc[nseg][14]/F");
454  ttreeOutput->Branch("zc", zc, "zc[nseg][14]/F");
455  ttreeOutput->Branch("ex", ex, "ex[nseg][14]/F");
456  ttreeOutput->Branch("xcp", xcp, "xcp[nseg][14]/F");
457  ttreeOutput->Branch("ycp", ycp, "ycp[nseg][14]/F");
458  ttreeOutput->Branch("excp", excp, "excp[nseg][14]/F");
459  ttreeOutput->Branch("eycp", eycp, "eycp[nseg][14]/F");
460  ttreeOutput->Branch("wh", wh, "wh[nseg]/I");
461  ttreeOutput->Branch("st", st, "st[nseg]/I");
462  ttreeOutput->Branch("sr", sr, "sr[nseg]/I");
463  ttreeOutput->Branch("sl", sl, "sl[nseg][14]/I");
464  ttreeOutput->Branch("la", la, "la[nseg][14]/I");
465 
466 }
467 
468 
470 
TrajectoryStateCombiner.h
MuonDTLocalMillepedeAlgorithm::Info1D::st
int st[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:69
MuonDTLocalMillepedeAlgorithm::xSL1SL3
float xSL1SL3[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:98
counter
Definition: counter.py:1
MuonDTLocalMillepedeAlgorithm::Info1D::la
int la[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:70
MuonDTLocalMillepedeAlgorithm::f
TFile * f
Definition: MuonDTLocalMillepedeAlgorithm.h:122
MuonDTLocalMillepedeAlgorithm
Definition: MuonDTLocalMillepedeAlgorithm.h:30
MuonDTLocalMillepedeAlgorithm::phi
float phi
Definition: MuonDTLocalMillepedeAlgorithm.h:78
AlignmentAlgorithmBase::ConstTrajTrackPairCollection
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
Definition: AlignmentAlgorithmBase.h:67
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
MuonDTLocalMillepedeAlgorithm::Info1D::nhits
int nhits
Definition: MuonDTLocalMillepedeAlgorithm.h:66
MuonDTLocalMillepedeAlgorithm::theAlignableDetAccessor
AlignableNavigator * theAlignableDetAccessor
Definition: MuonDTLocalMillepedeAlgorithm.h:129
MessageLogger.h
GeomDet
Definition: GeomDet.h:27
AlignmentParameterStore::alignables
const align::Alignables & alignables(void) const
get all alignables
Definition: AlignmentParameterStore.h:47
MuonDTLocalMillepedeAlgorithm::workingmode
int workingmode
Definition: MuonDTLocalMillepedeAlgorithm.h:141
muon
Definition: MuonCocktails.h:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
AlignmentParameterSelector.h
MuonDTLocalMillepedeAlgorithm::pt
float pt
Definition: MuonDTLocalMillepedeAlgorithm.h:78
MuonDTLocalMillepedeAlgorithm::xcp
float xcp[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:109
MAX_SEGMENT
#define MAX_SEGMENT
Definition: DTMuonLocalAlignment.h:15
MuonDTLocalMillepedeAlgorithm::terminate
void terminate(void)
Call at end of job.
Definition: MuonDTLocalMillepedeAlgorithm.cc:110
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
MuonDTLocalMillepedeAlgorithm::eySl
float eySl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:90
MuonDTLocalMillepedeAlgorithm::sr
int sr[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:113
MuonDTLocalMillepedeAlgorithm::nThetahits
float nThetahits
Definition: MuonDTLocalMillepedeAlgorithm.h:140
MuonDTLocalMillepedeAlgorithm::la
int la[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:115
MuonDTLocalMillepedeAlgorithm::initialize
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignmentParameterStore *store)
Call at beginning of job.
Definition: MuonDTLocalMillepedeAlgorithm.cc:86
MuonDTLocalMillepedeAlgorithm::exSlSL1
float exSlSL1[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:95
AlignableDet.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
AlignmentAlgorithmPluginFactory.h
MuonDTLocalMillepedeAlgorithm::Info1D::sl
int sl[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:70
DTMuonSLToSL
Definition: DTMuonSLToSL.h:18
AlignmentAlgorithmBase
Definition: AlignmentAlgorithmBase.h:59
MuonDTLocalMillepedeAlgorithm::setBranchTrees
void setBranchTrees()
Definition: MuonDTLocalMillepedeAlgorithm.cc:419
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MuonDTLocalMillepedeAlgorithm::MuonDTLocalMillepedeAlgorithm
MuonDTLocalMillepedeAlgorithm(const edm::ParameterSet &cfg)
Constructor.
Definition: MuonDTLocalMillepedeAlgorithm.cc:41
MuonDTLocalMillepedeAlgorithm::xSl
float xSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:83
MuonDTLocalMillepedeAlgorithm::Info1D::wh
int wh[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:69
MuonDTLocalMillepedeAlgorithm::ptMin
float ptMin
Definition: MuonDTLocalMillepedeAlgorithm.h:138
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
AlignmentParameters.h
MuonDTLocalMillepedeAlgorithm::dxdzSlSL1
float dxdzSlSL1[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:94
AlignableDet
Definition: AlignableDet.h:8
MakerMacros.h
MuonDTLocalMillepedeAlgorithm::xSlSL1
float xSlSL1[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:93
alignCSCRings.s
s
Definition: alignCSCRings.py:92
MuonDTLocalMillepedeAlgorithm::Info1D::zc
float zc[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:67
MuonDTLocalMillepedeAlgorithm::edxdzSlSL1
float edxdzSlSL1[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:96
Track.h
MuonDTLocalMillepedeAlgorithm.h
MuonDTLocalMillepedeAlgorithm::exSlSL3
float exSlSL3[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:101
MuonDTLocalMillepedeAlgorithm::ex
float ex[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:108
LocalError.h
MuonDTLocalMillepedeAlgorithm::nhits
int nhits[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:82
MuonDTLocalMillepedeAlgorithm::sl
int sl[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:114
MuonDTLocalMillepedeAlgorithm::numberOfSigmasX
float numberOfSigmasX
Definition: MuonDTLocalMillepedeAlgorithm.h:147
MuonDTLocalMillepedeAlgorithm::exSl
float exSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:85
reco::Track
Definition: Track.h:27
MuonDTLocalMillepedeAlgorithm::exdxdzSl
float exdxdzSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:87
AlignableTracker
Definition: AlignableTracker.h:17
MuonDTLocalMillepedeAlgorithm::theAlignables
align::Alignables theAlignables
Definition: MuonDTLocalMillepedeAlgorithm.h:128
MuonDTLocalMillepedeAlgorithm::zc
float zc[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:107
dqmdumpme.k
k
Definition: dqmdumpme.py:60
MuonDTLocalMillepedeAlgorithm::exdxdzSlSL3
float exdxdzSlSL3[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:103
Point3DBase< Scalar, GlobalTag >
MuonDTLocalMillepedeAlgorithm::wh
int wh[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:113
AlignableNavigator.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
AlignableNavigator
Definition: AlignableNavigator.h:25
DTLayerId
Definition: DTLayerId.h:12
AlignmentParameterStore.h
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonDTLocalMillepedeAlgorithm::dxdzSl
float dxdzSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:84
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
MuonDTLocalMillepedeAlgorithm::eydydzSl
float eydydzSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:92
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
SurveyResidual.h
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
edm::ParameterSet
Definition: ParameterSet.h:47
MuonDTLocalMillepedeAlgorithm::nthetahits
int nthetahits[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:81
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
MuonDTLocalMillepedeAlgorithm::xc
float xc[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:105
AlignableMuon.h
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
MuonDTLocalMillepedeAlgorithm::nPhihits
float nPhihits
Definition: MuonDTLocalMillepedeAlgorithm.h:139
MuonDTLocalMillepedeAlgorithm::Info1D::sr
int sr[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:69
counter
static std::atomic< unsigned int > counter
Definition: SharedResourceNames.cc:18
edm::EventSetup
Definition: EventSetup.h:58
MuonDTLocalMillepedeAlgorithm::myTrack1D
Info1D myTrack1D
Definition: MuonDTLocalMillepedeAlgorithm.h:73
MuonDTLocalMillepedeAlgorithm::xSL3SL1
float xSL3SL1[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:104
MuonDTLocalMillepedeAlgorithm::xSlSL3
float xSlSL3[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:99
MuonDTLocalMillepedeAlgorithm::Info1D::yc
float yc[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:67
DTMuonMillepede.cc
MAX_HIT_CHAM
#define MAX_HIT_CHAM
Definition: DTMuonLocalAlignment.h:16
MuonDTLocalMillepedeAlgorithm::dxdzSlSL3
float dxdzSlSL3[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:100
DTMuonSLToSL.cc
Trajectory::measurements
DataContainer const & measurements() const
Definition: Trajectory.h:178
MuonDTLocalMillepedeAlgorithm::excp
float excp[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:111
looper.cfg
cfg
Definition: looper.py:297
TrackingRecHit
Definition: TrackingRecHit.h:21
MuonDTLocalMillepedeAlgorithm::eycp
float eycp[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:112
MuonDTLocalMillepedeAlgorithm::Info1D::erx
float erx[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:68
MuonDTLocalMillepedeAlgorithm::Info1D::xc
float xc[60]
Definition: MuonDTLocalMillepedeAlgorithm.h:67
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
AlignableObjectId.h
dumpTauVariables_cfi.eventInfo
eventInfo
add run, event number and lumi section
Definition: dumpTauVariables_cfi.py:12
Trajectory.h
MuonDTLocalMillepedeAlgorithm::p
float p
Definition: MuonDTLocalMillepedeAlgorithm.h:78
MuonDTLocalMillepedeAlgorithm::numberOfSigmasY
float numberOfSigmasY
Definition: MuonDTLocalMillepedeAlgorithm.h:149
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
MuonDTLocalMillepedeAlgorithm::yc
float yc[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:106
MuonDTLocalMillepedeAlgorithm::nseg
int nseg
Definition: MuonDTLocalMillepedeAlgorithm.h:79
AlignmentParameterStore
Definition: AlignmentParameterStore.h:23
MuonDTLocalMillepedeAlgorithm::nMtxSection
int nMtxSection
Definition: MuonDTLocalMillepedeAlgorithm.h:143
MuonDTLocalMillepedeAlgorithm::theAlignmentParameterStore
AlignmentParameterStore * theAlignmentParameterStore
Definition: MuonDTLocalMillepedeAlgorithm.h:127
Trajectory
Definition: Trajectory.h:38
Frameworkfwd.h
MuonDTLocalMillepedeAlgorithm::edxdzSlSL3
float edxdzSlSL3[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:102
MuonDTLocalMillepedeAlgorithm::ttreeOutput
TTree * ttreeOutput
Definition: MuonDTLocalMillepedeAlgorithm.h:123
Alignable.h
MuonDTLocalMillepedeAlgorithm::ycp
float ycp[5][14]
Definition: MuonDTLocalMillepedeAlgorithm.h:110
MuonDTLocalMillepedeAlgorithm::st
int st[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:113
MuonDTLocalMillepedeAlgorithm::numberOfRootFiles
int numberOfRootFiles
Definition: MuonDTLocalMillepedeAlgorithm.h:142
MuonDTLocalMillepedeAlgorithm::ySl
float ySl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:88
MuonDTLocalMillepedeAlgorithm::eta
float eta
Definition: MuonDTLocalMillepedeAlgorithm.h:78
MuonDTLocalMillepedeAlgorithm::ntuplePath
std::string ntuplePath
Definition: MuonDTLocalMillepedeAlgorithm.h:136
MuonDTLocalMillepedeAlgorithm::nphihits
int nphihits[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:80
AlignableTracker.h
DTChamberId
Definition: DTChamberId.h:14
ParameterSet.h
MuonDTLocalMillepedeAlgorithm::edydzSl
float edydzSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:91
MuonDTLocalMillepedeAlgorithm::numberOfSigmasDXDZ
float numberOfSigmasDXDZ
Definition: MuonDTLocalMillepedeAlgorithm.h:148
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
AlignmentAlgorithmPluginFactory
MuonDTLocalMillepedeAlgorithm::numberOfSigmasDYDZ
float numberOfSigmasDYDZ
Definition: MuonDTLocalMillepedeAlgorithm.h:150
MuonDTLocalMillepedeAlgorithm::build4DSegments
bool build4DSegments()
Definition: MuonDTLocalMillepedeAlgorithm.cc:214
MuonDTLocalMillepedeAlgorithm::edxdzSl
float edxdzSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:86
DTMuonMillepede
Definition: DTMuonMillepede.h:19
MuonDTLocalMillepedeAlgorithm::run
void run(const edm::EventSetup &setup, const EventInfo &eventInfo)
Run the algorithm on trajectories and tracks.
Definition: MuonDTLocalMillepedeAlgorithm.cc:132
MuonDTLocalMillepedeAlgorithm::charge
float charge
Definition: MuonDTLocalMillepedeAlgorithm.h:78
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MuonDTLocalMillepedeAlgorithm::ptMax
float ptMax
Definition: MuonDTLocalMillepedeAlgorithm.h:137
AlignmentAlgorithmBase::EventInfo
define event information passed to algorithms
Definition: AlignmentAlgorithmBase.h:72
MuonDTLocalMillepedeAlgorithm::dydzSl
float dydzSl[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:89
MuonDTLocalMillepedeAlgorithm::exdxdzSlSL1
float exdxdzSlSL1[5]
Definition: MuonDTLocalMillepedeAlgorithm.h:97