72 LogTrace(
"EcalClusters") <<
"\n ....... Event " << evt.
id() <<
" with Number = " <<
nEvt_ + 1
73 <<
" is analyzing ....... ";
85 auto ps_cl_for_pi0_disc_x = std::make_unique<reco::PreshowerClusterShapeCollection>();
86 auto ps_cl_for_pi0_disc_y = std::make_unique<reco::PreshowerClusterShapeCollection>();
88 std::unique_ptr<CaloSubdetectorTopology> topology_p;
90 topology_p = std::make_unique<EcalPreshowerTopology>();
97 LogTrace(
"EcalClusters") <<
"PreshowerClusterShapeProducer: ### Total # of preshower RecHits: " << rechits->
size();
102 map<DetId, EcalRecHit> rechits_map;
104 for (it = rechits->
begin(); it != rechits->
end(); it++) {
105 rechits_map.insert(make_pair(it->id(), *it));
108 LogTrace(
"EcalClusters") <<
"PreshowerClusterShapeProducer: ### Preshower RecHits_map of size " << rechits_map.size()
122 LogTrace(
"EcalClusters") <<
"### Total # Endcap Superclusters: " << SClusts->size();
124 SuperClusterCollection::const_iterator it_s;
125 for (it_s = SClusts->begin(); it_s != SClusts->end(); it_s++) {
128 float SC_eta = it_super->eta();
130 LogTrace(
"EcalClusters") <<
"PreshowerClusterShapeProducer: superCl_E = " << it_super->energy()
131 <<
" superCl_Et = " << it_super->energy() *
sin(2 * atan(
exp(-it_super->eta())))
132 <<
" superCl_Eta = " << SC_eta <<
" superCl_Phi = " << it_super->phi();
134 if (fabs(SC_eta) >= 1.65 && fabs(SC_eta) <= 2.5) {
136 const GlobalPoint pointSC(it_super->x(), it_super->y(), it_super->z());
137 LogTrace(
"EcalClusters") <<
"SC centroind = " << pointSC;
149 LogTrace(
"EcalClusters") <<
"PreshowerClusterShapeProducer : ES Energy vector associated to the given SC = ";
150 for (
int k1 = 0; k1 < 11; k1++) {
151 LogTrace(
"EcalClusters") << vout_stripE1[k1] <<
" ";
154 for (
int k1 = 0; k1 < 11; k1++) {
155 LogTrace(
"EcalClusters") << vout_stripE2[k1] <<
" ";
160 ps_cl_x.push_back(ps1);
164 ps_cl_y.push_back(ps2);
170 ps_cl_for_pi0_disc_x->assign(ps_cl_x.begin(), ps_cl_x.end());
171 ps_cl_for_pi0_disc_y->assign(ps_cl_y.begin(), ps_cl_y.end());
175 LogTrace(
"EcalClusters") <<
"PreshowerClusterShapeCollection added to the event";
179 LogDebug(
"PiZeroDiscriminatorDebug") << ostr.str();
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void setSCRef(const SuperClusterRef &r)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
std::vector< EcalRecHit >::const_iterator const_iterator
std::string PreshowerClusterShapeCollectionY_
std::vector< float > findPreshVector(ESDetId strip, RecHitsMap *rechits_map, CaloSubdetectorTopology *topology_p)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::string PreshowerClusterShapeCollectionX_
std::vector< PreshowerClusterShape > PreshowerClusterShapeCollection
collection of PreshowerClusterShape objects
const_iterator end() const
T const * product() const
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSClusterToken_
ESHandle< TrackerGeometry > geometry
EndcapPiZeroDiscriminatorAlgo * presh_pi0_algo
edm::EDGetTokenT< EcalRecHitCollection > preshHitToken_
const_iterator begin() const