701 std::vector<edm::Ref<T> > recoecalcands;
713 std::vector<edm::Ref<T> > isocands;
715 if (isocands.size()>0)
717 for (
unsigned int i=0;
i < isocands.size();
i++)
718 recoecalcands.push_back(isocands[
i]);
723 if (recoecalcands.size() < 1){
728 if (recoecalcands.size() >=
dqm->reqNum )
729 dqm->totalreco->Fill(
n+0.5);
736 for (
unsigned int j=0;
j<recoecalcands.size();
j++){
737 if(!( recoecalcands.at(
j).isAvailable())){
738 edm::LogError(
"EmDQMReco") <<
"Event content inconsistent: TriggerEventWithRefs contains invalid Refs" << std::endl <<
"invalid refs for: " <<
dqm->theHLTCollectionLabels[
n].label();
749 for (
unsigned int i=0;
i<recoecalcands.size();
i++) {
751 dqm->standardHist[
n].fill(recoecalcands[
i]->
p4());
757 if (
n+1 <
dqm->numOfHLTCollectionLabels ) {
758 if (
dqm->plotiso[
n+1]) {
764 if (mapi!=depMap->end()){
765 dqm->etahistiso[
n+1]->Fill(recoecalcands[i]->
eta(),mapi->val);
766 dqm->ethistiso[
n+1]->Fill(recoecalcands[i]->
et() ,mapi->val);
767 dqm->phiHistIso[
n+1]->Fill(recoecalcands[i]->
phi(),mapi->val);
779 if (plotReco ==
true) {
780 for (
unsigned int i=0; i <
dqm->recocut_; i++) {
784 float closestRecoDeltaR = 1000.;
785 int closestRecoEcalCandIndex = -1;
786 for (
unsigned int j=0;
j<recoecalcands.size();
j++) {
787 float deltaR =
DeltaR(recoecalcands[
j]->momentum(),currentRecoParticleMomentum);
789 if (deltaR < closestRecoDeltaR) {
790 closestRecoDeltaR =
deltaR;
791 closestRecoEcalCandIndex =
j;
797 if ( closestRecoEcalCandIndex >= 0 ) {
802 dqm->histHltObjMatchToReco[
n].fill(recoecalcands[closestRecoEcalCandIndex]->
p4());
805 if (
n+1 <
dqm->numOfHLTCollectionLabels){
806 if (
dqm->plotiso[
n+1] ){
812 if (mapi!=depMap->end()) {
813 dqm->histEtaIsoOfHltObjMatchToReco[
n+1]->Fill( recoecalcands[closestRecoEcalCandIndex]->
eta(),mapi->val);
814 dqm->histEtIsoOfHltObjMatchToReco[
n+1] ->Fill( recoecalcands[closestRecoEcalCandIndex]->
et(), mapi->val);
815 dqm->histPhiIsoOfHltObjMatchToReco[
n+1] ->Fill( recoecalcands[closestRecoEcalCandIndex]->
phi(), mapi->val);
827 unsigned int mtachedRecoParts = 0;
828 float minrecodist=0.3;
829 if(
n==0) minrecodist=0.5;
830 for(
unsigned int i =0; i <
dqm->recocut_; i++){
832 bool matchThis=
false;
834 unsigned int closest = 0;
835 double closestDr = 1000.;
836 for(
unsigned int trigOb = 0 ; trigOb < recoecalcands.size(); trigOb++){
837 double dr =
DeltaR(recoecalcands[trigOb]->momentum(),candDir);
838 if (dr < closestDr) {
842 if (closestDr > minrecodist) {
849 if ( !matchThis )
continue;
854 dqm->histMatchReco[
n].fill(sortedReco[i].
p4());
860 dqm->histMatchRecoMonPath[
n].fill(sortedReco[i].
p4());
867 if (
n+1 <
dqm->numOfHLTCollectionLabels){
868 if (
dqm->plotiso[
n+1] ){
874 if (mapi!=depMapReco->end()){
875 dqm->etahistisomatchreco[
n+1]->Fill(sortedReco[i].
eta(),mapi->val);
876 dqm->ethistisomatchreco[
n+1]->Fill(sortedReco[i].
et(),mapi->val);
877 dqm->phiHistIsoMatchReco[
n+1]->Fill(sortedReco[i].
eta(),mapi->val);
885 if (mtachedRecoParts >=
dqm->reqNum )
886 dqm-> totalmatchreco->Fill(
n+0.5);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
std::vector< edm::EDGetTokenT< edm::AssociationMap< edm::OneToValue< T, float > > > > isoNameTokens_
size_type size() const
number of filters
et
define resolution functions of each parameter