diff --git a/RecoLocalCalo/HGCalESProducers/plugins/BuildFile.xml b/RecoLocalCalo/HGCalESProducers/plugins/BuildFile.xml
new file mode 100644
index 0000000000000..fbd2fdb8354bc
--- /dev/null
+++ b/RecoLocalCalo/HGCalESProducers/plugins/BuildFile.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitKernelImpl.cu b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitKernelImpl.cu
index 9d6845cbe5f99..7c238283c5cc4 100644
--- a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitKernelImpl.cu
+++ b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitKernelImpl.cu
@@ -131,7 +131,6 @@ void hef_to_rechit(HGCRecHitSoA dst_soa, HGCUncalibratedRecHitSoA src_soa, const
CUDADataFormats/HGCal/interface/HGCUncalibratedRecHitsToRecHitsConstants.h maxsizes_constanats will perhaps have to be changed (change some 3's to 6's)
*/
HeterogeneousHGCSiliconDetId detid(src_soa.id_[i]);
- //printf( "Layer offset: %d\n", cdata.layerOffset_ );
uint32_t layer = detid.layer() + cdata.layerOffset_;
float weight = get_weight_from_layer(layer, cdata.weights_);
float rcorr = 1.f;//get_thickness_correction(detid.type(), cdata.rcorr_);
@@ -193,9 +192,6 @@ void fill_positions_from_detids(const hgcal_conditions::HeterogeneousHEFCellPosi
conds->posmap.x[i] = xpos; //* side; multiply by -1 if one wants to obtain the position from the opposite endcap. CAREFUL WITH LATER DETECTOR ALIGNMENT!!!
conds->posmap.y[i] = ypos;
-
- //printf( "%d - %lf - %lf\n", cV - ncells, 1.5f*(static_cast(cV) - static_cast(ncells)), 1.5f*(static_cast(cV - ncells)) );
- //printf("waferU: %d\t waferV: %d\t cellU: %d\t cellV: %d\t nCells: %d\t R1: %lf\t Layer: %d\t PosX: %lf\t PosY: %lf\t PosZ: %lf\n", wU, wV, cU, cV, ncells, R1, layer, conds->posmap.x[i], conds->posmap.y[i], conds->posmap.z[i]);
}
}
diff --git a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitWorkerSimple.cc b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitWorkerSimple.cc
index 9f18cceaf9e96..0112b6e77482f 100644
--- a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitWorkerSimple.cc
+++ b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitWorkerSimple.cc
@@ -170,12 +170,12 @@ bool HGCalRecHitWorkerSimple::run(const edm::Event& evt,
break;
}
}
+
switch (idtype) {
case hgcee:
rechitMaker_->setADCToGeVConstant(float(hgceeUncalib2GeV_));
cce_correction = hgcEE_cce_[thickness - 1];
- sigmaNoiseGeV =
- 1e-3 * weights_[layer] * rcorr_[thickness] * hgcEE_noise_fC_[thickness - 1] / hgcEE_fCPerMIP_[thickness - 1];
+ sigmaNoiseGeV = 1e-3 * weights_[layer] * rcorr_[thickness] * hgcEE_noise_fC_[thickness - 1] / hgcEE_fCPerMIP_[thickness - 1];
break;
case hgcfh:
rechitMaker_->setADCToGeVConstant(float(hgchefUncalib2GeV_));
diff --git a/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py b/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py
index bc18ac9561551..7fc8201bb00df 100644
--- a/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py
+++ b/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py
@@ -104,7 +104,7 @@
#With the new regional em factors there are 7 different factors used.
#Six of them are for silicon and one for scint. For silicon it is in the following order
# CE_E_120um, CE_E_200um, CE_E_300um, CE_H_120um, CE_H_200um, CE_H_300um
- thicknessCorrection = cms.vdouble(1.132,1.092,1.084,1.132,1.092,1.084), # 100, 200, 300 um #the last three numbers were added by B. Alves on 31/08/2020
+ thicknessCorrection = cms.vdouble(1.132,1.092,1.084,1.,1.,1.), # 100, 200, 300 um #the last three numbers were added by B. Alves on 31/08/2020
deltasi_index_regemfac = cms.int32(3),
#One factor for scint
sciThicknessCorrection = cms.double(1.0),
diff --git a/UserCode/CodeGPU/python/HeterogeneousHGCalRecHit_cfg.py b/UserCode/CodeGPU/python/HeterogeneousHGCalRecHit_cfg.py
index 470c7668f358c..cdc4e0beccf8e 100644
--- a/UserCode/CodeGPU/python/HeterogeneousHGCalRecHit_cfg.py
+++ b/UserCode/CodeGPU/python/HeterogeneousHGCalRecHit_cfg.py
@@ -71,10 +71,11 @@
HGCHEB_keV2DIGI = HGCalRecHit.__dict__['HGCHEB_keV2DIGI'],
HGCHEB_noise_MIP = HGCalRecHit.__dict__['HGCHEB_noise_MIP'],
weights = HGCalRecHit.__dict__['layerWeights'] )
+process.HGCalRecHits = HGCalRecHit.clone()
fNameOut = 'out'
-#process.task = cms.Task( process.HeterogeneousHGCalEERecHits, process.HeterogeneousHGCalHEFRecHits )
-process.task = cms.Task( process.HeterogeneousHGCalHEFCellPositionsFiller, process.HeterogeneousHGCalHEFRecHits )
+#process.task = cms.Task( process.HeterogeneousHGCalHEFCellPositionsFiller, process.HeterogeneousHGCalHEFRecHits )
+process.task = cms.Task( process.HGCalRecHits, process.HeterogeneousHGCalHEFRecHits )
process.path = cms.Path( process.task )
process.out = cms.OutputModule("PoolOutputModule",
diff --git a/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.cc b/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.cc
index bbf106fad2c69..3872986263a1c 100644
--- a/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.cc
+++ b/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.cc
@@ -30,9 +30,9 @@ HeterogeneousHGCalRecHitsValidator::HeterogeneousHGCalRecHitsValidator( const ed
for(unsigned int i=0; imake(treenames_[i].c_str(), treenames_[i].c_str());
- trees_[i]->Branch( "cpu", "validHitCollection", &cpuValidRecHits );
- trees_[i]->Branch( "gpu", "validHitCollection", &gpuValidRecHits );
- trees_[i]->Branch( "diffs", "validHitCollection", &diffsValidRecHits );
+ trees_[i]->Branch( "cpu", "validHitCollection", &cpuValidRecHits[i] );
+ trees_[i]->Branch( "gpu", "validHitCollection", &gpuValidRecHits[i] );
+ trees_[i]->Branch( "diffs", "validHitCollection", &diffsValidRecHits[i] );
}
}
@@ -91,9 +91,10 @@ void HeterogeneousHGCalRecHitsValidator::analyze(const edm::Event &event, const
validHit vGPU(gpuEn, gpuTime, gpuTimeErr, gpuDetId, gpuFB, gpuSoN);
validHit vDiffs(cpuEn-gpuEn, cpuTime-gpuTime, cpuTimeErr-gpuTimeErr, cpuDetId-gpuDetId, cpuFB-gpuFB, cpuSoN-gpuSoN);
- cpuValidRecHits.push_back( vCPU );
- gpuValidRecHits.push_back( vGPU );
- diffsValidRecHits.push_back( vDiffs );
+ std::cout << cpuEn << ", " << gpuEn << std::endl;
+ cpuValidRecHits[idet].push_back( vCPU );
+ gpuValidRecHits[idet].push_back( vGPU );
+ diffsValidRecHits[idet].push_back( vDiffs );
}
trees_[idet]->Fill();
}
diff --git a/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.h b/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.h
index 903b19b6cb878..7d83b4b5478bb 100644
--- a/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.h
+++ b/UserCode/RecHitsValidator/plugins/HeterogeneousHGCalRecHitsValidator.h
@@ -63,7 +63,7 @@ class HeterogeneousHGCalRecHitsValidator : public edm::EDAnalyzer
std::array< TTree*, nsubdetectors > trees_;
std::array< std::string, nsubdetectors > treenames_;
- validHitCollection cpuValidRecHits, gpuValidRecHits, diffsValidRecHits;
+ std::array< validHitCollection, nsubdetectors > cpuValidRecHits, gpuValidRecHits, diffsValidRecHits;
//std::vector< TH1F* > zhist;
void set_geometry_(const edm::EventSetup&, const unsigned int&);
diff --git a/UserCode/RecHitsValidator/python/HeterogeneousHGCalRecHitsValidator_cfg.py b/UserCode/RecHitsValidator/python/HeterogeneousHGCalRecHitsValidator_cfg.py
index e6fd8eef98e00..e8f5ee918f667 100644
--- a/UserCode/RecHitsValidator/python/HeterogeneousHGCalRecHitsValidator_cfg.py
+++ b/UserCode/RecHitsValidator/python/HeterogeneousHGCalRecHitsValidator_cfg.py
@@ -54,6 +54,7 @@
rcorr = cms.vdouble( HGCalRecHit.__dict__['thicknessCorrection'][0:3] ),
weights = HGCalRecHit.__dict__['layerWeights']
)
+
process.HeterogeneousHGCalHEFRecHits = cms.EDProducer( 'HeterogeneousHGCalHEFRecHitProducer',
HGCHEFUncalibRecHitsTok = cms.InputTag('HGCalUncalibRecHit', 'HGCHEFUncalibRecHits'),
HGCHEF_keV2DIGI = HGCalRecHit.__dict__['HGCHEF_keV2DIGI'],
@@ -68,22 +69,24 @@
rangeMatch = HGCalRecHit.__dict__['rangeMatch'],
rangeMask = HGCalRecHit.__dict__['rangeMask'],
rcorr = cms.vdouble( HGCalRecHit.__dict__['thicknessCorrection'][3:6] ),
- weights = HGCalRecHit.__dict__['layerWeights'] )
+ weights = HGCalRecHit.__dict__['layerWeights']
+)
process.HeterogeneousHGCalHEBRecHits = cms.EDProducer('HeterogeneousHGCalHEBRecHitProducer',
HGCHEBUncalibRecHitsTok = cms.InputTag('HGCalUncalibRecHit', 'HGCHEBUncalibRecHits'),
HGCHEB_keV2DIGI = HGCalRecHit.__dict__['HGCHEB_keV2DIGI'],
HGCHEB_noise_MIP = HGCalRecHit.__dict__['HGCHEB_noise_MIP'],
- weights = HGCalRecHit.__dict__['layerWeights'] )
-
+ weights = HGCalRecHit.__dict__['layerWeights']
+)
+process.HGCalRecHits = HGCalRecHit.clone()
process.valid = cms.EDAnalyzer( "HeterogeneousHGCalRecHitsValidator",
- cpuRecHitsEEToken = cms.InputTag('HGCalRecHit', 'HGCEERecHits'),
+ cpuRecHitsEEToken = cms.InputTag('HGCalRecHits', 'HGCEERecHits'),
gpuRecHitsEEToken = cms.InputTag('HeterogeneousHGCalEERecHits','HeterogeneousHGCalEERecHits'),
- cpuRecHitsHSiToken = cms.InputTag('HGCalRecHit', 'HGCHEFRecHits'),
+ cpuRecHitsHSiToken = cms.InputTag('HGCalRecHits', 'HGCHEFRecHits'),
gpuRecHitsHSiToken = cms.InputTag('HeterogeneousHGCalHEFRecHits','HeterogeneousHGCalHEFRecHits'),
- cpuRecHitsHSciToken = cms.InputTag('HGCalRecHit', 'HGCHEBRecHits'),
+ cpuRecHitsHSciToken = cms.InputTag('HGCalRecHits', 'HGCHEBRecHits'),
gpuRecHitsHSciToken = cms.InputTag('HeterogeneousHGCalHEBRecHits','HeterogeneousHGCalHEBRecHits') )
-process.recHitsTask = cms.Task( process.HeterogeneousHGCalEERecHits, process.HeterogeneousHGCalHEFRecHits, process.HeterogeneousHGCalHEBRecHits )
+process.recHitsTask = cms.Task( process.HGCalRecHits, process.HeterogeneousHGCalEERecHits, process.HeterogeneousHGCalHEFRecHits, process.HeterogeneousHGCalHEBRecHits )
process.path = cms.Path( process.valid, process.recHitsTask )
process.out = cms.OutputModule( "PoolOutputModule",