Skip to content

Commit

Permalink
change name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Dildick committed Jun 10, 2017
1 parent c8c9961 commit 3329487
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 47 deletions.
12 changes: 6 additions & 6 deletions L1Trigger/CSCTriggerPrimitives/src/CSCGEMMotherboard.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <L1Trigger/CSCTriggerPrimitives/src/CSCGEMMotherboard.h>
#include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h>
#include "L1Trigger/CSCTriggerPrimitives/src/CSCGEMMotherboard.h"
#include "DataFormats/MuonDetId/interface/CSCTriggerNumbering.h"
#include "L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h"

CSCGEMMotherboard::CSCGEMMotherboard(unsigned endcap, unsigned station,
unsigned sector, unsigned subsector,
unsigned chamber,
const edm::ParameterSet& conf) :
CSCIntegratedMotherboard(endcap, station, sector, subsector, chamber, conf)
CSCUpgradeMotherboard(endcap, station, sector, subsector, chamber, conf)
{
gemId = GEMDetId(theRegion, 1, theStation, 1, theChamber, 0).rawId();

Expand All @@ -33,7 +33,7 @@ CSCGEMMotherboard::CSCGEMMotherboard(unsigned endcap, unsigned station,
tmbParams_.getParameter<int>("maxDeltaPadL2Odd") );
}

CSCGEMMotherboard::CSCGEMMotherboard() : CSCIntegratedMotherboard()
CSCGEMMotherboard::CSCGEMMotherboard() : CSCUpgradeMotherboard()
{
}

Expand Down Expand Up @@ -345,6 +345,6 @@ float CSCGEMMotherboard::getAvePad(const CSCCLCTDigi& clct, enum CSCPart part)

void CSCGEMMotherboard::setupGeometry()
{
CSCIntegratedMotherboard::setupGeometry();
CSCUpgradeMotherboard::setupGeometry();
generator_->setGEMGeometry(gem_g);
}
4 changes: 2 additions & 2 deletions L1Trigger/CSCTriggerPrimitives/src/CSCGEMMotherboard.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
#define L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h

#include "L1Trigger/CSCTriggerPrimitives/src/CSCIntegratedMotherboard.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboard.h"
#include "L1Trigger/CSCTriggerPrimitives/src/GEMCoPadProcessor.h"
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"

