11 |
|
tracks_ (cfg.getParameter<edm::InputTag> ("tracks")), |
12 |
|
genjets_ (cfg.getParameter<edm::InputTag> ("genjets")), |
13 |
|
mcparticles_ (cfg.getParameter<edm::InputTag> ("mcparticles")), |
14 |
+ |
stops_ (cfg.getParameter<edm::InputTag> ("stops")), |
15 |
|
primaryvertexs_ (cfg.getParameter<edm::InputTag> ("primaryvertexs")), |
16 |
|
bxlumis_ (cfg.getParameter<edm::InputTag> ("bxlumis")), |
17 |
|
photons_ (cfg.getParameter<edm::InputTag> ("photons")), |
30 |
|
plotAllObjectsInPassingEvents_ (cfg.getParameter<bool> ("plotAllObjectsInPassingEvents")), |
31 |
|
doPileupReweighting_ (cfg.getParameter<bool> ("doPileupReweighting")), |
32 |
|
printEventInfo_ (cfg.getParameter<bool> ("printEventInfo")), |
33 |
< |
useTrackCaloRhoCorr_ (cfg.getParameter<bool> ("useTrackCaloRhoCorr")) |
33 |
> |
useTrackCaloRhoCorr_ (cfg.getParameter<bool> ("useTrackCaloRhoCorr")), |
34 |
> |
stopCTau_ (cfg.getParameter<vector<double> > ("stopCTau")) |
35 |
|
|
36 |
|
{ |
37 |
|
|
43 |
|
// muonSFWeight_ = new MuonSFWeight (muonSFFile_, muonSF_); |
44 |
|
// electronSFWeight_ = new ElectronSFWeight ("53X", electronSFID_); |
45 |
|
} |
46 |
+ |
#ifdef DISPLACED_SUSY |
47 |
+ |
if (datasetType_ == "signalMC") |
48 |
+ |
cTauWeight_ = new CTauWeight (stopCTau_.at (0), stopCTau_.at (1), stops_); |
49 |
+ |
#endif |
50 |
|
|
51 |
|
|
52 |
|
// Construct Cutflow Objects. These store the results of cut decisions and |
57 |
|
//always get vertex collection so we can assign the primary vertex in the event |
58 |
|
objectsToGet.push_back("primaryvertexs"); |
59 |
|
|
60 |
< |
//always make the plot of number of primary verticex (to check pile-up reweighting) |
60 |
> |
//always make the plot of number of primary vertices (to check pile-up reweighting) |
61 |
|
objectsToPlot.push_back("primaryvertexs"); |
62 |
|
|
63 |
|
//always get the MC particles to do GEN-matching |
72 |
|
string tempInputCollection = histogramSets_.at(currentHistogramSet).getParameter<string> ("inputCollection"); |
73 |
|
if(tempInputCollection == "muon-electron pairs") tempInputCollection = "electron-muon pairs"; |
74 |
|
if(tempInputCollection == "event-track pairs") tempInputCollection = "track-event pairs"; |
75 |
+ |
if(tempInputCollection == "secondary muon-muon pairs") tempInputCollection = "muon-secondary muon pairs"; |
76 |
|
if(tempInputCollection.find("pairs")==std::string::npos){ //just a single object |
77 |
< |
objectsToGet.push_back(tempInputCollection); |
77 |
> |
if(tempInputCollection.find("secondary")!=std::string::npos){//secondary object |
78 |
> |
int spaceIndex = tempInputCollection.find(" "); |
79 |
> |
int secondWordLength = tempInputCollection.size() - spaceIndex; |
80 |
> |
objectsToGet.push_back(tempInputCollection.substr(spaceIndex+1,secondWordLength)); |
81 |
> |
} |
82 |
> |
else{ |
83 |
> |
objectsToGet.push_back(tempInputCollection); |
84 |
> |
} |
85 |
|
objectsToPlot.push_back(tempInputCollection); |
86 |
|
objectsToCut.push_back(tempInputCollection); |
87 |
|
} |
88 |
< |
else{//pair of objects, need to add them both to the things to objectsToGet |
89 |
< |
int dashIndex = tempInputCollection.find("-"); |
90 |
< |
int spaceIndex = tempInputCollection.find(" "); |
91 |
< |
int secondWordLength = spaceIndex - dashIndex; |
92 |
< |
objectsToGet.push_back(tempInputCollection); |
79 |
< |
objectsToGet.push_back(tempInputCollection.substr(0,dashIndex)+"s"); |
80 |
< |
objectsToGet.push_back(tempInputCollection.substr(dashIndex+1,secondWordLength-1)+"s"); |
81 |
< |
objectsToPlot.push_back(tempInputCollection); |
82 |
< |
objectsToPlot.push_back(tempInputCollection.substr(0,dashIndex)+"s"); |
83 |
< |
objectsToPlot.push_back(tempInputCollection.substr(dashIndex+1,secondWordLength-1)+"s"); |
88 |
> |
else{//pair of objects, need to add the pair and the individual objects to the lists of things to Get/Plot/Cut |
89 |
> |
string obj1; |
90 |
> |
string obj2; |
91 |
> |
getTwoObjs(tempInputCollection, obj1, obj2); |
92 |
> |
string obj2ToGet = getObjToGet(obj2); |
93 |
|
objectsToCut.push_back(tempInputCollection); |
94 |
< |
objectsToCut.push_back(tempInputCollection.substr(0,dashIndex)+"s"); |
95 |
< |
objectsToCut.push_back(tempInputCollection.substr(dashIndex+1,secondWordLength-1)+"s"); |
94 |
> |
objectsToCut.push_back(obj1); |
95 |
> |
objectsToCut.push_back(obj2); |
96 |
> |
objectsToPlot.push_back(tempInputCollection); |
97 |
> |
objectsToPlot.push_back(obj1); |
98 |
> |
objectsToPlot.push_back(obj2); |
99 |
> |
objectsToGet.push_back(tempInputCollection); |
100 |
> |
objectsToGet.push_back(obj1); |
101 |
> |
objectsToGet.push_back(obj2ToGet); |
102 |
|
|
103 |
|
} |
104 |
|
|
127 |
|
for(uint currentObjectIndex = 0; currentObjectIndex != objectsToPlot.size(); currentObjectIndex++){ |
128 |
|
|
129 |
|
string currentObject = objectsToPlot.at(currentObjectIndex); |
130 |
< |
if(currentObject != "muons" && currentObject != "electrons" && currentObject != "taus" && currentObject != "tracks" && currentObject != "photons" && currentObject != "superclusters") continue; |
130 |
> |
if(currentObject != "muons" && currentObject != "secondary muons" && currentObject != "electrons" && currentObject != "taus" && currentObject != "tracks" && currentObject != "photons" && currentObject != "superclusters") continue; |
131 |
|
|
132 |
|
histogram tempIdHisto; |
133 |
|
histogram tempMomIdHisto; |
139 |
|
tempGmaIdHisto.inputCollection = currentObject; |
140 |
|
tempIdVsMomIdHisto.inputCollection = currentObject; |
141 |
|
|
142 |
+ |
if(currentObject == "secondary muons") currentObject = "secondaryMuons"; |
143 |
+ |
|
144 |
|
currentObject = currentObject.substr(0, currentObject.size()-1); |
145 |
|
tempIdHisto.name = currentObject+"GenMatchId"; |
146 |
|
tempMomIdHisto.name = currentObject+"GenMatchMotherId"; |
317 |
|
int maxNum = 10; |
318 |
|
if(currentObject == "mcparticles") maxNum = 50; |
319 |
|
else if(currentObject == "primaryvertexs") maxNum = 50; |
320 |
< |
else if(currentObject == "muon-muon pairs") currentObject = "dimuonPairs"; |
321 |
< |
else if(currentObject == "electron-electron pairs") currentObject = "dielectronPairs"; |
322 |
< |
else if(currentObject == "electron-muon pairs") currentObject = "electronMuonPairs"; |
323 |
< |
else if(currentObject == "track-event pairs") currentObject = "trackEventPairs"; |
324 |
< |
else if(currentObject == "electron-track pairs") currentObject = "electronTrackPairs"; |
325 |
< |
else if(currentObject == "muon-track pairs") currentObject = "muonTrackPairs"; |
326 |
< |
else if(currentObject == "muon-tau pairs") currentObject = "muonTauPairs"; |
327 |
< |
else if(currentObject == "tau-tau pairs") currentObject = "ditauPairs"; |
320 |
> |
|
321 |
> |
if(currentObject == "muon-muon pairs") currentObject = "dimuonPairs"; |
322 |
> |
else if(currentObject == "electron-electron pairs") currentObject = "dielectronPairs"; |
323 |
> |
else if(currentObject == "electron-muon pairs") currentObject = "electronMuonPairs"; |
324 |
> |
else if(currentObject == "track-event pairs") currentObject = "trackEventPairs"; |
325 |
> |
else if(currentObject == "electron-track pairs") currentObject = "electronTrackPairs"; |
326 |
> |
else if(currentObject == "muon-track pairs") currentObject = "muonTrackPairs"; |
327 |
> |
else if(currentObject == "muon-tau pairs") currentObject = "muonTauPairs"; |
328 |
> |
else if(currentObject == "tau-tau pairs") currentObject = "ditauPairs"; |
329 |
> |
else if(currentObject == "tau-track pairs") currentObject = "tauTrackPairs"; |
330 |
> |
else if(currentObject == "muon-secondary muon pairs") currentObject = "muonSecondaryMuonPairs"; |
331 |
> |
else if(currentObject == "secondary muons") currentObject = "secondaryMuons"; |
332 |
> |
|
333 |
|
currentObject.at(0) = toupper(currentObject.at(0)); |
334 |
|
string histoName = "num" + currentObject; |
335 |
|
|
354 |
|
cut tempCut; |
355 |
|
//store input collection for cut |
356 |
|
string tempInputCollection = cuts_.at(currentCut).getParameter<string> ("inputCollection"); |
357 |
+ |
if(tempInputCollection == "muon-electron pairs") tempInputCollection = "electron-muon pairs"; |
358 |
+ |
if(tempInputCollection == "event-track pairs") tempInputCollection = "track-event pairs"; |
359 |
+ |
if(tempInputCollection == "secondary muon-muon pairs") tempInputCollection = "muon-secondary muon pairs"; |
360 |
|
tempCut.inputCollection = tempInputCollection; |
361 |
|
if(tempInputCollection.find("pairs")==std::string::npos){ //just a single object |
362 |
< |
objectsToGet.push_back(tempInputCollection); |
363 |
< |
objectsToCut.push_back(tempInputCollection); |
362 |
> |
if(tempInputCollection.find("secondary")!=std::string::npos){//secondary object |
363 |
> |
int spaceIndex = tempInputCollection.find(" "); |
364 |
> |
int secondWordLength = tempInputCollection.size() - spaceIndex; |
365 |
> |
objectsToGet.push_back(tempInputCollection.substr(spaceIndex+1,secondWordLength)); |
366 |
> |
} |
367 |
> |
else{ |
368 |
> |
objectsToGet.push_back(tempInputCollection); |
369 |
> |
} |
370 |
> |
objectsToCut.push_back(tempInputCollection); |
371 |
|
} |
372 |
< |
else{//pair of objects, need to add them both to the things to objectsToGet |
373 |
< |
int dashIndex = tempInputCollection.find("-"); |
374 |
< |
int spaceIndex = tempInputCollection.find(" "); |
375 |
< |
int secondWordLength = spaceIndex - dashIndex; |
376 |
< |
objectsToGet.push_back(tempInputCollection); |
345 |
< |
objectsToGet.push_back(tempInputCollection.substr(0,dashIndex)+"s"); |
346 |
< |
objectsToGet.push_back(tempInputCollection.substr(dashIndex+1,secondWordLength-1)+"s"); |
372 |
> |
else{//pair of objects, need to add them both to objectsToGet |
373 |
> |
string obj1; |
374 |
> |
string obj2; |
375 |
> |
getTwoObjs(tempInputCollection, obj1, obj2); |
376 |
> |
string obj2ToGet = getObjToGet(obj2); |
377 |
|
objectsToCut.push_back(tempInputCollection); |
378 |
< |
objectsToCut.push_back(tempInputCollection.substr(0,dashIndex)+"s"); |
379 |
< |
objectsToCut.push_back(tempInputCollection.substr(dashIndex+1,secondWordLength-1)+"s"); |
378 |
> |
objectsToCut.push_back(obj1); |
379 |
> |
objectsToCut.push_back(obj2); |
380 |
> |
objectsToGet.push_back(tempInputCollection); |
381 |
> |
objectsToGet.push_back(obj1); |
382 |
> |
objectsToGet.push_back(obj2ToGet); |
383 |
|
|
384 |
|
} |
385 |
|
|
436 |
|
} |
437 |
|
tempCut.name = tempCutName; |
438 |
|
|
406 |
– |
|
439 |
|
tempChannel.cuts.push_back(tempCut); |
440 |
|
|
441 |
|
|
410 |
– |
|
442 |
|
}//end loop over cuts |
443 |
|
|
444 |
|
channels.push_back(tempChannel); |
528 |
|
if(doPileupReweighting_ && datasetType_ != "data") |
529 |
|
scaleFactor = puWeight_->at (events->at (0).numTruePV); |
530 |
|
|
531 |
+ |
cTauScaleFactor_ = 1.0; |
532 |
+ |
#ifdef DISPLACED_SUSY |
533 |
+ |
if (datasetType_ == "signalMC") |
534 |
+ |
cTauScaleFactor_ = cTauWeight_->at (event); |
535 |
+ |
#endif |
536 |
+ |
scaleFactor *= cTauScaleFactor_; |
537 |
|
|
538 |
|
//loop over all channels |
539 |
|
|
572 |
|
|
573 |
|
|
574 |
|
if(currentObject == "jets") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,jets.product(),"jets"); |
575 |
+ |
|
576 |
|
else if(currentObject == "muons") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,muons.product(),"muons"); |
577 |
+ |
|
578 |
+ |
else if(currentObject == "secondary muons") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,muons.product(),"secondary muons"); |
579 |
|
else if(currentObject == "electrons") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,electrons.product(),"electrons"); |
580 |
|
else if(currentObject == "events") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,events.product(),"events"); |
581 |
|
else if(currentObject == "taus") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,taus.product(),"taus"); |
593 |
|
cumulativeFlags.at("muons").at(flagsForPairCutsIndex), \ |
594 |
|
cumulativeFlags.at("muons").at(flagsForPairCutsIndex), \ |
595 |
|
"muon-muon pairs"); |
596 |
+ |
|
597 |
+ |
else if(currentObject == "muon-secondary muon pairs") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,muons.product(),muons.product(), \ |
598 |
+ |
cumulativeFlags.at("muons").at(flagsForPairCutsIndex), \ |
599 |
+ |
cumulativeFlags.at("secondary muons").at(flagsForPairCutsIndex), \ |
600 |
+ |
"muon-secondary muon pairs"); |
601 |
+ |
|
602 |
|
else if(currentObject == "electron-electron pairs") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,electrons.product(),electrons.product(), \ |
603 |
|
cumulativeFlags.at("electrons").at(flagsForPairCutsIndex), \ |
604 |
|
cumulativeFlags.at("electrons").at(flagsForPairCutsIndex), \ |
623 |
|
cumulativeFlags.at("muons").at(flagsForPairCutsIndex), |
624 |
|
cumulativeFlags.at("taus").at(flagsForPairCutsIndex), |
625 |
|
"muon-tau pairs"); |
626 |
< |
else if(currentObject == "tau-tau pairs") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,taus .product(),taus.product(), |
626 |
> |
else if(currentObject == "tau-tau pairs") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,taus.product(),taus.product(), |
627 |
|
cumulativeFlags.at("taus").at(flagsForPairCutsIndex), |
628 |
|
cumulativeFlags.at("taus").at(flagsForPairCutsIndex), |
629 |
|
"tau-tau pairs"); |
630 |
+ |
else if(currentObject == "tau-track pairs") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,taus .product(),tracks.product(), |
631 |
+ |
cumulativeFlags.at("taus").at(flagsForPairCutsIndex), |
632 |
+ |
cumulativeFlags.at("tracks").at(flagsForPairCutsIndex), |
633 |
+ |
"tau-track pairs"); |
634 |
|
|
635 |
|
|
636 |
|
} |
648 |
|
eventPassedAllCuts = eventPassedAllCuts && triggerDecision; |
649 |
|
|
650 |
|
|
601 |
– |
|
651 |
|
for(uint currentCutIndex = 0; currentCutIndex != currentChannel.cuts.size(); currentCutIndex++){ |
652 |
|
|
653 |
|
//loop over all objects and count how many passed the cumulative selection up to this point |
657 |
|
for (uint object = 0; object != cumulativeFlags.at(currentCut.inputCollection).at(currentCutIndex).size() ; object++){ |
658 |
|
if(cumulativeFlags.at(currentCut.inputCollection).at(currentCutIndex).at(object)) numberPassing++; |
659 |
|
} |
611 |
– |
|
660 |
|
bool cutDecision = evaluateComparison(numberPassing,currentCut.eventComparativeOperator,currentCut.numberRequired); |
661 |
|
cutFlows_.at(currentChannelIndex)->at (currentCut.name) = cutDecision; |
614 |
– |
|
662 |
|
eventPassedAllCuts = eventPassedAllCuts && cutDecision; |
663 |
|
|
664 |
|
} |
665 |
|
|
666 |
+ |
// if(datasetType_ != "data") { |
667 |
+ |
// scaleFactor *= muonSFWeight_->at (chosenMuon ()->eta); |
668 |
+ |
// scaleFactor *= electronSFWeight_->at (chosenElectron ()->eta, chosenElectron ()->pt); |
669 |
+ |
// } |
670 |
+ |
|
671 |
|
cutFlows_.at(currentChannelIndex)->fillCutFlow(scaleFactor); |
672 |
|
|
673 |
|
|
684 |
|
} |
685 |
|
|
686 |
|
|
635 |
– |
// if(datasetType_ != "data") { |
636 |
– |
// scaleFactor *= muonSFWeight_->at (chosenMuon ()->eta); |
637 |
– |
// scaleFactor *= electronSFWeight_->at (chosenElectron ()->eta, chosenElectron ()->pt); |
638 |
– |
// } |
639 |
– |
|
687 |
|
//filling histograms |
688 |
|
for (uint histogramIndex = 0; histogramIndex != histograms.size(); histogramIndex++){ |
689 |
|
histogram currentHistogram = histograms.at(histogramIndex); |
692 |
|
TH1D* histo; |
693 |
|
histo = oneDHists_.at(currentChannelIndex).at(currentHistogram.name); |
694 |
|
|
648 |
– |
|
649 |
– |
|
695 |
|
if(currentHistogram.inputCollection == "jets") fill1DHistogram(histo,currentHistogram,jets.product(),cumulativeFlags.at("jets").back(),scaleFactor); |
696 |
|
else if(currentHistogram.inputCollection == "muons") fill1DHistogram(histo,currentHistogram,muons.product(),cumulativeFlags.at("muons").back(),scaleFactor); |
697 |
+ |
else if(currentHistogram.inputCollection == "secondary muons") fill1DHistogram(histo,currentHistogram,muons.product(),cumulativeFlags.at("secondary muons").back(),scaleFactor); |
698 |
|
else if(currentHistogram.inputCollection == "muon-muon pairs") fill1DHistogram(histo,currentHistogram,muons.product(),muons.product(), \ |
699 |
|
cumulativeFlags.at("muons").back(),cumulativeFlags.at("muons").back(), \ |
700 |
|
cumulativeFlags.at("muon-muon pairs").back(),scaleFactor); |
701 |
+ |
else if(currentHistogram.inputCollection == "muon-secondary muon pairs") fill1DHistogram(histo,currentHistogram,muons.product(),muons.product(), \ |
702 |
+ |
cumulativeFlags.at("muons").back(),cumulativeFlags.at("secondary muons").back(), \ |
703 |
+ |
cumulativeFlags.at("muon-secondary muon pairs").back(),scaleFactor); |
704 |
|
else if(currentHistogram.inputCollection == "electrons") fill1DHistogram(histo,currentHistogram,electrons.product(),cumulativeFlags.at("electrons").back(),scaleFactor); |
705 |
|
else if(currentHistogram.inputCollection == "electron-electron pairs") fill1DHistogram(histo,currentHistogram,electrons.product(),electrons.product(),\ |
706 |
|
cumulativeFlags.at("electrons").back(),cumulativeFlags.at("electrons").back(),\ |
720 |
|
else if(currentHistogram.inputCollection == "tau-tau pairs") fill1DHistogram(histo,currentHistogram, taus.product(),taus.product(), |
721 |
|
cumulativeFlags.at("taus").back(),cumulativeFlags.at("taus").back(), |
722 |
|
cumulativeFlags.at("tau-tau pairs").back(),scaleFactor); |
723 |
+ |
else if(currentHistogram.inputCollection == "tau-track pairs") fill1DHistogram(histo,currentHistogram, taus.product(),tracks.product(), |
724 |
+ |
cumulativeFlags.at("taus").back(),cumulativeFlags.at("tracks").back(), |
725 |
+ |
cumulativeFlags.at("tau-track pairs").back(),scaleFactor); |
726 |
+ |
|
727 |
|
else if(currentHistogram.inputCollection == "events") fill1DHistogram(histo,currentHistogram,events.product(),cumulativeFlags.at("events").back(),scaleFactor); |
728 |
|
else if(currentHistogram.inputCollection == "taus") fill1DHistogram(histo,currentHistogram,taus.product(),cumulativeFlags.at("taus").back(),scaleFactor); |
729 |
|
else if(currentHistogram.inputCollection == "mets") fill1DHistogram(histo,currentHistogram,mets.product(),cumulativeFlags.at("mets").back(),scaleFactor); |
739 |
|
TH2D* histo; |
740 |
|
histo = twoDHists_.at(currentChannelIndex).at(currentHistogram.name); |
741 |
|
|
689 |
– |
|
690 |
– |
|
742 |
|
if(currentHistogram.inputCollection == "jets") fill2DHistogram(histo,currentHistogram,jets.product(),cumulativeFlags.at("jets").back(),scaleFactor); |
743 |
|
else if(currentHistogram.inputCollection == "muons") fill2DHistogram(histo,currentHistogram,muons.product(),cumulativeFlags.at("muons").back(),scaleFactor); |
744 |
+ |
else if(currentHistogram.inputCollection == "secondary muons") fill2DHistogram(histo,currentHistogram,muons.product(),cumulativeFlags.at("secondary muons").back(),scaleFactor); |
745 |
|
else if(currentHistogram.inputCollection == "muon-muon pairs") fill2DHistogram(histo,currentHistogram,muons.product(),muons.product(), \ |
746 |
|
cumulativeFlags.at("muons").back(),cumulativeFlags.at("muons").back(), \ |
747 |
|
cumulativeFlags.at("muon-muon pairs").back(),scaleFactor); |
748 |
+ |
else if(currentHistogram.inputCollection == "muon-muon pairs") fill2DHistogram(histo,currentHistogram,muons.product(),muons.product(), \ |
749 |
+ |
cumulativeFlags.at("muons").back(),cumulativeFlags.at("secondary muons").back(), \ |
750 |
+ |
cumulativeFlags.at("muon-secondary muon pairs").back(),scaleFactor); |
751 |
|
else if(currentHistogram.inputCollection == "electrons") fill2DHistogram(histo,currentHistogram,electrons.product(),cumulativeFlags.at("electrons").back(),scaleFactor); |
752 |
|
else if(currentHistogram.inputCollection == "electron-electron pairs") fill2DHistogram(histo,currentHistogram,electrons.product(),electrons.product(), \ |
753 |
|
cumulativeFlags.at("electrons").back(),cumulativeFlags.at("electrons").back(), \ |
767 |
|
else if(currentHistogram.inputCollection == "tau-tau pairs") fill2DHistogram(histo,currentHistogram,taus.product(),taus.product(), |
768 |
|
cumulativeFlags.at("taus").back(),cumulativeFlags.at("taus").back(), |
769 |
|
cumulativeFlags.at("tau-tau pairs").back(),scaleFactor); |
770 |
+ |
else if(currentHistogram.inputCollection == "tau-track pairs") fill2DHistogram(histo,currentHistogram,taus.product(),tracks.product(), |
771 |
+ |
cumulativeFlags.at("taus").back(),cumulativeFlags.at("tracks").back(), |
772 |
+ |
cumulativeFlags.at("tau-track pairs").back(),scaleFactor); |
773 |
|
else if(currentHistogram.inputCollection == "events") fill2DHistogram(histo,currentHistogram,events.product(),cumulativeFlags.at("events").back(),scaleFactor); |
774 |
|
else if(currentHistogram.inputCollection == "taus") fill2DHistogram(histo,currentHistogram,taus.product(),cumulativeFlags.at("taus").back(),scaleFactor); |
775 |
|
else if(currentHistogram.inputCollection == "mets") fill2DHistogram(histo,currentHistogram,mets.product(),cumulativeFlags.at("mets").back(),scaleFactor); |
786 |
|
} |
787 |
|
} |
788 |
|
|
789 |
+ |
|
790 |
+ |
|
791 |
|
//fills histograms with the sizes of collections |
792 |
|
for (uint currentObjectIndex = 0; currentObjectIndex != objectsToPlot.size(); currentObjectIndex++){ |
793 |
|
|
803 |
|
else if(currentObject == "muon-track pairs") objectToPlot = "muonTrackPairs"; |
804 |
|
else if(currentObject == "muon-tau pairs") objectToPlot = "muonTauPairs"; |
805 |
|
else if(currentObject == "tau-tau pairs") objectToPlot = "ditauPairs"; |
806 |
+ |
else if(currentObject == "tau-track pairs") objectToPlot = "tauTrackPairs"; |
807 |
|
else if(currentObject == "track-event pairs") objectToPlot = "trackEventPairs"; |
808 |
+ |
else if(currentObject == "muon-secondary muon pairs") objectToPlot = "muonSecondaryMuonPairs"; |
809 |
+ |
else if(currentObject == "secondary muons") objectToPlot = "secondaryMuons"; |
810 |
|
else objectToPlot = currentObject; |
811 |
+ |
|
812 |
|
string tempCurrentObject = objectToPlot; |
813 |
|
tempCurrentObject.at(0) = toupper(tempCurrentObject.at(0)); |
814 |
|
string histoName = "num" + tempCurrentObject; |
815 |
|
|
752 |
– |
|
816 |
|
//set position of primary vertex in event, in order to calculate quantities relative to it |
817 |
|
if(std::find(objectsToCut.begin(), objectsToCut.end(), currentObject) != objectsToCut.end()) { |
818 |
|
vector<bool> lastCutFlags = cumulativeFlags.at(currentObject).back(); |
819 |
< |
int numToPlot = 0; |
819 |
> |
int numToPlot = 0; |
820 |
|
for (uint currentFlag = 0; currentFlag != lastCutFlags.size(); currentFlag++){ |
821 |
|
if(lastCutFlags.at(currentFlag)) numToPlot++; |
822 |
|
} |
830 |
|
} |
831 |
|
else if(objectToPlot == "jets") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(jets->size(),scaleFactor); |
832 |
|
else if(objectToPlot == "muons") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(muons->size(),scaleFactor); |
833 |
+ |
else if(objectToPlot == "secondaryMuons") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(muons->size(),scaleFactor); |
834 |
|
else if(objectToPlot == "dimuonPairs") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(muons->size()*(muons->size()-1)/2,scaleFactor); |
835 |
+ |
else if(objectToPlot == "muonSecondaryMuonPairs") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(muons->size()*(muons->size()-1)/2,scaleFactor); |
836 |
|
else if(objectToPlot == "electrons") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(electrons->size(),scaleFactor); |
837 |
|
else if(objectToPlot == "dielectronPairs") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(electrons->size()*(electrons->size()-1)/2,scaleFactor); |
838 |
|
else if(objectToPlot == "electronMuonPairs") oneDHists_.at(currentChannelIndex).at(histoName)->Fill(electrons->size()*muons->size(),scaleFactor); |
906 |
|
|
907 |
|
} |
908 |
|
|
909 |
+ |
|
910 |
+ |
void OSUAnalysis::getTwoObjs(string tempInputCollection, string& obj1, string& obj2) { |
911 |
+ |
// Set two object strings from the tempInputCollection string, |
912 |
+ |
// For example, if tempInputCollection is "electron-muon pairs", |
913 |
+ |
// then obj1 = "electrons" and obj2 = "muons". |
914 |
+ |
// Note that the objects have an "s" appended. |
915 |
+ |
|
916 |
+ |
int dashIndex = tempInputCollection.find("-"); |
917 |
+ |
int spaceIndex = tempInputCollection.find_last_of(" "); |
918 |
+ |
int secondWordLength = spaceIndex - dashIndex; |
919 |
+ |
obj1 = tempInputCollection.substr(0,dashIndex) + "s"; |
920 |
+ |
obj2 = tempInputCollection.substr(dashIndex+1,secondWordLength-1)+"s"; |
921 |
+ |
|
922 |
+ |
} |
923 |
+ |
|
924 |
+ |
|
925 |
+ |
string OSUAnalysis::getObjToGet(string obj) { |
926 |
+ |
// Return the string corresponding to the object to get for the given obj string. |
927 |
+ |
// Right now this only handles the case in which obj contains "secondary", |
928 |
+ |
// e.g, "secondary muons". |
929 |
+ |
// Note that "s" is NOT appended. |
930 |
+ |
|
931 |
+ |
if (obj.find("secondary")==std::string::npos) return obj; // "secondary" is not found |
932 |
+ |
int firstSpaceIndex = obj.find_first_of(" "); |
933 |
+ |
return obj.substr(firstSpaceIndex+1,obj.length()-1); |
934 |
+ |
|
935 |
+ |
} |
936 |
+ |
|
937 |
+ |
|
938 |
+ |
|
939 |
|
double |
940 |
|
OSUAnalysis::valueLookup (const BNjet* object, string variable, string function){ |
941 |
|
|
1884 |
|
else |
1885 |
|
value = 1.0; |
1886 |
|
} |
1887 |
+ |
else if(variable == "cTauScaleFactor") |
1888 |
+ |
value = cTauScaleFactor_; |
1889 |
|
|
1890 |
|
else{std::cout << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
1891 |
|
|
2099 |
|
else if(variable == "dZwrtBS") value = object->dZ - events->at(0).BSz; |
2100 |
|
else if(variable == "caloTotDeltaRp5") value = (object->caloHadDeltaRp5 + object->caloEMDeltaRp5); |
2101 |
|
else if(variable == "caloTotDeltaRp5ByP") value = ((object->caloHadDeltaRp5 + object->caloEMDeltaRp5)/pMag); |
2102 |
< |
else if(variable == "caloTotDeltaRp5_RhoCorr") value = getTrkCaloTotRhoCorr(object); |
2103 |
< |
else if(variable == "caloTotDeltaRp5ByP_RhoCorr") value = getTrkCaloTotRhoCorr(object) / pMag; |
2102 |
> |
else if(variable == "caloTotDeltaRp5RhoCorr") value = getTrkCaloTotRhoCorr(object); |
2103 |
> |
else if(variable == "caloTotDeltaRp5ByPRhoCorr") value = getTrkCaloTotRhoCorr(object) / pMag; |
2104 |
|
else if(variable == "isIso") value = getTrkIsIso(object, tracks.product()); |
2105 |
|
else if(variable == "isMatchedDeadEcal") value = getTrkIsMatchedDeadEcal(object); |
2106 |
|
else if(variable == "ptErrorByPt") value = (object->ptError/object->pt); |
2524 |
|
double value = 0.0; |
2525 |
|
|
2526 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2527 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2528 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2529 |
|
else if(variable == "invMass"){ |
2530 |
|
TLorentzVector fourVector1(object1->px, object1->py, object1->pz, object1->energy); |
2594 |
|
double value = 0.0; |
2595 |
|
|
2596 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2597 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2598 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2599 |
|
else if(variable == "invMass"){ |
2600 |
|
TLorentzVector fourVector1(object1->px, object1->py, object1->pz, object1->energy); |
2649 |
|
double value = 0.0; |
2650 |
|
|
2651 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2652 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2653 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2654 |
|
else if(variable == "invMass"){ |
2655 |
|
TLorentzVector fourVector1(object1->px, object1->py, object1->pz, object1->energy); |
2696 |
|
else if(variable == "muonDetIso"){ |
2697 |
|
value = (object2->trackIsoDR03) / object2->pt; |
2698 |
|
} |
2699 |
< |
|
2699 |
> |
else if(variable == "electronRelPFrhoIso"){ |
2700 |
> |
value = ( object1->chargedHadronIsoDR03 + max(0.0, object1->neutralHadronIsoDR03 + object1->photonIsoDR03 - object1->AEffDr03*object1->rhoPrime) ) / object1->pt; |
2701 |
> |
} |
2702 |
> |
else if(variable == "muonRelPFdBetaIso"){ |
2703 |
> |
value = (object2->pfIsoR04SumChargedHadronPt + max(0.0, object2->pfIsoR04SumNeutralHadronEt + object2->pfIsoR04SumPhotonEt - 0.5*object2->pfIsoR04SumPUPt)) / object2->pt; |
2704 |
> |
} |
2705 |
|
|
2706 |
|
else{std::cout << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2707 |
|
|
2718 |
|
TLorentzVector fourVector1(0, 0, 0, 0); |
2719 |
|
TLorentzVector fourVector2(0, 0, 0, 0); |
2720 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2721 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2722 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2723 |
|
else if(variable == "invMass"){ |
2724 |
|
fourVector1.SetPtEtaPhiM(object1->pt, object1->eta, object1->phi, electronMass); |
2741 |
|
TLorentzVector fourVector1(0, 0, 0, 0); |
2742 |
|
TLorentzVector fourVector2(0, 0, 0, 0); |
2743 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2744 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2745 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2746 |
|
else if(variable == "invMass"){ |
2747 |
|
fourVector1.SetPtEtaPhiM(object1->pt, object1->eta, object1->phi, muonMass); |
2760 |
|
OSUAnalysis::valueLookup (const BNtau* object1, const BNtau* object2, string variable, string function){ |
2761 |
|
double value = 0.0; |
2762 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2763 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2764 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2765 |
|
else if(variable == "invMass"){ |
2766 |
|
TLorentzVector fourVector1(object1->px, object1->py, object1->pz, object1->energy); |
2778 |
|
OSUAnalysis::valueLookup (const BNmuon* object1, const BNtau* object2, string variable, string function){ |
2779 |
|
double value = 0.0; |
2780 |
|
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2781 |
+ |
else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta); |
2782 |
|
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2783 |
|
else if(variable == "invMass"){ |
2784 |
|
TLorentzVector fourVector1(object1->px, object1->py, object1->pz, object1->energy); |
2791 |
|
return value; |
2792 |
|
} |
2793 |
|
|
2794 |
+ |
double |
2795 |
+ |
OSUAnalysis::valueLookup (const BNtau* object1, const BNtrack* object2, string variable, string function){ |
2796 |
+ |
double value = 0.0; |
2797 |
+ |
if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi)); |
2798 |
+ |
else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi); |
2799 |
+ |
|
2800 |
+ |
else{std::cout << "WARNING: invalid variable '" << variable << "'\n"; value = -999;} |
2801 |
+ |
value = applyFunction(function, value); |
2802 |
+ |
return value; |
2803 |
+ |
} |
2804 |
+ |
|
2805 |
+ |
|
2806 |
|
|
2807 |
|
double |
2808 |
|
OSUAnalysis::valueLookup (const BNtrack* object1, const BNevent* object2, string variable, string function){ |
2961 |
|
|
2962 |
|
template <class InputCollection> |
2963 |
|
void OSUAnalysis::setObjectFlags(cut ¤tCut, uint currentCutIndex, flagMap &individualFlags, flagMap &cumulativeFlags, InputCollection inputCollection, string inputType){ |
2964 |
< |
|
2964 |
> |
|
2965 |
> |
if (currentCut.inputCollection.find("pair")!=std::string::npos) { |
2966 |
> |
string obj1, obj2; |
2967 |
> |
getTwoObjs(currentCut.inputCollection, obj1, obj2); |
2968 |
> |
if (inputType==obj1 || |
2969 |
> |
inputType==obj2) { |
2970 |
> |
// Do not add a cut to individualFlags or cumulativeFlags, if the cut is on a paired collection, |
2971 |
> |
// and the inputType is a member of the pair. |
2972 |
> |
// The cut will instead be applied when the setObjectFlags() is called for the paired collection. |
2973 |
> |
// For example, if currentCut.inputCollection==electron-muon pairs, |
2974 |
> |
// then the flags should not be set here when inputType==muons or inputType==electrons. |
2975 |
> |
return; |
2976 |
> |
} |
2977 |
> |
} |
2978 |
|
|
2979 |
|
for (uint object = 0; object != inputCollection->size(); object++){ |
2980 |
|
|
2847 |
– |
|
2981 |
|
bool decision = true;//object passes if this cut doesn't cut on that type of object |
2982 |
|
|
2850 |
– |
|
2983 |
|
if(currentCut.inputCollection == inputType){ |
2984 |
|
|
2985 |
|
vector<bool> subcutDecisions; |
2986 |
|
for( int subcutIndex = 0; subcutIndex != currentCut.numSubcuts; subcutIndex++){ |
2987 |
|
double value = valueLookup(&inputCollection->at(object), currentCut.variables.at(subcutIndex), currentCut.functions.at(subcutIndex)); |
2988 |
|
subcutDecisions.push_back(evaluateComparison(value,currentCut.comparativeOperators.at(subcutIndex),currentCut.cutValues.at(subcutIndex))); |
2989 |
+ |
|
2990 |
|
} |
2991 |
|
if(currentCut.numSubcuts == 1) decision = subcutDecisions.at(0); |
2992 |
|
else{ |
3000 |
|
decision = tempDecision; |
3001 |
|
} |
3002 |
|
} |
2870 |
– |
individualFlags.at(inputType).at(currentCutIndex).push_back(decision); |
3003 |
|
|
3004 |
+ |
individualFlags.at(inputType).at(currentCutIndex).push_back(decision); |
3005 |
|
|
3006 |
|
//set flags for objects that pass each cut AND all the previous cuts |
3007 |
|
bool previousCumulativeFlag = true; |
3011 |
|
} |
3012 |
|
cumulativeFlags.at(inputType).at(currentCutIndex).push_back(previousCumulativeFlag && decision); |
3013 |
|
|
2881 |
– |
|
3014 |
|
} |
3015 |
|
|
3016 |
|
} |
3024 |
|
bool sameObjects = false; |
3025 |
|
if(typeid(InputCollection1).name() == typeid(InputCollection2).name()) sameObjects = true; |
3026 |
|
|
3027 |
< |
|
3027 |
> |
// Get the strings for the two objects that make up the pair. |
3028 |
> |
string obj1Type, obj2Type; |
3029 |
> |
getTwoObjs(inputType, obj1Type, obj2Type); |
3030 |
> |
bool isTwoTypesOfObject = true; |
3031 |
> |
if (obj1Type==obj2Type) isTwoTypesOfObject = false; |
3032 |
> |
|
3033 |
> |
// Initialize the flags for individual objects to all be false, if the cut is on the pair. |
3034 |
> |
// Set them to true later, if any paired object passes (in which case both of its constituents should pass). |
3035 |
> |
if (currentCut.inputCollection == inputType) { |
3036 |
> |
for (uint object1 = 0; object1 != inputCollection1->size(); object1++) { |
3037 |
> |
individualFlags.at(obj1Type).at(currentCutIndex).push_back(false); |
3038 |
> |
cumulativeFlags.at(obj1Type).at(currentCutIndex).push_back(false); |
3039 |
> |
} |
3040 |
> |
if (isTwoTypesOfObject) { // Only initialize the second object if it is different from the first. |
3041 |
> |
for (uint object2 = 0; object2 != inputCollection2->size(); object2++) { |
3042 |
> |
individualFlags.at(obj2Type).at(currentCutIndex).push_back(false); |
3043 |
> |
cumulativeFlags.at(obj2Type).at(currentCutIndex).push_back(false); |
3044 |
> |
} |
3045 |
> |
} |
3046 |
> |
} |
3047 |
> |
|
3048 |
|
int counter = 0; |
3049 |
+ |
|
3050 |
|
for (uint object1 = 0; object1 != inputCollection1->size(); object1++){ |
3051 |
|
for (uint object2 = 0; object2 != inputCollection2->size(); object2++){ |
3052 |
|
|
3075 |
|
decision = tempDecision; |
3076 |
|
} |
3077 |
|
} |
3078 |
< |
individualFlags.at(inputType).at(currentCutIndex).push_back(decision); |
3078 |
> |
// if (decision) isPassObj1.at(object1) = true; |
3079 |
> |
// if (decision) isPassObj2.at(object2) = true; |
3080 |
> |
individualFlags.at(inputType).at(currentCutIndex).push_back(decision); |
3081 |
> |
if (decision && currentCut.inputCollection == inputType) { // only set the flags for the individual objects if the pair object is being cut on |
3082 |
> |
individualFlags.at(obj1Type).at(currentCutIndex).at(object1) = true; |
3083 |
> |
individualFlags.at(obj2Type).at(currentCutIndex).at(object2) = true; |
3084 |
> |
} |
3085 |
|
|
3086 |
|
//set flags for objects that pass each cut AND all the previous cuts |
3087 |
|
bool previousCumulativeFlag = true; |
3096 |
|
else if(flags2.size() == 0) currentCumulativeFlag = previousCumulativeFlag && decision && flags1.at(object1); |
3097 |
|
else currentCumulativeFlag = previousCumulativeFlag && decision && flags1.at(object1) && flags2.at(object2); |
3098 |
|
cumulativeFlags.at(inputType).at(currentCutIndex).push_back(currentCumulativeFlag); |
3099 |
< |
|
3099 |
> |
if (currentCumulativeFlag && currentCut.inputCollection == inputType) { // only set the flags for the individual objects if the pair object is being cut on |
3100 |
> |
cumulativeFlags.at(obj1Type).at(currentCutIndex).at(object1) = true && getPreviousCumulativeFlags(currentCutIndex, individualFlags, obj1Type, object1); |
3101 |
> |
cumulativeFlags.at(obj2Type).at(currentCutIndex).at(object2) = true && getPreviousCumulativeFlags(currentCutIndex, individualFlags, obj2Type, object2); |
3102 |
> |
} |
3103 |
|
counter++; |
2942 |
– |
} |
2943 |
– |
|
2944 |
– |
} |
3104 |
|
|
3105 |
+ |
} // end for (uint object2 = 0; object2 != inputCollection2->size(); object2++){ |
3106 |
+ |
} // end for (uint object1 = 0; object1 != inputCollection1->size(); object1++){ |
3107 |
|
|
3108 |
|
} |
3109 |
|
|
3110 |
|
|
3111 |
+ |
bool OSUAnalysis::getPreviousCumulativeFlags(uint currentCutIndex, flagMap &individualFlags, string obj1Type, uint object1) { |
3112 |
+ |
// Return true iff for the collection obj1Type, the element with index object1 has individal flags set to true for |
3113 |
+ |
// all cuts up to currentCutIndex |
3114 |
+ |
bool previousCumulativeFlag = true; |
3115 |
+ |
for (uint previousCutIndex = 0; previousCutIndex < currentCutIndex; previousCutIndex++) { |
3116 |
+ |
if (previousCumulativeFlag && individualFlags.at(obj1Type).at(previousCutIndex).at(object1)) previousCumulativeFlag = true; |
3117 |
+ |
else { |
3118 |
+ |
previousCumulativeFlag = false; break; |
3119 |
+ |
} |
3120 |
+ |
} |
3121 |
+ |
return previousCumulativeFlag; |
3122 |
+ |
} |
3123 |
+ |
|
3124 |
+ |
|
3125 |
|
template <class InputCollection> |
3126 |
|
void OSUAnalysis::fill1DHistogram(TH1* histo, histogram parameters, InputCollection inputCollection,vector<bool> flags, double scaleFactor){ |
3127 |
|
|
3158 |
|
bool sameObjects = false; |
3159 |
|
if(typeid(InputCollection1).name() == typeid(InputCollection2).name()) sameObjects = true; |
3160 |
|
|
3161 |
< |
int pairCounter = 0; |
3161 |
> |
int pairCounter = -1; |
3162 |
|
for (uint object1 = 0; object1 != inputCollection1->size(); object1++){ |
3163 |
|
for (uint object2 = 0; object2 != inputCollection2->size(); object2++){ |
3164 |
|
|
3165 |
|
if(sameObjects && object1 >= object2) continue;//account for duplicate pairs if both collections are the same |
3166 |
|
|
3167 |
+ |
pairCounter++; |
3168 |
|
//only take objects which have passed all cuts and pairs which have passed all cuts |
3169 |
|
if(!plotAllObjectsInPassingEvents_ && !flags1.at(object1)) continue; |
3170 |
|
if(!plotAllObjectsInPassingEvents_ && !flags2.at(object2)) continue; |
3185 |
|
double value = valueLookup(&inputCollection1->at(object1), &inputCollection2->at(object2), inputVariable, function); |
3186 |
|
histo->Fill(value,scaleFactor); |
3187 |
|
|
3012 |
– |
pairCounter++; |
3188 |
|
} |
3189 |
|
} |
3190 |
|
|
3237 |
|
bool sameObjects = false; |
3238 |
|
if(typeid(InputCollection1).name() == typeid(InputCollection2).name()) sameObjects = true; |
3239 |
|
|
3240 |
< |
int pairCounter = 0; |
3240 |
> |
int pairCounter = -1; |
3241 |
|
for (uint object1 = 0; object1 != inputCollection1->size(); object1++){ |
3242 |
|
for (uint object2 = 0; object2 != inputCollection2->size(); object2++){ |
3243 |
|
|
3244 |
|
if(sameObjects && object1 >= object2) continue;//account for duplicate pairs if both collections are the same |
3245 |
|
|
3246 |
+ |
pairCounter++; |
3247 |
+ |
|
3248 |
|
//only take objects which have passed all cuts and pairs which have passed all cuts |
3249 |
|
if(!plotAllObjectsInPassingEvents_ && !flags1.at(object1)) continue; |
3250 |
|
if(!plotAllObjectsInPassingEvents_ && !flags2.at(object2)) continue; |
3279 |
|
|
3280 |
|
histo->Fill(valueX,valueY,scaleFactor); |
3281 |
|
|
3105 |
– |
pairCounter++; |
3106 |
– |
|
3282 |
|
} |
3283 |
|
} |
3284 |
|
|