1 |
+ |
|
2 |
|
//*************************************************************************************************** |
3 |
|
// |
4 |
|
// selection sync'ed with https://twiki.cern.ch/twiki/bin/viewauth/CMS/HiggsZZ4l2012SummerSync |
38 |
|
extern vector<vector<unsigned> > zzcutvec; |
39 |
|
extern map<unsigned,float> evtrhoMap; |
40 |
|
extern bool passes_HLT_MC; |
41 |
+ |
extern map<TString, map<TString,int>* > counts; |
42 |
|
|
43 |
|
// |
44 |
|
// prototypes |
51 |
|
vector< const mithep::Electron*> & electronsToVeto, |
52 |
|
const mithep::Vertex * vtx ) ; |
53 |
|
//-------------------------------------------------------------------------------------------------- |
54 |
+ |
void increment(TString cutName, int z1type=0, int z2type=0) |
55 |
+ |
{ |
56 |
+ |
assert(counts.find(cutName) != counts.end()); |
57 |
+ |
(*(counts[cutName]))["all"] ++; |
58 |
+ |
if(z1type!=0 && z2type!=0) { |
59 |
+ |
assert(counts.find(cutName) != counts.end()); |
60 |
+ |
(*(counts[cutName]))[getChannel(z1type,z2type)] ++; |
61 |
+ |
} |
62 |
+ |
} |
63 |
|
|
64 |
|
//-------------------------------------------------------------------------------------------------- |
65 |
|
EventData apply_HZZ4L_reference_selection(ControlFlags &ctrl, // input control |
227 |
|
if( passes_HLT_MC ) { |
228 |
|
ret.status.selectionBits.flip(PASS_TRIGGER); |
229 |
|
cutvec[PASS_TRIGGER] +=1; |
230 |
+ |
increment("trigger"); |
231 |
|
} else { |
232 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
233 |
|
return ret; |
775 |
|
ret.Z2leptons.push_back(ZCandidatesLeptons[best_Z2_index].first); |
776 |
|
ret.Z2leptons.push_back(ZCandidatesLeptons[best_Z2_index].second); |
777 |
|
|
778 |
+ |
int theZ1type = abs(ZCandidatesLeptons[best_Z1_index].first.type); |
779 |
+ |
int theZ2type = abs(ZCandidatesLeptons[best_Z2_index].first.type); |
780 |
|
|
781 |
|
cout << "best mZ2: " << (ret.Z2leptons[0].vec+ret.Z2leptons[1].vec).M() << endl; |
782 |
|
int ZZtype; |
784 |
|
else if ( Z1type == 1 && abs(ret.Z2leptons[0].type) == 13 ) ZZtype=1; |
785 |
|
else ZZtype=2; |
786 |
|
zzcutvec[ZZtype][PASS_ZZCANDIDATE] += 1; |
787 |
+ |
increment("sfOsHiPt",theZ1type,theZ2type); |
788 |
|
|
789 |
|
if(ctrl.debug)cout << "ZZ :: evt: " << info->EvtNum() |
790 |
|
<< "\tmZ1: " << (ret.Z1leptons[0].vec+ret.Z1leptons[1].vec).M() |
803 |
|
ret.status.selectionBits.flip(PASS_GOODZ2); |
804 |
|
cutvec[PASS_GOODZ2] +=1; |
805 |
|
zzcutvec[ZZtype][PASS_GOODZ2] += 1; |
806 |
+ |
increment("4<mZ2<120",theZ1type,theZ2type); |
807 |
|
} else { |
808 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
809 |
|
return ret; |
826 |
|
if( nlep_above_10 > 1 && nlep_above_20 > 0 ) { |
827 |
|
ret.status.selectionBits.flip(PASS_ZZ_20_10); |
828 |
|
cutvec[PASS_ZZ_20_10] +=1; |
829 |
< |
zzcutvec[ZZtype][PASS_ZZ_20_10] += 1; |
829 |
> |
zzcutvec[ZZtype][PASS_ZZ_20_10] += 1; |
830 |
> |
increment("pt>20,10",theZ1type,theZ2type); |
831 |
|
if( ctrl.debug ) cout << "passess 20/10 ..." << endl; |
832 |
|
} else { |
833 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
853 |
|
if( !resonance ) { |
854 |
|
ret.status.selectionBits.flip(PASS_RESONANCE); |
855 |
|
cutvec[PASS_RESONANCE] +=1; |
856 |
< |
zzcutvec[ZZtype][PASS_RESONANCE] += 1; |
856 |
> |
zzcutvec[ZZtype][PASS_RESONANCE] += 1; |
857 |
> |
increment("mll>4",theZ1type,theZ2type); |
858 |
|
if( ctrl.debug ) cout << "\tpasses resonance killing ... " << endl; |
859 |
|
} else { |
860 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
876 |
|
ret.status.selectionBits.flip(PASS_m4l_GT_70); |
877 |
|
cutvec[PASS_m4l_GT_70] +=1; |
878 |
|
zzcutvec[ZZtype][PASS_m4l_GT_70] += 1; |
879 |
+ |
increment("m4l>70",theZ1type,theZ2type); |
880 |
|
} else { |
881 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
882 |
|
return ret; |
887 |
|
ret.status.selectionBits.flip(PASS_m4l_GT_100); |
888 |
|
cutvec[PASS_m4l_GT_100] +=1; |
889 |
|
zzcutvec[ZZtype][PASS_m4l_GT_100] += 1; |
890 |
+ |
increment("m4l>100,mZ2>12",theZ1type,theZ2type); |
891 |
|
} else { |
892 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
893 |
|
return ret; |
902 |
|
TLorentzVector theZ2 = (ZCandidatesLeptons[best_Z2_index].first.vec) + |
903 |
|
(ZCandidatesLeptons[best_Z2_index].second.vec); |
904 |
|
TLorentzVector theZZ = theZ1 + theZ2; |
885 |
– |
int theZ1type = ZCandidatesLeptons[best_Z1_index].first.type; |
886 |
– |
int theZ2type = ZCandidatesLeptons[best_Z2_index].first.type; |
905 |
|
|
906 |
|
if( ctrl.debug ) cout << "run: " << info->RunNum() |
907 |
|
<< "\tevt: " << info->EvtNum() |