82 |
|
|
83 |
|
cout<<f->GetName()<<endl; |
84 |
|
TH1I *hlt_stats = (TH1I*)f->Get("analyze/HLTTriggerStats"); |
85 |
– |
cout<<"here 3"<<endl; |
85 |
|
|
86 |
|
// clear the map |
87 |
|
if(!HLTmap.empty()) { |
94 |
|
} |
95 |
|
} |
96 |
|
|
97 |
+ |
void baseClass::GetHLTNames(Int_t& run){ |
98 |
+ |
|
99 |
+ |
TFile *f = tree_->GetCurrentFile(); |
100 |
+ |
TTree* runTree = (TTree*)f->Get("analyze/RunInfo"); |
101 |
+ |
cout<<"here"<<endl; |
102 |
+ |
std::vector<std::string>* HLTNames; |
103 |
+ |
if ( !runTree ) { |
104 |
+ |
std::cerr << "!!! UserAnalysisBase::GetHLTNames " |
105 |
+ |
<< "Couldn't get analyze/RunInfo tree" << std::endl; |
106 |
+ |
return; |
107 |
+ |
} |
108 |
+ |
//TH1I *hlt_stats = (TH1I*)f->Get("analyze/HLTTriggerStats"); |
109 |
+ |
|
110 |
+ |
/*if ( fVerbose>0 ) */std::cout << "Retrieving HLTNames for run " << run << std::endl; |
111 |
+ |
runTree->SetBranchAddress("HLTNames",&HLTNames); |
112 |
+ |
runTree->GetEntryWithIndex(run); |
113 |
+ |
|
114 |
+ |
cout<<HLTNames->size()<<endl; |
115 |
+ |
|
116 |
+ |
for( int i=0; i < HLTNames->size(); i++ ) { |
117 |
+ |
HLTmap[(*HLTNames)[i]] = i; |
118 |
+ |
cout<<i<<": "<<(*HLTNames)[i]<<endl; |
119 |
+ |
} |
120 |
+ |
} |
121 |
+ |
|
122 |
+ |
|
123 |
|
int baseClass::getHLTtriggerBit(string triggerName) { |
124 |
|
if(HLTmap.empty()) { |
125 |
< |
cerr<<"HLTtrigger: no HLTmap available!"<<endl; |
125 |
> |
bool verbose = true; |
126 |
> |
if(verbose) cerr<<"HLTtrigger: no HLTmap available!"<<endl; |
127 |
|
return -1; |
128 |
|
} |
129 |
+ |
|
130 |
|
map<string, int>::iterator iter = HLTmap.find(triggerName); |
131 |
|
//cout<<"HLT bit: "<<iter->second<<endl; // iter->second is the HLT trigger bit |
132 |
|
if(iter==HLTmap.end()) { |
133 |
< |
cerr<<"HLTtrigger: trigger name "<<triggerName<< " not found!"<<endl; |
133 |
> |
//cerr<<"HLTtrigger: trigger name "<<triggerName<< " not found!"<<endl; |
134 |
|
return -1; |
135 |
|
} |
136 |
|
else { |
627 |
|
double eta = ElSCEta[i]; |
628 |
|
// double eta = ElEta[i]; |
629 |
|
|
630 |
< |
double dPhiCorr=dphiCorrections(eta, ElPhi[i]); |
631 |
< |
double dEtaCorr=detaCorrections(eta, ElPhi[i]); |
630 |
> |
// double dPhiCorr=dphiCorrections(eta, ElPhi[i]); |
631 |
> |
// double dEtaCorr=detaCorrections(eta, ElPhi[i]); |
632 |
> |
double dPhiCorr=0.;//dphiCorrections(eta, ElPhi[i]); |
633 |
> |
double dEtaCorr=0.;//detaCorrections(eta, ElPhi[i]); |
634 |
|
|
635 |
|
double See = ElSigmaIetaIeta[i]; |
636 |
|
// apply the correction for the endcaps |
643 |
|
double combIso_B = (trkIso + max(0., ecalIso - 1.) + hcalIso) / ElPt[i]; |
644 |
|
double combIso_E = (trkIso + ecalIso + hcalIso) / ElPt[i]; |
645 |
|
bool isConversion; |
646 |
< |
if((fabs(ElConvPartnerTrkDist[i])<dist && fabs(ElConvPartnerTrkDCot[i])<cot) /*|| ElNumberOfMissingInnerHits[i]>hits*/) isConversion=true; |
646 |
> |
if((fabs(ElConvPartnerTrkDist[i])<=dist && fabs(ElConvPartnerTrkDCot[i])<=cot) || ElNumberOfMissingInnerHits[i]>hits) isConversion=true; |
647 |
|
else isConversion=false; |
648 |
|
|
649 |
|
if(c==see) cutOn_See = false; |
654 |
|
if(c==conversion) cutOn_conversion = false; |
655 |
|
|
656 |
|
if(fabs(eta)<=etaMax_B) { |
657 |
< |
if(cutOn_See) if(See > SeeMax_B) return 1; |
658 |
< |
if(cutOn_dPhi) if(dPhi > dPhiMax_B) return 2; |
659 |
< |
if(cutOn_dEta) if(dEta > dEtaMax_B) return 3; |
660 |
< |
if(cutOn_HoE) if(HoE > HoEMax_B) return 4; |
657 |
> |
if(ElIDsimpleWP80relIso[i] < 5 || ElIDsimpleWP80relIso[i] == 6) return 1; |
658 |
> |
// if(cutOn_See) if(See > SeeMax_B) return 1; |
659 |
> |
// if(cutOn_dPhi) if(dPhi > dPhiMax_B) return 2; |
660 |
> |
// if(cutOn_dEta) if(dEta > dEtaMax_B) return 3; |
661 |
> |
// if(cutOn_HoE) if(HoE > HoEMax_B) return 4; |
662 |
|
if(cutOn_combIso) if(combIso_B > combIsoMax_B) return 5; |
663 |
< |
if(cutOn_conversion) if(isConversion==true) return 6; |
663 |
> |
// if(cutOn_combIso) if(trkIso / ElPt[i] < 0.09 && ecalIso / ElPt[i] < 0.07 && hcalIso / ElPt[i] < 0.1) return 5; |
664 |
> |
// if(cutOn_conversion) if(isConversion==true) return 6; |
665 |
|
return 0; |
666 |
|
} |
667 |
|
if(fabs(eta)>etaMin_E && fabs(eta)<etaMax_E) { |
668 |
< |
if(cutOn_See) if(See > SeeMax_E) return 1; |
669 |
< |
if(cutOn_dPhi) if(dPhi > dPhiMax_E) return 2; |
670 |
< |
if(cutOn_dEta) if(dEta > dEtaMax_E) return 3; |
671 |
< |
if(cutOn_HoE) if(HoE > HoEMax_E) return 4; |
668 |
> |
if(ElIDsimpleWP80relIso[i] < 5 || ElIDsimpleWP80relIso[i] == 6) return 1; |
669 |
> |
// if(cutOn_See) if(See > SeeMax_E) return 1; |
670 |
> |
// if(cutOn_dPhi) if(dPhi > dPhiMax_E) return 2; |
671 |
> |
// if(cutOn_dEta) if(dEta > dEtaMax_E) return 3; |
672 |
> |
// if(cutOn_HoE) if(HoE > HoEMax_E) return 4; |
673 |
|
if(cutOn_combIso) if(combIso_E > combIsoMax_E) return 5; |
674 |
< |
if(cutOn_conversion) if(isConversion==true) return 6; |
674 |
> |
// if(cutOn_combIso) if(trkIso / ElPt[i] < 0.04 && ecalIso / ElPt[i] < 0.05 && hcalIso / ElPt[i] < 0.025) return 5; |
675 |
> |
// if(cutOn_conversion) if(isConversion==true) return 6; |
676 |
|
return 0; |
677 |
|
} |
678 |
|
else { |