46 for ( std::vector<std::string>::iterator iParam = parameterNames.begin();
47 iParam != parameterNames.end(); iParam++ ){
93 std::map<double, reco::Muon> muonMap;
94 std::map<double,reco::GsfElectron> electronMap;
97 for (
size_t i = 0;
i < muonHandle.size(); ++
i) {
98 if ( (muonHandle)[
i].isGlobalMuon() && (muonHandle)[
i].pt()>10 &&
99 fabs((muonHandle)[
i].
eta())<2.4 ){
101 muonMap[(muonHandle)[
i].pt()]= (muonHandle)[
i];
106 for (
size_t ii = 0; ii < electronHandle.size(); ++ ii) {
107 if ( (electronHandle)[ii].pt()>10 && fabs((electronHandle)[ii].
eta())<2.4 &&
108 (electronHandle)[ii].hadronicOverEm()<0.05 &&
109 (electronHandle)[ii].eSuperClusterOverP()>0.6 && (electronHandle)[ii].eSuperClusterOverP()<2.5 ){
110 electronMap[(electronHandle)[ii].pt()]= (electronHandle)[ii];
116 std::vector<reco::Muon> selected_muons;
117 for( std::map<double,reco::Muon>::reverse_iterator rit=muonMap.rbegin(); rit!=muonMap.rend(); ++rit){
118 selected_muons.push_back( (*rit).second );
122 std::vector<reco::GsfElectron> selected_electrons;
123 for( std::map<double,reco::GsfElectron>::reverse_iterator rit=electronMap.rbegin(); rit!=electronMap.rend(); ++rit){
124 selected_electrons.push_back( (*rit).second );
134 if (selected_electrons.size() ==1 ) electron1 = selected_electrons[0];
135 if (selected_electrons.size() > 1){
136 electron1 = selected_electrons[0];
137 electron2 = selected_electrons[1];
140 if (selected_muons.size() ==1 ) muon1 = selected_muons[0];
141 if (selected_muons.size() > 1){
142 muon1 = selected_muons[0];
143 muon2 = selected_muons[1];
157 if (selected_electrons.size()==0) { ptel1 = 0; ptel2 = 0; }
158 if (selected_electrons.size()==1) { ptel1 = electron1.
pt(); ptel2 = 0; }
159 if (selected_electrons.size()>1) { ptel1 = electron1.
pt() ; ptel2 = electron2.
pt();}
161 if (selected_muons.size()==0) { ptmu1 = 0; ptmu2 = 0; }
162 if (selected_muons.size()==1) { ptmu1 = muon1.
pt(); ptmu2 = 0; }
163 if (selected_muons.size()>1) { ptmu1 = muon1.
pt(); ptmu2 =muon2.
pt();}
167 if (selected_muons.size() + selected_electrons.size() > 1){
170 if (electron1.
charge()*electron2.
charge()<0 && electron1.
pt()>20 ) {
183 else if (ptmu2 > ptel1){
191 Muon1 = selected_muons[0];
192 Muon2 = selected_muons[1];
202 if (muon1.
charge()*electron1.
charge()<0 && (muon1.
pt()>20 || electron1.
pt()>20)
210 Muon1 = selected_muons[0];
248 std::map<double,reco::Muon> muonMap;
251 for (
size_t i = 0;
i < muonHandle.size(); ++
i) {
252 if ( (muonHandle)[
i].isGlobalMuon() && (muonHandle)[
i].pt()>10 &&
253 fabs((muonHandle)[
i].
eta())<2.4 ){
254 muonMap[(muonHandle)[
i].pt()]= (muonHandle)[
i];
258 std::map<double,reco::GsfElectron> electronMap;
259 for (
size_t ii = 0; ii < electronHandle.size(); ++ ii) {
260 if ( (electronHandle)[ii].pt()>10 && fabs((electronHandle)[ii].
eta())<2.4 &&
261 (electronHandle)[ii].hadronicOverEm()<0.05 &&
262 (electronHandle)[ii].eSuperClusterOverP()>0.6 && (electronHandle)[ii].eSuperClusterOverP()<2.5){
263 electronMap[(electronHandle)[ii].pt()]= (electronHandle)[ii];
269 std::vector<reco::Muon> selected_muons;
271 for( std::map<double,reco::Muon>::reverse_iterator rit=muonMap.rbegin(); rit!=muonMap.rend(); ++rit){
272 selected_muons.push_back( (*rit).second );
276 std::vector<reco::GsfElectron> selected_electrons;
278 for( std::map<double,reco::GsfElectron>::reverse_iterator rit=electronMap.rbegin(); rit!=electronMap.rend(); ++rit){
279 selected_electrons.push_back( (*rit).second );
291 for (
size_t k=0;
k<selected_muons.size();
k++){
292 if (selected_muons[
k].
charge()>0) posMu++;
293 else if (selected_muons[
k].
charge()<0) negMu++;
296 for (
size_t k=0;
k<selected_electrons.size();
k++){
297 if (selected_electrons[
k].
charge()>0) posEle++;
298 else if (selected_electrons[
k].
charge()<0) negEle++;
307 bool hzz2e2mu_decay =
false;
308 bool hzz4e_decay =
false;
309 bool hzz4mu_decay=
false;
312 if (selected_muons.size()>=4) hzz4mu_decay=
true;
313 else if (selected_electrons.size()>=4) hzz4e_decay=
true;
314 else if (selected_muons.size()>=2 && selected_electrons.size()>=2) hzz2e2mu_decay=
true;
317 if (hzz2e2mu_decay) {
318 if ( posEle>=1 && negEle>=1 ) {
319 nElectron=posEle+negEle;
321 if ( posMu>=1 && negMu>=1 ) {
325 else if (hzz4e_decay) {
326 if ( posEle>=2 && negEle>=2 ) {
327 nElectron=posEle+negEle;
330 else if (hzz4mu_decay) {
331 if ( posMu>=2 && negMu>=2 ) {
338 if (hzz2e2mu_decay && nElectron>=2 && nMuon>=2 ){
341 Muon1 = selected_muons[0];
345 else if (hzz4e_decay && nElectron>=4){
351 else if (hzz4mu_decay && nMuon>=4){
353 Muon1 = selected_muons[0];
354 Muon2 = selected_muons[1];
375 std::map<double,reco::Photon> photonMap;
382 for (
size_t i = 0;
i < photonHandle.size(); ++
i) {
383 if ( (photonHandle)[
i].pt()>20 && fabs((photonHandle)[
i].
eta())<2.4 ){
384 photonMap[(photonHandle)[
i].pt()]= (photonHandle)[
i];
389 std::vector<reco::Photon> selected_photons;
391 for( std::map<double,reco::Photon>::reverse_iterator rit=photonMap.rbegin(); rit!=photonMap.rend(); ++rit){
392 selected_photons.push_back( (*rit).second );
399 if (selected_photons.size()>1){
422 for (
size_t i = 0;
i < mctruth.
size(); ++
i) {
429 bool aboveptcut = (p.
pt() > 3.0);
430 if (inacceptance && aboveptcut && ismuon) {
433 }
else if (pid<0 && nmuons==1) {
435 }
else if (pid>0 && nmuons==-1) {
444 else {
std::cout <<
"%HLTHiggsTruth -- No MC truth information" << std::endl;}
460 std::vector<double> ptMuFromTau_,ptElFromTau_;
461 std::vector<double> etaMuFromTau_,etaElFromTau_;
467 for (
size_t i = 0;
i < mctruth.
size(); ++
i) {
474 if (status==3 && fabs(pid)==15) {
476 bool elecdec =
false, muondec =
false;
522 int iTauQ = ngentau - itauel - itaumu;
523 if (ngentau==2 && itaumu==1 && iTauQ==1 && itaumuaccept==1){
534 if (ngentau==2 && itauel==1 && iTauQ==1 && itauelaccept==1){
545 else {
std::cout <<
"%HLTHiggsTruth -- No MC truth information" << std::endl;}
555 std::map<double,reco::Particle> tauMap;
557 for (
size_t i = 0;
i < mctruth.
size(); ++
i) {
564 if (status==1 || status==2) {
567 bool inacceptance = (fabs(p.
eta()) < 2.4);
568 bool aboveptcut = (p.
pt() > 100);
569 if (inacceptance && aboveptcut && istau) {
585 else {
std::cout <<
"%HLTHiggsTruth -- No MC truth information" << std::endl;}
595 std::cout <<
"%HLTHiggsTruth -- No MC truth information" << std::endl;
613 elecdec |=
std::abs(daughter->pdgId())==11;
614 muondec |=
std::abs(daughter->pdgId())==13;
616 if (
std::abs(daughter->pdgId())==11) {
621 if (
std::abs(daughter->pdgId())==13){
T getParameter(std::string const &) const
void analyzeHWW2l(const reco::CandidateView &mctruth, const reco::CaloMETCollection &caloMet, const reco::TrackCollection &Tracks, const reco::MuonCollection &muonHandle, const reco::GsfElectronCollection &electronHandle, TTree *tree)
void analyzeHtaunu(const reco::CandidateView &mctruth, TTree *tree)
virtual double pt() const =0
transverse momentum
virtual int status() const =0
status word
void LeptonicTauDecay(const reco::Candidate &tau, bool &elecdec, bool &muondec)
std::vector< Track > TrackCollection
collection of Tracks
reco::GsfElectron Electron1
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Muon > MuonCollection
collection of Muon objects
bool isPhotonDecay_recoacc
virtual const_iterator end() const =0
last daughter const_iterator
virtual int charge() const
electric charge
std::vector< std::string > getParameterNames() const
virtual int pdgId() const =0
PDG identifier.
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
void analyzeHinv(const reco::CandidateView &mctruth, TTree *tree)
virtual double pt() const
transverse momentum
reco::GsfElectron Electron2
std::vector< Photon > PhotonCollection
collectin of Photon objects
void setup(const edm::ParameterSet &pSet, TTree *tree)
void analyzeHgg(const reco::CandidateView &mctruth, const reco::PhotonCollection &photonHandle, TTree *tree)
virtual const_iterator begin() const =0
first daughter const_iterator
void analyzeA2mu(const reco::CandidateView &mctruth, TTree *tree)
void analyzeHZZ4l(const reco::CandidateView &mctruth, const reco::MuonCollection &muonHandle, const reco::GsfElectronCollection &electronHandle, TTree *tree)
void analyzeH2tau(const reco::CandidateView &mctruth, TTree *tree)
virtual double eta() const =0
momentum pseudorapidity