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"
#include "FWCore/MessageLogger/interface/MessageLogger.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 31 of file PrimitiveConverter.cc.

References neighbor().

31  {
32 
33  bool neighbor = false;
34 
35  int CompIndex = (endcap - 1)*6 + sector - 1;
36  bool AdSector = false;
37  if((SectIndex == 0 && CompIndex == 5) ||
38  (SectIndex == 1 && CompIndex == 0) ||
39  (SectIndex == 2 && CompIndex == 1) ||
40  (SectIndex == 3 && CompIndex == 2) ||
41  (SectIndex == 4 && CompIndex == 3) ||
42  (SectIndex == 5 && CompIndex == 4) ||
43  (SectIndex == 6 && CompIndex == 11) ||
44  (SectIndex == 7 && CompIndex == 6) ||
45  (SectIndex == 8 && CompIndex == 7) ||
46  (SectIndex == 9 && CompIndex == 8) ||
47  (SectIndex == 10 && CompIndex == 9) ||
48  (SectIndex == 11 && CompIndex == 10) ){AdSector = true;}
49 
50  if(AdSector && sub == 2 && station == 1 && (id == 3 || id == 6 || id == 9) )
51  neighbor = true;
52 
53  if(AdSector && station > 1 && (id == 3 || id == 9) )
54  neighbor = true;
55 
56  return neighbor;
57 }
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 60 of file PrimitiveConverter.cc.

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

Referenced by PrimitiveConverter::PrimitiveConverter().

60  {
61  ifstream input(edm::FileInPath(name).fullPath().c_str());
62  for (unsigned i=0; i<size; i++){
63  input >> buf[i];
64  }
65 }
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 24 of file PrimitiveConverter.cc.

Referenced by PrimitiveConverter::convert().