CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HcalHBHEMuonAnalyzer Class Reference
Inheritance diagram for HcalHBHEMuonAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HcalHBHEMuonAnalyzer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

double activeLength (const DetId &)
 
void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void clearVectors ()
 
int depth16HE (int ieta, int iphi)
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
double gainFactor (const HcalDbService *dbserv, const HcalDetId &id)
 
bool goodCell (const HcalDetId &hcid, const reco::Track *pTrack, const CaloGeometry *geo, const MagneticField *bField)
 
bool isGoodVertex (const reco::Vertex &vtx)
 
int matchId (const HcalDetId &, const HcalDetId &)
 
double respCorr (const DetId &id)
 

Private Attributes

std::vector
< HcalDDDRecConstants::HcalActiveLength
actHB
 
std::vector
< HcalDDDRecConstants::HcalActiveLength
actHE
 
std::vector< std::string > all_triggers_
 
unsigned int bxNumber_
 
double chiGlobal_
 
double chiTracker_
 
const bool collapseDepth_
 
std::map< DetId, double > corrValue_
 
double dxyTracker_
 
double dzTracker_
 
double ecal3x3Energy_
 
unsigned int ecalDetId_
 
double ecalEnergy_
 
unsigned int ehcalDetId_
 
double energyMuon_
 
double etaGlob_
 
unsigned int eventNumber_
 
const std::string fileInCorr_
 
edm::Service< TFileServicefs
 
const CaloGeometrygeo_
 
const bool getCharge_
 
int globalMuonHits_
 
bool globalTrack_
 
double globalTrckEta_
 
double globalTrckPhi_
 
double globalTrckPt_
 
unsigned int goodVertex_
 
double hcal1x1Energy_
 
int hcal_ieta_
 
int hcal_iphi_
 
double hcalActiveLength_
 
double hcalActiveLengthHot_
 
double hcalDepthActiveLength_ [depthMax_]
 
double hcalDepthActiveLengthHot_ [depthMax_]
 
double hcalDepthChargeHot_ [depthMax_]
 
double hcalDepthChargeHotBG_ [depthMax_]
 
double hcalDepthEnergy_ [depthMax_]
 
double hcalDepthEnergyCorr_ [depthMax_]
 
double hcalDepthEnergyHot_ [depthMax_]
 
double hcalDepthEnergyHotCorr_ [depthMax_]
 
bool hcalDepthMatch_ [depthMax_]
 
bool hcalDepthMatchHot_ [depthMax_]
 
unsigned int hcalDetId_
 
double hcalEnergy_
 
bool hcalHot_
 
const HcalDDDRecConstantshdc_
 
HLTConfigProvider hltConfig_
 
std::vector< int > hltresults_
 
const edm::InputTag hlTriggerResults_
 
double hoEnergy_
 
const bool ignoreHECorr_
 
bool innerTrack_
 
double innerTracketa_
 
double innerTrackphi_
 
double innerTrackpt_
 
const bool isItPlan1_
 
const bool isItPreRecHit_
 
double isolationR03_
 
double isolationR04_
 
int kount_
 
const edm::InputTag labelEBRecHit_
 
const edm::InputTag labelEERecHit_
 
const edm::InputTag labelHBHERecHit_
 
const std::string labelMuon_
 
const std::string labelVtx_
 
unsigned int lumiNumber_
 
bool matchedId_
 
int matchedStat_
 
int maxDepth_
 
bool mergedDepth_
 
float muon_chi2LocalPosition_
 
bool muon_global_
 
bool muon_is_good_
 
bool muon_is_medium_
 
bool muon_is_tight_
 
float muon_segComp_
 
bool muon_tracker_
 
float muon_trkKink_
 
int numPixelLayers_
 
bool outerTrack_
 
double outerTrackChi_
 
double outerTrackEta_
 
int outerTrackHits_
 
double outerTrackPhi_
 
double outerTrackPt_
 
int outerTrackRHits_
 
double phiGlob_
 
double pMuon_
 
double ptGlob_
 
HcalRespCorrsrespCorrs_
 
unsigned int runNumber_
 
const HcalTopologytheHBHETopology_
 
double tight_LongPara_
 
int tight_PixelHits_
 
double tight_TransImpara_
 
double tight_validFraction_
 
edm::ESGetToken
< EcalChannelStatus,
EcalChannelStatusRcd
tok_chan_
 
edm::ESGetToken< HcalDbService,
HcalDbRecord
tok_dbservice_
 
edm::ESGetToken
< HcalDDDRecConstants,
HcalRecNumberingRecord
tok_ddrec_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EB_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EE_
 
edm::ESGetToken< CaloGeometry,
CaloGeometryRecord
tok_geom_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_HBHE_
 
edm::ESGetToken< HcalTopology,
HcalRecNumberingRecord
tok_htopo_
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
tok_magField_
 
edm::EDGetTokenT
< reco::MuonCollection
tok_Muon_
 
edm::ESGetToken< HcalRespCorrs,
HcalRespCorrsRcd
tok_respcorr_
 
edm::ESGetToken
< EcalSeverityLevelAlgo,
EcalSeverityLevelAlgoRcd
tok_sevlv_
 
edm::ESGetToken< CaloTopology,
CaloTopologyRecord
tok_topo_
 
edm::EDGetTokenT
< edm::TriggerResults
tok_trigRes_
 
edm::EDGetTokenT
< reco::VertexCollection
tok_Vtx_
 
int trackerLayer_
 
TTree * tree_
 
const std::vector< std::string > triggers_
 
const bool unCorrect_
 
bool useMyCorr_
 
const int useRaw_
 
const int verbosity_
 
const bool writeRespCorr_
 

Static Private Attributes

static const int depthMax_ = 7
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 72 of file HcalHBHEMuonAnalyzer.cc.

Constructor & Destructor Documentation

HcalHBHEMuonAnalyzer::HcalHBHEMuonAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 172 of file HcalHBHEMuonAnalyzer.cc.

References collapseDepth_, corrValue_, depthMax_, fileInCorr_, getCharge_, edm::ParameterSet::getUntrackedParameter(), hlTriggerResults_, gpuClustering::id, ignoreHECorr_, timingPdfMaker::infile, HLT_FULL_cff::InputTag, isItPlan1_, isItPreRecHit_, kount_, TFileService::kSharedResource, labelEBRecHit_, labelEERecHit_, labelHBHERecHit_, labelMuon_, labelVtx_, maxDepth_, mergedDepth_, AlCaHLTBitMon_QueryRunRegistry::string, tok_chan_, tok_dbservice_, tok_ddrec_, tok_EB_, tok_EE_, tok_geom_, tok_HBHE_, tok_htopo_, tok_magField_, tok_Muon_, tok_respcorr_, tok_sevlv_, tok_topo_, tok_trigRes_, tok_Vtx_, unCorrect_, useMyCorr_, and useRaw_.

173  : hlTriggerResults_(iConfig.getParameter<edm::InputTag>("hlTriggerResults")),
174  labelEBRecHit_(iConfig.getParameter<edm::InputTag>("labelEBRecHit")),
175  labelEERecHit_(iConfig.getParameter<edm::InputTag>("labelEERecHit")),
176  labelHBHERecHit_(iConfig.getParameter<edm::InputTag>("labelHBHERecHit")),
177  labelVtx_(iConfig.getParameter<std::string>("labelVertex")),
178  labelMuon_(iConfig.getParameter<std::string>("labelMuon")),
179  fileInCorr_(iConfig.getUntrackedParameter<std::string>("fileInCorr", "")),
180  triggers_(iConfig.getParameter<std::vector<std::string>>("triggers")),
181  verbosity_(iConfig.getUntrackedParameter<int>("verbosity", 0)),
182  useRaw_(iConfig.getParameter<int>("useRaw")),
183  unCorrect_(iConfig.getParameter<bool>("unCorrect")),
184  collapseDepth_(iConfig.getParameter<bool>("collapseDepth")),
185  isItPlan1_(iConfig.getParameter<bool>("isItPlan1")),
186  ignoreHECorr_(iConfig.getUntrackedParameter<bool>("ignoreHECorr", false)),
187  isItPreRecHit_(iConfig.getUntrackedParameter<bool>("isItPreRecHit", false)),
188  getCharge_(iConfig.getParameter<bool>("getCharge")),
189  writeRespCorr_(iConfig.getUntrackedParameter<bool>("writeRespCorr", false)),
190  hdc_(nullptr),
191  theHBHETopology_(nullptr),
192  respCorrs_(nullptr) {
193  usesResource(TFileService::kSharedResource);
194  //now do what ever initialization is needed
195  kount_ = 0;
196  maxDepth_ = iConfig.getUntrackedParameter<int>("maxDepth", 4);
197  if (maxDepth_ > depthMax_)
199  else if (maxDepth_ < 1)
200  maxDepth_ = 4;
201  std::string modnam = iConfig.getUntrackedParameter<std::string>("moduleName", "");
202  std::string procnm = iConfig.getUntrackedParameter<std::string>("processName", "");
203 
205  tok_trigRes_ = consumes<edm::TriggerResults>(hlTriggerResults_);
206  tok_EB_ = consumes<EcalRecHitCollection>(labelEBRecHit_);
207  tok_EE_ = consumes<EcalRecHitCollection>(labelEERecHit_);
208  tok_HBHE_ = consumes<HBHERecHitCollection>(labelHBHERecHit_);
209  if (modnam.empty()) {
210  tok_Vtx_ = consumes<reco::VertexCollection>(labelVtx_);
211  tok_Muon_ = consumes<reco::MuonCollection>(labelMuon_);
212  edm::LogVerbatim("HBHEMuon") << "Labels used: Trig " << hlTriggerResults_ << " Vtx " << labelVtx_ << " EB "
213  << labelEBRecHit_ << " EE " << labelEERecHit_ << " HBHE " << labelHBHERecHit_ << " MU "
214  << labelMuon_;
215  } else {
216  tok_Vtx_ = consumes<reco::VertexCollection>(edm::InputTag(modnam, labelVtx_, procnm));
217  tok_Muon_ = consumes<reco::MuonCollection>(edm::InputTag(modnam, labelMuon_, procnm));
218  edm::LogVerbatim("HBHEMuon") << "Labels used Trig " << hlTriggerResults_ << "\n Vtx "
219  << edm::InputTag(modnam, labelVtx_, procnm) << "\n EB " << labelEBRecHit_
220  << "\n EE " << labelEERecHit_ << "\n HBHE " << labelHBHERecHit_ << "\n MU "
221  << edm::InputTag(modnam, labelMuon_, procnm);
222  }
223 
224  tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
225  tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
226  tok_respcorr_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd, edm::Transition::BeginRun>();
227  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord, edm::Transition::BeginRun>();
228  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
229  tok_chan_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
230  tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
231  tok_topo_ = esConsumes<CaloTopology, CaloTopologyRecord>();
232  tok_dbservice_ = esConsumes<HcalDbService, HcalDbRecord>();
233 
234  if (!fileInCorr_.empty()) {
235  std::ifstream infile(fileInCorr_.c_str());
236  if (infile.is_open()) {
237  while (true) {
238  unsigned int id;
239  double cfac;
240  infile >> id >> cfac;
241  if (!infile.good())
242  break;
243  corrValue_[DetId(id)] = cfac;
244  }
245  infile.close();
246  }
247  }
248  useMyCorr_ = (!corrValue_.empty());
249  edm::LogVerbatim("HBHEMuon") << "Flags used: UseRaw " << useRaw_ << " GetCharge " << getCharge_ << " UnCorrect "
250  << unCorrect_ << " IgnoreHECorr " << ignoreHECorr_ << " CollapseDepth " << collapseDepth_
251  << ":" << mergedDepth_ << " IsItPlan1 " << isItPlan1_ << " IsItPreRecHit "
252  << isItPreRecHit_ << " UseMyCorr " << useMyCorr_;
253 }
static const std::string kSharedResource
Definition: TFileService.h:76
Log< level::Info, true > LogVerbatim
const std::string labelMuon_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
const HcalTopology * theHBHETopology_
uint16_t *__restrict__ id
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
const edm::InputTag hlTriggerResults_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
const edm::InputTag labelEERecHit_
const edm::InputTag labelEBRecHit_
edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_topo_
const std::string labelVtx_
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
const edm::InputTag labelHBHERecHit_
Definition: DetId.h:17
std::map< DetId, double > corrValue_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_chan_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_respcorr_
const HcalDDDRecConstants * hdc_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbservice_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
const std::string fileInCorr_
const std::vector< std::string > triggers_

