Skip to content

Commit

Permalink
Merged l1t-tsg-v3 from repository cms-l1t-offline
Browse files Browse the repository at this point in the history
  • Loading branch information
thomreis committed Mar 4, 2016
2 parents 38304a4 + 82c8111 commit 57b2eeb
Show file tree
Hide file tree
Showing 197 changed files with 442,391 additions and 2,760 deletions.
52 changes: 26 additions & 26 deletions CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,35 +109,35 @@ class L1TMuonOverlapParams {
void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; }

///General definitions
std::vector<int>* generalParams() { return &pnodes_[GENERAL].iparams_; }
const std::vector<int>* generalParams() const { return &pnodes_[GENERAL].iparams_; }
void setGeneralParams (const std::vector<int> & paramsVec) { pnodes_[GENERAL].type_ = "INT"; pnodes_[GENERAL].iparams_ = paramsVec;}

///Access to specific general settings.
int nPdfAddrBits() { return pnodes_[GENERAL].iparams_[GENERAL_ADDRBITS];};
int nPdfAddrBits() const { return pnodes_[GENERAL].iparams_[GENERAL_ADDRBITS];};

int nPdfValBits() { return pnodes_[GENERAL].iparams_[GENERAL_VALBITS];};
int nPdfValBits() const { return pnodes_[GENERAL].iparams_[GENERAL_VALBITS];};

int nHitsPerLayer() { return pnodes_[GENERAL].iparams_[GENERAL_HITSPERLAYER];};
int nHitsPerLayer() const { return pnodes_[GENERAL].iparams_[GENERAL_HITSPERLAYER];};

int nPhiBits() { return pnodes_[GENERAL].iparams_[GENERAL_PHIBITS];};
int nPhiBits() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBITS];};

int nPhiBins() { return pnodes_[GENERAL].iparams_[GENERAL_PHIBINS];};
int nPhiBins() const { return pnodes_[GENERAL].iparams_[GENERAL_PHIBINS];};

int nRefHits() { return pnodes_[GENERAL].iparams_[GENERAL_NREFHITS];};
int nRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFHITS];};

int nTestRefHits() { return pnodes_[GENERAL].iparams_[GENERAL_NTESTREFHITS];};
int nTestRefHits() const { return pnodes_[GENERAL].iparams_[GENERAL_NTESTREFHITS];};

int nProcessors() { return pnodes_[GENERAL].iparams_[GENERAL_NPROCESSORS];};
int nProcessors() const { return pnodes_[GENERAL].iparams_[GENERAL_NPROCESSORS];};

int nLogicRegions() { return pnodes_[GENERAL].iparams_[GENERAL_NLOGIC_REGIONS];};
int nLogicRegions() const { return pnodes_[GENERAL].iparams_[GENERAL_NLOGIC_REGIONS];};

int nInputs() { return pnodes_[GENERAL].iparams_[GENERAL_NINPUTS];};
int nInputs() const { return pnodes_[GENERAL].iparams_[GENERAL_NINPUTS];};

int nLayers() { return pnodes_[GENERAL].iparams_[GENERAL_NLAYERS];};
int nLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NLAYERS];};

int nRefLayers() { return pnodes_[GENERAL].iparams_[GENERAL_NREFLAYERS];};
int nRefLayers() const { return pnodes_[GENERAL].iparams_[GENERAL_NREFLAYERS];};

int nGoldenPatterns() { return pnodes_[GENERAL].iparams_[GENERAL_NGOLDENPATTERNS];};
int nGoldenPatterns() const { return pnodes_[GENERAL].iparams_[GENERAL_NGOLDENPATTERNS];};

