897 std::vector<edm::Ref<T> > recoecalcands;
899 dqm->hltCollectionLabelsMissed.insert(
dqm->theHLTCollectionLabels[
n].encode());
904 dqm->hltCollectionLabelsFound.insert(
dqm->theHLTCollectionLabels[
n].encode());
913 std::vector<edm::Ref<T> > isocands;
915 if (!isocands.empty())
917 for (
unsigned int i=0;
i < isocands.size();
i++)
918 recoecalcands.push_back(isocands[
i]);
923 if (recoecalcands.empty()){
929 if (recoecalcands.size() >=
dqm->nCandCuts.at(
n) && !
dqm->mcMatchedOnly_)
930 dqm->totals.at(vPos)->Fill(
n+0.5);
936 for (
unsigned int j=0; j<recoecalcands.size(); j++){
937 if(!( recoecalcands.at(j).isAvailable())){
938 if (
dqm->verbosity_ >=
dqm->OUTPUT_ERRORS)
939 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.";
944 if (!
dqm->mcMatchedOnly_) {
950 for (
unsigned int i=0;
i <
dqm->nCandCuts.at(
n);
i++) {
953 float closestDeltaR = 0.5;
954 int closestEcalCandIndex = -1;
955 for (
unsigned int j=0; j<recoecalcands.size(); j++) {
956 float deltaR =
DeltaR(recoecalcands[j]->momentum(),currentGenParticleMomentum);
958 if (deltaR < closestDeltaR) {
960 closestEcalCandIndex = j;
966 if ( closestEcalCandIndex >= 0 ) {
967 dqm->histEtOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
et() );
968 dqm->histEtaOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
eta() );
969 if (!
dqm->noPhiPlots_)
dqm->histPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
phi() );
970 dqm->histEtaPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill( recoecalcands[closestEcalCandIndex]->
eta(),recoecalcands[closestEcalCandIndex]->
phi());
980 for (
unsigned int i=0;
i<recoecalcands.size();
i++) {
998 dqm->ethists.at(vPos).at(
n) ->Fill(recoecalcands[
i]->
et() );
999 dqm->etahists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta() );
1000 if (!
dqm->noPhiPlots_)
dqm->phihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
phi() );
1001 dqm->etaphihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta(),recoecalcands[
i]->
phi() );
1008 unsigned int matchedMcParts = 0;
1010 if(
n==0) mindist=0.5;
1011 for(
unsigned int i =0;
i <
dqm->nCandCuts.at(
n); ++
i){
1013 bool matchThis=
false;
1016 double closestDr = 1000.;
1017 for(
unsigned int trigOb = 0 ; trigOb < recoecalcands.size(); ++trigOb){
1018 double dr =
DeltaR(recoecalcands[trigOb]->momentum(),candDir);
1019 if (dr < closestDr) {
1023 if (closestDr > mindist) {
1035 dqm->ethistmatchs.at(vPos).at(
n) ->Fill( sortedGen[
i].
et() );
1036 if (sortedGen[
i].
et() >
dqm->minEtForEtaEffPlot_) {
1037 dqm->etahistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
eta() );
1038 if (!
dqm->noPhiPlots_)
dqm->phihistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
phi() );
1039 dqm->etaphihistmatchs.at(vPos).at(
n)->Fill( sortedGen[
i].
eta(),sortedGen[
i].
phi() );
1044 if (matchedMcParts >=
dqm->nCandCuts.at(
n) && accepted ==
true)
1045 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