Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DPGAnalysis/MuonTools/interface/MuDigiBaseProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MuDigiBaseProducer : public SimpleFlatTableProducerBase<DIGI_T, MuonDigiCo

using IntDetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, int>;
using UIntDetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, unsigned int>;
using Int8DetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, int8_t>;
using Int16DetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, int16_t>;
using UInt8DetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, uint8_t>;

std::vector<std::unique_ptr<Variable<DETECTOR_T>>> detIdVars_;
Expand All @@ -44,8 +44,8 @@ class MuDigiBaseProducer : public SimpleFlatTableProducerBase<DIGI_T, MuonDigiCo
detVarPtr = std::move(std::make_unique<IntDetVar>(name, varCfg));
} else if (type == "uint") {
detVarPtr = std::move(std::make_unique<UIntDetVar>(name, varCfg));
} else if (type == "int8") {
detVarPtr = std::move(std::make_unique<Int8DetVar>(name, varCfg));
} else if (type == "int16") {
detVarPtr = std::move(std::make_unique<Int16DetVar>(name, varCfg));
} else if (type == "uint8") {
detVarPtr = std::move(std::make_unique<UInt8DetVar>(name, varCfg));
} else {
Expand All @@ -69,7 +69,7 @@ class MuDigiBaseProducer : public SimpleFlatTableProducerBase<DIGI_T, MuonDigiCo
variable.add<std::string>("doc")->setComment("few words description of the branch content");

variable.ifValue(edm::ParameterDescription<std::string>("type", "int", true, comType),
edm::allowedValues<std::string>("int", "uint", "int8", "uint8"));
edm::allowedValues<std::string>("int", "uint", "int16", "uint8"));

edm::ParameterSetDescription variables;

Expand Down
8 changes: 4 additions & 4 deletions DPGAnalysis/MuonTools/interface/MuLocalRecoBaseProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MuRecObjBaseProducer

using IntDetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, int>;
using UIntDetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, unsigned int>;
using Int8DetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, int8_t>;
using Int16DetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, int16_t>;
using UInt8DetVar = FuncVariable<DETECTOR_T, StringObjectFunction<DETECTOR_T>, uint8_t>;

std::vector<std::unique_ptr<Variable<DETECTOR_T>>> detIdVars_;
Expand All @@ -67,8 +67,8 @@ class MuRecObjBaseProducer
detVarPtr = std::move(std::make_unique<IntDetVar>(name, varCfg)); // CB can improve?
} else if (type == "uint") {
detVarPtr = std::move(std::make_unique<UIntDetVar>(name, varCfg));
} else if (type == "int8") {
detVarPtr = std::move(std::make_unique<Int8DetVar>(name, varCfg));
} else if (type == "int16") {
detVarPtr = std::move(std::make_unique<Int16DetVar>(name, varCfg));
} else if (type == "uint8") {
detVarPtr = std::move(std::make_unique<UInt8DetVar>(name, varCfg));
} else {
Expand Down Expand Up @@ -124,7 +124,7 @@ class MuRecObjBaseProducer

edm::Comment comType{"the c++ type of the branch in the flat table"};
detIdVar.ifValue(edm::ParameterDescription<std::string>{"type", "int", true, comType},
edm::allowedValues<std::string>("int", "uint", "int8", "uint8"));
edm::allowedValues<std::string>("int", "uint", "int16", "uint8"));