class CSCGEMMotherboard : public CSCIntegratedMotherboard
class CSCGEMMotherboard : public CSCUpgradeMotherboard
{
public:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <L1Trigger/CSCTriggerPrimitives/src/CSCIntegratedMotherboard.h>
#include <L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboard.h>
#include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h>

std::vector<CSCCorrelatedLCTDigi> CSCIntegratedMotherboard::LCTContainer::getTimeMatched(const int bx) const
std::vector<CSCCorrelatedLCTDigi> CSCUpgradeMotherboard::LCTContainer::getTimeMatched(const int bx) const
{
std::vector<CSCCorrelatedLCTDigi> lcts;
for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
Expand All @@ -12,24 +12,24 @@ std::vector<CSCCorrelatedLCTDigi> CSCIntegratedMotherboard::LCTContainer::getTim
return lcts;
}

std::vector<CSCCorrelatedLCTDigi> CSCIntegratedMotherboard::LCTContainer::getMatched() const
std::vector<CSCCorrelatedLCTDigi> CSCUpgradeMotherboard::LCTContainer::getMatched() const
{
std::vector<CSCCorrelatedLCTDigi> lcts;
for (int bx = 0; bx < MAX_LCT_BINS; bx++){
auto temp_lcts = CSCIntegratedMotherboard::LCTContainer::getTimeMatched(bx);
auto temp_lcts = CSCUpgradeMotherboard::LCTContainer::getTimeMatched(bx);
lcts.insert(std::end(lcts), std::begin(temp_lcts), std::end(temp_lcts));
}
return lcts;
}

CSCIntegratedMotherboard::CSCIntegratedMotherboard(unsigned endcap, unsigned station,
CSCUpgradeMotherboard::CSCUpgradeMotherboard(unsigned endcap, unsigned station,
unsigned sector, unsigned subsector,
unsigned chamber,
const edm::ParameterSet& conf) :
CSCMotherboard(endcap, station, sector, subsector, chamber, conf)
{
if (!isSLHC) edm::LogError("L1CSCTPEmulatorConfigError")
<< "+++ Upgrade CSCIntegratedMotherboard constructed while isSLHC is not set! +++\n";
<< "+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC is not set! +++\n";

theRegion = (theEndcap == 1) ? 1: -1;
theChamber = CSCTriggerNumbering::chamberFromTriggerLabels(theSector,theSubsector,theStation,theTrigChamber);
Expand All @@ -40,7 +40,7 @@ CSCIntegratedMotherboard::CSCIntegratedMotherboard(unsigned endcap, unsigned sta
else if (theStation==2) tmbParams_ = conf.getParameter<edm::ParameterSet>("me21tmbSLHCGEM");
else if (theStation==3 or theStation==3) tmbParams_ = conf.getParameter<edm::ParameterSet>("me3141tmbSLHCRPC");

generator_ = new CSCIntegratedMotherboardLUTGenerator();
generator_ = new CSCUpgradeMotherboardLUTGenerator();

match_earliest_alct_only = tmbParams_.getParameter<bool>("matchEarliestAlctOnly");
match_earliest_clct_only = tmbParams_.getParameter<bool>("matchEarliestClctOnly");
Expand All @@ -59,7 +59,7 @@ CSCIntegratedMotherboard::CSCIntegratedMotherboard(unsigned endcap, unsigned sta
}
}

CSCIntegratedMotherboard::CSCIntegratedMotherboard() : CSCMotherboard()
CSCUpgradeMotherboard::CSCUpgradeMotherboard() : CSCMotherboard()
{
pref[0] = match_trig_window_size/2;
for (unsigned int m=2; m<match_trig_window_size; m+=2)
Expand All @@ -69,32 +69,32 @@ CSCIntegratedMotherboard::CSCIntegratedMotherboard() : CSCMotherboard()
}
}

CSCIntegratedMotherboard::~CSCIntegratedMotherboard()
CSCUpgradeMotherboard::~CSCUpgradeMotherboard()
{
}

void CSCIntegratedMotherboard::debugLUTs()
void CSCUpgradeMotherboard::debugLUTs()
{
if (debug_luts) generator_->generateLUTs(theEndcap, theStation, theSector, theSubsector, theTrigChamber);
}

bool CSCIntegratedMotherboard::sortLCTsByQuality(const CSCCorrelatedLCTDigi& lct1, const CSCCorrelatedLCTDigi& lct2)
bool CSCUpgradeMotherboard::sortLCTsByQuality(const CSCCorrelatedLCTDigi& lct1, const CSCCorrelatedLCTDigi& lct2)
{
return lct1.getQuality() > lct2.getQuality();
}

bool CSCIntegratedMotherboard::sortLCTsByGEMDphi(const CSCCorrelatedLCTDigi& lct1, const CSCCorrelatedLCTDigi& lct2)
bool CSCUpgradeMotherboard::sortLCTsByGEMDphi(const CSCCorrelatedLCTDigi& lct1, const CSCCorrelatedLCTDigi& lct2)
{
return true;
}

void CSCIntegratedMotherboard::sortLCTs(std::vector<CSCCorrelatedLCTDigi>& lcts, bool (*sorter)(const CSCCorrelatedLCTDigi&,const CSCCorrelatedLCTDigi&)){
void CSCUpgradeMotherboard::sortLCTs(std::vector<CSCCorrelatedLCTDigi>& lcts, bool (*sorter)(const CSCCorrelatedLCTDigi&,const CSCCorrelatedLCTDigi&)){
std::sort(lcts.begin(), lcts.end(), *sorter);
if (lcts.size() > max_lcts) lcts.erase(lcts.begin()+max_lcts, lcts.end());
}


void CSCIntegratedMotherboard::setupGeometry()
void CSCUpgradeMotherboard::setupGeometry()
{
// check whether chamber is even or odd
CSCTriggerGeomManager* geo_manager(CSCTriggerGeometry::get());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef L1Trigger_CSCTriggerPrimitives_CSCIntegratedMotherboard_h
#define L1Trigger_CSCTriggerPrimitives_CSCIntegratedMotherboard_h
#ifndef L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboard_h
#define L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboard_h

#include <FWCore/MessageLogger/interface/MessageLogger.h>
#include "L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCIntegratedMotherboardLUT.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCIntegratedMotherboardLUTGenerator.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboardLUT.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboardLUTGenerator.h"
#include "DataFormats/GEMDigi/interface/GEMPadDigiCollection.h"
#include "DataFormats/GEMDigi/interface/GEMCoPadDigiCollection.h"
#include <DataFormats/RPCDigi/interface/RPCDigiCollection.h>
Expand Down Expand Up @@ -37,7 +37,7 @@ typedef matchesBX<RPCDigi> RPCDigiIdsBX;
class CSCGeometry;
class CSCChamber;

class CSCIntegratedMotherboard : public CSCMotherboard
class CSCUpgradeMotherboard : public CSCMotherboard
{
public:

Expand All @@ -53,14 +53,14 @@ class CSCIntegratedMotherboard : public CSCMotherboard
const unsigned int match_trig_window_size;
};

CSCIntegratedMotherboard(unsigned endcap, unsigned station, unsigned sector,
CSCUpgradeMotherboard(unsigned endcap, unsigned station, unsigned sector,
unsigned subsector, unsigned chamber,
const edm::ParameterSet& conf);

//Default constructor for testing
CSCIntegratedMotherboard();
CSCUpgradeMotherboard();

virtual ~CSCIntegratedMotherboard();
virtual ~CSCUpgradeMotherboard();

template <class S>
bool compare(const S& p, const S& q);
Expand Down Expand Up @@ -92,7 +92,7 @@ class CSCIntegratedMotherboard : public CSCMotherboard

std::vector<CSCALCTDigi> alctV;

CSCIntegratedMotherboardLUTGenerator* generator_;
CSCUpgradeMotherboardLUTGenerator* generator_;

/** "preferential" index array in matching window for cross-BX sorting */
int pref[MAX_LCT_BINS];
Expand Down Expand Up @@ -121,13 +121,13 @@ class CSCIntegratedMotherboard : public CSCMotherboard
};

template <class S>
bool CSCIntegratedMotherboard::compare(const S& p, const S& q)
bool CSCUpgradeMotherboard::compare(const S& p, const S& q)
{
return (p.first == q.first) and (p.second == q.second);
}

template <class S>
S CSCIntegratedMotherboard::intersection(const S& d1, const S& d2)
S CSCUpgradeMotherboard::intersection(const S& d1, const S& d2)
{
S result;
for (auto p: d1){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "L1Trigger/CSCTriggerPrimitives/src/CSCIntegratedMotherboardLUT.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboardLUT.h"

CSCGEMMotherboardLUT::CSCGEMMotherboardLUT()
: lut_wg_eta_odd(0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef L1Trigger_CSCTriggerPrimitives_CSCIntegratedMotherboardLUT_h
#define L1Trigger_CSCTriggerPrimitives_CSCIntegratedMotherboardLUT_h
#ifndef L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboardLUT_h
#define L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboardLUT_h

#include <vector>
#include <map>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include "L1Trigger/CSCTriggerPrimitives/src/CSCIntegratedMotherboardLUTGenerator.h"
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboardLUTGenerator.h"
#include "Geometry/GEMGeometry/interface/GEMEtaPartitionSpecs.h"
#include <Geometry/RPCGeometry/interface/RPCRollSpecs.h>

void CSCIntegratedMotherboardLUTGenerator::generateLUTs(unsigned theEndcap, unsigned theStation, unsigned theSector, unsigned theSubsector, unsigned theTrigChamber) const
void CSCUpgradeMotherboardLUTGenerator::generateLUTs(unsigned theEndcap, unsigned theStation, unsigned theSector, unsigned theSubsector, unsigned theTrigChamber) const
{
if (theStation==1) generateLUTsME11(theEndcap, theSector, theSubsector, theTrigChamber);
if (theStation==2) generateLUTsME21(theEndcap, theSector, theSubsector, theTrigChamber);
if (theStation==3) generateLUTsME3141(theEndcap, 3, theSector, theSubsector, theTrigChamber);
if (theStation==4) generateLUTsME3141(theEndcap, 4, theSector, theSubsector, theTrigChamber);
}

void CSCIntegratedMotherboardLUTGenerator::generateLUTsME11(unsigned theEndcap, unsigned theSector, unsigned theSubsector, unsigned theTrigChamber) const
void CSCUpgradeMotherboardLUTGenerator::generateLUTsME11(unsigned theEndcap, unsigned theSector, unsigned theSubsector, unsigned theTrigChamber) const
{
bool gemGeometryAvailable(false);
if (gem_g != nullptr) {
Expand Down Expand Up @@ -183,7 +183,7 @@ void CSCIntegratedMotherboardLUTGenerator::generateLUTsME11(unsigned theEndcap,
}
}

void CSCIntegratedMotherboardLUTGenerator::generateLUTsME21(unsigned theEndcap, unsigned theSector, unsigned theSubsector, unsigned theTrigChamber) const
void CSCUpgradeMotherboardLUTGenerator::generateLUTsME21(unsigned theEndcap, unsigned theSector, unsigned theSubsector, unsigned theTrigChamber) const
{
bool gemGeometryAvailable(false);
if (gem_g != nullptr) {
Expand Down Expand Up @@ -307,7 +307,7 @@ void CSCIntegratedMotherboardLUTGenerator::generateLUTsME21(unsigned theEndcap,
}
}

void CSCIntegratedMotherboardLUTGenerator::generateLUTsME3141(unsigned theEndcap, unsigned theStation, unsigned theSector, unsigned theSubSector, unsigned theTrigChamber) const
void CSCUpgradeMotherboardLUTGenerator::generateLUTsME3141(unsigned theEndcap, unsigned theStation, unsigned theSector, unsigned theSubSector, unsigned theTrigChamber) const
{
bool rpcGeometryAvailable(false);
if (rpc_g != nullptr) {
Expand Down Expand Up @@ -440,7 +440,7 @@ void CSCIntegratedMotherboardLUTGenerator::generateLUTsME3141(unsigned theEndcap
}
}

int CSCIntegratedMotherboardLUTGenerator::assignRoll(const std::map<int,std::pair<double,double> >& lut_, double eta) const
int CSCUpgradeMotherboardLUTGenerator::assignRoll(const std::map<int,std::pair<double,double> >& lut_, double eta) const
{
int result = -99;
for(auto p : lut_) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef L1Trigger_CSCTriggerPrimitives_CSCIntegratedMotherboardLUTGenerator_h
#define L1Trigger_CSCTriggerPrimitives_CSCIntegratedMotherboardLUTGenerator_h
#ifndef L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboardLUTGenerator_h
#define L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboardLUTGenerator_h

#include "L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h"
#include "DataFormats/MuonDetId/interface/CSCTriggerNumbering.h"
Expand All @@ -10,12 +10,12 @@
#include <vector>
#include <map>

class CSCIntegratedMotherboardLUTGenerator
class CSCUpgradeMotherboardLUTGenerator
{
public:

CSCIntegratedMotherboardLUTGenerator() {}
~CSCIntegratedMotherboardLUTGenerator() {}
CSCUpgradeMotherboardLUTGenerator() {}
~CSCUpgradeMotherboardLUTGenerator() {}

/// set CSC and GEM geometries for the matching needs
void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
Expand Down

0 comments on commit 3329487

Please sign in to comment.