Member Function Documentation

double HcalHBHEMuonAnalyzer::activeLength ( const DetId id_)
private

Definition at line 1184 of file HcalHBHEMuonAnalyzer.cc.

References actHB, actHE, HLT_FULL_cff::depth, spr::find(), HcalBarrel, hdc_, mps_fire::i, gpuClustering::id, mergedDepth_, HcalDDDRecConstants::unmergeDepthDetId(), and ecaldqm::zside().

Referenced by analyze(), and beginRun().

1184  {
1185  HcalDetId id(id_);
1186  int ieta = id.ietaAbs();
1187  int zside = id.zside();
1188  int iphi = id.iphi();
1189  std::vector<int> dpths;
1190  if (mergedDepth_) {
1191  std::vector<HcalDetId> ids;
1192  hdc_->unmergeDepthDetId(id, ids);
1193  for (auto idh : ids)
1194  dpths.emplace_back(idh.depth());
1195  } else {
1196  dpths.emplace_back(id.depth());
1197  }
1198  double lx(0);
1199  if (id.subdet() == HcalBarrel) {
1200  for (unsigned int i = 0; i < actHB.size(); ++i) {
1201  if ((ieta == actHB[i].ieta) && (zside == actHB[i].zside) &&
1202  (std::find(dpths.begin(), dpths.end(), actHB[i].depth) != dpths.end()) &&
1203  (std::find(actHB[i].iphis.begin(), actHB[i].iphis.end(), iphi) != actHB[i].iphis.end())) {
1204  lx += actHB[i].thick;
1205  }
1206  }
1207  } else {
1208  for (unsigned int i = 0; i < actHE.size(); ++i) {
1209  if ((ieta == actHE[i].ieta) && (zside == actHE[i].zside) &&
1210  (std::find(dpths.begin(), dpths.end(), actHE[i].depth) != dpths.end()) &&
1211  (std::find(actHE[i].iphis.begin(), actHE[i].iphis.end(), iphi) != actHE[i].iphis.end())) {
1212  lx += actHE[i].thick;
1213  }
1214  }
1215  }
1216  return lx;
1217 }
uint16_t *__restrict__ id
int zside(DetId const &)
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
const HcalDDDRecConstants * hdc_
void HcalHBHEMuonAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 260 of file HcalHBHEMuonAnalyzer.cc.

References funct::abs(), accept(), activeLength(), all_triggers_, ecalTB2006H4_GenSimDigiReco_cfg::bField, edm::EventBase::bunchCrossing(), bxNumber_, trackerTree::check(), chg, chiGlobal_, chiTracker_, clearVectors(), collapseDepth_, submitPVValidationJobs::conditions, alignCSCRings::corr, HcalDetId::depth(), HLT_FULL_cff::depth, depth16HE(), depthMax_, spr::propagatedTrackID::detIdECAL, spr::propagatedTrackID::detIdEHCAL, spr::propagatedTrackID::detIdHCAL, dxyTracker_, dzTracker_, ecal3x3Energy_, ecalDetId_, ecalEnergy_, spr::eECALmatrix(), ehcalDetId_, spr::eHCALmatrix(), spr::energyHCALCell(), energyMuon_, etaGlob_, edm::EventID::event(), eventNumber_, gainFactor(), geo_, edm::Event::getByToken(), getCharge_, edm::EventSetup::getData(), globalMuonHits_, globalTrack_, globalTrckEta_, globalTrckPhi_, globalTrckPt_, goodCell(), goodVertex_, hcal1x1Energy_, hcal_ieta_, hcal_iphi_, hcalActiveLength_, hcalActiveLengthHot_, HcalBarrel, hcalDepthActiveLength_, hcalDepthActiveLengthHot_, hcalDepthChargeHot_, hcalDepthChargeHotBG_, hcalDepthEnergy_, hcalDepthEnergyCorr_, hcalDepthEnergyHot_, hcalDepthEnergyHotCorr_, hcalDepthMatch_, hcalDepthMatchHot_, hcalDetId_, HcalEndcap, hcalEnergy_, hcalHot_, hdc_, hltresults_, hoEnergy_, mps_fire::i, edm::EventBase::id(), HcalDetId::ieta(), ignoreHECorr_, info(), susybsm::HSCParticleType::innerTrack, innerTrack_, innerTracketa_, innerTrackphi_, innerTrackpt_, HcalDetId::iphi(), isGoodVertex(), isItPlan1_, isItPreRecHit_, muon::isMediumMuon(), isolationR03_, isolationR04_, muon::isTightMuon(), edm::HandleBase::isValid(), isotrackApplyRegressor::k, kount_, edm::EventID::luminosityBlock(), lumiNumber_, matchedId_, matchedStat_, matchId(), SiStripPI::max, maxDepth_, HcalDDDRecConstants::mergedDepthDetId(), muon_chi2LocalPosition_, muon_global_, muon_is_good_, muon_is_medium_, muon_is_tight_, muon_segComp_, muon_tracker_, muon_trkKink_, numPixelLayers_, spr::propagatedTrackID::okECAL, spr::propagatedTrackID::okHCAL, outerTrack_, outerTrackChi_, outerTrackEta_, outerTrackHits_, outerTrackPhi_, outerTrackPt_, outerTrackRHits_, phiGlob_, pMuon_, spr::propagateCALO(), spr::propagateHCALBack(), DiDispStaMuonMonitor_cfi::pt, ptGlob_, DetId::rawId(), respCorr(), edm::EventID::run(), runNumber_, edm::second(), muon::segmentCompatibility(), HcalDetId::subdet(), theHBHETopology_, tight_LongPara_, tight_PixelHits_, tight_TransImpara_, tight_validFraction_, tok_chan_, tok_dbservice_, tok_EB_, tok_EE_, tok_HBHE_, tok_magField_, tok_Muon_, tok_sevlv_, tok_topo_, tok_trigRes_, tok_Vtx_, trackerLayer_, tree_, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), unCorrect_, useRaw_, HcalTopology::validHcal(), and verbosity_.

