43 gammaClus_ = iConfig.
getUntrackedParameter<std::string>(
"gammaClus",
"GammaJetGammaBackToBackCollection");
52 ProducerAnalyzer::~ProducerAnalyzer()
64 void ProducerAnalyzer::endJob()
86 std::vector<Provenance const*> theProvenance;
88 for( std::vector<Provenance const*>::const_iterator ip = theProvenance.begin();
89 ip != theProvenance.end(); ip++)
91 cout<<
" Print all module/label names "<<(**ip).moduleName()<<
" "<<(**ip).moduleLabel()<<
92 " "<<(**ip).productInstanceName()<<endl;
96 if(nameProd_ ==
"hoCalibProducer")
104 if(nameProd_ ==
"ALCARECOMuAlZMuMu" )
112 iEvent.
getByLabel(nameProd_,
"SelectedMuons", mucand);
113 std::cout<<
" Size of muon collection "<<mucand->size()<<std::endl;
114 for(MuonCollection::const_iterator it = mucand->begin(); it != mucand->end(); it++)
117 std::cout<<
" Pt muon "<<mu->innerMomentum()<<std::endl;
122 if(nameProd_ !=
"IsoProd" && nameProd_ !=
"ALCARECOMuAlZMuMu" && nameProd_ !=
"hoCalibProducer")
141 if(nameProd_ ==
"IsoProd")
143 cout<<
" We are here "<<endl;
148 std::cout<<
" Tracks size "<<(*tracks).size()<<std::endl;
149 reco::TrackCollection::const_iterator track = tracks->begin ();
151 for (; track != tracks->end (); track++)
153 cout<<
" P track "<<(*track).p()<<
" eta "<<(*track).eta()<<
" phi "<<(*track).phi()<<
" Outer "<<(*track).outerMomentum()<<
" "<<
154 (*track).outerPosition()<<endl;
156 cout<<
" Track extra "<<myextra->outerMomentum()<<
" "<<myextra->outerPosition()<<endl;
168 for (; hite != (ecal.
product())->
end (); hite++)
176 GlobalPoint posE = geo->getPosition((*hite).detid());
178 cout<<
" Energy ECAL "<<(*hite).energy()<<
179 " eta "<<posE.
eta()<<
" phi "<<posE.
phi()<<endl;
181 energyECAL = energyECAL + (*hite).energy();
191 for (; hith != (hbhe.
product())->
end (); hith++)
194 GlobalPoint posH = geo->getPosition((*hith).detid());
196 cout<<
" Energy HCAL "<<(*hith).energy()<<
197 " eta "<<posH.
eta()<<
" phi "<<posH.
phi()<<endl;
199 energyHCAL = energyHCAL + (*hith).energy();
203 cout<<
" Energy ECAL "<< energyECAL<<
" Energy HCAL "<< energyHCAL<<endl;
211 for (; hito != (ho.
product())->
end (); hito++)
220 if(nameProd_ ==
"GammaJetProd" || nameProd_ ==
"DiJProd")
222 cout<<
" we are in GammaJetProd area "<<endl;
224 iEvent.
getByLabel(nameProd_,ecalInput_, ecal);
225 std::cout<<
" Size of ECAL "<<(*ecal).size()<<std::endl;
229 std::cout<<
" Jet size "<<(*jets).size()<<std::endl;
230 reco::CaloJetCollection::const_iterator
jet = jets->begin ();
231 for (; jet != jets->end (); jet++)
233 cout<<
" Et jet "<<(*jet).et()<<
" eta "<<(*jet).eta()<<
" phi "<<(*jet).phi()<<endl;
238 std::cout<<
" Tracks size "<<(*tracks).size()<<std::endl;
240 if( nameProd_ ==
"GammaJetProd")
243 iEvent.
getByLabel(nameProd_,gammaClus_, eclus);
244 std::cout<<
" GammaClus size "<<(*eclus).size()<<std::endl;
245 reco::SuperClusterCollection::const_iterator iclus = eclus->begin ();
246 for (; iclus != eclus->end (); iclus++)
248 cout<<
" Et gamma "<<(*iclus).energy()/cosh((*iclus).eta())<<
" eta "<<(*iclus).eta()<<
" phi "<<(*iclus).phi()<<endl;
double energyHCAL(std::vector< DetId > &vdets, edm::Handle< T > &hits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, bool debug=false)
T getUntrackedParameter(std::string const &, T const &) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
double energyECAL(std::vector< DetId > &vdets, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< HOCalibVariables > HOCalibVariableCollection
collection of HOcalibration variabale
T const * product() const
tuple size
Write out results.