Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of the Beam Halo Filter (both CSC and Calo algos) #13926

Merged
merged 3 commits into from Apr 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions DataFormats/METReco/interface/BeamHaloSummary.h
Expand Up @@ -47,6 +47,8 @@ namespace reco {

const bool GlobalLooseHaloId() const { return GlobalHaloReport.size() ? GlobalHaloReport[0] : false ; }
const bool GlobalTightHaloId() const { return GlobalHaloReport.size() > 1 ? GlobalHaloReport[1] : false ; }
const bool GlobalTightHaloId2016() const { return GlobalHaloReport.size() > 2 ? GlobalHaloReport[2] : false ; }
const bool GlobalSuperTightHaloId2016() const { return GlobalHaloReport.size() > 3 ? GlobalHaloReport[3] : false ; }

const bool EventSmellsLikeHalo() const { return HcalLooseHaloId() || EcalLooseHaloId() || CSCLooseHaloId() || GlobalLooseHaloId() ; }
const bool LooseId() const { return EventSmellsLikeHalo(); }
Expand Down
14 changes: 14 additions & 0 deletions DataFormats/METReco/interface/EcalHaloData.h
Expand Up @@ -15,6 +15,8 @@
#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "DataFormats/Common/interface/ValueMap.h"
#include "DataFormats/METReco/interface/HaloClusterCandidateECAL.h"


namespace reco {
class EcalHaloData {
Expand Down Expand Up @@ -43,13 +45,25 @@ namespace reco {

edm::ValueMap<float>& GetShowerShapesAngle() { return ShowerShapes_Angle;}
const edm::ValueMap<float>& GetShowerShapesAngle() const { return ShowerShapes_Angle;}


const std::vector<HaloClusterCandidateECAL>& getHaloClusterCandidatesEB() const {return thehaloclustercands_eb;}
std::vector<HaloClusterCandidateECAL>& getHaloClusterCandidatesEB(){return thehaloclustercands_eb;}
const std::vector<HaloClusterCandidateECAL>& getHaloClusterCandidatesEE() const {return thehaloclustercands_ee;}
std::vector<HaloClusterCandidateECAL>& getHaloClusterCandidatesEE(){return thehaloclustercands_ee;}

void setHaloClusterCandidatesEB(const std::vector<HaloClusterCandidateECAL>& x) {thehaloclustercands_eb =x;}
void setHaloClusterCandidatesEE(const std::vector<HaloClusterCandidateECAL>& x) {thehaloclustercands_ee =x;}
private:
std::vector<PhiWedge> PhiWedgeCollection;
edm::RefVector<reco::SuperClusterCollection> TheSuperClusterRefs;

edm::ValueMap<float> ShowerShapes_Roundness;
edm::ValueMap<float> ShowerShapes_Angle;

std::vector<HaloClusterCandidateECAL> thehaloclustercands_eb;
std::vector<HaloClusterCandidateECAL> thehaloclustercands_ee;

};
}

Expand Down
46 changes: 46 additions & 0 deletions DataFormats/METReco/interface/GlobalHaloData.h
Expand Up @@ -42,10 +42,48 @@ namespace reco {

std::vector<PhiWedge>& GetMatchedEcalPhiWedges(){return EcalPhiWedges;}
const std::vector<PhiWedge>& GetMatchedEcalPhiWedges() const {return EcalPhiWedges;}



edm::RefVector<EcalRecHitCollection>& GetEBRechits(){return ecalebrhRefs;}
const edm::RefVector<EcalRecHitCollection>& GetEBRechits()const {return ecalebrhRefs;}

edm::RefVector<EcalRecHitCollection>& GetEERechits(){return ecaleerhRefs;}
const edm::RefVector<EcalRecHitCollection>& GetEERechits()const {return ecaleerhRefs;}

edm::RefVector<HBHERecHitCollection>& GetHBHERechits(){return hbherhRefs;}
const edm::RefVector<HBHERecHitCollection>& GetHBHERechits()const {return hbherhRefs;}


bool GetSegmentIsHBCaloMatched() const{ return segmentisHBcalomatched; }
bool GetSegmentIsHECaloMatched() const{ return segmentisHEcalomatched; }
bool GetSegmentIsEBCaloMatched() const{ return segmentisEBcalomatched; }
bool GetSegmentIsEECaloMatched() const{ return segmentisEEcalomatched; }

bool GetHaloPatternFoundEB() const{ return halopatternfoundEB;}
bool GetHaloPatternFoundEE() const{ return halopatternfoundEE;}
bool GetHaloPatternFoundHB() const{ return halopatternfoundHB;}
bool GetHaloPatternFoundHE() const{ return halopatternfoundHE;}



//Setters
void SetMETOverSumEt(float x){METOverSumEt_=x;}
void SetMETCorrections(float x, float y) { dMEx_ =x ; dMEy_ = y;}

void SetSegmentIsHBCaloMatched(bool b) { segmentisHBcalomatched = b; }
void SetSegmentIsHECaloMatched(bool b) { segmentisHEcalomatched = b; }
void SetSegmentIsEBCaloMatched(bool b) { segmentisEBcalomatched = b;}
void SetSegmentIsEECaloMatched(bool b) { segmentisEEcalomatched = b; }
void SetHaloPatternFoundEB(bool b) { halopatternfoundEB = b;}
void SetHaloPatternFoundEE(bool b) { halopatternfoundEE = b;}
void SetHaloPatternFoundHB(bool b) { halopatternfoundHB = b;}
void SetHaloPatternFoundHE(bool b) { halopatternfoundHE = b;}





private:

float METOverSumEt_;
Expand All @@ -55,6 +93,14 @@ namespace reco {

std::vector<PhiWedge> HcalPhiWedges;
std::vector<PhiWedge> EcalPhiWedges;

bool segmentisEBcalomatched,segmentisEEcalomatched,segmentisHBcalomatched,segmentisHEcalomatched;
bool halopatternfoundEB,halopatternfoundEE,halopatternfoundHB,halopatternfoundHE;

edm::RefVector<EcalRecHitCollection> ecalebrhRefs;
edm::RefVector<EcalRecHitCollection> ecaleerhRefs;
edm::RefVector<HBHERecHitCollection> hbherhRefs;

};
}
#endif
98 changes: 98 additions & 0 deletions DataFormats/METReco/interface/HaloClusterCandidateECAL.h
@@ -0,0 +1,98 @@
#ifndef DATAFORMATS_METRECO_HALOCLUSTERCANDIDATEECAL_H
#define DATAFORMATS_METRECO_HALOCLUSTERCANDIDATEECAL_H



#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
#include "DataFormats/GeometrySurface/interface/Cylinder.h"
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/GeometrySurface/interface/Cone.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
#include "DataFormats/GeometryVector/interface/LocalPoint.h"
#include "DataFormats/GeometryVector/interface/LocalVector.h"
#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "DataFormats/Math/interface/deltaPhi.h"


namespace reco {
class HaloClusterCandidateECAL {

public:
HaloClusterCandidateECAL();
~HaloClusterCandidateECAL(){}



double getClusterEt() const {return et;}
double getSeedEt() const {return seed_et;}
double getSeedEta() const {return seed_eta;}
double getSeedPhi() const {return seed_phi;}
double getSeedZ() const {return seed_Z;}
double getSeedR() const {return seed_R;}
double getSeedTime() const {return seed_time;}
double getTimeDiscriminator() const {return timediscriminator;}
bool getIsHaloFromPattern() const {return ishalofrompattern;}
bool getIsHaloFromPattern_HLT() const {return ishalofrompattern_hlt;}
const edm::RefVector<EcalRecHitCollection>& getBeamHaloRecHitsCandidates() const {return bhrhcandidates;}

//Specific to EB:
double getEtStripIPhiSeedPlus1() const {return etstrip_iphiseedplus1;}
double getEtStripIPhiSeedMinus1() const {return etstrip_iphiseedminus1;}
double getHoverE() const {return hovere;}
int getNbofCrystalsInEta() const {return numberofcrystalsineta;}
//Specific to EE:
double getH2overE() const {return h2overe;}
int getNbEarlyCrystals() const {return nbearlycrystals;}
int getNbLateCrystals() const {return nblatecrystals;}
int getClusterSize() const {return clustersize;}


void setClusterEt(double x){ et=x;}
void setSeedEt(double x){ seed_et=x;}
void setSeedEta(double x){ seed_eta=x;}
void setSeedPhi(double x){ seed_phi=x;}
void setSeedZ(double x){ seed_Z=x;}
void setSeedR(double x){ seed_R=x;}
void setSeedTime(double x){ seed_time=x;}
void setTimeDiscriminator(double x){ timediscriminator=x;}
void setIsHaloFromPattern(bool x) { ishalofrompattern=x;}
void setIsHaloFromPattern_HLT(bool x) { ishalofrompattern_hlt=x;}
void setBeamHaloRecHitsCandidates(edm::RefVector<EcalRecHitCollection> x) {bhrhcandidates =x;}
//Specific to EB:
void setEtStripIPhiSeedPlus1(double x){ etstrip_iphiseedplus1=x;}
void setEtStripIPhiSeedMinus1(double x){ etstrip_iphiseedminus1=x;}
void setHoverE(double x){hovere=x;}
void setNbofCrystalsInEta(double x){numberofcrystalsineta=x;}
//Specific to EE:
void setH2overE(double x){h2overe=x;}
void setNbEarlyCrystals(int x){nbearlycrystals=x;}
void setNbLateCrystals(int x){nblatecrystals=x;}
void setClusterSize(int x){clustersize=x;}


private:
double et;
double seed_et, seed_eta, seed_phi, seed_Z, seed_R, seed_time;
double timediscriminator;
bool ishalofrompattern;
bool ishalofrompattern_hlt;
//Specific to EB:
double hovere;
int numberofcrystalsineta;
double etstrip_iphiseedplus1, etstrip_iphiseedminus1;
//Specific to EE:
double h2overe;
int nbearlycrystals, nblatecrystals, clustersize;

edm::RefVector<EcalRecHitCollection> bhrhcandidates;

};
typedef std::vector<HaloClusterCandidateECAL> HaloClusterCandidateECALCollection;
}
#endif
96 changes: 96 additions & 0 deletions DataFormats/METReco/interface/HaloClusterCandidateHCAL.h
@@ -0,0 +1,96 @@
#ifndef DATAFORMATS_METRECO_HALOCLUSTERCANDIDATEHCAL_H
#define DATAFORMATS_METRECO_HALOCLUSTERCANDIDATEHCAL_H



#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "DataFormats/GeometrySurface/interface/Cylinder.h"
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/GeometrySurface/interface/Cone.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
#include "DataFormats/GeometryVector/interface/LocalPoint.h"
#include "DataFormats/GeometryVector/interface/LocalVector.h"
#include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "DataFormats/Math/interface/deltaPhi.h"


namespace reco {
class HaloClusterCandidateHCAL {

public:
HaloClusterCandidateHCAL();
~HaloClusterCandidateHCAL(){}



double getClusterEt() const {return et;}
double getSeedEt() const {return seed_et;}
double getSeedEta() const {return seed_eta;}
double getSeedPhi() const {return seed_phi;}
double getSeedZ() const {return seed_Z;}
double getSeedR() const {return seed_R;}
double getSeedTime() const {return seed_time;}
bool getIsHaloFromPattern() const {return ishalofrompattern;}
bool getIsHaloFromPattern_HLT() const {return ishalofrompattern_hlt;}
double getEoverH() const {return eoverh;}
double getEtStripPhiSeedPlus1() const {return etstrip_phiseedplus1;}
double getEtStripPhiSeedMinus1() const {return etstrip_phiseedminus1;}
edm::RefVector<HBHERecHitCollection> getBeamHaloRecHitsCandidates() const {return bhrhcandidates;}
//Specific to HB:
int getNbTowersInEta() const {return nbtowersineta;}
double getTimeDiscriminatorITBH() const {return timediscriminatoritbh;}
double getTimeDiscriminatorOTBH() const {return timediscriminatorotbh;}
//Specific to HE:
double getH1overH123() const {return h1overh123;}
int getClusterSize() const {return clustersize;}
double getTimeDiscriminator() const {return timediscriminator;}

void setClusterEt(double x){ et=x;}
void setSeedEt(double x){ seed_et=x;}
void setSeedEta(double x){ seed_eta=x;}
void setSeedPhi(double x){ seed_phi=x;}
void setSeedZ(double x){ seed_Z=x;}
void setSeedR(double x){ seed_R=x;}
void setSeedTime(double x){ seed_time=x;}
void setIsHaloFromPattern(bool x) { ishalofrompattern=x;}
void setIsHaloFromPattern_HLT(bool x) { ishalofrompattern_hlt=x;}
void setEoverH(double x){eoverh=x;}
void setEtStripPhiSeedPlus1(double x){etstrip_phiseedplus1=x;}
void setEtStripPhiSeedMinus1(double x){etstrip_phiseedminus1=x;}
void setBeamHaloRecHitsCandidates(edm::RefVector<HBHERecHitCollection> x) {bhrhcandidates =x;}
//Specific to HB:
void setNbTowersInEta(double x){nbtowersineta=x;}
void setTimeDiscriminatorITBH(double x){ timediscriminatoritbh=x;}
void setTimeDiscriminatorOTBH(double x){ timediscriminatorotbh=x;}
//Specific to HE:
void setH1overH123(double x){h1overh123=x;}
void setClusterSize(int x){clustersize=x;}
void setTimeDiscriminator(double x){ timediscriminator=x;}

private:
double et;
double seed_et, seed_eta, seed_phi, seed_Z, seed_R, seed_time;
bool ishalofrompattern;
bool ishalofrompattern_hlt;
double eoverh;
double etstrip_phiseedplus1, etstrip_phiseedminus1;
//Specific to HB:
int nbtowersineta;
double timediscriminatoritbh, timediscriminatorotbh;
//Specific to HE:
double h1overh123;
int clustersize;
double timediscriminator;

edm::RefVector<HBHERecHitCollection> bhrhcandidates;

};
typedef std::vector<HaloClusterCandidateHCAL> HaloClusterCandidateHCALCollection;
}
#endif
15 changes: 14 additions & 1 deletion DataFormats/METReco/interface/HcalHaloData.h
Expand Up @@ -7,10 +7,12 @@
[date]: October 15, 2009
*/
#include <vector>
#include <cmath>
#include "DataFormats/METReco/interface/PhiWedge.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"

#include "DataFormats/METReco/interface/HaloClusterCandidateHCAL.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
struct HaloTowerStrip {
std::vector<std::pair<uint8_t, CaloTowerDetId> > cellTowerIds;
float hadEt;
Expand Down Expand Up @@ -50,9 +52,20 @@ namespace reco {
const std::vector<HaloTowerStrip>& getProblematicStrips() const {return problematicStripCollection;}
std::vector<HaloTowerStrip>& getProblematicStrips() {return problematicStripCollection;}

const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() const {return thehaloclustercands_hb;}
std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB(){return thehaloclustercands_hb;}

const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() const {return thehaloclustercands_he;}
std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE(){return thehaloclustercands_he;}

void setHaloClusterCandidatesHB(const std::vector<HaloClusterCandidateHCAL>& x){thehaloclustercands_hb =x;};
void setHaloClusterCandidatesHE(const std::vector<HaloClusterCandidateHCAL>& x){thehaloclustercands_he =x;};

private:
std::vector<PhiWedge> PhiWedgeCollection;
std::vector<HaloTowerStrip> problematicStripCollection;
std::vector<HaloClusterCandidateHCAL> thehaloclustercands_hb;
std::vector<HaloClusterCandidateHCAL> thehaloclustercands_he;

};
}
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/METReco/src/BeamHaloSummary.cc
Expand Up @@ -14,9 +14,9 @@ BeamHaloSummary::BeamHaloSummary()
for( unsigned int i = 0 ; i < 6 ; i++ )
{
CSCHaloReport.push_back(0);
if(i<4) GlobalHaloReport.push_back(0);
if( i < 2 )
{
GlobalHaloReport.push_back(0);
HcalHaloReport.push_back(0);
EcalHaloReport.push_back(0);
}
Expand Down
24 changes: 24 additions & 0 deletions DataFormats/METReco/src/HaloClusterCandidateECAL.cc
@@ -0,0 +1,24 @@
#include "DataFormats/METReco/interface/HaloClusterCandidateECAL.h"

using namespace reco;
HaloClusterCandidateECAL::HaloClusterCandidateECAL() :
et(0),
seed_et(0),
seed_eta(0),
seed_phi(0),
seed_Z(0),
seed_R(0),
seed_time(0),
timediscriminator(0),
ishalofrompattern(false),
ishalofrompattern_hlt(false),
hovere(0),
numberofcrystalsineta(0),
etstrip_iphiseedplus1(0),
etstrip_iphiseedminus1(0),
h2overe(0),
nbearlycrystals(0),
nblatecrystals(0),
clustersize(0)
{
}
24 changes: 24 additions & 0 deletions DataFormats/METReco/src/HaloClusterCandidateHCAL.cc
@@ -0,0 +1,24 @@
#include "DataFormats/METReco/interface/HaloClusterCandidateHCAL.h"

using namespace reco;
HaloClusterCandidateHCAL::HaloClusterCandidateHCAL() :
et(0),
seed_et(0),
seed_eta(0),
seed_phi(0),
seed_Z(0),
seed_R(0),
seed_time(0),
ishalofrompattern(false),
ishalofrompattern_hlt(false),
eoverh(0),
etstrip_phiseedplus1(0),
etstrip_phiseedminus1(0),
nbtowersineta(0),
timediscriminatoritbh(0),
timediscriminatorotbh(0),
h1overh123(0),
clustersize(0),
timediscriminator(0)
{
}