84 int ietaHB[18] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
85 11, 12, 13, 14, 15, 15, 16, 16};
86 int depthHB[18] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
87 1, 1, 1, 1, 1, 2, 1, 2};
88 double etaHB[18] = {0.0435, 0.1305, 0.2175, 0.3045, 0.3915, 0.4785,
89 0.5655, 0.6525, 0.7395, 0.8265, 0.9135, 1.0005,
90 1.0875, 1.1745, 1.2615, 1.2615, 1.3485, 1.3485};
91 double actLHB[18]= {7.35696, 7.41268, 7.52454, 7.69339, 7.92051, 8.20761,
92 8.55688, 8.97096, 9.45298, 10.0066, 10.6360, 11.3460,
93 12.1419, 13.0297, 10.1832, 3.83301, 2.61066, 5.32410};
95 for (
int i=0;
i<18; ++
i) {
100 int ietaHE[28] = {16, 17, 18, 18, 19, 19, 20, 20, 21, 21,
101 22, 22, 23, 23, 24, 24, 25, 25, 26, 26,
102 27, 27, 27, 28, 28, 28, 29, 29};
103 int depthHE[28] = {3, 1, 1, 2, 1, 2, 1, 2, 1, 2,
104 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
105 1, 2, 3, 1, 2, 3, 1, 2};
106 double etaHE[28] = {1.3485, 1.4355, 1.5225, 1.5225, 1.6095, 1.6095, 1.6965,
107 1.6965, 1.7850, 1.7850, 1.8800, 1.8800, 1.9865, 1.9865,
108 2.1075, 2.1075, 2.2470, 2.2470, 2.4110, 2.4110, 2.5750,
109 2.5750, 2.5750, 2.7590, 2.7590, 2.8250, 2.9340, 2.9340};
110 double actLHE[28]= {4.23487, 8.05342, 2.21090, 5.69774, 2.57831, 5.21078,
111 2.54554, 5.14455, 2.51790, 5.08871, 2.49347, 5.03933,
112 2.47129, 4.99449, 2.45137, 4.95424, 2.43380, 4.91873,
113 2.41863, 4.88808, 1.65913, 0.74863, 4.86612, 1.65322,
114 0.74596, 4.84396, 1.64930, 0.744198};
116 for (
int i=0;
i<28; ++
i) {
118 actHE.push_back(act);
124 edm::LogInfo(
"HcalHBHEMuon") <<
"HcalDDDRecConstantsTemp::destructed!!!";
128 std::vector<HcalDDDRecConstantsTemp::HcalActiveLength>
131 if (type == 0)
return actHB;
192 std::vector<HcalDDDRecConstantsTemp::HcalActiveLength>
actHB ,
actHE;
212 if (maxDepth_ > 7) maxDepth_ = 7;
213 else if (maxDepth_ < 1) maxDepth_ = 4;
225 << labelVtx_ <<
" " << labelEBRecHit_ <<
" "
226 << labelEERecHit_ <<
" " << labelHBHERecHit_
271 edm::LogInfo(
"HcalHBHEMuon") <<
"Size of HLT MENU: " << _Triggers->size();
275 std::vector<int>
index;
276 for (
int i=0;
i < Ntriggers;
i++) {
278 int triggerSize = int( _Triggers->size());
281 <<
"\ntriggerSize " << triggerSize;
283 if (index[i] < triggerSize) {
284 hltresults.push_back(_Triggers->accept(index[i]));
286 edm::LogInfo(
"HcalHBHEMuon") <<
"Trigger_info " << triggerSize
287 <<
" triggerSize " << index[
i]
292 edm::LogInfo(
"HcalHBHEMuon") <<
"Requested HLT path \"" <<
"\" does not exist";
337 reco::VertexCollection::const_iterator firstGoodVertex = vtx->end();
338 for (reco::VertexCollection::const_iterator it = vtx->begin(); it != firstGoodVertex; it++) {
340 firstGoodVertex = it;
345 if (firstGoodVertex == vtx->end())
return;
350 for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon!= _Muon->end(); ++RecMuon) {
352 if (RecMuon->p() > 10.0) accept =
true;
358 EtaGlob.push_back(RecMuon->eta());
359 PhiGlob.push_back(RecMuon->phi());
360 Energy.push_back(RecMuon->energy());
361 Pmuon.push_back(RecMuon->p());
363 edm::LogInfo(
"HcalHBHEMuon") <<
"Energy:" << RecMuon->energy() <<
" P:"
367 if (RecMuon->track().isNonnull()) {
368 TrackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
372 if (RecMuon->innerTrack().isNonnull()) {
374 NumPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
375 chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
376 DxyTracker.push_back(fabs(RecMuon->innerTrack()->dxy((*firstGoodVertex).position())));
377 DzTracker.push_back(fabs(RecMuon->innerTrack()->dz((*firstGoodVertex).position())));
381 Tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
394 if (RecMuon->outerTrack().isNonnull()) {
399 OuterTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
400 OuterTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
412 if (RecMuon->globalTrack().isNonnull()) {
414 chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
415 GlobalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
416 MatchedStat.push_back(RecMuon->numberOfMatchedStations());
420 Tight_TransImpara.push_back(fabs(RecMuon->muonBestTrack()->dxy((*firstGoodVertex).position())));
421 Tight_LongPara.push_back(fabs(RecMuon->muonBestTrack()->dz((*firstGoodVertex).position())));
434 IsolationR04.push_back(((RecMuon->pfIsolationR04().sumChargedHadronPt +
std::max(0.,RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt - (0.5 *RecMuon->pfIsolationR04().sumPUPt))) / RecMuon->pt()) );
436 IsolationR03.push_back(((RecMuon->pfIsolationR03().sumChargedHadronPt +
std::max(0.,RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt - (0.5 * RecMuon->pfIsolationR03().sumPUPt))) / RecMuon->pt()));
442 double eEcal(0),eHcal(0),activeL(0),eHcalDepth[7],eHcalDepthHot[7];
443 unsigned int isHot = 0;
444 for (
int i=0;
i<7; ++
i) eHcalDepth[
i]=eHcalDepthHot[
i]=-10000;
446 if (RecMuon->innerTrack().isNonnull()) {
447 const reco::Track* pTrack = (RecMuon->innerTrack()).
get();
456 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);
462 eHcal =
spr::eHCALmatrix(theHBHETopology, closestCell, hbhe,0,0,
false,
true, -100.0, -100.0, -100.0, -100.0, -500.,500.);
463 std::vector<std::pair<double,int> > ehdepth;
464 spr::energyHCALCell((
HcalDetId) closestCell, hbhe, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0, (((
verbosity_/1000)%10)>0));
465 for (
unsigned int i=0;
i<ehdepth.size(); ++
i) {
466 eHcalDepth[ehdepth[
i].second-1] = ehdepth[
i].first;
472 spr::eHCALmatrix(geo,theHBHETopology, closestCell, hbhe, 1,1, hotCell,
false,
false);
473 isHot =
matchId(closestCell,hotCell);
475 std::vector<std::pair<double,int> > ehdepth;
476 spr::energyHCALCell(hotCell, hbhe, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0,
false);
477 for (
unsigned int i=0;
i<ehdepth.size(); ++
i) {
478 eHcalDepthHot[ehdepth[
i].second-1] = ehdepth[
i].first;
509 if (accept)
TREE->Fill();
625 edm::LogInfo(
"TriggerBlock") <<
"HLT config with process name "
626 <<
"HLT" <<
" successfully extracted";
629 std::string string_search[6]={
"HLT_IsoMu17",
"HLT_IsoMu20",
"HLT_IsoMu24",
"HLT_IsoMu27",
"HLT_Mu45",
"HLT_Mu50"};
632 for (
unsigned int t=0;
t<ntriggers;++
t) {
634 for (
unsigned int ik=0; ik<6; ++ik) {
635 if (
hltname.find(string_search[ik])!=std::string::npos ){
641 edm::LogInfo(
"HcalHBHEMuon") <<
"All triggers size in begin run "
644 edm::LogError(
"HcalHBHEMuon") <<
"Error! HLT config extraction with process name "
645 <<
"HLT"<<
" failed";
744 int match = ((kd1 == kd2) ? 1 : 0);
750 int ieta =
id.ietaAbs();
751 int depth=
id.depth();
754 for (
unsigned int i=0;
i<
actHB.size(); ++
i) {
761 for (
unsigned int i=0;
i<
actHE.size(); ++
i) {
772 if (vtx.
isFake())
return false;
773 if (vtx.
ndof() < 4)
return false;
774 if (vtx.
position().Rho() > 2.)
return false;
775 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
HcalActiveLength(int ie=0, int d=0, double et=0, double t=0)
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 > 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_
std::vector< HcalActiveLength > actHB
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
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< double > MuonHcalDepth3Energy
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< HcalDDDRecConstantsTemp::HcalActiveLength > actHE
std::vector< double > PtGlob
const Point & position() const
position
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
std::string labelEBRecHit_
std::vector< double > MuonHcalDepth2HotEnergy
std::vector< HcalActiveLength > getThickActive(const int type) const
std::vector< double > OuterTrackRHits
uint32_t rawId() const
get the raw id
std::vector< double > OuterTrackEta
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 debug=false)
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 debug=false)
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
std::vector< double > MuonHcalActiveLength
std::vector< HcalActiveLength > actHE
std::vector< double > MuonHcalDepth7Energy
int ieta() const
get the cell ieta
std::vector< double > MuonHcalDepth2Energy
std::vector< double > IsolationR03
HcalDDDRecConstantsTemp()
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 &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< HcalDDDRecConstantsTemp::HcalActiveLength > actHB
std::vector< double > Tight_TransImpara
int iphi() const
get the cell iphi
std::string labelHBHERecHit_
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
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)
~HcalDDDRecConstantsTemp()