174 |
|
tempHistogram.variableBinsY = histogramList_.at(currentHistogram).getUntrackedParameter<vector<double> >("variableBinsY", defaultValue); |
175 |
|
tempHistogram.inputVariables = histogramList_.at(currentHistogram).getParameter<vector<string> >("inputVariables"); |
176 |
|
|
177 |
< |
histograms.push_back(tempHistogram); |
177 |
> |
bool histExists = false; |
178 |
> |
for (uint i=0; i<histograms.size(); i++) { |
179 |
> |
if (histograms.at(i).name == tempHistogram.name) { histExists = true; break; } |
180 |
> |
} |
181 |
> |
if (histExists) { |
182 |
> |
clog << "Warning: histogram " << tempHistogram.name << " already exists; will not book an additional instance." << endl; |
183 |
> |
} else { |
184 |
> |
histograms.push_back(tempHistogram); |
185 |
> |
} |
186 |
|
|
187 |
|
} |
188 |
|
} // for(uint currentHistogramSet = 0; currentHistogramSet != histogramSets_.size(); currentHistogramSet++) |
799 |
|
|
800 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "triggers") != objectsToGet.end()) { |
801 |
|
event.getByLabel (triggers_, triggers); |
802 |
< |
if (!triggers.product()) cout << "ERROR: could not get triggers input collection" << endl; |
802 |
> |
if (!triggers.product()) clog << "ERROR: could not get triggers input collection" << endl; |
803 |
|
} |
804 |
|
|
805 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "trigobjs") != objectsToGet.end()) { |
806 |
|
event.getByLabel (trigobjs_, trigobjs); |
807 |
< |
if (!trigobjs.product()) cout << "ERROR: could not get trigobjs input collection" << endl; |
807 |
> |
if (!trigobjs.product()) clog << "ERROR: could not get trigobjs input collection" << endl; |
808 |
|
} |
809 |
|
|
810 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "jets") != objectsToGet.end()) { |
811 |
|
event.getByLabel (jets_, jets); |
812 |
< |
if (!jets.product()) cout << "ERROR: could not get jets input collection" << endl; |
812 |
> |
if (!jets.product()) clog << "ERROR: could not get jets input collection" << endl; |
813 |
|
} |
814 |
|
|
815 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "muons") != objectsToGet.end()) { |
816 |
|
event.getByLabel (muons_, muons); |
817 |
< |
if (!muons.product()) cout << "ERROR: could not get muons input collection" << endl; |
817 |
> |
if (!muons.product()) clog << "ERROR: could not get muons input collection" << endl; |
818 |
|
} |
819 |
|
|
820 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "secondary muons") != objectsToGet.end()) { |
821 |
|
event.getByLabel (secMuons_, secMuons); |
822 |
< |
if (!secMuons.product()) cout << "ERROR: could not get secMuons input collection" << endl; |
822 |
> |
if (!secMuons.product()) clog << "ERROR: could not get secMuons input collection" << endl; |
823 |
|
} |
824 |
|
|
825 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "electrons") != objectsToGet.end()) { |
826 |
|
event.getByLabel (electrons_, electrons); |
827 |
< |
if (!electrons.product()) cout << "ERROR: could not get electrons input collection" << endl; |
827 |
> |
if (!electrons.product()) clog << "ERROR: could not get electrons input collection" << endl; |
828 |
|
} |
829 |
|
|
830 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "events") != objectsToGet.end()) { |
831 |
|
event.getByLabel (events_, events); |
832 |
< |
if (!events.product()) cout << "ERROR: could not get events input collection" << endl; |
832 |
> |
if (!events.product()) clog << "ERROR: could not get events input collection" << endl; |
833 |
|
} |
834 |
|
|
835 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "taus") != objectsToGet.end()) { |
836 |
|
event.getByLabel (taus_, taus); |
837 |
< |
if (!taus.product()) cout << "ERROR: could not get taus input collection" << endl; |
837 |
> |
if (!taus.product()) clog << "ERROR: could not get taus input collection" << endl; |
838 |
|
} |
839 |
|
|
840 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "mets") != objectsToGet.end()) { |
841 |
|
event.getByLabel (mets_, mets); |
842 |
< |
if (!mets.product()) cout << "ERROR: could not get mets input collection" << endl; |
842 |
> |
if (!mets.product()) clog << "ERROR: could not get mets input collection" << endl; |
843 |
|
} |
844 |
|
|
845 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "tracks") != objectsToGet.end()) { |
846 |
|
event.getByLabel (tracks_, tracks); |
847 |
< |
if (!tracks.product()) cout << "ERROR: could not get tracks input collection" << endl; |
847 |
> |
if (!tracks.product()) clog << "ERROR: could not get tracks input collection" << endl; |
848 |
|
} |
849 |
|
|
850 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "genjets") != objectsToGet.end()) { |
851 |
|
event.getByLabel (genjets_, genjets); |
852 |
< |
if (!genjets.product()) cout << "ERROR: could not get genjets input collection" << endl; |
852 |
> |
if (!genjets.product()) clog << "ERROR: could not get genjets input collection" << endl; |
853 |
|
} |
854 |
|
|
855 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "mcparticles") != objectsToGet.end()) { |
856 |
|
event.getByLabel (mcparticles_, mcparticles); |
857 |
< |
if (!mcparticles.product()) cout << "ERROR: could not get mcparticles input collection" << endl; |
857 |
> |
if (!mcparticles.product()) clog << "ERROR: could not get mcparticles input collection" << endl; |
858 |
|
} |
859 |
|
|
860 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "primaryvertexs") != objectsToGet.end()) { |
861 |
|
event.getByLabel (primaryvertexs_, primaryvertexs); |
862 |
< |
if (!primaryvertexs.product()) cout << "ERROR: could not get primaryvertexs input collection" << endl; |
862 |
> |
if (!primaryvertexs.product()) clog << "ERROR: could not get primaryvertexs input collection" << endl; |
863 |
|
} |
864 |
|
|
865 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "bxlumis") != objectsToGet.end()) { |
866 |
|
event.getByLabel (bxlumis_, bxlumis); |
867 |
< |
if (!bxlumis.product()) cout << "ERROR: could not get bxlumis input collection" << endl; |
867 |
> |
if (!bxlumis.product()) clog << "ERROR: could not get bxlumis input collection" << endl; |
868 |
|
} |
869 |
|
|
870 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "photons") != objectsToGet.end()) { |
871 |
|
event.getByLabel (photons_, photons); |
872 |
< |
if (!photons.product()) cout << "ERROR: could not get photons input collection" << endl; |
872 |
> |
if (!photons.product()) clog << "ERROR: could not get photons input collection" << endl; |
873 |
|
} |
874 |
|
|
875 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "superclusters") != objectsToGet.end()) { |
876 |
|
event.getByLabel (superclusters_, superclusters); |
877 |
< |
if (!superclusters.product()) cout << "ERROR: could not get superclusters input collection" << endl; |
877 |
> |
if (!superclusters.product()) clog << "ERROR: could not get superclusters input collection" << endl; |
878 |
|
} |
879 |
|
|
880 |
|
if (datasetType_ == "signalMC"){ |
881 |
|
if (find(objectsToGet.begin(), objectsToGet.end(), "stops") != objectsToGet.end()) { |
882 |
|
event.getByLabel (stops_, stops); |
883 |
< |
if (!stops.product()) cout << "ERROR: could not get stops input collection" << endl; |
883 |
> |
if (!stops.product()) clog << "ERROR: could not get stops input collection" << endl; |
884 |
|
} |
885 |
|
} |
886 |
|
|
890 |
|
// For description of rho values for different jet reconstruction algorithms, see |
891 |
|
// https://twiki.cern.ch/twiki/bin/view/CMS/JetAlgorithms#Algorithms |
892 |
|
event.getByLabel ("kt6CaloJets","rho", rhokt6CaloJetsHandle_); |
893 |
< |
if (!rhokt6CaloJetsHandle_.product()) cout << "ERROR: could not get kt6CaloJets input collection" << endl; |
893 |
> |
if (!rhokt6CaloJetsHandle_.product()) clog << "ERROR: could not get kt6CaloJets input collection" << endl; |
894 |
|
} |
895 |
|
|
896 |
|
double masterScaleFactor = 1.0; |
1698 |
|
} |
1699 |
|
|
1700 |
|
|
1701 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
1701 |
> |
else{clog << "WARNING: invalid jet variable '" << variable << "'\n"; value = -999;} |
1702 |
|
|
1703 |
|
value = applyFunction(function, value); |
1704 |
|
|
1873 |
|
|
1874 |
|
//user-defined variables |
1875 |
|
else if(variable == "looseID") { |
1876 |
< |
value = object->pt > 10 && |
1876 |
> |
value = object->pt > 10 && |
1877 |
|
(object->isGlobalMuon > 0 || |
1878 |
|
object->isTrackerMuon > 0); |
1879 |
|
} |
1880 |
+ |
|
1881 |
|
else if(variable == "looseIDGlobalMuon") { |
1882 |
|
value = object->pt > 10 && |
1883 |
|
object->isGlobalMuon > 0; |
2095 |
|
|
2096 |
|
|
2097 |
|
|
2098 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2098 |
> |
else{clog << "WARNING: invalid muon variable '" << variable << "'\n"; value = -999;} |
2099 |
|
|
2100 |
|
value = applyFunction(function, value); |
2101 |
|
|
2542 |
|
|
2543 |
|
|
2544 |
|
|
2545 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2545 |
> |
else{clog << "WARNING: invalid electron variable '" << variable << "'\n"; value = -999;} |
2546 |
|
|
2547 |
|
value = applyFunction(function, value); |
2548 |
|
|
2660 |
|
pt0 += pt1; |
2661 |
|
value = pt0.Mod (); |
2662 |
|
} |
2663 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2663 |
> |
else{clog << "WARNING: invalid event variable '" << variable << "'\n"; value = -999;} |
2664 |
|
|
2665 |
|
value = applyFunction(function, value); |
2666 |
|
|
2715 |
|
else if(variable == "leadingTrackValid") value = object->leadingTrackValid; |
2716 |
|
|
2717 |
|
else if (variable == "looseHadronicID") { |
2718 |
< |
value = object->pt > 10 |
2719 |
< |
&& object->eta < 2.3 |
2718 |
> |
//criteria taken from http://cms.cern.ch/iCMS/jsp/db_notes/showNoteDetails.jsp?noteID=CMS%20AN-2011/019 |
2719 |
> |
value = object->pt > 30 |
2720 |
> |
&& fabs(object->eta) < 2.3 |
2721 |
|
&& object->HPSbyLooseCombinedIsolationDeltaBetaCorr > 0 |
2722 |
|
&& object->HPSdecayModeFinding > 0 |
2723 |
|
&& object->HPSagainstElectronLoose > 0 |
2769 |
|
} |
2770 |
|
|
2771 |
|
|
2772 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2772 |
> |
else{clog << "WARNING: invalid tau variable '" << variable << "'\n"; value = -999;} |
2773 |
|
|
2774 |
|
value = applyFunction(function, value); |
2775 |
|
|
2843 |
|
else if(variable == "pfT1jet10pt") value = object->pfT1jet10pt; |
2844 |
|
else if(variable == "pfT1jet10phi") value = object->pfT1jet10phi; |
2845 |
|
|
2846 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2846 |
> |
else{clog << "WARNING: invalid met variable '" << variable << "'\n"; value = -999;} |
2847 |
|
|
2848 |
|
value = applyFunction(function, value); |
2849 |
|
|
2980 |
|
else if(variable == "deltaRMinSubLeadJet") { |
2981 |
|
// calculate minimum deltaR between track and any other subleading jet |
2982 |
|
double trkJetDeltaRMin = 99.; |
2983 |
+ |
if (!jets.product()) clog << "ERROR: cannot find deltaRMinSubLeadJet because jets collection is not initialized." << endl; |
2984 |
|
for (uint ijet = 0; ijet<jets->size(); ijet++) { |
2985 |
|
string empty = ""; |
2986 |
|
double isSubLeadingJet = valueLookup(&jets->at(ijet), "disappTrkSubLeadingJetID", "", empty); |
2996 |
|
else if(variable == "deltaRMinElecLooseMvaId") { |
2997 |
|
// calculate minimum deltaR between track and any other electron passing loose mva ID, i.e., mvaNonTrigV0 > 0 |
2998 |
|
double trkElecDeltaRMin = 99.; |
2999 |
+ |
if (!electrons.product()) clog << "ERROR: cannot find deltaRMinElecLooseMvaId because electrons collection is not initialized." << endl; |
3000 |
|
for (uint ielec = 0; ielec<electrons->size(); ielec++) { |
3001 |
|
string empty = ""; |
3002 |
|
double mvaNonTrigV0 = valueLookup(&electrons->at(ielec), "mvaNonTrigV0", "", empty); |
3012 |
|
else if(variable == "deltaRMinMuonLooseId") { |
3013 |
|
// calculate minimum deltaR between track and any other loose-Id muon |
3014 |
|
double trkMuonDeltaRMin = 99.; |
3015 |
< |
// if (!muons) cout << "ERROR: could not find muon collection for calculation of deltaRMinMuonLooseId" << endl; |
3015 |
> |
if (!muons.product()) clog << "ERROR: cannot find deltaRMinMuonLooseId because muons collection is not initialized." << endl; |
3016 |
|
for (uint imuon = 0; imuon<muons->size(); imuon++) { |
3017 |
|
string empty = ""; |
3018 |
|
double isLooseIdMuon = valueLookup(&muons->at(imuon), "looseID", "", empty); |
3024 |
|
} |
3025 |
|
value = trkMuonDeltaRMin; |
3026 |
|
} |
3027 |
+ |
|
3028 |
+ |
else if(variable == "isPassMuonLooseIDVeto") { |
3029 |
+ |
|
3030 |
+ |
// calculate minimum deltaR between track and any other loose-Id |
3031 |
+ |
double trkMuonDeltaRMin = 99.; |
3032 |
+ |
if (!muons.product()) clog << "ERROR: cannot find deltaRMinMuonLooseId because muons collection is not initialized." << endl; |
3033 |
+ |
for (uint imuon = 0; imuon<muons->size(); imuon++) { |
3034 |
+ |
string empty = ""; |
3035 |
+ |
double isLooseIdMuon = valueLookup(&muons->at(imuon), "looseID", "", empty); |
3036 |
+ |
if (!isLooseIdMuon) continue; // only consider muons that pass the looseID |
3037 |
+ |
double muonEta = valueLookup(&muons->at(imuon), "eta", "", empty); |
3038 |
+ |
double muonPhi = valueLookup(&muons->at(imuon), "phi", "", empty); |
3039 |
+ |
double trkMuonDeltaR = deltaR(object->eta, object->phi, muonEta, muonPhi); |
3040 |
+ |
if (trkMuonDeltaR < trkMuonDeltaRMin) trkMuonDeltaRMin = trkMuonDeltaR; |
3041 |
+ |
} |
3042 |
+ |
if (trkMuonDeltaRMin < 0.15) value = 1; |
3043 |
+ |
if (trkMuonDeltaRMin > 0.15) value = 0; |
3044 |
+ |
} |
3045 |
+ |
|
3046 |
+ |
|
3047 |
|
|
3048 |
|
else if(variable == "deltaRMinSecMuonLooseIdGlobal") { |
3049 |
|
// calculate minimum deltaR between track and any other loose-Id muon |
3050 |
|
double trkMuonDeltaRMin = 99.; |
3051 |
< |
// if (!secMuons) cout << "ERROR: could not find secondary muon collection for calculation of deltaRMinSecMuonLooseIdGlobal" << endl; |
3051 |
> |
if (!secMuons.product()) clog << "ERROR: cannot find deltaRMinSecMuonLooseIdGlobal because secMuons collection is not initialized." << endl; |
3052 |
|
for (uint imuon = 0; imuon<secMuons->size(); imuon++) { |
3053 |
|
string empty = ""; |
3054 |
|
double isLooseIdMuon = valueLookup(&secMuons->at(imuon), "looseIDGlobalMuon", "", empty); |
3064 |
|
else if(variable == "deltaRMinTauLooseHadronicId") { |
3065 |
|
// calculate minimum deltaR between track and any other tau passing loose hadronic ID |
3066 |
|
double trkTauDeltaRMin = 99.; |
3067 |
< |
// if (!taus) cout << "ERROR: could not find tau collection for calculation of deltaRMinTauLooseHadronicId" << endl; |
3067 |
> |
if (!taus.product()) clog << "ERROR: cannot find deltaRMinTauLooseHadronicId because taus collection is not initialized." << endl; |
3068 |
|
for (uint itau = 0; itau<taus->size(); itau++) { |
3069 |
|
string empty = ""; |
3070 |
|
double isIdTau = valueLookup(&taus->at(itau), "looseHadronicID", "", empty); |
3124 |
|
|
3125 |
|
|
3126 |
|
|
3127 |
< |
else{clog << "WARNING: invalid variable '" << variable << "' for BNtrack collection.\n"; value = -999;} |
3127 |
> |
else{clog << "WARNING: invalid track variable '" << variable << "'\n"; value = -999;} |
3128 |
|
|
3129 |
|
value = applyFunction(function, value); |
3130 |
|
|
3154 |
|
else if(variable == "charge") value = object->charge; |
3155 |
|
|
3156 |
|
|
3157 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3157 |
> |
else{clog << "WARNING: invalid genjet variable '" << variable << "'\n"; value = -999;} |
3158 |
|
|
3159 |
|
value = applyFunction(function, value); |
3160 |
|
|
3288 |
|
} |
3289 |
|
|
3290 |
|
|
3291 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3291 |
> |
else{clog << "WARNING: invalid mcparticle variable '" << variable << "'\n"; value = -999;} |
3292 |
|
|
3293 |
|
value = applyFunction(function, value); |
3294 |
|
|
3317 |
|
else if(variable == "isGood") value = object->isGood; |
3318 |
|
|
3319 |
|
|
3320 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3320 |
> |
else{clog << "WARNING: invalid primaryvertex variable '" << variable << "'\n"; value = -999;} |
3321 |
|
|
3322 |
|
value = applyFunction(function, value); |
3323 |
|
|
3335 |
|
else if(variable == "bx_LUMI_now") value = object->bx_LUMI_now; |
3336 |
|
|
3337 |
|
|
3338 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3338 |
> |
else{clog << "WARNING: invalid bxlumi variable '" << variable << "'\n"; value = -999;} |
3339 |
|
|
3340 |
|
value = applyFunction(function, value); |
3341 |
|
|
3468 |
|
} |
3469 |
|
|
3470 |
|
|
3471 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3471 |
> |
else{clog << "WARNING: invalid photon variable '" << variable << "'\n"; value = -999;} |
3472 |
|
|
3473 |
|
value = applyFunction(function, value); |
3474 |
|
|
3492 |
|
else if(variable == "theta") value = object->theta; |
3493 |
|
|
3494 |
|
|
3495 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3495 |
> |
else{clog << "WARNING: invalid supercluster variable '" << variable << "'\n"; value = -999;} |
3496 |
|
|
3497 |
|
value = applyFunction(function, value); |
3498 |
|
|
3526 |
|
stringValue = "none"; // stringValue should only be empty if value is filled |
3527 |
|
} |
3528 |
|
|
3529 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3529 |
> |
else{clog << "WARNING: invalid trigobj variable '" << variable << "'\n"; value = -999;} |
3530 |
|
|
3531 |
|
value = applyFunction(function, value); |
3532 |
|
|
3597 |
|
value = object2->correctedD0; |
3598 |
|
} |
3599 |
|
|
3600 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3600 |
> |
else{clog << "WARNING: invalid muon-muon pair variable '" << variable << "'\n"; value = -999;} |
3601 |
|
|
3602 |
|
value = applyFunction(function, value); |
3603 |
|
|
3644 |
|
TVector3 threeVector2(object2->px, object2->py, object2->pz); |
3645 |
|
value = (pi-threeVector1.Angle(threeVector2)); |
3646 |
|
} |
3647 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3647 |
> |
else{clog << "WARNING: invalid muon-photon pair variable '" << variable << "'\n"; value = -999;} |
3648 |
|
|
3649 |
|
value = applyFunction(function, value); |
3650 |
|
|
3651 |
|
return value; |
3652 |
< |
} |
3652 |
> |
} // end muon-photon pair valueLookup |
3653 |
> |
|
3654 |
|
|
3655 |
|
//!electron-photon pair valueLookup |
3656 |
|
double |
3691 |
|
TVector3 threeVector2(object2->px, object2->py, object2->pz); |
3692 |
|
value = (pi-threeVector1.Angle(threeVector2)); |
3693 |
|
} |
3694 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3694 |
> |
else{clog << "WARNING: invalid electron-photon pair variable '" << variable << "'\n"; value = -999;} |
3695 |
|
|
3696 |
|
value = applyFunction(function, value); |
3697 |
|
|
3698 |
|
return value; |
3699 |
< |
} |
3699 |
> |
} // end electron-photon pair valueLookup |
3700 |
> |
|
3701 |
|
|
3702 |
|
//!electron-electron pair valueLookup |
3703 |
|
double |
3748 |
|
value = object2->correctedD0; |
3749 |
|
} |
3750 |
|
|
3751 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3751 |
> |
else{clog << "WARNING: invalid electron-electron pair variable '" << variable << "'\n"; value = -999;} |
3752 |
|
|
3753 |
|
value = applyFunction(function, value); |
3754 |
|
|
3755 |
|
return value; |
3756 |
< |
} |
3756 |
> |
} // end electron-electron pair valueLookup |
3757 |
> |
|
3758 |
|
|
3759 |
|
//!electron-muon pair valueLookup |
3760 |
|
double |
3816 |
|
else if(variable == "muonRelPFdBetaIso"){ |
3817 |
|
value = (object2->pfIsoR04SumChargedHadronPt + max(0.0, object2->pfIsoR04SumNeutralHadronEt + object2->pfIsoR04SumPhotonEt - 0.5*object2->pfIsoR04SumPUPt)) / object2->pt; |
3818 |
|
} |
3819 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3819 |
> |
else{clog << "WARNING: invalid electron-muon pair variable '" << variable << "'\n"; value = -999;} |
3820 |
|
value = applyFunction(function, value); |
3821 |
|
|
3822 |
|
return value; |
3856 |
|
value = object1->charge*object2->charge; |
3857 |
|
} |
3858 |
|
|
3859 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3859 |
> |
else{clog << "WARNING: invalid electron-jet pair variable '" << variable << "'\n"; value = -999;} |
3860 |
|
value = applyFunction(function, value); |
3861 |
|
|
3862 |
|
return value; |
3881 |
|
value = object1->charge*object2->charge; |
3882 |
|
} |
3883 |
|
|
3884 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3884 |
> |
else{clog << "WARNING: invalid electron-mcparticle variable '" << variable << "'\n"; value = -999;} |
3885 |
|
value = applyFunction(function, value); |
3886 |
|
|
3887 |
|
return value; |
3918 |
|
TVector3 threeVector2(object2->px, object2->py, object2->pz); |
3919 |
|
value = (threeVector1.Angle(threeVector2)); |
3920 |
|
} |
3921 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3921 |
> |
else{clog << "WARNING: invalid photon-jet pair variable '" << variable << "'\n"; value = -999;} |
3922 |
|
value = applyFunction(function, value); |
3923 |
|
|
3924 |
|
return value; |
3933 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
3934 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
3935 |
|
|
3936 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3936 |
> |
else{clog << "WARNING: invalid track-jet pair variable '" << variable << "'\n"; value = -999;} |
3937 |
|
value = applyFunction(function, value); |
3938 |
|
|
3939 |
|
return value; |
3950 |
|
|
3951 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
3952 |
|
|
3953 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3953 |
> |
else{clog << "WARNING: invalid met-jet pair variable '" << variable << "'\n"; value = -999;} |
3954 |
|
value = applyFunction(function, value); |
3955 |
|
|
3956 |
|
return value; |
3996 |
|
value = object1->charge*object2->charge; |
3997 |
|
} |
3998 |
|
|
3999 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
3999 |
> |
else{clog << "WARNING: invalid muon-jet pair variable '" << variable << "'\n"; value = -999;} |
4000 |
|
value = applyFunction(function, value); |
4001 |
|
|
4002 |
|
return value; |
4003 |
< |
} |
4003 |
> |
} // end muon-jet pair valueLookup |
4004 |
> |
|
4005 |
|
|
4006 |
|
//!muon-event valueLookup |
4007 |
|
double |
4015 |
|
else if(variable == "Ht") value = getHt(jets.product()); |
4016 |
|
else if(variable == "pthat") value = object2->pthat; |
4017 |
|
else if(variable == "relPFdBetaIso") value = (object1->pfIsoR04SumChargedHadronPt + max(0.0, object1->pfIsoR04SumNeutralHadronEt + object1->pfIsoR04SumPhotonEt - 0.5*object1->pfIsoR04SumPUPt)) / object1->pt; |
4018 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4018 |
> |
else{clog << "WARNING: invalid muon-event pair variable '" << variable << "'\n"; value = -999;} |
4019 |
|
value = applyFunction(function, value); |
4020 |
|
|
4021 |
|
return value; |
4050 |
|
value = object1->charge*object2->charge; |
4051 |
|
} |
4052 |
|
|
4053 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4053 |
> |
else{clog << "WARNING: invalid jet-jet pair variable '" << variable << "'\n"; value = -999;} |
4054 |
|
value = applyFunction(function, value); |
4055 |
|
|
4056 |
|
return value; |
4081 |
|
else if(variable == "chargeProduct"){ |
4082 |
|
value = object1->charge*object2->charge; |
4083 |
|
} |
4084 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4084 |
> |
else{clog << "WARNING: invalid electron-track pair variable '" << variable << "'\n"; value = -999;} |
4085 |
|
value = applyFunction(function, value); |
4086 |
|
return value; |
4087 |
|
|
4091 |
|
//!muon-track pair valueLookup |
4092 |
|
double |
4093 |
|
OSUAnalysis::valueLookup (const BNmuon* object1, const BNtrack* object2, string variable, string function, string &stringValue){ |
4058 |
– |
double pionMass = 0.140; |
4059 |
– |
double muonMass = 0.106; |
4094 |
|
double value = 0.0; |
4061 |
– |
TLorentzVector fourVector1(0, 0, 0, 0); |
4062 |
– |
TLorentzVector fourVector2(0, 0, 0, 0); |
4095 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
4096 |
|
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
4097 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
4108 |
|
else value = 99.; |
4109 |
|
} |
4110 |
|
else if(variable == "invMass"){ |
4111 |
+ |
double pionMass = 0.140; |
4112 |
+ |
double muonMass = 0.106; |
4113 |
+ |
TLorentzVector fourVector1(0, 0, 0, 0); |
4114 |
+ |
TLorentzVector fourVector2(0, 0, 0, 0); |
4115 |
|
fourVector1.SetPtEtaPhiM(object1->pt, object1->eta, object1->phi, muonMass); |
4116 |
|
fourVector2.SetPtEtaPhiM(object2->pt, object2->eta, object2->phi, pionMass ); |
4081 |
– |
|
4117 |
|
value = (fourVector1 + fourVector2).M(); |
4118 |
|
} |
4119 |
|
else if(variable == "chargeProduct"){ |
4120 |
|
value = object1->charge*object2->charge; |
4121 |
|
} |
4122 |
|
|
4123 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4123 |
> |
else{clog << "WARNING: invalid muon-track pair variable '" << variable << "'\n"; value = -999;} |
4124 |
|
value = applyFunction(function, value); |
4125 |
|
return value; |
4126 |
|
} |
4142 |
|
value = object1->charge*object2->charge; |
4143 |
|
} |
4144 |
|
|
4145 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4145 |
> |
else{clog << "WARNING: invalid tau-tau pair variable '" << variable << "'\n"; value = -999;} |
4146 |
|
value = applyFunction(function, value); |
4147 |
|
return value; |
4148 |
|
} |
4164 |
|
value = object1->charge*object2->charge; |
4165 |
|
} |
4166 |
|
|
4167 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4167 |
> |
else{clog << "WARNING: invalid muon-tau pair variable '" << variable << "'\n"; value = -999;} |
4168 |
|
value = applyFunction(function, value); |
4169 |
|
return value; |
4170 |
|
} |
4183 |
|
if (isLooseHadronicID) value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
4184 |
|
else value = 99.; |
4185 |
|
} |
4186 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
4187 |
+ |
else if(variable == "invMass"){ |
4188 |
+ |
double tauMass = 1.777; // PDG 2010 |
4189 |
+ |
double pionMass = 0.140; // PDG 2010 |
4190 |
+ |
TLorentzVector fourVector1(0, 0, 0, 0); |
4191 |
+ |
TLorentzVector fourVector2(0, 0, 0, 0); |
4192 |
+ |
fourVector1.SetPtEtaPhiM(object1->pt, object1->eta, object1->phi, tauMass); |
4193 |
+ |
fourVector2.SetPtEtaPhiM(object2->pt, object2->eta, object2->phi, pionMass ); |
4194 |
+ |
value = (fourVector1 + fourVector2).M(); |
4195 |
+ |
} |
4196 |
|
else if(variable == "chargeProduct"){ |
4197 |
|
value = object1->charge*object2->charge; |
4198 |
|
} |
4199 |
|
|
4200 |
< |
else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
4200 |
> |
else{clog << "WARNING: invalid tau-track pair variable '" << variable << "'\n"; value = -999;} |
4201 |
|
value = applyFunction(function, value); |
4202 |
|
return value; |
4203 |
|
} |
4217 |
|
else if (variable == "caloTotDeltaRp5_RhoCorr") value = getTrkCaloTotRhoCorr(object1); |
4218 |
|
else if (variable == "caloTotDeltaRp5ByP_RhoCorr") value = getTrkCaloTotRhoCorr(object1) / pMag; |
4219 |
|
|
4220 |
< |
else { clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999; } |
4220 |
> |
else { clog << "WARNING: invalid track-event pair variable '" << variable << "'\n"; value = -999; } |
4221 |
|
|
4222 |
|
value = applyFunction(function, value); |
4223 |
|
|
4239 |
|
stringValue = "none"; |
4240 |
|
} |
4241 |
|
|
4242 |
< |
else { clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999; } |
4242 |
> |
else { clog << "WARNING: invalid electron-trigobj variable '" << variable << "'\n"; value = -999; } |
4243 |
|
|
4244 |
|
value = applyFunction(function, value); |
4245 |
|
|
4255 |
|
|
4256 |
|
if (variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
4257 |
|
|
4258 |
< |
else { clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999; } |
4258 |
> |
else { clog << "WARNING: invalid muon-trigobj variable '" << variable << "'\n"; value = -999; } |
4259 |
|
|
4260 |
|
value = applyFunction(function, value); |
4261 |
|
|
4375 |
|
|
4376 |
|
|
4377 |
|
|
4378 |
< |
else { clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999; } |
4378 |
> |
else { clog << "WARNING: invalid stop variable '" << variable << "'\n"; value = -999; } |
4379 |
|
|
4380 |
|
value = applyFunction(function, value); |
4381 |
|
|
4584 |
|
} |
4585 |
|
} |
4586 |
|
|
4587 |
< |
if (!inputCollection) cout << "ERROR: invalid input collection for inputType=" << inputType << endl; |
4587 |
> |
if (!inputCollection) clog << "ERROR: invalid input collection for inputType=" << inputType << endl; |
4588 |
|
|
4589 |
|
if (verbose_>3) clog << " Collection size: " << inputCollection->size() << endl; |
4590 |
|
|