Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CSCTriggerGeometry and CSCTriggerGeomManager #21655

Merged
merged 1 commit into from Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion DQM/L1TMonitor/interface/L1TCSCTF.h
Expand Up @@ -19,6 +19,7 @@
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DQMServices/Core/interface/DQMStore.h"
Expand Down Expand Up @@ -55,7 +56,7 @@
// class decleration
//

class L1TCSCTF : public thread_unsafe::DQMEDAnalyzer {
class L1TCSCTF : public DQMEDAnalyzer {

public:

Expand Down
6 changes: 2 additions & 4 deletions DQM/L1TMonitor/src/L1TCSCTF.cc
Expand Up @@ -12,7 +12,6 @@
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/L1CSCStatusDigiCollection.h"
#include "L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"

#include "DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h"
Expand Down Expand Up @@ -678,10 +677,10 @@ void L1TCSCTF::analyze(const Event& e, const EventSetup& c)
if( c.get< L1MuTriggerScalesRcd > ().cacheIdentifier() != m_scalesCacheID ||
c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() != m_ptScaleCacheID ){

ESHandle< L1MuTriggerScales > scales;
edm::ESHandle< L1MuTriggerScales > scales;
c.get< L1MuTriggerScalesRcd >().get(scales);
ts = scales.product();
ESHandle< L1MuTriggerPtScale > ptscales;
edm::ESHandle< L1MuTriggerPtScale > ptscales;
c.get< L1MuTriggerPtScaleRcd >().get(ptscales);
tpts = ptscales.product();
m_scalesCacheID = c.get< L1MuTriggerScalesRcd >().cacheIdentifier();
Expand Down Expand Up @@ -905,7 +904,6 @@ void L1TCSCTF::analyze(const Event& e, const EventSetup& c)
{
edm::ESHandle<CSCGeometry> pDD;
c.get<MuonGeometryRecord>().get( pDD );
CSCTriggerGeometry::setGeometry(pDD);

edm::Handle<CSCCorrelatedLCTDigiCollection> corrlcts;
e.getByToken(corrlctsToken_, corrlcts);
Expand Down
45 changes: 0 additions & 45 deletions L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h

This file was deleted.

26 changes: 0 additions & 26 deletions L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h

This file was deleted.

47 changes: 0 additions & 47 deletions L1Trigger/CSCCommonTrigger/src/CSCTriggerGeomManager.cc

This file was deleted.

3 changes: 0 additions & 3 deletions L1Trigger/CSCCommonTrigger/src/CSCTriggerGeometry.cc

This file was deleted.

5 changes: 5 additions & 0 deletions L1Trigger/CSCTrackFinder/interface/CSCSectorReceiverLUT.h
Expand Up @@ -12,6 +12,7 @@
#include <L1Trigger/CSCTrackFinder/interface/CSCTrackFinderDataTypes.h>
#include <FWCore/ParameterSet/interface/ParameterSet.h>
#include <FWCore/ParameterSet/interface/FileInPath.h>
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"

class CSCLayer;

Expand Down Expand Up @@ -48,6 +49,8 @@ class CSCSectorReceiverLUT
/// Helpers
std::string encodeFileIndex() const;

void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }

private:
int _endcap, _sector, _subsector, _station;

Expand Down Expand Up @@ -83,6 +86,8 @@ class CSCSectorReceiverLUT
static lclphidat* me_lcl_phi;
gblphidat* me_global_phi, *mb_global_phi;
gbletadat* me_global_eta;

const CSCGeometry* csc_g;
};

#endif
10 changes: 4 additions & 6 deletions L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.cc
@@ -1,4 +1,4 @@
#include "CSCTFTrackProducer.h"
#include "L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.h"

#include "L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.h"

Expand All @@ -9,7 +9,7 @@
#include "DataFormats/L1CSCTrackFinder/interface/TrackStub.h"
#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"

#include "L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h"
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"

#include "DataFormats/Common/interface/Handle.h"
Expand Down Expand Up @@ -77,15 +77,13 @@ void CSCTFTrackProducer::produce(edm::Event & e, const edm::EventSetup& c)

// set geometry pointer
edm::ESHandle<CSCGeometry> pDD;

c.get<MuonGeometryRecord>().get( pDD );
CSCTriggerGeometry::setGeometry(pDD);

edm::Handle<CSCCorrelatedLCTDigiCollection> LCTs;
std::unique_ptr<L1CSCTrackCollection> track_product(new L1CSCTrackCollection);
e.getByToken(input_module, LCTs);
std::unique_ptr<CSCTriggerContainer<csctf::TrackStub> > dt_stubs(new CSCTriggerContainer<csctf::TrackStub>);

// Either emulate or directly read in DT stubs based on switch
//////////////////////////////////////////////////////////////
CSCTriggerContainer<csctf::TrackStub> emulStub;
Expand All @@ -100,7 +98,7 @@ void CSCTFTrackProducer::produce(edm::Event & e, const edm::EventSetup& c)
e.getByToken(directProd, stubsFromDaq);
const CSCTriggerContainer<csctf::TrackStub>* stubPointer = stubsFromDaq.product();
emulStub.push_many(*stubPointer);
}
}

my_builder->buildTracks(LCTs.product(), (useDT?&emulStub:nullptr), track_product.get(), dt_stubs.get());

