ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/src/ReferenceSelection.cc
(Generate patch)

Comparing UserCode/MitHzz4l/Selection/src/ReferenceSelection.cc (file contents):
Revision 1.17 by anlevin, Fri Oct 12 12:26:12 2012 UTC vs.
Revision 1.18 by anlevin, Sat Oct 13 19:47:56 2012 UTC

# Line 1 | Line 1
1 +
2   //***************************************************************************************************
3   //
4   // selection sync'ed with https://twiki.cern.ch/twiki/bin/viewauth/CMS/HiggsZZ4l2012SummerSync
# Line 37 | Line 38 | extern vector<vector<unsigned> > zcutvec
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
# Line 49 | Line 51 | void fillVetoArrays( ControlFlags & ctrl
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
# Line 216 | Line 227 | EventData apply_HZZ4L_reference_selectio
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;
# Line 763 | Line 775 | EventData apply_HZZ4L_reference_selectio
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;
# Line 770 | Line 784 | EventData apply_HZZ4L_reference_selectio
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()  
# Line 788 | Line 803 | EventData apply_HZZ4L_reference_selectio
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;
# Line 810 | Line 826 | EventData apply_HZZ4L_reference_selectio
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);
# Line 836 | Line 853 | EventData apply_HZZ4L_reference_selectio
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);
# Line 858 | Line 876 | EventData apply_HZZ4L_reference_selectio
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;
# Line 868 | Line 887 | EventData apply_HZZ4L_reference_selectio
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;
# Line 882 | Line 902 | EventData apply_HZZ4L_reference_selectio
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()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines