-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Carlo Battilana
committed
Apr 5, 2023
1 parent
4476e41
commit 2c9d5bd
Showing
19 changed files
with
950 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...uonTools/plugins/MuNtupleDTTPGPhiFiller.h → ...ols/plugins/MuDTTPGPhiFlatTableProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...nTools/plugins/MuNtupleDTTPGThetaFiller.h → ...s/plugins/MuDTTPGThetaFlatTableProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** \class MuDigiFlatTableProducers.cc MuDigiFlatTableProducers.cc DPGAnalysis/MuonTools/src/MuDigiFlatTableProducers.cc | ||
* | ||
* EDProducers : the flat table producers for CSC, DT, GEM and RPC digis | ||
* | ||
* \author C. Battilana (INFN BO) | ||
* | ||
* | ||
*/ | ||
|
||
#include "DPGAnalysis/MuonTools/src/MuDigiBaseProducer.h" | ||
|
||
#include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h" | ||
using CSCWireDigiFlatTableProducer = MuDigiBaseProducer<CSCDetId,CSCWireDigi>; | ||
|
||
#include "DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h" | ||
using CSCALCTDigiFlatTableProducer = MuDigiBaseProducer<CSCDetId,CSCALCTDigi>; | ||
|
||
#include "DataFormats/DTDigi/interface/DTDigiCollection.h" | ||
using DTDigiFlatTableProducer = MuDigiBaseProducer<DTLayerId,DTDigi>; | ||
|
||
#include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" | ||
using RPCDigiFlatTableProducer = MuDigiBaseProducer<RPCDetId,RPCDigi>; | ||
|
||
#include "DataFormats/GEMDigi/interface/GEMDigiCollection.h" | ||
using GEMDigiFlatTableProducer = MuDigiBaseProducer<GEMDetId,GEMDigi>; | ||
|
||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
DEFINE_FWK_MODULE(CSCWireDigiFlatTableProducer); | ||
DEFINE_FWK_MODULE(CSCALCTDigiFlatTableProducer); | ||
DEFINE_FWK_MODULE(DTDigiFlatTableProducer); | ||
DEFINE_FWK_MODULE(RPCDigiFlatTableProducer); | ||
DEFINE_FWK_MODULE(GEMDigiFlatTableProducer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** \class MuRecoFlatTableProducers.ccMuRecoFlatTableProducers DPGAnalysis/MuonTools/src/MuRecoFlatTableProducers.cc | ||
* | ||
* EDProducers : the flat table producers for DT, GEM and RPC RecHits and Segments | ||
* | ||
* \author C. Battilana (INFN BO) | ||
* | ||
* | ||
*/ | ||
|
||
#include "DPGAnalysis/MuonTools/src/MuRecObjBaseProducer.h" | ||
|
||
|
||
#include "Geometry/DTGeometry/interface/DTGeometry.h" | ||
#include "Geometry/Records/interface/MuonGeometryRecord.h" | ||
#include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h" | ||
|
||
using DTSegmentFlatTableProducer = MuRecObjBaseProducer<DTChamberId,DTRecSegment4D,DTGeometry>; | ||
|
||
#include "Geometry/RPCGeometry/interface/RPCGeometry.h" | ||
#include "Geometry/Records/interface/MuonGeometryRecord.h" | ||
#include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h" | ||
|
||
using RPCRecHitFlatTableProducer = MuRecObjBaseProducer<RPCDetId,RPCRecHit,RPCGeometry>; | ||
|
||
#include "Geometry/GEMGeometry/interface/GEMGeometry.h" | ||
#include "Geometry/Records/interface/MuonGeometryRecord.h" | ||
#include "DataFormats/GEMRecHit/interface/GEMRecHitCollection.h" | ||
|
||
using GEMRecHitFlatTableProducer = MuRecObjBaseProducer<GEMDetId,GEMRecHit,GEMGeometry>; | ||
|
||
#include "Geometry/GEMGeometry/interface/GEMGeometry.h" | ||
#include "Geometry/Records/interface/MuonGeometryRecord.h" | ||
#include "DataFormats/GEMRecHit/interface/GEMSegmentCollection.h" | ||
|
||
using GEMSegmentFlatTableProducer = MuRecObjBaseProducer<GEMDetId,GEMSegment,GEMGeometry>; | ||
|
||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
DEFINE_FWK_MODULE(DTSegmentFlatTableProducer); | ||
DEFINE_FWK_MODULE(RPCRecHitFlatTableProducer); | ||
DEFINE_FWK_MODULE(GEMRecHitFlatTableProducer); | ||
DEFINE_FWK_MODULE(GEMSegmentFlatTableProducer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from PhysicsTools.NanoAOD.common_cff import * | ||
from typing import NamedTuple | ||
|
||
class DEFAULT_VAL(NamedTuple): | ||
INT: int = -999 | ||
INT8: int = -99 | ||
INT_POS: int = -1 | ||
FLOAT: int = -999.0 | ||
FLOAT_POS: int = -1.0 | ||
|
||
defaults = DEFAULT_VAL() | ||
|
||
def DetIdVar(expr, type, doc=None): | ||
""" Create a PSet for a DetId variable in the tree: | ||
- expr is the expression to evaluate to compute the variable, | ||
- type of the value (int, bool, or a string that the table producer understands), | ||
- doc is a docstring, that will be passed to the table producer | ||
""" | ||
if type == float: type = "float" | ||
elif type == bool: type = "bool" | ||
elif type == int: type = "int" | ||
return cms.PSet( | ||
type = cms.string(type), | ||
expr = cms.string(expr), | ||
doc = cms.string(doc if doc else expr) | ||
) | ||
|
||
def GlobGeomVar(expr, doc=None, precision=-1): | ||
""" Create a PSet for a Global position/direction variable in the tree , | ||
- expr is the expression to evaluate to compute the variable, | ||
- doc is a docstring, that will be passed to the table producer, | ||
- precision is an int handling mantissa reduction. | ||
""" | ||
return cms.PSet( | ||
expr = cms.string(expr), | ||
doc = cms.string(doc if doc else expr), | ||
precision=cms.string(precision) if type(precision)==str else cms.int32(precision) | ||
) | ||
|
||
|
||
|
||
|
Oops, something went wrong.