260  {
261  ++kount_;
262  clearVectors();
263  std::vector<bool> muon_is_good, muon_global, muon_tracker;
264  std::vector<bool> muon_is_tight, muon_is_medium;
265  std::vector<double> ptGlob, etaGlob, phiGlob, energyMuon, pMuon;
266  std::vector<float> muon_trkKink, muon_chi2LocalPosition, muon_segComp;
267  std::vector<int> trackerLayer, numPixelLayers, tight_PixelHits;
268  std::vector<bool> innerTrack, outerTrack, globalTrack;
269  std::vector<double> chiTracker, dxyTracker, dzTracker;
270  std::vector<double> innerTrackpt, innerTracketa, innerTrackphi;
271  std::vector<double> tight_validFraction, outerTrackChi;
272  std::vector<double> outerTrackPt, outerTrackEta, outerTrackPhi;
273  std::vector<int> outerTrackHits, outerTrackRHits;
274  std::vector<double> globalTrckPt, globalTrckEta, globalTrckPhi;
275  std::vector<int> globalMuonHits, matchedStat;
276  std::vector<double> chiGlobal, tight_LongPara, tight_TransImpara;
277  std::vector<double> isolationR04, isolationR03;
278  std::vector<double> ecalEnergy, hcalEnergy, hoEnergy;
279  std::vector<bool> matchedId, hcalHot;
280  std::vector<double> ecal3x3Energy, hcal1x1Energy;
281  std::vector<unsigned int> ecalDetId, hcalDetId, ehcalDetId;
282  std::vector<int> hcal_ieta, hcal_iphi;
283  std::vector<double> hcalDepthEnergy[depthMax_];
284  std::vector<double> hcalDepthActiveLength[depthMax_];
285  std::vector<double> hcalDepthEnergyHot[depthMax_];
286  std::vector<double> hcalDepthActiveLengthHot[depthMax_];
287  std::vector<double> hcalDepthChargeHot[depthMax_];
288  std::vector<double> hcalDepthChargeHotBG[depthMax_];
289  std::vector<double> hcalDepthEnergyCorr[depthMax_];
290  std::vector<double> hcalDepthEnergyHotCorr[depthMax_];
291  std::vector<bool> hcalDepthMatch[depthMax_];
292  std::vector<bool> hcalDepthMatchHot[depthMax_];
293  std::vector<double> hcalActiveLength, hcalActiveLengthHot;
294  runNumber_ = iEvent.id().run();
295  eventNumber_ = iEvent.id().event();
296  lumiNumber_ = iEvent.id().luminosityBlock();
297  bxNumber_ = iEvent.bunchCrossing();
298 #ifdef EDM_ML_DEBUG
299  edm::LogVerbatim("HBHEMuon") << "Run " << runNumber_ << " Event " << eventNumber_ << " Lumi " << lumiNumber_ << " BX "
300  << bxNumber_ << std::endl;
301 #endif
303  iEvent.getByToken(tok_trigRes_, _Triggers);
304 #ifdef EDM_ML_DEBUG
305  if ((verbosity_ / 10000) % 10 > 0)
306  edm::LogVerbatim("HBHEMuon") << "Size of all triggers " << all_triggers_.size();
307 #endif
308  int Ntriggers = all_triggers_.size();
309 #ifdef EDM_ML_DEBUG
310  if ((verbosity_ / 10000) % 10 > 0)
311  edm::LogVerbatim("HBHEMuon") << "Size of HLT MENU: " << _Triggers->size();
312 #endif
313  if (_Triggers.isValid()) {
314  const edm::TriggerNames& triggerNames_ = iEvent.triggerNames(*_Triggers);
315  std::vector<int> index;
316  for (int i = 0; i < Ntriggers; i++) {
317  index.push_back(triggerNames_.triggerIndex(all_triggers_[i]));
318  int triggerSize = int(_Triggers->size());
319 #ifdef EDM_ML_DEBUG
320  if ((verbosity_ / 10000) % 10 > 0)
321  edm::LogVerbatim("HBHEMuon") << "outside loop " << index[i] << "\ntriggerSize " << triggerSize;
322 #endif
323  if (index[i] < triggerSize) {
324  hltresults_.push_back(_Triggers->accept(index[i]));
325 #ifdef EDM_ML_DEBUG
326  if ((verbosity_ / 10000) % 10 > 0)
327  edm::LogVerbatim("HBHEMuon") << "Trigger_info " << triggerSize << " triggerSize " << index[i]
328  << " trigger_index " << hltresults_.at(i) << " hltresult";
329 #endif
330  } else {
331  if ((verbosity_ / 10000) % 10 > 0)
332  edm::LogVerbatim("HBHEMuon") << "Requested HLT path \""
333  << "\" does not exist";
334  }
335  }
336  }
337 
338  // get handles to calogeometry and calotopology
339  const MagneticField* bField = &iSetup.getData(tok_magField_);
340  const EcalChannelStatus* theEcalChStatus = &iSetup.getData(tok_chan_);
341  const EcalSeverityLevelAlgo* sevlv = &iSetup.getData(tok_sevlv_);
342  const CaloTopology* caloTopology = &iSetup.getData(tok_topo_);
343  const HcalDbService* conditions = &iSetup.getData(tok_dbservice_);
344 
345  // Relevant blocks from iEvent
347  iEvent.getByToken(tok_Vtx_, vtx);
348 
349  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
350  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
351  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
352  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
353 
355  iEvent.getByToken(tok_HBHE_, hbhe);
356 
358  iEvent.getByToken(tok_Muon_, _Muon);
359 
360  // require a good vertex
361  math::XYZPoint pvx;
362  goodVertex_ = 0;
363  if (!vtx.isValid()) {
364 #ifdef EDM_ML_DEBUG
365  edm::LogVerbatim("HBHEMuon") << "No Good Vertex found == Reject";
366 #endif
367  return;
368  }
369  reco::VertexCollection::const_iterator firstGoodVertex = vtx->end();
370  for (reco::VertexCollection::const_iterator it = vtx->begin(); it != vtx->end(); it++) {
371  if (isGoodVertex(*it)) {
372  if (firstGoodVertex == vtx->end())
373  firstGoodVertex = it;
374  ++goodVertex_;
375  }
376  }
377  if (firstGoodVertex != vtx->end())
378  pvx = firstGoodVertex->position();
379 
380  bool accept(false);
381  if (_Muon.isValid() && barrelRecHitsHandle.isValid() && endcapRecHitsHandle.isValid() && hbhe.isValid()) {
382  for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon != _Muon->end(); ++RecMuon) {
383  muon_is_good.push_back(RecMuon->isPFMuon());
384  muon_global.push_back(RecMuon->isGlobalMuon());
385  muon_tracker.push_back(RecMuon->isTrackerMuon());
386  ptGlob.push_back((RecMuon)->pt());
387  etaGlob.push_back(RecMuon->eta());
388  phiGlob.push_back(RecMuon->phi());
389  energyMuon.push_back(RecMuon->energy());
390  pMuon.push_back(RecMuon->p());
391 #ifdef EDM_ML_DEBUG
392  edm::LogVerbatim("HBHEMuon") << "Energy:" << RecMuon->energy() << " P:" << RecMuon->p();
393 #endif
394  muon_is_tight.push_back(muon::isTightMuon(*RecMuon, *firstGoodVertex));
395  muon_is_medium.push_back(muon::isMediumMuon(*RecMuon));
396  muon_trkKink.push_back(RecMuon->combinedQuality().trkKink);
397  muon_chi2LocalPosition.push_back(RecMuon->combinedQuality().chi2LocalPosition);
398  muon_segComp.push_back(muon::segmentCompatibility(*RecMuon));
399  // acessing tracker hits info
400  if (RecMuon->track().isNonnull()) {
401  trackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
402  } else {
403  trackerLayer.push_back(-1);
404  }
405  if (RecMuon->innerTrack().isNonnull()) {
406  innerTrack.push_back(true);
407  numPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
408  chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
409  dxyTracker.push_back(fabs(RecMuon->innerTrack()->dxy(pvx)));
410  dzTracker.push_back(fabs(RecMuon->innerTrack()->dz(pvx)));
411  innerTrackpt.push_back(RecMuon->innerTrack()->pt());
412  innerTracketa.push_back(RecMuon->innerTrack()->eta());
413  innerTrackphi.push_back(RecMuon->innerTrack()->phi());
414  tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
415  tight_validFraction.push_back(RecMuon->innerTrack()->validFraction());
416  } else {
417  innerTrack.push_back(false);
418  numPixelLayers.push_back(0);
419  chiTracker.push_back(0);
420  dxyTracker.push_back(0);
421  dzTracker.push_back(0);
422  innerTrackpt.push_back(0);
423  innerTracketa.push_back(0);
424  innerTrackphi.push_back(0);
425  tight_PixelHits.push_back(0);
426  tight_validFraction.push_back(-99);
427  }
428  // outer track info
429  if (RecMuon->outerTrack().isNonnull()) {
430  outerTrack.push_back(true);
431  outerTrackPt.push_back(RecMuon->outerTrack()->pt());
432  outerTrackEta.push_back(RecMuon->outerTrack()->eta());
433  outerTrackPhi.push_back(RecMuon->outerTrack()->phi());
434  outerTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
435  outerTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
436  outerTrackRHits.push_back(RecMuon->outerTrack()->recHitsSize());
437  } else {
438  outerTrack.push_back(false);
439  outerTrackPt.push_back(0);
440  outerTrackEta.push_back(0);
441  outerTrackPhi.push_back(0);
442  outerTrackChi.push_back(0);
443  outerTrackHits.push_back(0);
444  outerTrackRHits.push_back(0);
445  }
446  // Tight Muon cuts
447  if (RecMuon->globalTrack().isNonnull()) {
448  globalTrack.push_back(true);
449  chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
450  globalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
451  matchedStat.push_back(RecMuon->numberOfMatchedStations());
452  globalTrckPt.push_back(RecMuon->globalTrack()->pt());
453  globalTrckEta.push_back(RecMuon->globalTrack()->eta());
454  globalTrckPhi.push_back(RecMuon->globalTrack()->phi());
455  tight_TransImpara.push_back(fabs(RecMuon->muonBestTrack()->dxy(pvx)));
456  tight_LongPara.push_back(fabs(RecMuon->muonBestTrack()->dz(pvx)));
457  } else {
458  globalTrack.push_back(false);
459  chiGlobal.push_back(0);
460  globalMuonHits.push_back(0);
461  matchedStat.push_back(0);
462  globalTrckPt.push_back(0);
463  globalTrckEta.push_back(0);
464  globalTrckPhi.push_back(0);
465  tight_TransImpara.push_back(0);
466  tight_LongPara.push_back(0);
467  }
468 
469  isolationR04.push_back(
470  ((RecMuon->pfIsolationR04().sumChargedHadronPt +
471  std::max(0.,
472  RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt -
473  (0.5 * RecMuon->pfIsolationR04().sumPUPt))) /
474  RecMuon->pt()));
475 
476  isolationR03.push_back(
477  ((RecMuon->pfIsolationR03().sumChargedHadronPt +
478  std::max(0.,
479  RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt -
480  (0.5 * RecMuon->pfIsolationR03().sumPUPt))) /
481  RecMuon->pt()));
482 
483  ecalEnergy.push_back(RecMuon->calEnergy().emS9);
484  hcalEnergy.push_back(RecMuon->calEnergy().hadS9);
485  hoEnergy.push_back(RecMuon->calEnergy().hoS9);
486 
487  double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
488  double eHcalDepth[depthMax_], eHcalDepthHot[depthMax_];
489  double eHcalDepthC[depthMax_], eHcalDepthHotC[depthMax_];
490  double cHcalDepthHot[depthMax_], cHcalDepthHotBG[depthMax_];
491  double activeL[depthMax_], activeHotL[depthMax_];
492  bool matchDepth[depthMax_], matchDepthHot[depthMax_];
493  HcalDetId eHcalDetId[depthMax_];
494  unsigned int isHot(0);
495  bool tmpmatch(false);
496  int ieta(-1000), iphi(-1000);
497  for (int i = 0; i < depthMax_; ++i) {
498  eHcalDepth[i] = eHcalDepthHot[i] = 0;
499  eHcalDepthC[i] = eHcalDepthHotC[i] = 0;
500  cHcalDepthHot[i] = cHcalDepthHotBG[i] = 0;
501  activeL[i] = activeHotL[i] = 0;
502  matchDepth[i] = matchDepthHot[i] = true;
503  }
504  if (RecMuon->innerTrack().isNonnull()) {
505  const reco::Track* pTrack = (RecMuon->innerTrack()).get();
506  spr::propagatedTrackID trackID = spr::propagateCALO(pTrack, geo_, bField, (((verbosity_ / 100) % 10 > 0)));
507  if ((RecMuon->p() > 10.0) && (trackID.okHCAL))
508  accept = true;
509 
510  ecalDetId.push_back((trackID.detIdECAL)());
511  hcalDetId.push_back((trackID.detIdHCAL)());
512  ehcalDetId.push_back((trackID.detIdEHCAL)());
513 
515  std::pair<bool, HcalDetId> info = spr::propagateHCALBack(pTrack, geo_, bField, (((verbosity_ / 100) % 10 > 0)));
516  if (info.first) {
517  check = info.second;
518  }
519 
520  bool okE = trackID.okECAL;
521  if (okE) {
522  const DetId isoCell(trackID.detIdECAL);
523  std::pair<double, bool> e3x3 = spr::eECALmatrix(isoCell,
524  barrelRecHitsHandle,
525  endcapRecHitsHandle,
526  *theEcalChStatus,
527  geo_,
528  caloTopology,
529  sevlv,
530  1,
531  1,
532  -100.0,
533  -100.0,
534  -500.0,
535  500.0,
536  false);
537  eEcal = e3x3.first;
538  okE = e3x3.second;
539  }
540 #ifdef EDM_ML_DEBUG
541  edm::LogVerbatim("HBHEMuon") << "Propagate Track to ECAL: " << okE << ":" << trackID.okECAL << " E " << eEcal;
542 #endif
543 
544  if (trackID.okHCAL) {
545  DetId closestCell(trackID.detIdHCAL);
546  HcalDetId hcidt(closestCell.rawId());
547  if ((hcidt.ieta() == check.ieta()) && (hcidt.iphi() == check.iphi()))
548  tmpmatch = true;
549 #ifdef EDM_ML_DEBUG
550  edm::LogVerbatim("HBHEMuon") << "Front " << hcidt << " Back " << info.first << ":" << check << " Match "
551  << tmpmatch;
552 #endif
553 
554  HcalSubdetector subdet = hcidt.subdet();
555  ieta = hcidt.ieta();
556  iphi = hcidt.iphi();
557  bool hborhe = (std::abs(ieta) == 16);
558 
560  closestCell,
561  hbhe,
562  0,
563  0,
564  false,
565  true,
566  -100.0,
567  -100.0,
568  -100.0,
569  -100.0,
570  -500.,
571  500.,
572  useRaw_);
573  std::vector<std::pair<double, int>> ehdepth;
574  spr::energyHCALCell((HcalDetId)closestCell,
575  hbhe,
576  ehdepth,
577  maxDepth_,
578  -100.0,
579  -100.0,
580  -100.0,
581  -100.0,
582  -500.0,
583  500.0,
584  useRaw_,
585  depth16HE(ieta, iphi),
586  (((verbosity_ / 1000) % 10) > 0));
587  for (int i = 0; i < depthMax_; ++i)
588  eHcalDetId[i] = HcalDetId();
589  for (unsigned int i = 0; i < ehdepth.size(); ++i) {
590  HcalSubdetector subdet0 =
591  (hborhe) ? ((ehdepth[i].second >= depth16HE(ieta, iphi)) ? HcalEndcap : HcalBarrel) : subdet;
592  HcalDetId hcid0(subdet0, ieta, iphi, ehdepth[i].second);
593  double actL = activeLength(DetId(hcid0));
594  double ene = ehdepth[i].first;
595  bool tmpC(false);
596  if (ene > 0.0) {
597  if (!(theHBHETopology_->validHcal(hcid0))) {
598  edm::LogWarning("HBHEMuon") << "(1) Invalid ID " << hcid0 << " with E = " << ene;
599  edm::LogWarning("HBHEMuon") << HcalDetId(closestCell) << " with " << ehdepth.size() << " depths:";
600  for (const auto& ehd : ehdepth)
601  edm::LogWarning("HBHEMuon") << " " << ehd.second << ":" << ehd.first;
602  } else {
603  tmpC = goodCell(hcid0, pTrack, geo_, bField);
604  double enec(ene);
605  if (unCorrect_) {
606  double corr = (ignoreHECorr_ && (subdet0 == HcalEndcap)) ? 1.0 : respCorr(DetId(hcid0));
607  if (corr != 0)
608  ene /= corr;
609 #ifdef EDM_ML_DEBUG
610  HcalDetId id = (isItPlan1_ && isItPreRecHit_) ? hdc_->mergedDepthDetId(hcid0) : hcid0;
611  edm::LogVerbatim("HBHEMuon") << hcid0 << ":" << id << " Corr " << corr;
612 #endif
613  }
614  int depth = ehdepth[i].second - 1;
615  if (collapseDepth_) {
616  HcalDetId id = hdc_->mergedDepthDetId(hcid0);
617  depth = id.depth() - 1;
618  }
619  eHcalDepth[depth] += ene;
620  eHcalDepthC[depth] += enec;
621  activeL[depth] += actL;
622  activeLengthTot += actL;
623  matchDepth[depth] = (matchDepth[depth] && tmpC);
624 #ifdef EDM_ML_DEBUG
625  if ((verbosity_ % 10) > 0)
626  edm::LogVerbatim("HBHEMuon")
627  << hcid0 << " E " << ene << ":" << enec << " L " << actL << " Match " << tmpC;
628 #endif
629  }
630  }
631  }
632 #ifdef EDM_ML_DEBUG
633  if ((verbosity_ % 10) > 0) {
634  edm::LogVerbatim("HBHEMuon") << hcidt << " Match " << tmpmatch << " Depths " << ehdepth.size();
635  for (unsigned int k = 0; k < ehdepth.size(); ++k)
636  edm::LogVerbatim("HBHEMuon") << " [" << k << ":" << ehdepth[k].second << "] " << matchDepth[k];
637  }
638 #endif
639  HcalDetId hotCell;
640  spr::eHCALmatrix(geo_, theHBHETopology_, closestCell, hbhe, 1, 1, hotCell, false, useRaw_, false);
641  isHot = matchId(closestCell, hotCell);
642  if (hotCell != HcalDetId()) {
643  subdet = HcalDetId(hotCell).subdet();
644  ieta = HcalDetId(hotCell).ieta();
645  iphi = HcalDetId(hotCell).iphi();
646  hborhe = (std::abs(ieta) == 16);
647  std::vector<std::pair<double, int>> ehdepth;
648  spr::energyHCALCell(hotCell,
649  hbhe,
650  ehdepth,
651  maxDepth_,
652  -100.0,
653  -100.0,
654  -100.0,
655  -100.0,
656  -500.0,
657  500.0,
658  useRaw_,
659  depth16HE(ieta, iphi),
660  false); //(((verbosity_/1000)%10)>0 ));
661  for (int i = 0; i < depthMax_; ++i)
662  eHcalDetId[i] = HcalDetId();
663  for (unsigned int i = 0; i < ehdepth.size(); ++i) {
664  HcalSubdetector subdet0 =
665  (hborhe) ? ((ehdepth[i].second >= depth16HE(ieta, iphi)) ? HcalEndcap : HcalBarrel) : subdet;
666  HcalDetId hcid0(subdet0, ieta, iphi, ehdepth[i].second);
667  double actL = activeLength(DetId(hcid0));
668  double ene = ehdepth[i].first;
669  bool tmpC(false);
670  if (ene > 0.0) {
671  if (!(theHBHETopology_->validHcal(hcid0))) {
672  edm::LogWarning("HBHEMuon") << "(2) Invalid ID " << hcid0 << " with E = " << ene;
673  edm::LogWarning("HBHEMuon") << HcalDetId(hotCell) << " with " << ehdepth.size() << " depths:";
674  for (const auto& ehd : ehdepth)
675  edm::LogWarning("HBHEMuon") << " " << ehd.second << ":" << ehd.first;
676  } else {
677  tmpC = goodCell(hcid0, pTrack, geo_, bField);
678  double chg(ene), enec(ene);
679  if (unCorrect_) {
680  double corr = (ignoreHECorr_ && (subdet0 == HcalEndcap)) ? 1.0 : respCorr(DetId(hcid0));
681  if (corr != 0)
682  ene /= corr;
683 #ifdef EDM_ML_DEBUG
684  HcalDetId id = (isItPlan1_ && isItPreRecHit_) ? hdc_->mergedDepthDetId(hcid0) : hcid0;
685  edm::LogVerbatim("HBHEMuon")
686  << hcid0 << ":" << id << " Corr " << corr << " E " << ene << ":" << enec;
687 #endif
688  }
689  if (getCharge_) {
690  double gain = gainFactor(conditions, hcid0);
691  if (gain != 0)
692  chg /= gain;
693 #ifdef EDM_ML_DEBUG
694  edm::LogVerbatim("HBHEMuon") << hcid0 << " Gain " << gain << " C " << chg;
695 #endif
696  }
697  int depth = ehdepth[i].second - 1;
698  if (collapseDepth_) {
699  HcalDetId id = hdc_->mergedDepthDetId(hcid0);
700  depth = id.depth() - 1;
701  }
702  eHcalDepthHot[depth] += ene;
703  eHcalDepthHotC[depth] += enec;
704  cHcalDepthHot[depth] += chg;
705  activeHotL[depth] += actL;
706  activeLengthHotTot += actL;
707  matchDepthHot[depth] = (matchDepthHot[depth] && tmpC);
708 #ifdef EDM_ML_DEBUG
709  if ((verbosity_ % 10) > 0)
710  edm::LogVerbatim("HBHEMuon") << hcid0 << " depth " << depth << " E " << ene << ":" << enec << " C "
711  << chg << " L " << actL << " Match " << tmpC;
712 #endif
713  }
714  }
715  }
716 
717  HcalDetId oppCell(subdet, -ieta, iphi, HcalDetId(hotCell).depth());
718  std::vector<std::pair<double, int>> ehdeptho;
719  spr::energyHCALCell(oppCell,
720  hbhe,
721  ehdeptho,
722  maxDepth_,
723  -100.0,
724  -100.0,
725  -100.0,
726  -100.0,
727  -500.0,
728  500.0,
729  useRaw_,
730  depth16HE(-ieta, iphi),
731  false); //(((verbosity_/1000)%10)>0));
732  for (unsigned int i = 0; i < ehdeptho.size(); ++i) {
733  HcalSubdetector subdet0 =
734  (hborhe) ? ((ehdeptho[i].second >= depth16HE(-ieta, iphi)) ? HcalEndcap : HcalBarrel) : subdet;
735  HcalDetId hcid0(subdet0, -ieta, iphi, ehdeptho[i].second);
736  double ene = ehdeptho[i].first;
737  if (ene > 0.0) {
738  if (!(theHBHETopology_->validHcal(hcid0))) {
739  edm::LogWarning("HBHEMuon") << "(3) Invalid ID " << hcid0 << " with E = " << ene;
740  edm::LogWarning("HBHEMuon") << oppCell << " with " << ehdeptho.size() << " depths:";
741  for (const auto& ehd : ehdeptho)
742  edm::LogWarning("HBHEMuon") << " " << ehd.second << ":" << ehd.first;
743  } else {
744  double chg(ene);
745  if (unCorrect_) {
746  double corr = (ignoreHECorr_ && (subdet0 == HcalEndcap)) ? 1.0 : respCorr(DetId(hcid0));
747  if (corr != 0)
748  ene /= corr;
749 #ifdef EDM_ML_DEBUG
750  HcalDetId id = (isItPlan1_ && isItPreRecHit_) ? hdc_->mergedDepthDetId(hcid0) : hcid0;
751  edm::LogVerbatim("HBHEMuon")
752  << hcid0 << ":" << id << " Corr " << corr << " E " << ene << ":" << ehdeptho[i].first;
753 #endif
754  }
755  if (getCharge_) {
756  double gain = gainFactor(conditions, hcid0);
757  if (gain != 0)
758  chg /= gain;
759 #ifdef EDM_ML_DEBUG
760  edm::LogVerbatim("HBHEMuon") << hcid0 << " Gain " << gain << " C " << chg;
761 #endif
762  }
763  int depth = ehdeptho[i].second - 1;
764  if (collapseDepth_) {
765  HcalDetId id = hdc_->mergedDepthDetId(hcid0);
766  depth = id.depth() - 1;
767  }
768  cHcalDepthHotBG[depth] += chg;
769 #ifdef EDM_ML_DEBUG
770  if ((verbosity_ % 10) > 0)
771  edm::LogVerbatim("HBHEMuon") << hcid0 << " Depth " << depth << " E " << ene << " C " << chg;
772 #endif
773  }
774  }
775  }
776  }
777  }
778 #ifdef EDM_ML_DEBUG
779  edm::LogVerbatim("HBHEMuon") << "Propagate Track to HCAL: " << trackID.okHCAL << " Match " << tmpmatch
780  << " Hot " << isHot << " Energy " << eHcal << std::endl;
781 #endif
782 
783  } else {
784  ecalDetId.push_back(0);
785  hcalDetId.push_back(0);
786  ehcalDetId.push_back(0);
787  }
788 
789  matchedId.push_back(tmpmatch);
790  ecal3x3Energy.push_back(eEcal);
791  hcal1x1Energy.push_back(eHcal);
792  hcal_ieta.push_back(ieta);
793  hcal_iphi.push_back(iphi);
794  for (int i = 0; i < depthMax_; ++i) {
795  hcalDepthEnergy[i].push_back(eHcalDepth[i]);
796  hcalDepthActiveLength[i].push_back(activeL[i]);
797  hcalDepthEnergyHot[i].push_back(eHcalDepthHot[i]);
798  hcalDepthActiveLengthHot[i].push_back(activeHotL[i]);
799  hcalDepthEnergyCorr[i].push_back(eHcalDepthC[i]);
800  hcalDepthEnergyHotCorr[i].push_back(eHcalDepthHotC[i]);
801  hcalDepthChargeHot[i].push_back(cHcalDepthHot[i]);
802  hcalDepthChargeHotBG[i].push_back(cHcalDepthHotBG[i]);
803  hcalDepthMatch[i].push_back(matchDepth[i]);
804  hcalDepthMatchHot[i].push_back(matchDepthHot[i]);
805  }
806  hcalActiveLength.push_back(activeLengthTot);
807  hcalHot.push_back(isHot);
808  hcalActiveLengthHot.push_back(activeLengthHotTot);
809  }
810  }
811  if (accept) {
812 #ifdef EDM_ML_DEBUG
813  for (unsigned int i = 0; i < hcal_ieta.size(); ++i)
814  edm::LogVerbatim("HBHEMuon") << "[" << i << "] ieta/iphi for entry to "
815  << "HCAL has value of " << hcal_ieta[i] << ":" << hcal_iphi[i];
816 #endif
817  for (unsigned int k = 0; k < muon_is_good.size(); ++k) {
818  muon_is_good_ = muon_is_good[k];
819  muon_global_ = muon_global[k];
820  muon_tracker_ = muon_tracker[k];
821  muon_is_tight_ = muon_is_tight[k];
822  muon_is_medium_ = muon_is_medium[k];
823  ptGlob_ = ptGlob[k];
824  etaGlob_ = etaGlob[k];
825  phiGlob_ = phiGlob[k];
826  energyMuon_ = energyMuon[k];
827  pMuon_ = pMuon[k];
828  muon_trkKink_ = muon_trkKink[k];
829  muon_chi2LocalPosition_ = muon_chi2LocalPosition[k];
830  muon_segComp_ = muon_segComp[k];
831  trackerLayer_ = trackerLayer[k];
832  numPixelLayers_ = numPixelLayers[k];
833  tight_PixelHits_ = tight_PixelHits[k];
834  innerTrack_ = innerTrack[k];
835  outerTrack_ = outerTrack[k];
836  globalTrack_ = globalTrack[k];
837  chiTracker_ = chiTracker[k];
838  dxyTracker_ = dxyTracker[k];
839  dzTracker_ = dzTracker[k];
840  innerTrackpt_ = innerTrackpt[k];
841  innerTracketa_ = innerTracketa[k];
842  innerTrackphi_ = innerTrackphi[k];
843  tight_validFraction_ = tight_validFraction[k];
844  outerTrackChi_ = outerTrackChi[k];
845  outerTrackPt_ = outerTrackPt[k];
846  outerTrackEta_ = outerTrackEta[k];
847  outerTrackPhi_ = outerTrackPhi[k];
848  outerTrackHits_ = outerTrackHits[k];
849  outerTrackRHits_ = outerTrackRHits[k];
850  globalTrckPt_ = globalTrckPt[k];
851  globalTrckEta_ = globalTrckEta[k];
852  globalTrckPhi_ = globalTrckPhi[k];
853  globalMuonHits_ = globalMuonHits[k];
854  matchedStat_ = matchedStat[k];
855  chiGlobal_ = chiGlobal[k];
856  tight_LongPara_ = tight_LongPara[k];
857  tight_TransImpara_ = tight_TransImpara[k];
858  isolationR04_ = isolationR04[k];
859  isolationR03_ = isolationR03[k];
860  ecalEnergy_ = ecalEnergy[k];
861  hcalEnergy_ = hcalEnergy[k];
862  hoEnergy_ = hoEnergy[k];
863  matchedId_ = matchedId[k];
864  hcalHot_ = hcalHot[k];
865  ecal3x3Energy_ = ecal3x3Energy[k];
866  hcal1x1Energy_ = hcal1x1Energy[k];
867  ecalDetId_ = ecalDetId[k];
868  hcalDetId_ = hcalDetId[k];
869  ehcalDetId_ = ehcalDetId[k];
870  hcal_ieta_ = hcal_ieta[k];
871  hcal_iphi_ = hcal_iphi[k];
872  for (int i = 0; i < depthMax_; ++i) {
873  hcalDepthEnergy_[i] = hcalDepthEnergy[i][k];
874  hcalDepthActiveLength_[i] = hcalDepthActiveLength[i][k];
875  hcalDepthEnergyHot_[i] = hcalDepthEnergyHot[i][k];
876  hcalDepthActiveLengthHot_[i] = hcalDepthActiveLengthHot[i][k];
877  hcalDepthChargeHot_[i] = hcalDepthChargeHot[i][k];
878  hcalDepthChargeHotBG_[i] = hcalDepthChargeHotBG[i][k];
879  hcalDepthEnergyCorr_[i] = hcalDepthEnergyCorr[i][k];
880  hcalDepthEnergyHotCorr_[i] = hcalDepthEnergyHotCorr[i][k];
881  hcalDepthMatch_[i] = hcalDepthMatch[i][k];
882  hcalDepthMatchHot_[i] = hcalDepthMatchHot[i][k];
883  }
884  hcalActiveLength_ = hcalActiveLength[k];
885  hcalActiveLengthHot_ = hcalActiveLengthHot[k];
886  tree_->Fill();
887  }
888  }
889 }
double gainFactor(const HcalDbService *dbserv, const HcalDetId &id)
std::vector< int > hltresults_
Log< level::Info, true > LogVerbatim
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const HcalTopology * theHBHETopology_
double hcalDepthEnergyHot_[depthMax_]
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< std::string > all_triggers_
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
const float chg[109]
Definition: CoreSimTrack.cc:5
HcalDetId mergedDepthDetId(const HcalDetId &id) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
unsigned int triggerIndex(std::string_view name) const
Definition: TriggerNames.cc:52
double respCorr(const DetId &id)
double hcalDepthChargeHot_[depthMax_]
bool validHcal(const HcalDetId &id) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
double hcalDepthActiveLengthHot_[depthMax_]
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
double hcalDepthEnergyCorr_[depthMax_]
double hcalDepthActiveLength_[depthMax_]
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
double hcalDepthEnergyHotCorr_[depthMax_]
bool hcalDepthMatchHot_[depthMax_]
int iEvent
Definition: GenABIO.cc:224
spr::propagatedTrackDirection propagateHCALBack(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const CaloGeometry *geo, const MagneticField *bField, bool debug=false)
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_topo_
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
const CaloGeometry * geo_
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
bool isValid() const
Definition: HandleBase.h:70
double activeLength(const DetId &)
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
bool goodCell(const HcalDetId &hcid, const reco::Track *pTrack, const CaloGeometry *geo, const MagneticField *bField)
double hcalDepthChargeHotBG_[depthMax_]
Definition: DetId.h:17
double hcalDepthEnergy_[depthMax_]
int depth16HE(int ieta, int iphi)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool hcalDepthMatch_[depthMax_]
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_chan_
int matchId(const HcalDetId &, const HcalDetId &)
const HcalDDDRecConstants * hdc_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
Log< level::Warning, false > LogWarning
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbservice_
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
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)
bool isGoodVertex(const reco::Vertex &vtx)
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)
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)
void HcalHBHEMuonAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 892 of file HcalHBHEMuonAnalyzer.cc.