///Connections definitions
void setLayerMap(const std::vector<LayerMapNode> &aVector) { layerMap_ = aVector;}
Expand All @@ -154,27 +154,27 @@ class L1TMuonOverlapParams {

void setConnectedSectorsEnd(const std::vector<int> &aVector){pnodes_[SECTORS_END].type_ = "INT"; pnodes_[SECTORS_END].iparams_ = aVector;};

std::vector<LayerMapNode> * layerMap() { return &layerMap_;};
const std::vector<LayerMapNode> * layerMap() const { return &layerMap_;};

std::vector<RefLayerMapNode> * refLayerMap() { return &refLayerMap_;};
const std::vector<RefLayerMapNode> * refLayerMap() const { return &refLayerMap_;};

std::vector<RefHitNode> * refHitMap() {return &refHitMap_;};
const std::vector<RefHitNode> * refHitMap() const {return &refHitMap_;};

std::vector<int> * globalPhiStartMap() { return &globalPhiStart_;};
const std::vector<int> * globalPhiStartMap() const { return &globalPhiStart_;};

std::vector<LayerInputNode> * layerInputMap() { return &layerInputMap_;};
const std::vector<LayerInputNode> * layerInputMap() const { return &layerInputMap_;};

std::vector<int> * connectedSectorsStart() { return &pnodes_[SECTORS_START].iparams_;};
const std::vector<int> * connectedSectorsStart() const { return &pnodes_[SECTORS_START].iparams_;};

std::vector<int> * connectedSectorsEnd() { return &pnodes_[SECTORS_END].iparams_;};
const std::vector<int> * connectedSectorsEnd() const { return &pnodes_[SECTORS_END].iparams_;};


///Golden Patterns definitions
l1t::LUT* chargeLUT() { return &pnodes_[CHARGE].LUT_; }
l1t::LUT* etaLUT() { return &pnodes_[ETA].LUT_; }
l1t::LUT* ptLUT() { return &pnodes_[PT].LUT_; }
l1t::LUT* pdfLUT() { return &pnodes_[PDF].LUT_; }
l1t::LUT* meanDistPhiLUT() { return &pnodes_[MEANDISTPHI].LUT_; }
const l1t::LUT* chargeLUT() const { return &pnodes_[CHARGE].LUT_; }
const l1t::LUT* etaLUT() const { return &pnodes_[ETA].LUT_; }
const l1t::LUT* ptLUT() const { return &pnodes_[PT].LUT_; }
const l1t::LUT* pdfLUT() const { return &pnodes_[PDF].LUT_; }
const l1t::LUT* meanDistPhiLUT() const { return &pnodes_[MEANDISTPHI].LUT_; }

void setChargeLUT (const l1t::LUT & lut) { pnodes_[CHARGE].type_ = "LUT"; pnodes_[CHARGE].LUT_ = lut; }
void setEtaLUT (const l1t::LUT & lut) { pnodes_[ETA].type_ = "LUT"; pnodes_[ETA].LUT_ = lut; }
Expand Down
39 changes: 3 additions & 36 deletions Configuration/StandardSequences/python/DigiToRaw_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
# this case for Run 2
from Configuration.StandardSequences.Eras import eras

from EventFilter.CSCTFRawToDigi.csctfpacker_cfi import *
from EventFilter.DTTFRawToDigi.dttfpacker_cfi import *
from EventFilter.GctRawToDigi.gctDigiToRaw_cfi import *
from EventFilter.L1GlobalTriggerRawToDigi.l1GtPack_cfi import *
from EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmPack_cfi import *
from EventFilter.SiPixelRawToDigi.SiPixelDigiToRaw_cfi import *
from EventFilter.SiStripRawToDigi.SiStripDigiToRaw_cfi import *
from SimCalorimetry.EcalTrigPrimProducers.ecalTriggerPrimitiveDigis_cff import *
Expand All @@ -21,44 +16,16 @@
from EventFilter.RPCRawToDigi.rpcPacker_cfi import *
from EventFilter.CastorRawToDigi.CastorDigiToRaw_cfi import *
from EventFilter.RawDataCollector.rawDataCollector_cfi import *
#DigiToRaw = cms.Sequence(csctfpacker*dttfpacker*gctDigiToRaw*l1GtPack*l1GtEvmPack*siPixelRawData*SiStripDigiToRaw*ecalPacker*esDigiToRaw*hcalRawData*cscpacker*dtpacker*rpcpacker*rawDataCollector)
DigiToRaw = cms.Sequence(csctfpacker*dttfpacker*gctDigiToRaw*l1GtPack*l1GtEvmPack*siPixelRawData*SiStripDigiToRaw*ecalPacker*esDigiToRaw*hcalRawData*cscpacker*dtpacker*rpcpacker*castorRawData*rawDataCollector)
csctfpacker.lctProducer = "simCscTriggerPrimitiveDigis:MPCSORTED"
csctfpacker.trackProducer = 'simCsctfTrackDigis'
dttfpacker.DTDigi_Source = 'simDtTriggerPrimitiveDigis'
dttfpacker.DTTracks_Source = "simDttfDigis:DTTF"
gctDigiToRaw.rctInputLabel = 'simRctDigis'
gctDigiToRaw.gctInputLabel = 'simGctDigis'
# Change only if using the Stage 1 trigger
eras.stage1L1Trigger.toModify( gctDigiToRaw, gctInputLabel = 'simCaloStage1LegacyFormatDigis' )

l1GtPack.DaqGtInputTag = 'simGtDigis'
l1GtPack.MuGmtInputTag = 'simGmtDigis'
l1GtEvmPack.EvmGtInputTag = 'simGtDigis'
from L1Trigger.Configuration.L1TDigiToRaw_cff import *
#DigiToRaw = cms.Sequence(L1TDigiToRaw*siPixelRawData*SiStripDigiToRaw*ecalPacker*esDigiToRaw*hcalRawData*cscpacker*dtpacker*rpcpacker*rawDataCollector)
DigiToRaw = cms.Sequence(L1TDigiToRaw*siPixelRawData*SiStripDigiToRaw*ecalPacker*esDigiToRaw*hcalRawData*cscpacker*dtpacker*rpcpacker*castorRawData*rawDataCollector)
ecalPacker.Label = 'simEcalDigis'
ecalPacker.InstanceEB = 'ebDigis'
ecalPacker.InstanceEE = 'eeDigis'
ecalPacker.labelEBSRFlags = "simEcalDigis:ebSrFlags"
ecalPacker.labelEESRFlags = "simEcalDigis:eeSrFlags"

##
## Make changes for Run 2
##
def _modifyDigiToRawForStage1L1Trigger( theProcess ) :
"""
Modifies the DigiToRaw sequence for running in Run 2
"""
theProcess.load("L1Trigger.L1TCommon.l1tDigiToRaw_cfi")
# Note that this function is applied before the objects in this file are added
# to the process. So things declared in this file should be used "bare", i.e.
# not with "theProcess." in front of them. l1tDigiToRaw is an exception because
# it is not declared in this file but loaded into the process in the "load"
# statement above.
l1tDigiToRawSeq = cms.Sequence( gctDigiToRaw + theProcess.l1tDigiToRaw )
DigiToRaw.replace( gctDigiToRaw, l1tDigiToRawSeq )

# A unique name is required for this object, so I'll call it "modify<python filename>ForRun2_"
modifyConfigurationStandardSequencesDigiToRawForRun2_ = eras.stage1L1Trigger.makeProcessModifier( _modifyDigiToRawForStage1L1Trigger )
if eras.phase1Pixel.isChosen() :
DigiToRaw.remove(siPixelRawData)
DigiToRaw.remove(castorRawData)
Expand Down
2 changes: 1 addition & 1 deletion Configuration/StandardSequences/python/L1Reco_cff.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FWCore.ParameterSet.Config as cms

from L1Trigger.Configuration.L1Reco_cff import *
from L1Trigger.Configuration.L1TReco_cff import *

46 changes: 4 additions & 42 deletions Configuration/StandardSequences/python/RawToDigi_Data_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

from Configuration.StandardSequences.RawToDigi_cff import *

RawToDigi = cms.Sequence(csctfDigis
+dttfDigis
+gctDigis
+gtDigis
+gtEvmDigis
+siPixelDigis
RawToDigi = cms.Sequence(
siPixelDigis
+siStripDigis
+ecalDigis
+ecalPreshowerDigis
Expand All @@ -17,45 +13,11 @@
+muonRPCDigis
+castorDigis
+scalersRawToDigi
+tcdsDigis)

RawToDigi_woGCT = cms.Sequence(csctfDigis
+dttfDigis
+gtDigis
+gtEvmDigis
+siPixelDigis
+siStripDigis
+ecalDigis
+ecalPreshowerDigis
+hcalDigis
+muonCSCDigis
+muonDTDigis
+muonRPCDigis
+castorDigis
+scalersRawToDigi
+tcdsDigis)
+tcdsDigis
+L1TRawToDigi)

ecalDigis.DoRegional = False

#set those back to "source"
#False by default ecalDigis.DoRegional = False


## Make changes for Run 2
##
def _modifyRawToDigiForStage1Trigger( theProcess ) :
"""
Modifies the RawToDigi sequence if using the Stage 1 L1 trigger
"""
theProcess.load("L1Trigger.L1TCommon.l1tRawToDigi_cfi")
theProcess.load("L1Trigger.L1TCommon.caloStage1LegacyFormatDigis_cfi")
# Note that this function is applied before the objects in this file are added
# to the process. So things declared in this file should be used "bare", i.e.
# not with "theProcess." in front of them. caloStage1Digis and caloStage1LegacyFormatDigis
# are an exception because they are not declared in this file but loaded into the
# process in the "load" statements above.
L1RawToDigiSeq = cms.Sequence( gctDigis + theProcess.caloStage1Digis + theProcess.caloStage1LegacyFormatDigis)
RawToDigi.replace( gctDigis, L1RawToDigiSeq )

# A unique name is required for this object, so I'll call it "modify<python filename>ForRun2_"
modifyConfigurationStandardSequencesRawToDigiForRun2_ = eras.stage1L1Trigger.makeProcessModifier( _modifyRawToDigiForStage1Trigger )
66 changes: 12 additions & 54 deletions Configuration/StandardSequences/python/RawToDigi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@

from CondCore.DBCommon.CondDBSetup_cfi import *

import EventFilter.CSCTFRawToDigi.csctfunpacker_cfi
csctfDigis = EventFilter.CSCTFRawToDigi.csctfunpacker_cfi.csctfunpacker.clone()

import EventFilter.DTTFRawToDigi.dttfunpacker_cfi
dttfDigis = EventFilter.DTTFRawToDigi.dttfunpacker_cfi.dttfunpacker.clone()

import EventFilter.GctRawToDigi.l1GctHwDigis_cfi
gctDigis = EventFilter.GctRawToDigi.l1GctHwDigis_cfi.l1GctHwDigis.clone()

import EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi
gtDigis = EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi.l1GtUnpack.clone()

import EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmUnpack_cfi
gtEvmDigis = EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmUnpack_cfi.l1GtEvmUnpack.clone()

from EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi import *

Expand Down Expand Up @@ -53,11 +39,9 @@
from EventFilter.Utilities.tcdsRawToDigi_cfi import *
tcdsDigis = EventFilter.Utilities.tcdsRawToDigi_cfi.tcdsRawToDigi.clone()

RawToDigi = cms.Sequence(csctfDigis
+dttfDigis
+gctDigis
+gtDigis
+gtEvmDigis
from L1Trigger.Configuration.L1TRawToDigi_cff import *

RawToDigi = cms.Sequence(L1TRawToDigi
+siPixelDigis
+siStripDigis
+ecalDigis
Expand All @@ -68,13 +52,10 @@
+muonRPCDigis
+castorDigis
+scalersRawToDigi
+tcdsDigis)
+tcdsDigis
)

RawToDigi_noTk = cms.Sequence(csctfDigis
+dttfDigis
+gctDigis
+gtDigis
+gtEvmDigis
RawToDigi_noTk = cms.Sequence(L1TRawToDigi
+ecalDigis
+ecalPreshowerDigis
+hcalDigis
Expand All @@ -83,13 +64,10 @@
+muonRPCDigis
+castorDigis
+scalersRawToDigi
+tcdsDigis)
+tcdsDigis
)

scalersRawToDigi.scalersInputTag = 'rawDataCollector'
csctfDigis.producer = 'rawDataCollector'
dttfDigis.DTTF_FED_Source = 'rawDataCollector'
gctDigis.inputLabel = 'rawDataCollector'
gtDigis.DaqGtInputTag = 'rawDataCollector'
siPixelDigis.InputLabel = 'rawDataCollector'
#false by default anyways ecalDigis.DoRegional = False
ecalDigis.InputLabel = 'rawDataCollector'
Expand All @@ -98,32 +76,12 @@
muonCSCDigis.InputObjects = 'rawDataCollector'
muonDTDigis.inputLabel = 'rawDataCollector'
muonRPCDigis.InputLabel = 'rawDataCollector'
gtEvmDigis.EvmGtInputTag = 'rawDataCollector'
castorDigis.InputLabel = 'rawDataCollector'

##
## Make changes for Run 2
##
def _modifyRawToDigiForRun2( RawToDigi_object ) :
RawToDigi_object.remove(gtEvmDigis)

def _modifyRawToDigiForStage1Trigger( theProcess ) :
"""
Modifies the RawToDigi sequence if using the Stage 1 L1 trigger
"""
theProcess.load("L1Trigger.L1TCommon.l1tRawToDigi_cfi")
theProcess.load("L1Trigger.L1TCommon.caloStage1LegacyFormatDigis_cfi")
# Note that this function is applied before the objects in this file are added
# to the process. So things declared in this file should be used "bare", i.e.
# not with "theProcess." in front of them. caloStage1Digis and caloStage1LegacyFormatDigis
# are an exception because they are not declared in this file but loaded into the
# process in the "load" statements above.
L1RawToDigiSeq = cms.Sequence( gctDigis + theProcess.caloStage1Digis + theProcess.caloStage1LegacyFormatDigis)
RawToDigi.replace( gctDigis, L1RawToDigiSeq )

eras.run2_common.toModify( RawToDigi, func=_modifyRawToDigiForRun2 )
# A unique name is required for this object, so I'll call it "modify<python filename>ForRun2_"
modifyConfigurationStandardSequencesRawToDigiForRun2_ = eras.stage1L1Trigger.makeProcessModifier( _modifyRawToDigiForStage1Trigger )

if eras.phase1Pixel.isChosen() :
RawToDigi.remove(siPixelDigis)
RawToDigi.remove(castorDigis)



14 changes: 10 additions & 4 deletions DataFormats/L1TMuon/interface/EMTF/AMC13Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ namespace l1t {

// Empty constructor
AMC13Header() :
orn(-99), lv1_id(-99), bx_id(-99), source_id(-99), evt_ty(-99), fov(-99), ufov(-99), res(-99), namc(-99), h(-99), x(-99), dataword(-99)
orn(-99), lv1_id(-99), bx_id(-99), source_id(-99), evt_ty(-99), fov(-99), ufov(-99),
res(-99), namc(-99), h(-99), x(-99), format_errors(0), dataword(-99)
{};

// Fill constructor
AMC13Header(int int_orn, int int_lv1_id, int int_bx_id, int int_source_id, int int_evt_ty, int int_fov, int int_ufov, int int_res, int int_namc, int int_h, int int_x) :
orn(int_orn), lv1_id(int_lv1_id), bx_id(int_bx_id), source_id(int_source_id), evt_ty(int_evt_ty), fov(int_fov), ufov(int_ufov), res(int_res), namc(int_namc), h(int_h), x(int_x), dataword(-99)
AMC13Header(int int_orn, int int_lv1_id, int int_bx_id, int int_source_id, int int_evt_ty, int int_fov, int int_ufov,
int int_res, int int_namc, int int_h, int int_x) :
orn(int_orn), lv1_id(int_lv1_id), bx_id(int_bx_id), source_id(int_source_id), evt_ty(int_evt_ty), fov(int_fov), ufov(int_ufov),
res(int_res), namc(int_namc), h(int_h), x(int_x), format_errors(0), dataword(-99)
{};

virtual ~AMC13Header() {};
Expand All @@ -36,6 +39,7 @@ namespace l1t {
void set_namc(int bits) { namc = bits; };
void set_h(int bits) { h = bits; };
void set_x(int bits) { x = bits; };
void add_format_error() { format_errors += 1; };
void set_dataword(uint64_t bits) { dataword = bits; };

const int ORN() const { return orn ; };
Expand All @@ -49,7 +53,8 @@ namespace l1t {
const int Namc() const { return namc ; };
const int H() const { return h ; };
const int X() const { return x ; };
const uint64_t Dataword() const { return dataword; };
const int Format_Errors() const { return format_errors; };
const uint64_t Dataword() const { return dataword; };

private:
int orn;
Expand All @@ -63,6 +68,7 @@ namespace l1t {
int namc;
int h;
int x;
int format_errors;
uint64_t dataword;

}; // End class AMC13Header
Expand Down
Loading

0 comments on commit 57b2eeb

Please sign in to comment.