edm::Comment comPrecision{"the precision with which to store the value in the flat table"};
globalGeomVar.addOptionalNode(edm::ParameterDescription<int>{"precision", true, comPrecision}, false);
Expand Down
8 changes: 4 additions & 4 deletions DPGAnalysis/MuonTools/plugins/MuDTMuonExtTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ void MuDTMuonExtTableProducer::fillTable(edm::Event& ev) {
std::vector<uint32_t> staMatches_begin;
std::vector<uint32_t> staMatches_end;

std::vector<int8_t> matches_wheel;
std::vector<int8_t> matches_sector;
std::vector<int8_t> matches_station;
std::vector<int16_t> matches_wheel;
std::vector<int16_t> matches_sector;
std::vector<int16_t> matches_station;

std::vector<float> matches_x;
std::vector<float> matches_y;
Expand Down Expand Up @@ -402,4 +402,4 @@ bool MuDTMuonExtTableProducer::hasTrigger(std::vector<int>& trigIndices,
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"

DEFINE_FWK_MODULE(MuDTMuonExtTableProducer);
DEFINE_FWK_MODULE(MuDTMuonExtTableProducer);
12 changes: 6 additions & 6 deletions DPGAnalysis/MuonTools/plugins/MuDTSegmentExtTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,19 @@ void MuDTSegmentExtTableProducer::fillTable(edm::Event& ev) {

std::vector<float> seg4D_hitsExpPos;
std::vector<float> seg4D_hitsExpPosCh;
std::vector<int8_t> seg4D_hitsExpWire;
std::vector<int16_t> seg4D_hitsExpWire;

// rec-hits vectors, filled if m_fillHits == true
unsigned int nHits{0};

std::vector<float> seg2D_hits_pos;
std::vector<float> seg2D_hits_posCh;
std::vector<float> seg2D_hits_posErr;
std::vector<int8_t> seg2D_hits_side;
std::vector<int8_t> seg2D_hits_wire;
std::vector<int8_t> seg2D_hits_wirePos;
std::vector<int8_t> seg2D_hits_layer;
std::vector<int8_t> seg2D_hits_superLayer;
std::vector<int16_t> seg2D_hits_side;
std::vector<int16_t> seg2D_hits_wire;
std::vector<int16_t> seg2D_hits_wirePos;
std::vector<int16_t> seg2D_hits_layer;
std::vector<int16_t> seg2D_hits_superLayer;
std::vector<float> seg2D_hits_time;
std::vector<float> seg2D_hits_timeCali;

Expand Down
14 changes: 7 additions & 7 deletions DPGAnalysis/MuonTools/plugins/MuDTTPGPhiFlatTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ void MuDTTPGPhiFlatTableProducer::getFromES(const edm::Run& run, const edm::Even
void MuDTTPGPhiFlatTableProducer::fillTable(edm::Event& ev) {
unsigned int nTrigs{0};

std::vector<int8_t> wheel;
std::vector<int8_t> sector;
std::vector<int8_t> station;
std::vector<int16_t> wheel;
std::vector<int16_t> sector;
std::vector<int16_t> station;

std::vector<int8_t> quality;
std::vector<int8_t> rpcBit;
std::vector<int16_t> quality;
std::vector<int16_t> rpcBit;

std::vector<int> phi;
std::vector<int> phiB;

std::vector<float> posLoc_x;
std::vector<float> dirLoc_phi;

std::vector<int8_t> bx;
std::vector<int8_t> is2nd;
std::vector<int16_t> bx;
std::vector<int16_t> is2nd;

auto trigColl = m_token.conditionalGet(ev);

Expand Down
10 changes: 5 additions & 5 deletions DPGAnalysis/MuonTools/plugins/MuDTTPGThetaFlatTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ void MuDTTPGThetaFlatTableProducer::fillDescriptions(edm::ConfigurationDescripti
void MuDTTPGThetaFlatTableProducer::fillTable(edm::Event& ev) {
unsigned int nTrigs{0};

std::vector<int8_t> wheel;
std::vector<int8_t> sector;
std::vector<int8_t> station;
std::vector<int16_t> wheel;
std::vector<int16_t> sector;
std::vector<int16_t> station;

std::vector<int8_t> bx;
std::vector<int16_t> bx;
std::vector<uint32_t> hitMap;

auto trigColl = m_token.conditionalGet(ev);
Expand Down Expand Up @@ -152,4 +152,4 @@ MuDTTPGThetaFlatTableProducer::TriggerTag MuDTTPGThetaFlatTableProducer::getTag(
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"

DEFINE_FWK_MODULE(MuDTTPGThetaFlatTableProducer);
DEFINE_FWK_MODULE(MuDTTPGThetaFlatTableProducer);
24 changes: 12 additions & 12 deletions DPGAnalysis/MuonTools/plugins/MuGEMMuonExtTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ void MuGEMMuonExtTableProducer::fillTable(edm::Event& ev) {

std::vector<bool> propagated_isincoming;
std::vector<bool> propagated_isinsideout;
std::vector<int8_t> propagated_region;
std::vector<int8_t> propagated_layer;
std::vector<int8_t> propagated_chamber;
std::vector<int8_t> propagated_etaP;
std::vector<int16_t> propagated_region;
std::vector<int16_t> propagated_layer;
std::vector<int16_t> propagated_chamber;
std::vector<int16_t> propagated_etaP;

std::vector<float> propagatedLoc_x;
std::vector<float> propagatedLoc_y;
Expand Down Expand Up @@ -148,10 +148,10 @@ void MuGEMMuonExtTableProducer::fillTable(edm::Event& ev) {
std::vector<float> propagated_EtaPartition_rMax;
std::vector<float> propagated_EtaPartition_rMin;

std::vector<int8_t> propagated_nME1hits;
std::vector<int8_t> propagated_nME2hits;
std::vector<int8_t> propagated_nME3hits;
std::vector<int8_t> propagated_nME4hits;
std::vector<int16_t> propagated_nME1hits;
std::vector<int16_t> propagated_nME2hits;
std::vector<int16_t> propagated_nME3hits;
std::vector<int16_t> propagated_nME4hits;

auto muons = m_token.conditionalGet(ev);

Expand Down Expand Up @@ -237,10 +237,10 @@ void MuGEMMuonExtTableProducer::fillTable(edm::Event& ev) {
//if at least one CSC hit is found, perform propagation
if (is_csc) {
// CSC Hits
int8_t nME1_hits = 0;
int8_t nME2_hits = 0;
int8_t nME3_hits = 0;
int8_t nME4_hits = 0;
int16_t nME1_hits = 0;
int16_t nME2_hits = 0;
int16_t nME3_hits = 0;
int16_t nME4_hits = 0;

int nHits{htp.numberOfAllHits(htp.TRACK_HITS)};

Expand Down
10 changes: 5 additions & 5 deletions DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

muDPGNanoProducer = cms.Sequence(lhcInfoTableProducer
+ lumiTableProducer
+ muDigiProducers
+ muLocalRecoProducers
+ muDigiProducers
+ muLocalRecoProducers
+ muRecoProducers
+ muL1TriggerProducers
)

def muDPGNanoCustomize(process) :

if hasattr(process, "dtrpcPointFlatTableProducer") and \
hasattr(process, "cscrpcPointFlatTableProducer") and \
hasattr(process, "RawToDigiTask"):
Expand All @@ -27,7 +27,7 @@ def muDPGNanoCustomize(process) :
process.rpcPointProducer.cscSegments = 'cscSegments'
process.rpcPointProducer.ExtrapolatedRegion = 0.6
process.RawToDigiTask.add(process.rpcPointProducer)

if hasattr(process, "muGEMMuonExtTableProducer") or hasattr(process, "muCSCTnPFlatTableProducer"):
process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi")
Expand Down
78 changes: 39 additions & 39 deletions DPGAnalysis/MuonTools/python/nano_mu_digi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@

dtDigiFlatTableProducer.variables = cms.PSet(
time = Var("time()", float, doc = "digi time"),
wire = Var("wire()", "int8", doc="wire - [1:X] range"
wire = Var("wire()", "int16", doc="wire - [1:X] range"
"<br />(X varies for different chambers SLs and layers)")
)

dtDigiFlatTableProducer.detIdVariables = cms.PSet(
wheel = DetIdVar("wheel()", "int8", doc = "wheel - [-2:2] range"),
sector = DetIdVar("sector()", "int8", doc = "sector - [1:14] range"
wheel = DetIdVar("wheel()", "int16", doc = "wheel - [-2:2] range"),
sector = DetIdVar("sector()", "int16", doc = "sector - [1:14] range"
"<br />sector 13 used for the second MB4 of sector 4"
"<br />sector 14 used for the second MB4 of sector 10"),
station = DetIdVar("station()", "int8", doc = "station - [1:4] range"),
superLayer = DetIdVar("superLayer()", "int8", doc = "superlayer - [1:3] range"
station = DetIdVar("station()", "int16", doc = "station - [1:4] range"),
superLayer = DetIdVar("superLayer()", "int16", doc = "superlayer - [1:3] range"
"<br />SL 1 and 3 are phi SLs"
"<br />SL 2 is theta SL"),
layer = DetIdVar("layer()", "int8", doc = "layer - [1:4] range")
layer = DetIdVar("layer()", "int16", doc = "layer - [1:4] range")
)


Expand All @@ -40,18 +40,18 @@
)

rpcDigiFlatTableProducer.detIdVariables = cms.PSet(
region = DetIdVar("region()", "int8", doc = "0: barrel, +/-1: endcap"),
ring = DetIdVar("ring()", "int8", doc = "ring id:"
region = DetIdVar("region()", "int16", doc = "0: barrel, +/-1: endcap"),
ring = DetIdVar("ring()", "int16", doc = "ring id:"
"<br />wheel number in barrel - [-2:+2] range"
"<br />ring number in endcap - [1:3] range"),
station = DetIdVar("station()", "int8", doc = "chambers at same R in barrel, chambers at same Z ion endcap"),
layer = DetIdVar("layer()", "int8", doc = "layer id:"
station = DetIdVar("station()", "int16", doc = "chambers at same R in barrel, chambers at same Z ion endcap"),
layer = DetIdVar("layer()", "int16", doc = "layer id:"
"<br />barrel stations 1 and 2, have two layers of chambers "
"(layer 1 is the inner chamber and layer 2 is the outer chamber)"),
sector = DetIdVar("sector()", "int8", doc = "group of chambers at same phi"),
subsector = DetIdVar("subsector()", "int8", doc = "Some sectors are divided along the phi direction in subsectors "
sector = DetIdVar("sector()", "int16", doc = "group of chambers at same phi"),
subsector = DetIdVar("subsector()", "int16", doc = "Some sectors are divided along the phi direction in subsectors "
"(from 1 to 4 in Barrel, from 1 to 6 in Endcap)"),
roll = DetIdVar("roll()", "int8", doc = "roll id (also known as eta partition):"
roll = DetIdVar("roll()", "int16", doc = "roll id (also known as eta partition):"
"<br />each chamber is divided along the strip direction"),
rawId = DetIdVar("rawId()", "uint", doc = "unique detector unit ID")
)
Expand All @@ -63,19 +63,19 @@
gemDigiFlatTableProducer.doc = "GEM digi information"

gemDigiFlatTableProducer.variables = cms.PSet(
strip = Var("strip()", "int8", doc = "index of the readout strip associated to the digi"),
bx = Var("bx()", "int8", doc="bunch crossing associated to the digi")
strip = Var("strip()", "int16", doc = "index of the readout strip associated to the digi"),
bx = Var("bx()", "int16", doc="bunch crossing associated to the digi")
)

gemDigiFlatTableProducer.detIdVariables = cms.PSet(
station = DetIdVar("station()", "int8", doc = "GEM station <br />(always 1 for GE1/1)"),
region = DetIdVar("region()", "int8", doc = "GE11 region where the digi is detected"
station = DetIdVar("station()", "int16", doc = "GEM station <br />(always 1 for GE1/1)"),
region = DetIdVar("region()", "int16", doc = "GE11 region where the digi is detected"
"<br />(int, positive endcap: +1, negative endcap: -1)"),
roll = DetIdVar("roll()", "int8", doc = "roll id (also known as eta partition)"
roll = DetIdVar("roll()", "int16", doc = "roll id (also known as eta partition)"
"<br />(partitions numbered from 1 to 8)"),
chamber = DetIdVar("chamber()", "int8", doc = "GE11 superchamber where the hit is reconstructed"
chamber = DetIdVar("chamber()", "int16", doc = "GE11 superchamber where the hit is reconstructed"
"<br />(chambers numbered from 0 to 35)"),
layer = DetIdVar("layer()", "int8", doc = "GE11 layer where the hit is reconstructed"
layer = DetIdVar("layer()", "int16", doc = "GE11 layer where the hit is reconstructed"
"<br />(layer1: 1, layer2: 2)")
)

Expand All @@ -98,11 +98,11 @@
)

gemohStatusFlatTableProducer.detIdVariables = cms.PSet(
station = DetIdVar("station()", "int8", doc = "GEM station <br />always 1 for GE1/1)"),
region = DetIdVar("region()", "int8", doc = "region with which the GEMOHStatus is associated"
station = DetIdVar("station()", "int16", doc = "GEM station <br />always 1 for GE1/1)"),
region = DetIdVar("region()", "int16", doc = "region with which the GEMOHStatus is associated"
"<br />int, positive endcap: +1, negative endcap: -1"),
chamber = DetIdVar("chamber()", "int8", doc = "chamber with which the GEMOHStatus is associated"),
layer = DetIdVar("layer()", "int8", doc = "layer with which the GEMOHStatus is associated<br /> either 1 or 2 for GE1/1 and GE2/1")
chamber = DetIdVar("chamber()", "int16", doc = "chamber with which the GEMOHStatus is associated"),
layer = DetIdVar("layer()", "int16", doc = "layer with which the GEMOHStatus is associated<br /> either 1 or 2 for GE1/1 and GE2/1")
)


Expand All @@ -113,17 +113,17 @@
cscWireDigiFlatTableProducer.doc = "CSC wire digi information"

cscWireDigiFlatTableProducer.variables = cms.PSet(
timeBin = Var("getTimeBin()", "int8", doc = ""),
wireGroup = Var("getWireGroup()", "int8", doc=""),
wireGroupBX = Var("getWireGroupBX()", "int8", doc="")
timeBin = Var("getTimeBin()", "int16", doc = ""),
wireGroup = Var("getWireGroup()", "int16", doc=""),
wireGroupBX = Var("getWireGroupBX()", "int16", doc="")
)

cscWireDigiFlatTableProducer.detIdVariables = cms.PSet(
endcap = DetIdVar("endcap()", "int8", doc = ""),
station = DetIdVar("station()", "int8", doc = ""),
ring = DetIdVar("ring()", "int8", doc = ""),
chamber = DetIdVar("chamber()", "int8", doc = ""),
layer = DetIdVar("layer()", "int8", doc = "")
endcap = DetIdVar("endcap()", "int16", doc = ""),
station = DetIdVar("station()", "int16", doc = ""),
ring = DetIdVar("ring()", "int16", doc = ""),
chamber = DetIdVar("chamber()", "int16", doc = ""),
layer = DetIdVar("layer()", "int16", doc = "")
)

from DPGAnalysis.MuonTools.cscAlctDigiFlatTableProducer_cfi import cscAlctDigiFlatTableProducer
Expand All @@ -133,16 +133,16 @@
cscAlctDigiFlatTableProducer.doc = "CSC ALCT digi information"

cscAlctDigiFlatTableProducer.variables = cms.PSet(
keyWireGroup = Var("getKeyWG()", "int8", doc = ""),
bx = Var("getBX()", "int8", doc="")
keyWireGroup = Var("getKeyWG()", "int16", doc = ""),
bx = Var("getBX()", "int16", doc="")
)

cscAlctDigiFlatTableProducer.detIdVariables = cms.PSet(
endcap = DetIdVar("endcap()", "int8", doc = ""),
station = DetIdVar("station()", "int8", doc = ""),
ring = DetIdVar("ring()", "int8", doc = ""),
chamber = DetIdVar("chamber()", "int8", doc = ""),
layer = DetIdVar("layer()", "int8", doc = "")
endcap = DetIdVar("endcap()", "int16", doc = ""),
station = DetIdVar("station()", "int16", doc = ""),
ring = DetIdVar("ring()", "int16", doc = ""),
chamber = DetIdVar("chamber()", "int16", doc = ""),
layer = DetIdVar("layer()", "int16", doc = "")
)

muDigiProducers = cms.Sequence(dtDigiFlatTableProducer
Expand Down
Loading