Expand Down
27 changes: 15 additions & 12 deletions L1Trigger/CSCTrackFinder/src/CSCSectorReceiverLUT.cc
@@ -1,13 +1,12 @@
#include <L1Trigger/CSCTrackFinder/interface/CSCSectorReceiverLUT.h>
#include <L1Trigger/CSCTrackFinder/interface/CSCSectorReceiverMiniLUT.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCPatternLUT.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCFrontRearLUT.h>
#include <DataFormats/L1CSCTrackFinder/interface/CSCBitWidths.h>
#include <DataFormats/L1CSCTrackFinder/interface/CSCTFConstants.h>
#include <L1Trigger/CSCCommonTrigger/interface/CSCConstants.h>

#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
#include <Geometry/CSCGeometry/interface/CSCLayerGeometry.h>
#include "DataFormats/GeometryVector/interface/LocalPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
Expand Down Expand Up @@ -221,7 +220,7 @@ lclphidat CSCSectorReceiverLUT::localPhi(unsigned address, const bool gangedME1a
{
lclphidat result;
lclphiadd theadd(address);

if(useMiniLUTs && isTMB07)
{
result = CSCSectorReceiverMiniLUT::calcLocalPhiMini(address, gangedME1a);
Expand All @@ -238,7 +237,7 @@ lclphidat CSCSectorReceiverLUT::localPhi(lclphiadd address, const bool gangedME1

if(useMiniLUTs && isTMB07)
{
result = CSCSectorReceiverMiniLUT::calcLocalPhiMini(address.toint(), gangedME1a);
result = CSCSectorReceiverMiniLUT::calcLocalPhiMini(address.toint(), gangedME1a);
}
else if(LUTsFromFile) result = me_lcl_phi[address.toint()];
else result = calcLocalPhi(address);
Expand Down Expand Up @@ -273,8 +272,7 @@ double CSCSectorReceiverLUT::getGlobalPhiValue(const CSCLayer* thelayer, const u
gblphidat CSCSectorReceiverLUT::calcGlobalPhiME(const gblphiadd& address) const
{
gblphidat result(0);
CSCTriggerGeomManager* thegeom = CSCTriggerGeometry::get();
CSCChamber* thechamber = nullptr;
const CSCChamber* thechamber = nullptr;
const CSCLayer* thelayer = nullptr;
const CSCLayerGeometry* layergeom = nullptr;
int cscid = address.cscid;
Expand Down Expand Up @@ -336,7 +334,10 @@ gblphidat CSCSectorReceiverLUT::calcGlobalPhiME(const gblphiadd& address) const

try
{
thechamber = thegeom->chamber(_endcap,_station,_sector,_subsector,cscid);
int ring = CSCTriggerNumbering::ringFromTriggerLabels(_station, cscid);
int chid = CSCTriggerNumbering::chamberFromTriggerLabels(_sector, _subsector, _station, cscid);
CSCDetId detid(_endcap, _station, ring, chid, 0);
thechamber = const_cast<const CSCChamber*>(csc_g->chamber(detid));
if(thechamber)
{
if(isTMB07)
Expand Down Expand Up @@ -576,7 +577,7 @@ gblphidat CSCSectorReceiverLUT::globalPhiMB(int phi_local,int wire_group, int cs

// comment for now
// if(useMiniLUTs && isTMB07) result = CSCSectorReceiverMiniLUT::calcGlobalPhiMBMini(_endcap, _sector, _subsector, address.toint());
//else
//else
if(LUTsFromFile) result = mb_global_phi[address.toint()];
else result = calcGlobalPhiMB(globalPhiME(address, gangedME1a));

Expand All @@ -589,7 +590,7 @@ gblphidat CSCSectorReceiverLUT::globalPhiMB(unsigned address, const bool ganged
gblphiadd theadd(address);

//if(useMiniLUTs && isTMB07) result = CSCSectorReceiverMiniLUT::calcGlobalPhiMBMini(_endcap, _sector, _subsector, address);
//else
//else
if(LUTsFromFile) result = mb_global_phi[theadd.toint()];
else result = calcGlobalPhiMB(globalPhiME(address, gangedME1a));

Expand All @@ -601,7 +602,7 @@ gblphidat CSCSectorReceiverLUT::globalPhiMB(gblphiadd address, const bool gange
gblphidat result;

//if(useMiniLUTs && isTMB07) result = CSCSectorReceiverMiniLUT::calcGlobalPhiMBMini(_endcap, _sector, _subsector, address.toint());
//else
//else
if(LUTsFromFile) result = mb_global_phi[address.toint()];
else result = calcGlobalPhiMB(globalPhiME(address, gangedME1a));

Expand All @@ -628,7 +629,6 @@ double CSCSectorReceiverLUT::getGlobalEtaValue(const unsigned& thecscid, const u
cscid = CSCTriggerNumbering::maxTriggerCscId();
}

CSCTriggerGeomManager* thegeom = CSCTriggerGeometry::get();
CSCLayerGeometry* layerGeom = nullptr;
const unsigned numBins = 1 << 2; // 4 local phi bins

Expand All @@ -640,7 +640,10 @@ double CSCSectorReceiverLUT::getGlobalEtaValue(const unsigned& thecscid, const u
}
try
{
const CSCChamber* thechamber = thegeom->chamber(_endcap,_station,_sector,_subsector,cscid);
int ring = CSCTriggerNumbering::ringFromTriggerLabels(_station, cscid);
int chid = CSCTriggerNumbering::chamberFromTriggerLabels(_sector, _subsector, _station, cscid);
CSCDetId detid(_endcap, _station, ring, chid, 0);
const CSCChamber* thechamber = const_cast<const CSCChamber*>(csc_g->chamber(detid));
if(thechamber) {
layerGeom = const_cast<CSCLayerGeometry*>(thechamber->layer(CSCConstants::KEY_ALCT_LAYER)->geometry());
const unsigned nWireGroups = layerGeom->numberOfWireGroups();
Expand Down