CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
BXAnalyzer.h File Reference
#include "L1Trigger/L1TMuonEndCap/interface/EmulatorClasses.h"
#include "L1Trigger/L1TMuonEndCap/interface/PhiMemoryImage.h"

Go to the source code of this file.

Functions

PatternOutput DeleteDuplicatePatterns (std::vector< PatternOutput > Pout)
 
std::vector< std::vector
< ConvertedHit > > 
GroupBX (std::vector< ConvertedHit > ConvHits)
 

Function Documentation

PatternOutput DeleteDuplicatePatterns ( std::vector< PatternOutput Pout)

Definition at line 40 of file BXAnalyzer.h.

References PatternOutput::detected, PatternOutput::hits, i, QualityOutput::layer, convertSQLitetoXML_cfg::output, QualityOutput::rank, QualityOutput::straightness, FrontierCondition_GT_autoExpress_cfi::test, and tmp.

Referenced by L1TMuonEndCapTrackProducer::produce().

40  {
41 
42  std::vector<int> tmp (128,0);
43  std::vector<std::vector<int>> rank (4,tmp), layer(4,tmp),straightness(4,tmp);
44  std::vector<ConvertedHit> Hits;
45 
46  for(int i=0;i<3;i++){
47 
48  bool set = 0;
49 
50  for(int zone=0;zone<4;zone++){
51  for(int strip=0;strip<128;strip++){
52 
53  if(Pout[i].detected.rank[zone][strip] >= rank[zone][strip]){
54 
55  rank[zone][strip] = Pout[i].detected.rank[zone][strip];
56  layer[zone][strip] = Pout[i].detected.layer[zone][strip];
57  straightness[zone][strip] = Pout[i].detected.straightness[zone][strip];
58  set = 1;
59  }
60  }
61  }
62 
63  if(set && (Pout[i].hits.size() > Hits.size())){
64 
65  std::vector<ConvertedHit> test = Pout[i].hits;
66 
67  for(std::vector<ConvertedHit>::iterator it = test.begin();it != test.end();it++){
68  Hits.push_back(*it);
69  }
70  }
71 
72 
73  }
74 
75  QualityOutput qout;
76 
77  qout.rank = rank;
78  qout.layer = layer;
79  qout.straightness = straightness;
80 
82 
83  output.detected = qout;
84  output.hits = Hits;
85 
86  return output;
87 
88 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
QualityOutput detected
std::vector< ConvertedHit > hits
std::vector<std::vector<ConvertedHit> > GroupBX ( std::vector< ConvertedHit ConvHits)

Definition at line 14 of file BXAnalyzer.h.

References diffTreeTool::diff, i, convertSQLitetoXML_cfg::output, and tmp.

Referenced by L1TMuonEndCapTrackProducer::produce().

14  {
15 
16  std::vector<ConvertedHit> tmp;
17  std::vector<std::vector<ConvertedHit>> output (3,tmp);
18 
19  const int CentralBX = 6;
20 
21  for(std::vector<ConvertedHit>::iterator i = ConvHits.begin();i != ConvHits.end();i++){
22 
23  int diff = i->BX() - CentralBX;
24 
25  if((diff > -3) && (diff < 1))
26  output[0].push_back(*i);
27 
28  if((diff < 3) && (diff > -1))
29  output[2].push_back(*i);
30 
31  if(fabs(diff) < 2)
32  output[1].push_back(*i);
33  }
34 
35  return output;
36 
37 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100