25 using namespace isodeposit;
36 double ptThreshold_, etEcalThreshold_, etHcalThreshold_ ,dRVetoTrk_, dRTrk_, dREcal_ , dRHcal_;
39 vector<double>
isolation(
const T &
t,
double ptThreshold,
double etEcalThreshold,
double etHcalThreshold ,
double dRVetoTrk,
double dRTrk,
double dREcal ,
double dRHcal,
double alpha,
double beta);
43 vector<double>
ZMuMuMuonUserData::isolation(
const T &
t,
double ptThreshold,
double etEcalThreshold,
double etHcalThreshold ,
double dRVetoTrk,
double dRTrk,
double dREcal ,
double dRHcal,
double alpha,
double beta) {
53 vetosTrk.push_back(
new ConeVeto( dir, dRVetoTrk ));
57 vetosEcal.push_back(
new ConeVeto( dir, 0.));
61 vetosHcal.push_back(
new ConeVeto( dir, 0. ));
64 double isovalueTrk = (trkIso->
sumWithin(dRTrk,vetosTrk));
65 double isovalueEcal = (ecalIso->
sumWithin(dREcal,vetosEcal));
66 double isovalueHcal = (hcalIso->
sumWithin(dRHcal,vetosHcal));
68 iso.push_back(isovalueTrk);
70 iso.push_back(isovalueEcal);
72 iso.push_back(isovalueHcal);
79 double combIso = alpha*( ((1+
beta)/2*isovalueEcal) + ((1-
beta)/2*isovalueHcal) ) + ((1-alpha)*isovalueTrk);
80 iso.push_back(combIso);
83 double relIso = combIso /= t.pt();
84 iso.push_back(relIso);
90 src_( cfg.getParameter<
InputTag>(
"src" ) ),
91 beamSpot_(cfg.getParameter<
InputTag>(
"beamSpot" ) ),
92 primaryVertices_(cfg.getParameter<
InputTag>(
"primaryVertices" ) ),
93 alpha_(cfg.getParameter<double>(
"alpha") ),
94 beta_(cfg.getParameter<double>(
"beta") ),
95 ptThreshold_(cfg.getParameter<double >(
"ptThreshold") ),
96 etEcalThreshold_(cfg.getParameter<double >(
"etEcalThreshold") ),
97 etHcalThreshold_(cfg.getParameter<double >(
"etHcalThreshold") ),
98 dRVetoTrk_(cfg.getParameter<double >(
"dRVetoTrk") ),
99 dRTrk_(cfg.getParameter<double >(
"dRTrk") ),
100 dREcal_(cfg.getParameter<double >(
"dREcal") ),
101 dRHcal_(cfg.getParameter<double >(
"dRHcal") ),
102 hltPath_(cfg.getParameter<std::string >(
"hltPath") ){
103 produces<std::vector<pat::Muon> >();
116 auto_ptr<vector<pat::Muon> > muonColl(
new vector<pat::Muon> (*muons) );
117 for (
unsigned int i = 0;
i< muonColl->size();++
i){
136 float zDaudxyFromBS = -1;
137 float zDaudzFromBS = -1;
138 float zDaudxyFromPV = -1;
139 float zDaudzFromPV = -1;
144 float zDauTrkChi2 = -1;
145 float zDauSaChi2 = -1;
146 float zDauNofMuonHits = -1;
147 float zDauSaNofMuonHits = -1;
148 float zDauNofStripHits = -1;
149 float zDauTrkNofStripHits = -1;
150 float zDauNofPixelHits = -1;
151 float zDauTrkNofPixelHits = -1;
157 zDaudxyFromBS = muGlbRef->dxy(beamSpotHandle->position());
158 zDaudzFromBS = muGlbRef->dz(beamSpotHandle->position());
159 zDaudxyFromPV = muGlbRef->dxy(primaryVertices->begin()->position() );
160 zDaudzFromPV = muGlbRef->dz(primaryVertices->begin()->position() );
161 zDauChi2 = muGlbRef->normalizedChi2();
162 zDauTrkChi2 = muTrkRef->normalizedChi2();
163 zDauSaChi2 = muSaRef->normalizedChi2();
164 zDauNofMuonHits = muGlbRef->hitPattern().numberOfValidMuonHits();
165 zDauSaNofMuonHits = muSaRef->hitPattern().numberOfValidMuonHits();
166 zDauNofStripHits = muGlbRef->hitPattern().numberOfValidStripHits();
167 zDauTrkNofStripHits = muTrkRef->hitPattern().numberOfValidStripHits();
168 zDauNofPixelHits = muGlbRef->hitPattern().numberOfValidPixelHits();
169 zDauTrkNofPixelHits = muTrkRef->hitPattern().numberOfValidPixelHits();
172 zDaudxyFromBS = muSaRef->dxy(beamSpotHandle->position());
173 zDaudzFromBS = muSaRef->dz(beamSpotHandle->position());
174 zDaudxyFromPV = muSaRef->dxy(primaryVertices->begin()->position() );
175 zDaudzFromPV = muSaRef->dz(primaryVertices->begin()->position() );
176 zDauSaChi2 = muSaRef->normalizedChi2();
177 zDauSaNofMuonHits = muSaRef->hitPattern().numberOfValidMuonHits();
181 zDaudxyFromBS = muTrkRef->dxy(beamSpotHandle->position());
182 zDaudzFromBS = muTrkRef->dz(beamSpotHandle->position());
183 zDaudxyFromPV = muTrkRef->dxy(primaryVertices->begin()->position() );
184 zDaudzFromPV = muTrkRef->dz(primaryVertices->begin()->position() );
185 zDauTrkChi2 = muTrkRef->normalizedChi2();
186 zDauTrkNofStripHits = muTrkRef->hitPattern().numberOfValidStripHits();
187 zDauTrkNofPixelHits = muTrkRef->hitPattern().numberOfValidPixelHits();
193 int dimTrig = muHLTMatches.size();
209 m.
addUserFloat(
"zDau_SaNofMuonHits" , zDauSaNofMuonHits );
210 m.
addUserFloat(
"zDau_NofStripHits" , zDauNofStripHits );
211 m.
addUserFloat(
"zDau_TrkNofStripHits" , zDauTrkNofStripHits );
212 m.
addUserFloat(
"zDau_NofPixelHits" , zDauNofPixelHits );
213 m.
addUserFloat(
"zDau_TrkNofPixelHits" , zDauTrkNofPixelHits );
214 m.
addUserFloat(
"zDau_NofMuChambers" , zDauNofMuChambers );
215 m.
addUserFloat(
"zDau_NofMuMatches" , zDauNofMuMatches );
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
vector< double > isolation(const T &t, double ptThreshold, double etEcalThreshold, double etHcalThreshold, double dRVetoTrk, double dRTrk, double dREcal, double dRHcal, double alpha, double beta)
void setIsolation(IsolationKeys key, float value)
void produce(edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
bool isTrackerMuon() const
bool isGlobalMuon() const
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
bool isStandAloneMuon() const
reco::TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) ...
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
bool isNonnull() const
Checks for non-null.
InputTag primaryVertices_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void addUserFloat(const std::string &label, float data)
Set user-defined float.
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
MuonEnergy calEnergy() const
get energy deposition information
int numberOfChambers() const
ZMuMuMuonUserData(const edm::ParameterSet &)
isodeposit::AbsVetos AbsVetos
Analysis-level muon class.