77 rawRecHits(iConfig.getParameter<bool>(
"rawRecHits")) {
86 }
else if(detector==
"EM") {
89 }
else if(detector==
"HAD") {
100 LayerOccupancy = fs->make<TH1F>(
"LayerOccupancy",
"", 60, 0., 60.);
126 const std::vector<CaloParticle>&
caloParticles = *caloParticleHandle;
129 for (std::vector<CaloParticle>::const_iterator it_caloPart = caloParticles.begin(); it_caloPart != caloParticles.end(); ++it_caloPart) {
137 float seedEnergy = 0.;
138 int simClusterCount = 0;
140 for (
const auto & simCluster : simClusterRefVector) {
143 std::cout <<
">>> simCluster.energy() = " << simCluster->energy() << std::endl;
145 const std::vector<std::pair<uint32_t,float> > hits_and_fractions = simCluster->hits_and_fractions();
148 for (std::vector<std::pair<uint32_t,float> >::const_iterator it_haf = hits_and_fractions.begin(); it_haf != hits_and_fractions.end(); ++it_haf) {
150 DetId hitid = (it_haf->first);
155 (
algo == 1 || algo == 2)) {
162 if(hitlayer != layer) {
164 std::cout <<
" recHit ID problem EE " << std::endl;
170 if(seedEnergy < it_hit->energy()){
171 seedEnergy = it_hit->energy();
179 (algo == 1 || algo == 3)) {
186 if (hitlayer != layer) {
188 std::cout <<
" recHit ID problem FH " << std::endl;
194 if(seedEnergy < it_hit->energy()){
195 seedEnergy = it_hit->energy();
203 (algo == 1 || algo == 3)) {
210 if (hitlayer != layer) {
212 std::cout <<
" recHit ID problem BH " << std::endl;
218 if(seedEnergy < it_hit->energy()){
219 seedEnergy = it_hit->energy();
232 float sumCalibRecHitCalib_fraction = 0;
259 desc.
add<
bool>(
"rawRecHits",
true);
260 descriptions.
add(
"hgcalHitCalibration",desc);
static const std::string kSharedResource
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< HGCRecHit >::const_iterator const_iterator
HGCalDepthPreClusterer pre
edm::EDGetTokenT< HGCRecHitCollection > _recHitsBH
TH1F * h_EoP_CPene_200_calib_fraction
HGCalHitCalibration(const edm::ParameterSet &)
edm::EDGetTokenT< std::vector< CaloParticle > > _caloParticles
edm::EDGetTokenT< HGCRecHitCollection > _recHitsFH
TH1F * h_EoP_CPene_100_calib_fraction
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual void beginJob() override
const_iterator end() const
TH1F * h_EoP_CPene_300_calib_fraction
virtual void endJob() override
edm::EDGetTokenT< HGCRecHitCollection > _recHitsEE
std::vector< float > Energy_layer_calib_fraction
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
hgcal::RecHitTools recHitTools
std::vector< float > Energy_layer_calib
Detector det() const
get the detector field from this detid
const_iterator begin() const