|
|
Go to the documentation of this file.
104 std::vector<HcalDDDRecConstants::HcalActiveLength>
actHB,
actHE;
126 std::vector<double>
PCharge,
PChi2,
PD0,
PD0Error,
dxyWithBS,
dzWithBS,
PdxyTrack,
PdzTrack,
PNormalizedChi2,
PNDoF,
127 PValidHits,
PLostHits,
NPvx,
NPvy,
NPvz,
NQOverP,
NQOverPError,
NTrkMomentum,
NRefPointX,
NRefPointY,
NRefPointZ;
154 : hlTriggerResults_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"hlTriggerResults_")),
155 muonsrc_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"muonSource")),
156 verbosity_(iConfig.getUntrackedParameter<
int>(
"verbosity", 0)),
157 useRaw_(iConfig.getUntrackedParameter<
int>(
"UseRaw", 0)),
158 isAOD_(iConfig.getUntrackedParameter<
bool>(
"IsAOD",
false)) {
183 tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
184 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
186 tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
187 tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
189 tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
225 std::vector<int>
index;
226 for (
int i = 0;
i < Ntriggers;
i++) {
228 int triggerSize =
int(_Triggers->
size());
231 if (
index[
i] < triggerSize) {
235 <<
" trigger_index " <<
hltresults.at(
i) <<
" hltresult ";
238 <<
"\" does not exist";
273 for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon != _Muon->end(); ++RecMuon) {
278 EtaGlob.push_back(RecMuon->eta());
279 PhiGlob.push_back(RecMuon->phi());
280 Energy.push_back(RecMuon->energy());
281 Pmuon.push_back(RecMuon->p());
284 if (RecMuon->track().isNonnull()) {
285 TrackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
289 if (RecMuon->innerTrack().isNonnull()) {
291 NumPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
292 chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
298 Tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
312 if (RecMuon->outerTrack().isNonnull()) {
317 OuterTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
318 OuterTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
330 if (RecMuon->globalTrack().isNonnull()) {
332 chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
333 GlobalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
334 MatchedStat.push_back(RecMuon->numberOfMatchedStations());
353 ((RecMuon->pfIsolationR04().sumChargedHadronPt +
355 RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt -
356 (0.5 * RecMuon->pfIsolationR04().sumPUPt))) /
360 ((RecMuon->pfIsolationR03().sumChargedHadronPt +
362 RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt -
363 (0.5 * RecMuon->pfIsolationR03().sumPUPt))) /
370 double eEcal(0), eHcal(0), activeL(0), eHcalDepth[7], eHcalDepthHot[7], eHcalDepthCalo[7], eHcalDepthHotCalo[7];
371 unsigned int isHot = 0;
372 unsigned int isHotCalo = 0;
374 for (
int i = 0;
i < 7; ++
i)
375 eHcalDepth[
i] = eHcalDepthHot[
i] = eHcalDepthCalo[
i] = eHcalDepthHotCalo[
i] = -10000;
377 if (RecMuon->innerTrack().isNonnull()) {
429 std::vector<std::pair<double, int> > ehdepth;
443 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
444 eHcalDepth[ehdepth[
i].second - 1] = ehdepth[
i].first;
447 <<
"eHcalDepth " <<
i <<
":" << (ehdepth[
i].second - 1) <<
":" << eHcalDepth[ehdepth[
i].
second - 1];
471 std::vector<std::pair<double, int> > ehdepthCalo;
485 for (
unsigned int i = 0;
i < ehdepthCalo.size(); ++
i) {
486 eHcalDepthCalo[ehdepthCalo[
i].second - 1] = ehdepthCalo[
i].first;
488 edm::LogVerbatim(
"HBHEMuon") <<
"eHcalDepthCalo " <<
i <<
":" << (ehdepth[
i].second - 1) <<
":"
489 << eHcalDepth[ehdepth[
i].
second - 1];
500 geo, theHBHETopology, closestCellCalo, calosimhits, 1, 1, hotCellCalo,
false,
useRaw_,
false);
502 isHot =
matchId(closestCell, hotCell);
503 isHotCalo =
matchId(closestCellCalo, hotCellCalo);
507 <<
" ClosestCell <" << (
HcalDetId)(closestCell) <<
"> hotCell id < " << hotCell
508 <<
"> isHot" << isHot;
513 std::vector<std::pair<double, int> > ehdepth;
526 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
527 eHcalDepthHot[ehdepth[
i].second - 1] = ehdepth[
i].first;
529 edm::LogVerbatim(
"HBHEMuon") <<
"eHcalDepthHot " <<
i <<
":" << (ehdepth[
i].second - 1) <<
":"
530 << eHcalDepthHot[ehdepth[
i].
second - 1];
538 std::vector<std::pair<double, int> > ehdepthCalo;
553 for (
unsigned int i = 0;
i < ehdepthCalo.size(); ++
i) {
554 eHcalDepthHotCalo[ehdepthCalo[
i].second - 1] = ehdepthCalo[
i].first;
556 edm::LogVerbatim(
"HBHEMuon") <<
"eHcalDepthHotCalo " <<
i <<
":" << (ehdepth[
i].second - 1) <<
":"
557 << eHcalDepthHot[ehdepth[
i].
second - 1];
725 edm::LogVerbatim(
"HBHEMuon") <<
"HLT config with process name 'HLT' successfully extracted";
726 std::string string_search[5] = {
"HLT_IsoMu_",
"HLT_L1SingleMu_",
"HLT_L2Mu",
"HLT_Mu",
"HLT_RelIso1p0Mu"};
730 for (
unsigned int ik = 0; ik < 5; ++ik) {
731 if (hltname.find(string_search[ik]) != std::string::npos) {
739 edm::LogError(
"HBHEMuon") <<
"Error! HLT config extraction with process name 'HLT' failed";
751 desc.addUntracked<
int>(
"verbosity", 0);
752 desc.addUntracked<
int>(
"useRaw", 0);
753 desc.add<
bool>(
"isAOD",
false);
754 desc.addUntracked<
int>(
"maxDepth", 4);
755 descriptions.
add(
"hcalRaddamMuon",
desc);
834 int match = ((kd1 == kd2) ? 1 : 0);
840 int ieta =
id.ietaAbs();
841 int depth =
id.depth();
846 for (
unsigned int i = 0;
i <
actHB.size(); ++
i) {
855 for (
unsigned int i = 0;
i <
actHE.size(); ++
i) {
std::vector< double > PD0
std::vector< double > ImpactParameter
std::vector< double > EtaGlob
std::vector< double > Pthetha
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< double > innerTrackphi
std::vector< double > NRefPointY
std::vector< double > Tight_TransImpara
std::vector< double > NumPixelLayers
std::vector< double > OuterTrackPhi
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
std::vector< bool > OuterTrack
std::vector< double > MuonHcalDepth5EnergyCalo
std::vector< double > chiTracker
const edm::InputTag muonsrc_
int matchId(const HcalDetId &, const HcalDetId &)
std::vector< double > dzWithBS
std::vector< double > dxyWithBS
std::vector< double > MuonHcalDepth6EnergyCalo
std::vector< double > PtGlob
std::vector< double > MuonHcalDepth6HotEnergy
std::vector< double > PLostHits
std::vector< int > hltresults
std::vector< double > track_cosmic_momentumIX
std::vector< unsigned int > MuonEHcalDetId
double _RecoMuon1TrackIsoSumPtMaxCutValue_04
std::vector< double > MuonHcalDepth7HotEnergyCalo
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
std::vector< double > MuonHcalDepth3EnergyCalo
std::vector< HcalActiveLength > getThickActive(const int &type) const
edm::Service< TFileService > fs
double _RecoMuon1TrackIsoSumPtMaxCutValue_03
std::vector< double > track_cosmic_yposition
std::vector< double > MuonHcalDepth1HotEnergy
std::vector< double > TrackerLayer
std::vector< double > MuonHOEnergy
std::vector< double > IsolationR03
std::vector< double > MuonHcalDepth3HotEnergy
std::vector< double > track_cosmic_zmomentum
std::vector< double > MuonHcalDepth1HotEnergyCalo
std::vector< double > track_cosmic_positionOZ
U second(std::pair< T, U > const &p)
std::vector< double > Tight_MuonHits
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > PhiGlob
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
std::vector< double > v_RH_h3x3_ene
std::vector< double > PNDoF
std::vector< std::string > all_triggers2
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< std::string > hltpaths
std::vector< double > Tight_PixelHits
HLTConfigProvider hltConfig_
std::vector< double > track_cosmic_zposition
std::vector< double > DzTracker
std::vector< double > track_cosmic_positionOY
std::vector< double > MuonHcalEnergy
std::vector< double > MuonHcalDepth7Energy
std::vector< double > MuonHcalDepth2Energy
std::vector< double > track_cosmic_momentumOZ
std::vector< double > OuterTrackHits
std::vector< double > track_cosmic_positionOX
std::vector< double > MuonHcalDepth5HotEnergy
std::vector< double > track_cosmic_detIDouter
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
std::vector< double > MuonHcal1x1Energy
std::vector< bool > muon_global
std::vector< double > PyGlob
std::vector< double > PChi2
std::vector< unsigned int > MuonHcalDetId
std::vector< double > PxGlob
std::vector< double > MuonHcalDepth6Energy
std::vector< double > MuonHcalDepth2EnergyCalo
std::vector< double > PdxyTrack
void endRun(edm::Run const &, edm::EventSetup const &) override
void energyHCALCell(HcalDetId detId, edm::Handle< T > &hits, std::vector< std::pair< double, int > > &energyCell, int maxDepth=1, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, int depthHE=3, bool debug=false)
std::vector< unsigned int > MuonHcalHotCalo
std::vector< double > IsolationR04
std::vector< double > track_cosmic_momentumIZ
#define DEFINE_FWK_MODULE(type)
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > Tight_GlobalMuonTrkFit
std::vector< double > Tight_TrkerLayers
std::vector< bool > muon_tracker
std::vector< double > NPvy
unsigned int size() const
Get number of paths stored.
std::vector< double > GlobalMuonHits
std::vector< double > MuonHcalDepth2HotEnergyCalo
std::vector< double > OuterTrackPt
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
std::vector< bool > innerTrack
std::vector< double > NPvx
std::vector< double > NQOverP
~HcalRaddamMuon() override
std::vector< double > NormChi2
std::vector< double > MuonHcalDepth7HotEnergy
const Point & position() const
position
std::vector< bool > all_ifTriggerpassed
std::vector< double > OuterTrackEta
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
std::vector< double > chiGlobal
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::MuonCollection > tok_muon_
unsigned int size() const
number of trigger paths in trigger table
std::vector< double > MuonHcalDepth5Energy
std::vector< double > track_cosmic_momentumIY
std::vector< double > MuonHcalDepth4EnergyCalo
std::vector< double > MuonHcalDepth1EnergyCalo
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
std::vector< double > MuonHcalDepth4HotEnergy
std::vector< double > track_cosmic_momentumOY
std::vector< unsigned int > MuonHcalHot
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< double > NRefPointZ
std::vector< double > MuonEcalEnergy
std::vector< double > track_cosmic_detid
std::vector< double > MuonEcal3x3Energy
std::vector< double > track_cosmic_ymomentum
const HcalDDDRecConstants * dddConstants() const
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::vector< double > Tight_MatchedStations
static int position[264][3]
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
std::vector< double > MuonHcalDepth5HotEnergyCalo
std::vector< double > DxyTracker
std::vector< double > NQOverPError
std::vector< double > PNormalizedChi2
std::vector< double > OuterTrackRHits
std::vector< double > GlobalTrckPhi
Log< level::Error, false > LogError
std::vector< double > MuonHcalDepth4HotEnergyCalo
std::vector< double > PdzTrack
unsigned int triggerIndex(std::string_view name) const
std::vector< double > PValidHits
std::vector< int > v_RH_h3x3_iphi
std::vector< double > trackerlayer_hits
void beginRun(edm::Run const &, edm::EventSetup const &) override
bool getData(T &iHolder) const
std::vector< double > MuonHcalDepth7EnergyCalo
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
std::vector< float > time_hb
std::vector< double > MuonHcalDepth6HotEnergyCalo
std::vector< double > MuonHcalDepth1Energy
std::vector< std::string > all_triggers1
std::vector< double > PD0Error
constexpr uint32_t rawId() const
get the raw id
std::vector< double > MuonHcalDepth2HotEnergy
std::vector< double > innerTrackpt
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
std::vector< double > High_TrackLayers
std::vector< double > GlobalTrckPt
std::vector< double > Pmuon
Log< level::Info, true > LogVerbatim
static const std::string kSharedResource
std::vector< std::string > all_triggers3
std::vector< bool > muon_is_good
std::vector< double > PzGlob
const edm::InputTag hlTriggerResults_
std::vector< std::string > TrigName_
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
bool accept() const
Has at least one path accepted the event?
std::vector< double > OuterTrackChi
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
std::vector< double > track_cosmic_detIDinner
std::vector< double > innerTracketa
const std::string & triggerName(unsigned int triggerIndex) const
std::vector< double > Tight_LongPara
std::vector< double > MuonHcalDepth4Energy
std::vector< double > No_pixelLayers
std::vector< double > NRefPointX
std::vector< double > track_cosmic_rad
std::vector< double > MuonHcalActiveLength
std::vector< double > NPvz
std::vector< float > energy_hb
std::vector< double > track_cosmic_momentumOX
std::vector< bool > GlobalTrack
std::vector< bool > Trk_match_MuStat
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hcal_
std::vector< int > v_RH_h3x3_ieta
std::vector< double > MuonHcalDepth3Energy
std::vector< double > MatchedStat
std::vector< double > track_cosmic_positionIX
std::vector< double > track_cosmic_positionIZ
std::vector< double > PCharge
std::vector< double > GlobalTrckEta
std::vector< double > NTrkMomentum
std::vector< double > track_cosmic_xmomentum
std::vector< std::string > all_triggers4
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< unsigned int > MuonEcalDetId
double activeLength(const DetId &)
std::vector< std::string > all_triggers5
std::vector< double > MuonHcalDepth3HotEnergyCalo
std::vector< double > Energy
HcalRaddamMuon(const edm::ParameterSet &)
T * make(const Args &... args) const
make new ROOT object
std::vector< std::string > all_triggers
std::vector< double > track_cosmic_positionIY
std::vector< double > track_cosmic_xposition