References all_triggers_, bxNumber_, chiGlobal_, chiTracker_, dxyTracker_, dzTracker_, ecal3x3Energy_, ecalDetId_, ecalEnergy_, ehcalDetId_, energyMuon_, etaGlob_, eventNumber_, fs, globalMuonHits_, globalTrack_, globalTrckEta_, globalTrckPhi_, globalTrckPt_, goodVertex_, hcal1x1Energy_, hcal_ieta_, hcal_iphi_, hcalActiveLength_, hcalActiveLengthHot_, hcalDepthActiveLength_, hcalDepthActiveLengthHot_, hcalDepthChargeHot_, hcalDepthChargeHotBG_, hcalDepthEnergy_, hcalDepthEnergyCorr_, hcalDepthEnergyHot_, hcalDepthEnergyHotCorr_, hcalDepthMatch_, hcalDepthMatchHot_, hcalDetId_, hcalEnergy_, hcalHot_, hltresults_, hoEnergy_, innerTrack_, innerTracketa_, innerTrackphi_, innerTrackpt_, isolationR03_, isolationR04_, isotrackApplyRegressor::k, lumiNumber_, TFileService::make(), matchedId_, matchedStat_, maxDepth_, muon_chi2LocalPosition_, muon_global_, muon_is_good_, muon_is_medium_, muon_is_tight_, muon_segComp_, muon_tracker_, muon_trkKink_, mergeVDriftHistosByStation::name, numPixelLayers_, outerTrack_, outerTrackChi_, outerTrackEta_, outerTrackHits_, outerTrackPhi_, outerTrackPt_, outerTrackRHits_, phiGlob_, pMuon_, ptGlob_, runNumber_, tight_LongPara_, tight_PixelHits_, tight_TransImpara_, tight_validFraction_, trackerLayer_, and tree_.

