120 std::vector<HcalDDDRecConstants::HcalActiveLength>
actHB,
actHE;
141 if (maxDepth_ > 7) maxDepth_ = 7;
142 else if (maxDepth_ < 1) maxDepth_ = 4;
155 << labelVtx_ <<
" " << labelEBRecHit_ <<
" "
156 << labelEERecHit_ <<
" " << labelHBHERecHit_
201 edm::LogInfo(
"HcalHBHEMuon") <<
"Size of HLT MENU: " << _Triggers->size();
205 std::vector<int>
index;
206 for (
int i=0;
i < Ntriggers;
i++) {
208 int triggerSize = int( _Triggers->size());
211 <<
"\ntriggerSize " << triggerSize;
213 if (index[i] < triggerSize) {
214 hltresults.push_back(_Triggers->accept(index[i]));
216 edm::LogInfo(
"HcalHBHEMuon") <<
"Trigger_info " << triggerSize
217 <<
" triggerSize " << index[
i]
222 edm::LogInfo(
"HcalHBHEMuon") <<
"Requested HLT path \"" <<
"\" does not exist";
267 reco::VertexCollection::const_iterator firstGoodVertex = vtx->end();
268 for (reco::VertexCollection::const_iterator it = vtx->begin(); it != firstGoodVertex; it++) {
270 firstGoodVertex = it;
275 if (firstGoodVertex == vtx->end())
return;
280 for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon!= _Muon->end(); ++RecMuon) {
282 if (RecMuon->p() > 10.0) accept =
true;
288 EtaGlob.push_back(RecMuon->eta());
289 PhiGlob.push_back(RecMuon->phi());
290 Energy.push_back(RecMuon->energy());
291 Pmuon.push_back(RecMuon->p());
293 edm::LogInfo(
"HcalHBHEMuon") <<
"Energy:" << RecMuon->energy() <<
" P:"
297 if (RecMuon->track().isNonnull()) {
298 TrackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
302 if (RecMuon->innerTrack().isNonnull()) {
304 NumPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
305 chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
306 DxyTracker.push_back(fabs(RecMuon->innerTrack()->dxy((*firstGoodVertex).position())));
307 DzTracker.push_back(fabs(RecMuon->innerTrack()->dz((*firstGoodVertex).position())));
311 Tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
324 if (RecMuon->outerTrack().isNonnull()) {
329 OuterTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
330 OuterTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
342 if (RecMuon->globalTrack().isNonnull()) {
344 chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
345 GlobalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
346 MatchedStat.push_back(RecMuon->numberOfMatchedStations());
350 Tight_TransImpara.push_back(fabs(RecMuon->muonBestTrack()->dxy((*firstGoodVertex).position())));
351 Tight_LongPara.push_back(fabs(RecMuon->muonBestTrack()->dz((*firstGoodVertex).position())));
364 IsolationR04.push_back(((RecMuon->pfIsolationR04().sumChargedHadronPt +
std::max(0.,RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt - (0.5 *RecMuon->pfIsolationR04().sumPUPt))) / RecMuon->pt()) );
366 IsolationR03.push_back(((RecMuon->pfIsolationR03().sumChargedHadronPt +
std::max(0.,RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt - (0.5 * RecMuon->pfIsolationR03().sumPUPt))) / RecMuon->pt()));
372 double eEcal(0),eHcal(0),activeL(0),eHcalDepth[7],eHcalDepthHot[7];
373 bool tmpmatch =
false;
374 unsigned int isHot = 0;
375 for (
int i=0;
i<7; ++
i) eHcalDepth[
i]=eHcalDepthHot[
i]=-10000;
377 if (RecMuon->innerTrack().isNonnull()) {
378 const reco::Track* pTrack = (RecMuon->innerTrack()).
get();
393 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);
400 if ((hcidt.ieta() == check.
ieta()) && (hcidt.iphi() == check.
iphi()))
403 eHcal =
spr::eHCALmatrix(theHBHETopology, closestCell, hbhe,0,0,
false,
true, -100.0, -100.0, -100.0, -100.0, -500.,500.,
useRaw_);
404 std::vector<std::pair<double,int> > ehdepth;
405 spr::energyHCALCell((
HcalDetId) closestCell, hbhe, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0,
useRaw_, (((
verbosity_/1000)%10)>0));
406 for (
unsigned int i=0;
i<ehdepth.size(); ++
i) {
407 eHcalDepth[ehdepth[
i].second-1] = ehdepth[
i].first;
414 isHot =
matchId(closestCell,hotCell);
416 std::vector<std::pair<double,int> > ehdepth;
417 spr::energyHCALCell(hotCell, hbhe, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0,
useRaw_,
false);
418 for (
unsigned int i=0;
i<ehdepth.size(); ++
i) {
419 eHcalDepthHot[ehdepth[
i].second-1] = ehdepth[
i].first;
451 if (accept)
TREE->Fill();
565 edm::LogInfo(
"TriggerBlock") <<
"HLT config with process name "
566 <<
"HLT" <<
" successfully extracted";
569 std::string string_search[6]={
"HLT_IsoMu17",
"HLT_IsoMu20",
"HLT_IsoMu24",
"HLT_IsoMu27",
"HLT_Mu45",
"HLT_Mu50"};
572 for (
unsigned int t=0;
t<ntriggers;++
t) {
574 for (
unsigned int ik=0; ik<6; ++ik) {
575 if (
hltname.find(string_search[ik])!=std::string::npos ){
581 edm::LogInfo(
"HcalHBHEMuon") <<
"All triggers size in begin run "
584 edm::LogError(
"HcalHBHEMuon") <<
"Error! HLT config extraction with process name "
585 <<
"HLT"<<
" failed";
685 int match = ((kd1 == kd2) ? 1 : 0);
691 int ieta =
id.ietaAbs();
692 int depth=
id.depth();
695 for (
unsigned int i=0;
i<
actHB.size(); ++
i) {
702 for (
unsigned int i=0;
i<
actHE.size(); ++
i) {
713 if (vtx.
isFake())
return false;
714 if (vtx.
ndof() < 4)
return false;
715 if (vtx.
position().Rho() > 2.)
return false;
716 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
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)