40 tok_hovar_ = consumes<HOCalibVariableCollection>(
edm::InputTag(nameProd_,hoInput_) );
41 tok_horeco_ = consumes<HORecHitCollection>(
edm::InputTag(
"horeco") );
42 tok_ho_ = consumes<HORecHitCollection>(
edm::InputTag(hoInput_) );
43 tok_hoProd_ = consumes<HORecHitCollection>(
edm::InputTag(nameProd_,hoInput_) );
45 tok_hf_ = consumes<HFRecHitCollection>(
edm::InputTag(hfInput_) );
47 tok_jets_ = consumes<reco::CaloJetCollection>(
edm::InputTag(nameProd_,jetCalo_) );
48 tok_gamma_ = consumes<reco::SuperClusterCollection>(
edm::InputTag(nameProd_,gammaClus_) );
49 tok_muons_ = consumes<reco::MuonCollection>(
edm::InputTag(nameProd_,
"SelectedMuons"));
50 tok_ecal_ = consumes<EcalRecHitCollection>(
edm::InputTag(nameProd_,ecalInput_) );
51 tok_tracks_ = consumes<reco::TrackCollection>(
edm::InputTag(nameProd_,Tracks_) );
53 tok_hbheProd_ = consumes<HBHERecHitCollection>(
edm::InputTag(nameProd_,hbheInput_) );
54 tok_hbhe_ = consumes<HBHERecHitCollection>(
edm::InputTag(hbheInput_) );
58 ProducerAnalyzer::~ProducerAnalyzer()
70 void ProducerAnalyzer::endJob()
91 std::vector<StableProvenance const*> theProvenance;
93 for(
auto const& provenance : theProvenance) {
95 <<provenance->moduleName()
96 <<
" "<<provenance->moduleLabel()
97 <<
" "<<provenance->productInstanceName();
101 if(nameProd_ ==
"hoCalibProducer") {
108 if(nameProd_ ==
"ALCARECOMuAlZMuMu" ) {
117 for(
const auto & it : *(mucand.
product())) {
124 if(nameProd_ !=
"IsoProd" && nameProd_ !=
"ALCARECOMuAlZMuMu" && nameProd_ !=
"hoCalibProducer") {
142 if(nameProd_ ==
"IsoProd") {
152 <<
" Outer "<<
track.outerMomentum()
153 <<
" "<<
track.outerPosition();
156 <<myextra->outerMomentum()<<
" " 157 <<myextra->outerPosition();
168 for (
const auto & hite : *(ecal.
product())) {
173 <<
" eta "<<posE.
eta()<<
" phi "<<posE.
phi();
175 energyECAL = energyECAL + hite.energy();
184 for (
const auto & hith : *(hbhe.
product())) {
189 <<
" eta "<<posH.
eta()<<
" phi "<<posH.
phi();
191 energyHCAL = energyHCAL + hith.energy();
200 if(nameProd_ ==
"GammaJetProd" || nameProd_ ==
"DiJProd") {
212 <<
" phi "<<
jet.phi();
219 if( nameProd_ ==
"GammaJetProd") {
223 for (
const auto & iclus : *(eclus.
product())) {
225 <<iclus.energy()/cosh(iclus.eta())<<
" eta " 226 <<iclus.eta()<<
" phi "<<iclus.phi();
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
T getUntrackedParameter(std::string const &, T const &) 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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
def analyze(function, filename, filter=None)
Geom::Phi< T > phi() const
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
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 useRaw=false, bool debug=false)
T const * product() const
std::vector< HOCalibVariables > HOCalibVariableCollection
collection of HOcalibration variabale
T const * product() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const