892  {
893  tree_ = fs->make<TTree>("TREE", "TREE");
894  tree_->Branch("Event_No", &eventNumber_);
895  tree_->Branch("Run_No", &runNumber_);
896  tree_->Branch("LumiNumber", &lumiNumber_);
897  tree_->Branch("BXNumber", &bxNumber_);
898  tree_->Branch("GoodVertex", &goodVertex_);
899  tree_->Branch("PF_Muon", &muon_is_good_);
900  tree_->Branch("Global_Muon", &muon_global_);
901  tree_->Branch("Tracker_muon", &muon_tracker_);
902  tree_->Branch("MuonIsTight", &muon_is_tight_);
903  tree_->Branch("MuonIsMedium", &muon_is_medium_);
904  tree_->Branch("pt_of_muon", &ptGlob_);
905  tree_->Branch("eta_of_muon", &etaGlob_);
906  tree_->Branch("phi_of_muon", &phiGlob_);
907  tree_->Branch("energy_of_muon", &energyMuon_);
908  tree_->Branch("p_of_muon", &pMuon_);
909  tree_->Branch("muon_trkKink", &muon_trkKink_);
910  tree_->Branch("muon_chi2LocalPosition", &muon_chi2LocalPosition_);
911  tree_->Branch("muon_segComp", &muon_segComp_);
912 
913  tree_->Branch("TrackerLayer", &trackerLayer_);
914  tree_->Branch("NumPixelLayers", &numPixelLayers_);
915  tree_->Branch("InnerTrackPixelHits", &tight_PixelHits_);
916  tree_->Branch("innerTrack", &innerTrack_);
917  tree_->Branch("chiTracker", &chiTracker_);
918  tree_->Branch("DxyTracker", &dxyTracker_);
919  tree_->Branch("DzTracker", &dzTracker_);
920  tree_->Branch("innerTrackpt", &innerTrackpt_);
921  tree_->Branch("innerTracketa", &innerTracketa_);
922  tree_->Branch("innerTrackphi", &innerTrackphi_);
923  tree_->Branch("tight_validFraction", &tight_validFraction_);
924 
925  tree_->Branch("OuterTrack", &outerTrack_);
926  tree_->Branch("OuterTrackChi", &outerTrackChi_);
927  tree_->Branch("OuterTrackPt", &outerTrackPt_);
928  tree_->Branch("OuterTrackEta", &outerTrackEta_);
929  tree_->Branch("OuterTrackPhi", &outerTrackPhi_);
930  tree_->Branch("OuterTrackHits", &outerTrackHits_);
931  tree_->Branch("OuterTrackRHits", &outerTrackRHits_);
932 
933  tree_->Branch("GlobalTrack", &globalTrack_);
934  tree_->Branch("GlobalTrckPt", &globalTrckPt_);
935  tree_->Branch("GlobalTrckEta", &globalTrckEta_);
936  tree_->Branch("GlobalTrckPhi", &globalTrckPhi_);
937  tree_->Branch("Global_Muon_Hits", &globalMuonHits_);
938  tree_->Branch("MatchedStations", &matchedStat_);
939  tree_->Branch("GlobTrack_Chi", &chiGlobal_);
940  tree_->Branch("Tight_LongitudinalImpactparameter", &tight_LongPara_);
941  tree_->Branch("Tight_TransImpactparameter", &tight_TransImpara_);
942 
943  tree_->Branch("IsolationR04", &isolationR04_);
944  tree_->Branch("IsolationR03", &isolationR03_);
945  tree_->Branch("ecal_3into3", &ecalEnergy_);
946  tree_->Branch("hcal_3into3", &hcalEnergy_);
947  tree_->Branch("tracker_3into3", &hoEnergy_);
948 
949  tree_->Branch("matchedId", &matchedId_);
950  tree_->Branch("hcal_cellHot", &hcalHot_);
951 
952  tree_->Branch("ecal_3x3", &ecal3x3Energy_);
953  tree_->Branch("hcal_1x1", &hcal1x1Energy_);
954  tree_->Branch("ecal_detID", &ecalDetId_);
955  tree_->Branch("hcal_detID", &hcalDetId_);
956  tree_->Branch("ehcal_detID", &ehcalDetId_);
957  tree_->Branch("hcal_ieta", &hcal_ieta_);
958  tree_->Branch("hcal_iphi", &hcal_iphi_);
959 
960  char name[100];
961  for (int k = 0; k < maxDepth_; ++k) {
962  sprintf(name, "hcal_edepth%d", (k + 1));
963  tree_->Branch(name, &hcalDepthEnergy_[k]);
964  sprintf(name, "hcal_activeL%d", (k + 1));
965  tree_->Branch(name, &hcalDepthActiveLength_[k]);
966  sprintf(name, "hcal_edepthHot%d", (k + 1));
967  tree_->Branch(name, &hcalDepthEnergyHot_[k]);
968  sprintf(name, "hcal_activeHotL%d", (k + 1));
969  tree_->Branch(name, &hcalDepthActiveLengthHot_[k]);
970  sprintf(name, "hcal_cdepthHot%d", (k + 1));
971  tree_->Branch(name, &hcalDepthChargeHot_[k]);
972  sprintf(name, "hcal_cdepthHotBG%d", (k + 1));
973  tree_->Branch(name, &hcalDepthChargeHotBG_[k]);
974  sprintf(name, "hcal_edepthCorrect%d", (k + 1));
975  tree_->Branch(name, &hcalDepthEnergyCorr_[k]);
976  sprintf(name, "hcal_edepthHotCorrect%d", (k + 1));
977  tree_->Branch(name, &hcalDepthEnergyHotCorr_[k]);
978  sprintf(name, "hcal_depthMatch%d", (k + 1));
979  tree_->Branch(name, &hcalDepthMatch_[k]);
980  sprintf(name, "hcal_depthMatchHot%d", (k + 1));
981  tree_->Branch(name, &hcalDepthMatchHot_[k]);
982  }
983 
984  tree_->Branch("activeLength", &hcalActiveLength_);
985  tree_->Branch("activeLengthHot", &hcalActiveLengthHot_);
986 
987  tree_->Branch("hltresults", &hltresults_);
988  tree_->Branch("all_triggers", &all_triggers_);
989 }
std::vector< int > hltresults_
double hcalDepthEnergyHot_[depthMax_]
std::vector< std::string > all_triggers_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
double hcalDepthChargeHot_[depthMax_]
double hcalDepthActiveLengthHot_[depthMax_]
double hcalDepthEnergyCorr_[depthMax_]
double hcalDepthActiveLength_[depthMax_]
double hcalDepthEnergyHotCorr_[depthMax_]
bool hcalDepthMatchHot_[depthMax_]
double hcalDepthChargeHotBG_[depthMax_]
double hcalDepthEnergy_[depthMax_]
bool hcalDepthMatch_[depthMax_]
edm::Service< TFileService > fs
void HcalHBHEMuonAnalyzer::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 992 of file HcalHBHEMuonAnalyzer.cc.

