120 std::vector<HcalDDDRecConstants::HcalActiveLength>
actHB,
actHE;
140 if (maxDepth_ > 7) maxDepth_ = 7;
141 else if (maxDepth_ < 1) maxDepth_ = 4;
154 << labelVtx_ <<
" " << labelEBRecHit_ <<
" "
155 << labelEERecHit_ <<
" " << labelHBHERecHit_
200 edm::LogInfo(
"HcalHBHEMuon") <<
"Size of HLT MENU: " << _Triggers->size();
204 std::vector<int>
index;
205 for (
int i=0;
i < Ntriggers;
i++) {
207 int triggerSize = int( _Triggers->size());
210 <<
"\ntriggerSize " << triggerSize;
212 if (index[i] < triggerSize) {
213 hltresults.push_back(_Triggers->accept(index[i]));
215 edm::LogInfo(
"HcalHBHEMuon") <<
"Trigger_info " << triggerSize
216 <<
" triggerSize " << index[
i]
221 edm::LogInfo(
"HcalHBHEMuon") <<
"Requested HLT path \"" <<
"\" does not exist";
266 reco::VertexCollection::const_iterator firstGoodVertex = vtx->end();
267 for (reco::VertexCollection::const_iterator it = vtx->begin(); it != firstGoodVertex; it++) {
269 firstGoodVertex = it;
274 if (firstGoodVertex == vtx->end())
return;
279 for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon!= _Muon->end(); ++RecMuon) {
281 if (RecMuon->p() > 10.0) accept =
true;
287 EtaGlob.push_back(RecMuon->eta());
288 PhiGlob.push_back(RecMuon->phi());
289 Energy.push_back(RecMuon->energy());
290 Pmuon.push_back(RecMuon->p());
292 edm::LogInfo(
"HcalHBHEMuon") <<
"Energy:" << RecMuon->energy() <<
" P:"
296 if (RecMuon->track().isNonnull()) {
297 TrackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
301 if (RecMuon->innerTrack().isNonnull()) {
303 NumPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
304 chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
305 DxyTracker.push_back(fabs(RecMuon->innerTrack()->dxy((*firstGoodVertex).position())));
306 DzTracker.push_back(fabs(RecMuon->innerTrack()->dz((*firstGoodVertex).position())));
310 Tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
323 if (RecMuon->outerTrack().isNonnull()) {
328 OuterTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
329 OuterTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
341 if (RecMuon->globalTrack().isNonnull()) {
343 chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
344 GlobalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
345 MatchedStat.push_back(RecMuon->numberOfMatchedStations());
349 Tight_TransImpara.push_back(fabs(RecMuon->muonBestTrack()->dxy((*firstGoodVertex).position())));
350 Tight_LongPara.push_back(fabs(RecMuon->muonBestTrack()->dz((*firstGoodVertex).position())));
363 IsolationR04.push_back(((RecMuon->pfIsolationR04().sumChargedHadronPt +
std::max(0.,RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt - (0.5 *RecMuon->pfIsolationR04().sumPUPt))) / RecMuon->pt()) );
365 IsolationR03.push_back(((RecMuon->pfIsolationR03().sumChargedHadronPt +
std::max(0.,RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt - (0.5 * RecMuon->pfIsolationR03().sumPUPt))) / RecMuon->pt()));
371 double eEcal(0),eHcal(0),activeL(0),eHcalDepth[7],eHcalDepthHot[7];
372 bool tmpmatch =
false;
373 unsigned int isHot = 0;
374 for (
int i=0;
i<7; ++
i) eHcalDepth[
i]=eHcalDepthHot[
i]=-10000;
376 if (RecMuon->innerTrack().isNonnull()) {
377 const reco::Track* pTrack = (RecMuon->innerTrack()).
get();
392 std::pair<double,bool> e3x3 =
spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle,*theEcalChStatus,geo,caloTopology,sevlv.
product(),1,1,-100.0,-100.0,-500.0,500.0,
false);
399 if ((hcidt.ieta() == check.
ieta()) && (hcidt.iphi() == check.
iphi()))
402 eHcal =
spr::eHCALmatrix(theHBHETopology, closestCell, hbhe,0,0,
false,
true, -100.0, -100.0, -100.0, -100.0, -500.,500.,
useRaw_);
403 std::vector<std::pair<double,int> > ehdepth;
404 spr::energyHCALCell((
HcalDetId) closestCell, hbhe, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0,
useRaw_, (((
verbosity_/1000)%10)>0));
405 for (
unsigned int i=0;
i<ehdepth.size(); ++
i) {
406 eHcalDepth[ehdepth[
i].second-1] = ehdepth[
i].first;
413 isHot =
matchId(closestCell,hotCell);
415 std::vector<std::pair<double,int> > ehdepth;
416 spr::energyHCALCell(hotCell, hbhe, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0,
useRaw_,
false);
417 for (
unsigned int i=0;
i<ehdepth.size(); ++
i) {
418 eHcalDepthHot[ehdepth[
i].second-1] = ehdepth[
i].first;
450 if (accept)
TREE->Fill();
564 edm::LogInfo(
"TriggerBlock") <<
"HLT config with process name "
565 <<
"HLT" <<
" successfully extracted";
568 std::string string_search[6]={
"HLT_IsoMu17",
"HLT_IsoMu20",
"HLT_IsoMu24",
"HLT_IsoMu27",
"HLT_Mu45",
"HLT_Mu50"};
571 for (
unsigned int t=0;
t<ntriggers;++
t) {
573 for (
unsigned int ik=0; ik<6; ++ik) {
574 if (
hltname.find(string_search[ik])!=std::string::npos ){
580 edm::LogInfo(
"HcalHBHEMuon") <<
"All triggers size in begin run "
583 edm::LogError(
"HcalHBHEMuon") <<
"Error! HLT config extraction with process name "
584 <<
"HLT"<<
" failed";
684 int match = ((kd1 == kd2) ? 1 : 0);
690 int ieta =
id.ietaAbs();
691 int depth=
id.depth();
694 for (
unsigned int i=0;
i<
actHB.size(); ++
i) {
701 for (
unsigned int i=0;
i<
actHE.size(); ++
i) {
712 if (vtx.
isFake())
return false;
713 if (vtx.
ndof() < 4)
return false;
714 if (vtx.
position().Rho() > 2.)
return false;
715 if (fabs(vtx.
position().Z()) > 24.)
return false;
unsigned int size() const
number of trigger paths in trigger table
std::vector< double > Tight_LongPara
T getParameter(std::string const &) const
EventNumber_t event() const
HcalHBHEMuonAnalyzer(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > MuonEcal3x3Energy
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
std::vector< double > GlobalTrckPhi
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
std::vector< double > TrackerLayer
std::vector< double > MuonHcalDepth7HotEnergy
std::vector< double > matchedId
std::vector< double > OuterTrackHits
HcalSubdetector subdet() const
get the subdetector
const std::string & triggerName(unsigned int triggerIndex) const
std::vector< double > Pmuon
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::vector< double > OuterTrackPt
edm::InputTag HLTriggerResults_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< double > GlobalTrckPt
std::vector< double > DxyTracker
#define DEFINE_FWK_MODULE(type)
std::vector< double > MuonHcalEnergy
std::vector< bool > GlobalTrack
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
std::vector< double > MuonHOEnergy
std::vector< double > MuonHcalHot
std::vector< bool > muon_global
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, bool useRaw=false, bool debug=false)
std::vector< double > MuonHcalDepth1Energy
int bunchCrossing() const
std::vector< double > GlobalMuonHits
std::vector< double > chiGlobal
T * make(const Args &...args) const
make new ROOT object
std::vector< bool > innerTrack
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
std::vector< double > MuonHcalDepth3Energy
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< double > PtGlob
const Point & position() const
position
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
std::string labelEBRecHit_
std::vector< double > MuonHcalDepth2HotEnergy
std::vector< double > OuterTrackRHits
uint32_t rawId() const
get the raw id
std::vector< double > OuterTrackEta
edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
std::vector< unsigned int > MuonEHcalDetId
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< double > MuonHcalDepth1HotEnergy
std::vector< double > PhiGlob
unsigned int triggerIndex(std::string const &name) const
bool check(const std::string &)
std::vector< double > MuonHcalActiveLength
std::vector< double > MuonHcalDepth7Energy
int ieta() const
get the cell ieta
std::pair< bool, HcalDetId > propagateHCALBack(const reco::Track *, const CaloGeometry *geo, const MagneticField *bField, bool debug=false)
std::vector< double > MuonHcalDepth2Energy
std::vector< double > IsolationR03
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, bool useRaw=false, bool debug=false)
double activeLength(const DetId &)
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
std::vector< double > IsolationR04
std::vector< double > MuonHcalDepth3HotEnergy
std::vector< double > DzTracker
virtual void endRun(edm::Run const &, edm::EventSetup const &)
std::vector< HcalActiveLength > getThickActive(const int type) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< double > Tight_TransImpara
int iphi() const
get the cell iphi
std::string labelHBHERecHit_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
std::vector< double > MuonHcalDepth4Energy
std::vector< int > hltresults
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
std::vector< bool > OuterTrack
std::vector< double > GlobalTrckEta
T const * product() const
std::vector< double > MuonHcal1x1Energy
std::vector< std::string > all_triggers
std::vector< unsigned int > MuonHcalDetId
std::vector< double > innerTracketa
std::vector< double > MatchedStat
std::vector< double > MuonHcalDepth5Energy
int matchId(const HcalDetId &, const HcalDetId &)
std::vector< double > MuonHcalDepth5HotEnergy
std::vector< double > innerTrackphi
std::vector< double > OuterTrackChi
HLTConfigProvider hltConfig_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::vector< double > innerTrackpt
std::vector< double > MuonEcalEnergy
std::vector< double > Tight_PixelHits
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
std::vector< double > OuterTrackPhi
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< double > MuonHcalDepth4HotEnergy
std::vector< double > chiTracker
std::string labelEERecHit_
std::vector< double > MuonHcalDepth6HotEnergy
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
std::vector< bool > muon_tracker
std::vector< double > MuonHcalDepth6Energy
edm::Service< TFileService > fs
std::vector< double > NumPixelLayers
std::vector< double > Energy
cond::RealTimeType< cond::runnumber >::type RunNumber
std::vector< bool > muon_is_good
std::vector< unsigned int > MuonEcalDetId
std::vector< double > EtaGlob
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)