42 tok_hovar_ = consumes<HOCalibVariableCollection>(
edm::InputTag(nameProd_,hoInput_) );
43 tok_horeco_ = consumes<HORecHitCollection>(
edm::InputTag(
"horeco") );
44 tok_ho_ = consumes<HORecHitCollection>(
edm::InputTag(hoInput_) );
45 tok_hoProd_ = consumes<HORecHitCollection>(
edm::InputTag(nameProd_,hoInput_) );
47 tok_hf_ = consumes<HFRecHitCollection>(
edm::InputTag(hfInput_) );
49 tok_jets_ = consumes<reco::CaloJetCollection>(
edm::InputTag(nameProd_,jetCalo_) );
50 tok_gamma_ = consumes<reco::SuperClusterCollection>(
edm::InputTag(nameProd_,gammaClus_) );
51 tok_muons_ = consumes<reco::MuonCollection>(
edm::InputTag(nameProd_,
"SelectedMuons"));
52 tok_ecal_ = consumes<EcalRecHitCollection>(
edm::InputTag(nameProd_,ecalInput_) );
53 tok_tracks_ = consumes<reco::TrackCollection>(
edm::InputTag(nameProd_,Tracks_) );
55 tok_hbheProd_ = consumes<HBHERecHitCollection>(
edm::InputTag(nameProd_,hbheInput_) );
56 tok_hbhe_ = consumes<HBHERecHitCollection>(
edm::InputTag(hbheInput_) );
60 ProducerAnalyzer::~ProducerAnalyzer()
72 void ProducerAnalyzer::endJob()
94 std::vector<StableProvenance const*> theProvenance;
96 for(
auto const& provenance : theProvenance)
98 cout<<
" Print all module/label names "<<provenance->moduleName()<<
" "<<provenance->moduleLabel()<<
99 " "<<provenance->productInstanceName()<<endl;
103 if(nameProd_ ==
"hoCalibProducer")
111 if(nameProd_ ==
"ALCARECOMuAlZMuMu" )
120 std::cout<<
" Size of muon collection "<<mucand->size()<<std::endl;
121 for(MuonCollection::const_iterator it = mucand->begin(); it != mucand->end(); it++)
124 std::cout<<
" Pt muon "<<mu->innerMomentum()<<std::endl;
129 if(nameProd_ !=
"IsoProd" && nameProd_ !=
"ALCARECOMuAlZMuMu" && nameProd_ !=
"hoCalibProducer")
148 if(nameProd_ ==
"IsoProd")
150 cout<<
" We are here "<<endl;
155 std::cout<<
" Tracks size "<<(*tracks).size()<<std::endl;
156 reco::TrackCollection::const_iterator
track = tracks->begin ();
158 for (; track != tracks->end (); track++)
160 cout<<
" P track "<<(*track).p()<<
" eta "<<(*track).eta()<<
" phi "<<(*track).phi()<<
" Outer "<<(*track).outerMomentum()<<
" "<<
161 (*track).outerPosition()<<endl;
163 cout<<
" Track extra "<<myextra->outerMomentum()<<
" "<<myextra->outerPosition()<<endl;
175 for (; hite != (ecal.
product())->
end (); hite++) {
184 cout<<
" Energy ECAL "<<(*hite).energy()<<
185 " eta "<<posE.
eta()<<
" phi "<<posE.
phi()<<endl;
187 energyECAL = energyECAL + (*hite).energy();
197 for (; hith != (hbhe.
product())->
end (); hith++) {
201 cout<<
" Energy HCAL "<<(*hith).energy()<<
202 " eta "<<posH.
eta()<<
" phi "<<posH.
phi()<<endl;
204 energyHCAL = energyHCAL + (*hith).energy();
208 cout<<
" Energy ECAL "<< energyECAL<<
" Energy HCAL "<< energyHCAL<<endl;
216 for (; hito != (ho.
product())->
end (); hito++)
225 if(nameProd_ ==
"GammaJetProd" || nameProd_ ==
"DiJProd")
227 cout<<
" we are in GammaJetProd area "<<endl;
230 std::cout<<
" Size of ECAL "<<(*ecal).size()<<std::endl;
234 std::cout<<
" Jet size "<<(*jets).size()<<std::endl;
235 reco::CaloJetCollection::const_iterator
jet = jets->begin ();
236 for (; jet != jets->end (); jet++)
238 cout<<
" Et jet "<<(*jet).et()<<
" eta "<<(*jet).eta()<<
" phi "<<(*jet).phi()<<endl;
243 std::cout<<
" Tracks size "<<(*tracks).size()<<std::endl;
245 if( nameProd_ ==
"GammaJetProd")
249 std::cout<<
" GammaClus size "<<(*eclus).size()<<std::endl;
250 reco::SuperClusterCollection::const_iterator iclus = eclus->begin ();
251 for (; iclus != eclus->end (); iclus++)
253 cout<<
" Et gamma "<<(*iclus).energy()/cosh((*iclus).eta())<<
" eta "<<(*iclus).eta()<<
" phi "<<(*iclus).phi()<<endl;
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
std::vector< EcalRecHit >::const_iterator const_iterator
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