References actHB, actHE, activeLength(), all_triggers_, geo_, edm::EventSetup::getData(), CaloGeometry::getSubdetectorGeometry(), HcalDDDRecConstants::getThickActive(), HcalGeometry::getValidDetIds(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, HcalBarrel, HcalEndcap, hdc_, hltConfig_, HLTConfigProvider::init(), relval_steps::k2, mergedDepth_, HcalDDDRecConstants::mergedDepthDetId(), DetId::rawId(), respCorrs_, edm::RunBase::run(), HcalCondObjectContainerBase::setTopo(), HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, theHBHETopology_, tok_ddrec_, tok_geom_, tok_htopo_, tok_respcorr_, HLTConfigProvider::triggerName(), triggers_, and writeRespCorr_.

992  {
993  hdc_ = &iSetup.getData(tok_ddrec_);
994  actHB.clear();
995  actHE.clear();
996  actHB = hdc_->getThickActive(0);
997  actHE = hdc_->getThickActive(1);
998 #ifdef EDM_ML_DEBUG
999  unsigned int k1(0), k2(0);
1000  edm::LogVerbatim("HBHEMuon") << actHB.size() << " Active Length for HB";
1001  for (const auto& act : actHB) {
1002  edm::LogVerbatim("HBHEMuon") << "[" << k1 << "] ieta " << act.ieta << " depth " << act.depth << " zside "
1003  << act.zside << " type " << act.stype << " phi " << act.iphis.size() << ":"
1004  << act.iphis[0] << " L " << act.thick;
1005  HcalDetId hcid1(HcalBarrel, (act.ieta) * (act.zside), act.iphis[0], act.depth);
1006  HcalDetId hcid2 = mergedDepth_ ? hdc_->mergedDepthDetId(hcid1) : hcid1;
1007  edm::LogVerbatim("HBHEMuon") << hcid1 << " | " << hcid2 << " L " << activeLength(DetId(hcid2));
1008  ++k1;
1009  }
1010  edm::LogVerbatim("HBHEMuon") << actHE.size() << " Active Length for HE";
1011  for (const auto& act : actHE) {
1012  edm::LogVerbatim("HBHEMuon") << "[" << k2 << "] ieta " << act.ieta << " depth " << act.depth << " zside "
1013  << act.zside << " type " << act.stype << " phi " << act.iphis.size() << ":"
1014  << act.iphis[0] << " L " << act.thick;
1015  HcalDetId hcid1(HcalEndcap, (act.ieta) * (act.zside), act.iphis[0], act.depth);
1016  HcalDetId hcid2 = mergedDepth_ ? hdc_->mergedDepthDetId(hcid1) : hcid1;
1017  edm::LogVerbatim("HBHEMuon") << hcid1 << " | " << hcid2 << " L " << activeLength(DetId(hcid2));
1018  ++k2;
1019  }
1020 #endif
1021 
1022  bool changed = true;
1023  all_triggers_.clear();
1024  if (hltConfig_.init(iRun, iSetup, "HLT", changed)) {
1025  // if init returns TRUE, initialisation has succeeded!
1026 #ifdef EDM_ML_DEBUG
1027  edm::LogVerbatim("HBHEMuon") << "HLT config with process name "
1028  << "HLT"
1029  << " successfully extracted" << std::endl;
1030 #endif
1031  unsigned int ntriggers = hltConfig_.size();
1032  for (unsigned int t = 0; t < ntriggers; ++t) {
1033  std::string hltname(hltConfig_.triggerName(t));
1034  for (unsigned int ik = 0; ik < 6; ++ik) {
1035  if (hltname.find(triggers_[ik]) != std::string::npos) {
1036  all_triggers_.push_back(hltname);
1037  break;
1038  }
1039  }
1040  } //loop over ntriggers
1041  edm::LogVerbatim("HBHEMuon") << "All triggers size in begin run " << all_triggers_.size() << std::endl;
1042  } else {
1043  edm::LogError("HBHEMuon") << "Error! HLT config extraction with process "
1044  << "name HLT failed";
1045  }
1046 
1047  theHBHETopology_ = &iSetup.getData(tok_htopo_);
1048  const HcalRespCorrs* resp = &iSetup.getData(tok_respcorr_);
1049  respCorrs_ = new HcalRespCorrs(*resp);
1051  geo_ = &iSetup.getData(tok_geom_);
1052 
1053  // Write correction factors for all HB/HE events
1054  if (writeRespCorr_) {
1055  const HcalGeometry* gHcal = static_cast<const HcalGeometry*>(geo_->getSubdetectorGeometry(DetId::Hcal, HcalBarrel));
1056  const std::vector<DetId>& ids = gHcal->getValidDetIds(DetId::Hcal, 0);
1057  edm::LogVerbatim("HBHEMuon") << "\nTable of Correction Factors for Run " << iRun.run() << "\n";
1058  for (auto const& id : ids) {
1059  if ((id.det() == DetId::Hcal) && ((id.subdetId() == HcalBarrel) || (id.subdetId() == HcalEndcap))) {
1060  edm::LogVerbatim("HBHEMuon") << HcalDetId(id) << " " << id.rawId() << " "
1061  << (respCorrs_->getValues(id))->getValue();
1062  }
1063  }
1064  }
1065 }
unsigned int size() const
number of trigger paths in trigger table
Log< level::Info, true > LogVerbatim
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
const HcalTopology * theHBHETopology_
std::vector< std::string > all_triggers_
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
Definition: HcalGeometry.cc:76
const std::string & triggerName(unsigned int triggerIndex) const
HcalDetId mergedDepthDetId(const HcalDetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
Log< level::Error, false > LogError
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
const CaloGeometry * geo_
double activeLength(const DetId &)
Definition: DetId.h:17
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_respcorr_
const HcalDDDRecConstants * hdc_
HLTConfigProvider hltConfig_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
std::vector< HcalActiveLength > getThickActive(const int &type) const
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
void setTopo(const HcalTopology *topo)
const std::vector< std::string > triggers_
void HcalHBHEMuonAnalyzer::clearVectors ( )
private

clearing vectots

Definition at line 1094 of file HcalHBHEMuonAnalyzer.cc.

References bxNumber_, chiGlobal_, chiTracker_, dxyTracker_, dzTracker_, ecal3x3Energy_, ecalDetId_, ecalEnergy_, ehcalDetId_, energyMuon_, etaGlob_, eventNumber_, globalMuonHits_, globalTrack_, globalTrckEta_, globalTrckPhi_, globalTrckPt_, goodVertex_, hcal1x1Energy_, hcal_ieta_, hcal_iphi_, hcalActiveLength_, hcalActiveLengthHot_, hcalDepthActiveLength_, hcalDepthActiveLengthHot_, hcalDepthChargeHot_, hcalDepthChargeHotBG_, hcalDepthEnergy_, hcalDepthEnergyCorr_, hcalDepthEnergyHot_, hcalDepthEnergyHotCorr_, hcalDepthMatch_, hcalDepthMatchHot_, hcalDetId_, hcalEnergy_, hcalHot_, hltresults_, hoEnergy_, mps_fire::i, innerTrack_, innerTracketa_, innerTrackphi_, innerTrackpt_, isolationR03_, isolationR04_, lumiNumber_, matchedId_, matchedStat_, maxDepth_, muon_chi2LocalPosition_, muon_global_, muon_is_good_, muon_is_medium_, muon_is_tight_, muon_segComp_, muon_tracker_, muon_trkKink_, numPixelLayers_, outerTrack_, outerTrackChi_, outerTrackEta_, outerTrackHits_, outerTrackPhi_, outerTrackPt_, outerTrackRHits_, phiGlob_, pMuon_, ptGlob_, runNumber_, tight_LongPara_, tight_PixelHits_, tight_TransImpara_, tight_validFraction_, and trackerLayer_.

Referenced by analyze().

1094  {
1096  eventNumber_ = -99999;
1097  runNumber_ = -99999;
1098  lumiNumber_ = -99999;
1099  bxNumber_ = -99999;
1100  goodVertex_ = -99999;
1101 
1102  muon_is_good_ = false;
1103  muon_global_ = false;
1104  muon_tracker_ = false;
1105  ptGlob_ = 0;
1106  etaGlob_ = 0;
1107  phiGlob_ = 0;
1108  energyMuon_ = 0;
1109  pMuon_ = 0;
1110  muon_trkKink_ = 0;
1112  muon_segComp_ = 0;
1113  muon_is_tight_ = false;
1114  muon_is_medium_ = false;
1115 
1116  trackerLayer_ = 0;
1117  numPixelLayers_ = 0;
1118  tight_PixelHits_ = 0;
1119  innerTrack_ = false;
1120  chiTracker_ = 0;
1121  dxyTracker_ = 0;
1122  dzTracker_ = 0;
1123  innerTrackpt_ = 0;
1124  innerTracketa_ = 0;
1125  innerTrackphi_ = 0;
1127 
1128  outerTrack_ = false;
1129  outerTrackPt_ = 0;
1130  outerTrackEta_ = 0;
1131  outerTrackPhi_ = 0;
1132  outerTrackHits_ = 0;
1133  outerTrackRHits_ = 0;
1134  outerTrackChi_ = 0;
1135 
1136  globalTrack_ = false;
1137  globalTrckPt_ = 0;
1138  globalTrckEta_ = 0;
1139  globalTrckPhi_ = 0;
1140  globalMuonHits_ = 0;
1141  matchedStat_ = 0;
1142  chiGlobal_ = 0;
1143  tight_LongPara_ = 0;
1144  tight_TransImpara_ = 0;
1145 
1146  isolationR04_ = 0;
1147  isolationR03_ = 0;
1148  ecalEnergy_ = 0;
1149  hcalEnergy_ = 0;
1150  hoEnergy_ = 0;
1151  matchedId_ = false;
1152  hcalHot_ = false;
1153  ecal3x3Energy_ = 0;
1154  hcal1x1Energy_ = 0;
1155  ecalDetId_ = 0;
1156  hcalDetId_ = 0;
1157  ehcalDetId_ = 0;
1158  hcal_ieta_ = 0;
1159  hcal_iphi_ = 0;
1160  for (int i = 0; i < maxDepth_; ++i) {
1161  hcalDepthEnergy_[i] = 0;
1163  hcalDepthEnergyHot_[i] = 0;
1165  hcalDepthChargeHot_[i] = 0;
1166  hcalDepthChargeHotBG_[i] = 0;
1167  hcalDepthEnergyCorr_[i] = 0;
1169  hcalDepthMatch_[i] = false;
1170  hcalDepthMatchHot_[i] = false;
1171  }
1172  hcalActiveLength_ = 0;
1174  hltresults_.clear();
1175 }
std::vector< int > hltresults_
double hcalDepthEnergyHot_[depthMax_]
double hcalDepthChargeHot_[depthMax_]
double hcalDepthActiveLengthHot_[depthMax_]
double hcalDepthEnergyCorr_[depthMax_]
double hcalDepthActiveLength_[depthMax_]
double hcalDepthEnergyHotCorr_[depthMax_]
bool hcalDepthMatchHot_[depthMax_]
double hcalDepthChargeHotBG_[depthMax_]
double hcalDepthEnergy_[depthMax_]
bool hcalDepthMatch_[depthMax_]
int HcalHBHEMuonAnalyzer::depth16HE ( int  ieta,
int  iphi 
)
private

Definition at line 1251 of file HcalHBHEMuonAnalyzer.cc.

References HcalTopology::dddConstants(), HLT_FULL_cff::depth, HcalDDDRecConstants::getMinDepth(), isItPlan1_, isItPreRecHit_, theHBHETopology_, and ecaldqm::zside().

Referenced by analyze().

1251  {
1252  // Transition between HB/HE is special
1253  // For Run 1 or for Plan1 standard reconstruction it is 3
1254  // For runs beyond 2018 or in Plan1 for HEP17 it is 4
1255  int zside = (ieta > 0) ? 1 : -1;
1256  int depth = theHBHETopology_->dddConstants()->getMinDepth(1, 16, iphi, zside);
1257  if (isItPlan1_ && (!isItPreRecHit_))
1258  depth = 3;
1259 #ifdef EDM_ML_DEBUG
1260  edm::LogVerbatim("HBHEMuon") << "Plan1 " << isItPlan1_ << " PreRecHit " << isItPreRecHit_ << " phi " << iphi
1261  << " depth " << depth;
1262 #endif
1263  return depth;
1264 }
Log< level::Info, true > LogVerbatim
const HcalTopology * theHBHETopology_
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:164
int zside(DetId const &)
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
void HcalHBHEMuonAnalyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 82 of file HcalHBHEMuonAnalyzer.cc.

82 {}
void HcalHBHEMuonAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1068 of file HcalHBHEMuonAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

1068  {
1070  desc.add<edm::InputTag>("hlTriggerResults", edm::InputTag("TriggerResults", "", "HLT"));
1071  desc.add<edm::InputTag>("labelEBRecHit", edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
1072  desc.add<edm::InputTag>("labelEERecHit", edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
1073  desc.add<edm::InputTag>("labelHBHERecHit", edm::InputTag("hbhereco"));
1074  desc.add<std::string>("labelVertex", "offlinePrimaryVertices");
1075  desc.add<std::string>("labelMuon", "muons");
1076  std::vector<std::string> trig = {"HLT_IsoMu17", "HLT_IsoMu20", "HLT_IsoMu24", "HLT_IsoMu27", "HLT_Mu45", "HLT_Mu50"};
1077  desc.add<std::vector<std::string>>("triggers", trig);
1078  desc.addUntracked<int>("verbosity", 0);
1079  desc.add<int>("useRaw", 0);
1080  desc.add<bool>("unCorrect", false);
1081  desc.add<bool>("getCharge", false);
1082  desc.add<bool>("collapseDepth", false);
1083  desc.add<bool>("isItPlan1", false);
1084  desc.addUntracked<bool>("ignoreHECorr", false);
1085  desc.addUntracked<bool>("isItPreRecHit", false);
1086  desc.addUntracked<std::string>("moduleName", "");
1087  desc.addUntracked<std::string>("processName", "");
1088  desc.addUntracked<int>("maxDepth", 4);
1089  desc.addUntracked<std::string>("fileInCorr", "");
1090  desc.addUntracked<bool>("writeRespCorr", false);
1091  descriptions.add("hcalHBHEMuon", desc);
1092 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double HcalHBHEMuonAnalyzer::gainFactor ( const HcalDbService dbserv,
const HcalDetId id 
)
private

Definition at line 1243 of file HcalHBHEMuonAnalyzer.cc.

References HcalDbService::getHcalCalibrations(), and HcalCalibrations::respcorrgain().

Referenced by analyze().

1243  {
1244  double gain(0.0);
1245  const HcalCalibrations& calibs = conditions->getHcalCalibrations(id);
1246  for (int capid = 0; capid < 4; ++capid)
1247  gain += (0.25 * calibs.respcorrgain(capid));
1248  return gain;
1249 }
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
bool HcalHBHEMuonAnalyzer::goodCell ( const HcalDetId hcid,
const reco::Track pTrack,
const CaloGeometry geo,
const MagneticField bField 
)
private

Definition at line 1266 of file HcalHBHEMuonAnalyzer.cc.

References HcalDDDRecConstants::getRZ(), HcalEndcap, hdc_, match(), spr::propagateHCAL(), HcalDetId::subdet(), and verbosity_.

Referenced by analyze().

1269  {
1270  std::pair<double, double> rz = hdc_->getRZ(hcid);
1271  bool typeRZ = (hcid.subdet() == HcalEndcap) ? false : true;
1272  bool match = spr::propagateHCAL(pTrack, geo, bField, typeRZ, rz, (((verbosity_ / 10000) % 10) > 0));
1273  return match;
1274 }
std::pair< math::XYZPoint, bool > propagateHCAL(const reco::Track *, const MagneticField *, bool debug=false)
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
double getRZ(const int &subdet, const int &ieta, const int &depth) const
const HcalDDDRecConstants * hdc_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
bool HcalHBHEMuonAnalyzer::isGoodVertex ( const reco::Vertex vtx)
private

Definition at line 1219 of file HcalHBHEMuonAnalyzer.cc.

References reco::Vertex::isFake(), reco::Vertex::ndof(), and reco::Vertex::position().

Referenced by analyze().

1219  {
1220  if (vtx.isFake())
1221  return false;
1222  if (vtx.ndof() < 4)
1223  return false;
1224  if (vtx.position().Rho() > 2.)
1225  return false;
1226  if (fabs(vtx.position().Z()) > 24.)
1227  return false;
1228  return true;
1229 }
const Point & position() const
position
Definition: Vertex.h:127
double ndof() const
Definition: Vertex.h:123
bool isFake() const
Definition: Vertex.h:76
int HcalHBHEMuonAnalyzer::matchId ( const HcalDetId id1,
const HcalDetId id2 
)
private

Definition at line 1177 of file HcalHBHEMuonAnalyzer.cc.

References HcalDetId::ieta(), HcalDetId::iphi(), match(), and HcalDetId::subdet().

Referenced by analyze().

1177  {
1178  HcalDetId kd1(id1.subdet(), id1.ieta(), id1.iphi(), 1);
1179  HcalDetId kd2(id1.subdet(), id2.ieta(), id2.iphi(), 1);
1180  int match = ((kd1 == kd2) ? 1 : 0);
1181  return match;
1182 }
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
double HcalHBHEMuonAnalyzer::respCorr ( const DetId id)
private

Definition at line 1231 of file HcalHBHEMuonAnalyzer.cc.

References corrValue_, reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), respCorrs_, and useMyCorr_.

Referenced by analyze().

1231  {
1232  double cfac(1.0);
1233  if (useMyCorr_) {
1234  auto itr = corrValue_.find(id);
1235  if (itr != corrValue_.end())
1236  cfac = itr->second;
1237  } else if (respCorrs_ != nullptr) {
1238  cfac = (respCorrs_->getValues(id))->getValue();
1239  }
1240  return cfac;
1241 }
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::map< DetId, double > corrValue_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found

Member Data Documentation

std::vector<HcalDDDRecConstants::HcalActiveLength> HcalHBHEMuonAnalyzer::actHB
private

Definition at line 167 of file HcalHBHEMuonAnalyzer.cc.

Referenced by activeLength(), and beginRun().

std::vector<HcalDDDRecConstants::HcalActiveLength> HcalHBHEMuonAnalyzer::actHE
private

Definition at line 167 of file HcalHBHEMuonAnalyzer.cc.

Referenced by activeLength(), and beginRun().

std::vector<std::string> HcalHBHEMuonAnalyzer::all_triggers_
private

Definition at line 164 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and beginRun().

unsigned int HcalHBHEMuonAnalyzer::bxNumber_
private

Definition at line 131 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::chiGlobal_
private

Definition at line 146 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::chiTracker_
private

Definition at line 139 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const bool HcalHBHEMuonAnalyzer::collapseDepth_
private

Definition at line 100 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

std::map<DetId, double> HcalHBHEMuonAnalyzer::corrValue_
private

Definition at line 168 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer(), and respCorr().

const int HcalHBHEMuonAnalyzer::depthMax_ = 7
staticprivate

Definition at line 129 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

double HcalHBHEMuonAnalyzer::dxyTracker_
private

Definition at line 139 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::dzTracker_
private

Definition at line 139 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::ecal3x3Energy_
private

Definition at line 150 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

unsigned int HcalHBHEMuonAnalyzer::ecalDetId_
private

Definition at line 151 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::ecalEnergy_
private

Definition at line 148 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

unsigned int HcalHBHEMuonAnalyzer::ehcalDetId_
private

Definition at line 151 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::energyMuon_
private

Definition at line 135 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::etaGlob_
private

Definition at line 135 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

unsigned int HcalHBHEMuonAnalyzer::eventNumber_
private

Definition at line 131 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const std::string HcalHBHEMuonAnalyzer::fileInCorr_
private

Definition at line 97 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

edm::Service<TFileService> HcalHBHEMuonAnalyzer::fs
private

Definition at line 94 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginJob().

const CaloGeometry* HcalHBHEMuonAnalyzer::geo_
private

Definition at line 108 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and beginRun().

const bool HcalHBHEMuonAnalyzer::getCharge_
private

Definition at line 102 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

int HcalHBHEMuonAnalyzer::globalMuonHits_
private

Definition at line 145 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::globalTrack_
private

Definition at line 138 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::globalTrckEta_
private

Definition at line 144 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::globalTrckPhi_
private

Definition at line 144 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::globalTrckPt_
private

Definition at line 144 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

unsigned int HcalHBHEMuonAnalyzer::goodVertex_
private

Definition at line 132 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcal1x1Energy_
private

Definition at line 150 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::hcal_ieta_
private

Definition at line 152 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::hcal_iphi_
private

Definition at line 152 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalActiveLength_
private

Definition at line 163 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalActiveLengthHot_
private

Definition at line 163 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthActiveLength_[depthMax_]
private

Definition at line 154 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthActiveLengthHot_[depthMax_]
private

Definition at line 156 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthChargeHot_[depthMax_]
private

Definition at line 157 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthChargeHotBG_[depthMax_]
private

Definition at line 158 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthEnergy_[depthMax_]
private

Definition at line 153 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthEnergyCorr_[depthMax_]
private

Definition at line 159 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthEnergyHot_[depthMax_]
private

Definition at line 155 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalDepthEnergyHotCorr_[depthMax_]
private

Definition at line 160 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::hcalDepthMatch_[depthMax_]
private

Definition at line 161 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::hcalDepthMatchHot_[depthMax_]
private

Definition at line 162 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

unsigned int HcalHBHEMuonAnalyzer::hcalDetId_
private

Definition at line 151 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::hcalEnergy_
private

Definition at line 148 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::hcalHot_
private

Definition at line 149 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const HcalDDDRecConstants* HcalHBHEMuonAnalyzer::hdc_
private

Definition at line 106 of file HcalHBHEMuonAnalyzer.cc.

Referenced by activeLength(), analyze(), beginRun(), and goodCell().

HLTConfigProvider HcalHBHEMuonAnalyzer::hltConfig_
private

Definition at line 93 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun().

std::vector<int> HcalHBHEMuonAnalyzer::hltresults_
private

Definition at line 165 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const edm::InputTag HcalHBHEMuonAnalyzer::hlTriggerResults_
private

Definition at line 95 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

double HcalHBHEMuonAnalyzer::hoEnergy_
private

Definition at line 148 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const bool HcalHBHEMuonAnalyzer::ignoreHECorr_
private

Definition at line 101 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

bool HcalHBHEMuonAnalyzer::innerTrack_
private

Definition at line 138 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::innerTracketa_
private

Definition at line 140 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::innerTrackphi_
private

Definition at line 140 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::innerTrackpt_
private

Definition at line 140 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const bool HcalHBHEMuonAnalyzer::isItPlan1_
private

Definition at line 100 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), depth16HE(), and HcalHBHEMuonAnalyzer().

const bool HcalHBHEMuonAnalyzer::isItPreRecHit_
private

Definition at line 101 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), depth16HE(), and HcalHBHEMuonAnalyzer().

double HcalHBHEMuonAnalyzer::isolationR03_
private

Definition at line 147 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::isolationR04_
private

Definition at line 147 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::kount_
private

Definition at line 104 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

const edm::InputTag HcalHBHEMuonAnalyzer::labelEBRecHit_
private

Definition at line 96 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

const edm::InputTag HcalHBHEMuonAnalyzer::labelEERecHit_
private

Definition at line 96 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

const edm::InputTag HcalHBHEMuonAnalyzer::labelHBHERecHit_
private

Definition at line 96 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

const std::string HcalHBHEMuonAnalyzer::labelMuon_
private

Definition at line 97 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

const std::string HcalHBHEMuonAnalyzer::labelVtx_
private

Definition at line 97 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer().

unsigned int HcalHBHEMuonAnalyzer::lumiNumber_
private

Definition at line 131 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::matchedId_
private

Definition at line 149 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::matchedStat_
private

Definition at line 145 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::maxDepth_
private

Definition at line 104 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), clearVectors(), and HcalHBHEMuonAnalyzer().

bool HcalHBHEMuonAnalyzer::mergedDepth_
private

Definition at line 103 of file HcalHBHEMuonAnalyzer.cc.

Referenced by activeLength(), beginRun(), and HcalHBHEMuonAnalyzer().

float HcalHBHEMuonAnalyzer::muon_chi2LocalPosition_
private

Definition at line 136 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::muon_global_
private

Definition at line 133 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::muon_is_good_
private

Definition at line 133 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::muon_is_medium_
private

Definition at line 134 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::muon_is_tight_
private

Definition at line 134 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

float HcalHBHEMuonAnalyzer::muon_segComp_
private

Definition at line 136 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::muon_tracker_
private

Definition at line 133 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

float HcalHBHEMuonAnalyzer::muon_trkKink_
private

Definition at line 136 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::numPixelLayers_
private

Definition at line 137 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

bool HcalHBHEMuonAnalyzer::outerTrack_
private

Definition at line 138 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::outerTrackChi_
private

Definition at line 141 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::outerTrackEta_
private

Definition at line 142 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::outerTrackHits_
private

Definition at line 143 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::outerTrackPhi_
private

Definition at line 142 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::outerTrackPt_
private

Definition at line 142 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::outerTrackRHits_
private

Definition at line 143 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::phiGlob_
private

Definition at line 135 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::pMuon_
private

Definition at line 135 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::ptGlob_
private

Definition at line 135 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

HcalRespCorrs* HcalHBHEMuonAnalyzer::respCorrs_
private

Definition at line 109 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun(), and respCorr().

unsigned int HcalHBHEMuonAnalyzer::runNumber_
private

Definition at line 131 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const HcalTopology* HcalHBHEMuonAnalyzer::theHBHETopology_
private

Definition at line 107 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginRun(), and depth16HE().

double HcalHBHEMuonAnalyzer::tight_LongPara_
private

Definition at line 146 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

int HcalHBHEMuonAnalyzer::tight_PixelHits_
private

Definition at line 137 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::tight_TransImpara_
private

Definition at line 146 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonAnalyzer::tight_validFraction_
private

Definition at line 141 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> HcalHBHEMuonAnalyzer::tok_chan_
private

Definition at line 123 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<HcalDbService, HcalDbRecord> HcalHBHEMuonAnalyzer::tok_dbservice_
private

Definition at line 126 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> HcalHBHEMuonAnalyzer::tok_ddrec_
private

Definition at line 118 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun(), and HcalHBHEMuonAnalyzer().

edm::EDGetTokenT<EcalRecHitCollection> HcalHBHEMuonAnalyzer::tok_EB_
private

Definition at line 113 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::EDGetTokenT<EcalRecHitCollection> HcalHBHEMuonAnalyzer::tok_EE_
private

Definition at line 114 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> HcalHBHEMuonAnalyzer::tok_geom_
private

Definition at line 121 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun(), and HcalHBHEMuonAnalyzer().

edm::EDGetTokenT<HBHERecHitCollection> HcalHBHEMuonAnalyzer::tok_HBHE_
private

Definition at line 115 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> HcalHBHEMuonAnalyzer::tok_htopo_
private

Definition at line 119 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> HcalHBHEMuonAnalyzer::tok_magField_
private

Definition at line 122 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::EDGetTokenT<reco::MuonCollection> HcalHBHEMuonAnalyzer::tok_Muon_
private

Definition at line 116 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<HcalRespCorrs, HcalRespCorrsRcd> HcalHBHEMuonAnalyzer::tok_respcorr_
private

Definition at line 120 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd> HcalHBHEMuonAnalyzer::tok_sevlv_
private

Definition at line 124 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::ESGetToken<CaloTopology, CaloTopologyRecord> HcalHBHEMuonAnalyzer::tok_topo_
private

Definition at line 125 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::EDGetTokenT<edm::TriggerResults> HcalHBHEMuonAnalyzer::tok_trigRes_
private

Definition at line 111 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

edm::EDGetTokenT<reco::VertexCollection> HcalHBHEMuonAnalyzer::tok_Vtx_
private

Definition at line 112 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

int HcalHBHEMuonAnalyzer::trackerLayer_
private

Definition at line 137 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

TTree* HcalHBHEMuonAnalyzer::tree_
private

Definition at line 130 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and beginJob().

const std::vector<std::string> HcalHBHEMuonAnalyzer::triggers_
private

Definition at line 98 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun().

const bool HcalHBHEMuonAnalyzer::unCorrect_
private

Definition at line 100 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

bool HcalHBHEMuonAnalyzer::useMyCorr_
private

Definition at line 103 of file HcalHBHEMuonAnalyzer.cc.

Referenced by HcalHBHEMuonAnalyzer(), and respCorr().

const int HcalHBHEMuonAnalyzer::useRaw_
private

Definition at line 99 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonAnalyzer().

const int HcalHBHEMuonAnalyzer::verbosity_
private

Definition at line 99 of file HcalHBHEMuonAnalyzer.cc.

Referenced by analyze(), and goodCell().

const bool HcalHBHEMuonAnalyzer::writeRespCorr_
private

Definition at line 102 of file HcalHBHEMuonAnalyzer.cc.

Referenced by beginRun().