868 std::vector<edm::Ref<T> > recoecalcands;
870 dqm->hltCollectionLabelsMissed.insert(
dqm->theHLTCollectionLabels[
n].encode());
875 dqm->hltCollectionLabelsFound.insert(
dqm->theHLTCollectionLabels[
n].encode());
884 std::vector<edm::Ref<T> > isocands;
886 if (isocands.size()>0)
888 for (
unsigned int i=0;
i < isocands.size();
i++)
889 recoecalcands.push_back(isocands[
i]);
894 if (recoecalcands.size() < 1){
900 if (recoecalcands.size() >=
dqm->nCandCuts.at(
n) && !
dqm->mcMatchedOnly_)
901 dqm->totals.at(vPos)->Fill(
n+0.5);
907 for (
unsigned int j=0; j<recoecalcands.size(); j++){
908 if(!( recoecalcands.at(j).isAvailable())){
909 if (
dqm->verbosity_ >=
dqm->OUTPUT_ERRORS)
910 edm::LogError(
"EmDQMInvalidRefs") <<
"Event content inconsistent: TriggerEventWithRefs contains invalid Refs. Invalid refs for: " <<
dqm->theHLTCollectionLabels[
n].label() <<
". The collection that this module uses may has been dropped in the event.";
915 if (!
dqm->mcMatchedOnly_) {
921 for (
unsigned int i=0;
i <
dqm->nCandCuts.at(
n);
i++) {
924 float closestDeltaR = 0.5;
925 int closestEcalCandIndex = -1;
926 for (
unsigned int j=0; j<recoecalcands.size(); j++) {
927 float deltaR =
DeltaR(recoecalcands[j]->momentum(),currentGenParticleMomentum);
929 if (deltaR < closestDeltaR) {
931 closestEcalCandIndex = j;
937 if ( closestEcalCandIndex >= 0 ) {
938 dqm->histEtOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
et() );
939 dqm->histEtaOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
eta() );
940 if (!
dqm->noPhiPlots_)
dqm->histPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
phi() );
951 for (
unsigned int i=0;
i<recoecalcands.size();
i++) {
969 dqm->ethists.at(vPos).at(
n) ->Fill(recoecalcands[
i]->
et() );
970 dqm->etahists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta() );
971 if (!
dqm->noPhiPlots_)
dqm->phihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
phi() );
979 unsigned int matchedMcParts = 0;
981 if(
n==0) mindist=0.5;
982 for(
unsigned int i =0;
i <
dqm->nCandCuts.at(
n); ++
i){
984 bool matchThis=
false;
987 double closestDr = 1000.;
988 for(
unsigned int trigOb = 0 ; trigOb < recoecalcands.size(); ++trigOb){
989 double dr =
DeltaR(recoecalcands[trigOb]->momentum(),candDir);
990 if (dr < closestDr) {
994 if (closestDr > mindist) {
1006 dqm->ethistmatchs.at(vPos).at(
n) ->Fill( sortedGen[
i].
et() );
1007 if (sortedGen[
i].
et() >
dqm->minEtForEtaEffPlot_) {
1008 dqm->etahistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
eta() );
1009 if (!
dqm->noPhiPlots_)
dqm->phihistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
phi() );
1014 if (matchedMcParts >=
dqm->nCandCuts.at(
n) && accepted ==
true)
1015 dqm->totalmatchs.at(vPos)->Fill(
n+0.5);
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
double deltaR(double eta1, double eta2, double phi1, double phi2)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type
size_type size() const
number of filters
et
define resolution functions of each parameter