889 std::vector<edm::Ref<T> > recoecalcands;
891 dqm->hltCollectionLabelsMissed.insert(
dqm->theHLTCollectionLabels[
n].encode());
896 dqm->hltCollectionLabelsFound.insert(
dqm->theHLTCollectionLabels[
n].encode());
905 std::vector<edm::Ref<T> > isocands;
907 if (!isocands.empty())
909 for (
unsigned int i=0;
i < isocands.size();
i++)
910 recoecalcands.push_back(isocands[
i]);
915 if (recoecalcands.empty()){
921 if (recoecalcands.size() >=
dqm->nCandCuts.at(
n) && !
dqm->mcMatchedOnly_)
922 dqm->totals.at(vPos)->Fill(
n+0.5);
928 for (
unsigned int j=0; j<recoecalcands.size(); j++){
929 if(!( recoecalcands.at(j).isAvailable())){
930 if (
dqm->verbosity_ >=
dqm->OUTPUT_ERRORS)
931 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.";
936 if (!
dqm->mcMatchedOnly_) {
942 for (
unsigned int i=0;
i <
dqm->nCandCuts.at(
n);
i++) {
945 float closestDeltaR = 0.5;
946 int closestEcalCandIndex = -1;
947 for (
unsigned int j=0; j<recoecalcands.size(); j++) {
948 float deltaR =
DeltaR(recoecalcands[j]->momentum(),currentGenParticleMomentum);
950 if (deltaR < closestDeltaR) {
952 closestEcalCandIndex = j;
958 if ( closestEcalCandIndex >= 0 ) {
959 dqm->histEtOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
et() );
960 dqm->histEtaOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
eta() );
961 if (!
dqm->noPhiPlots_)
dqm->histPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
phi() );
962 dqm->histEtaPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
eta(),recoecalcands[closestEcalCandIndex]->
phi());
972 for (
unsigned int i=0;
i<recoecalcands.size();
i++) {
990 dqm->ethists.at(vPos).at(
n) ->Fill(recoecalcands[
i]->
et() );
991 dqm->etahists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta() );
992 if (!
dqm->noPhiPlots_)
dqm->phihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
phi() );
993 dqm->etaphihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta(),recoecalcands[
i]->
phi() );
1000 unsigned int matchedMcParts = 0;
1002 if(
n==0) mindist=0.5;
1003 for(
unsigned int i =0;
i <
dqm->nCandCuts.at(
n); ++
i){
1005 bool matchThis=
false;
1008 double closestDr = 1000.;
1009 for(
unsigned int trigOb = 0 ; trigOb < recoecalcands.size(); ++trigOb){
1010 double dr =
DeltaR(recoecalcands[trigOb]->momentum(),candDir);
1011 if (dr < closestDr) {
1015 if (closestDr > mindist) {
1027 dqm->ethistmatchs.at(vPos).at(
n) ->Fill( sortedGen[
i].
et() );
1028 if (sortedGen[
i].
et() >
dqm->minEtForEtaEffPlot_) {
1029 dqm->etahistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
eta() );
1030 if (!
dqm->noPhiPlots_)
dqm->phihistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
phi() );
1031 dqm->etaphihistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
eta(),sortedGen[
i].
phi() );
1036 if (matchedMcParts >=
dqm->nCandCuts.at(
n) && accepted ==
true)
1037 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