test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
PrimitiveConverter.cc File Reference
#include <cassert>
#include <iostream>
#include <fstream>
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "L1Trigger/L1TMuonEndCap/interface/PrimitiveConverter.h"
#include "L1Trigger/CSCCommonTrigger/interface/CSCPatternLUT.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "L1Trigger/L1TMuonEndCap/interface/EmulatorClasses.h"
#include "L1Trigger/L1TMuonEndCap/interface/MakeRegionalCand.h"

Go to the source code of this file.

Functions

bool neighbor (int endcap, int sector, int SectIndex, int id, int sub, int station)
 
template<typename T >
static void read_buf (const char *name, T *buf, unsigned size)
 

Variables

int ph_offsets [6][9]
 

Function Documentation

bool neighbor ( int  endcap,
int  sector,
int  SectIndex,
int  id,
int  sub,
int  station 
)

Definition at line 29 of file PrimitiveConverter.cc.

References neighbor().

29  {
30 
31  bool neighbor = false;
32 
33  int CompIndex = (endcap - 1)*6 + sector - 1;
34  bool AdSector = false;
35  if((SectIndex == 0 && CompIndex == 5) ||
36  (SectIndex == 1 && CompIndex == 0) ||
37  (SectIndex == 2 && CompIndex == 1) ||
38  (SectIndex == 3 && CompIndex == 2) ||
39  (SectIndex == 4 && CompIndex == 3) ||
40  (SectIndex == 5 && CompIndex == 4) ||
41  (SectIndex == 6 && CompIndex == 11) ||
42  (SectIndex == 7 && CompIndex == 6) ||
43  (SectIndex == 8 && CompIndex == 7) ||
44  (SectIndex == 9 && CompIndex == 8) ||
45  (SectIndex == 10 && CompIndex == 9) ||
46  (SectIndex == 11 && CompIndex == 10) ){AdSector = true;}
47 
48  if(AdSector && sub == 2 && station == 1 && (id == 3 || id == 6 || id == 9) )
49  neighbor = true;
50 
51  if(AdSector && station > 1 && (id == 3 || id == 9) )
52  neighbor = true;
53 
54  return neighbor;
55 }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
template<typename T >
static void read_buf ( const char *  name,
T buf,
unsigned  size 
)
static

Definition at line 58 of file PrimitiveConverter.cc.

References contentValuesFiles::fullPath, i, input, and findQualityFiles::size.

Referenced by PrimitiveConverter::PrimitiveConverter().

58  {
59  ifstream input(edm::FileInPath(name).fullPath().c_str());
60  for (unsigned i=0; i<size; i++){
61  input >> buf[i];
62  }
63 }
int i
Definition: DBlmapReader.cc:9
static std::string const input
Definition: EdmProvDump.cc:44
tuple size
Write out results.

Variable Documentation

int ph_offsets[6][9]
Initial value:
= { {39, 57, 76, 39, 58, 76, 41, 60, 79},
{95, 114, 132, 95, 114, 133, 98, 116, 135},
{38, 76, 113, 39, 58, 76, 95, 114, 132},
{38, 76, 113, 39, 58, 76, 95, 114, 132},
{38, 76, 113, 38, 57, 76, 95, 113, 132},
{21, 21, 23, 1, 21, 1, 21, 1, 20} }

Definition at line 22 of file PrimitiveConverter.cc.

Referenced by PrimitiveConverter::convert().