118 LogTrace(
"EcalClusters") <<
"PreshowerClusterProducerInfo: ### Total # of preshower RecHits: "<< rechits->
size();
121 std::map<DetId, EcalRecHit> rechits_map;
123 for (it = rechits->
begin(); it != rechits->
end(); it++) {
125 if (it->recoFlag()==1 || it->recoFlag()==14 || (it->recoFlag()<=10 && it->recoFlag()>=5))
continue;
127 rechits_map.insert(std::make_pair(it->id(), *it));
130 std::set<DetId> used_strips;
132 LogTrace(
"EcalClusters") <<
"PreshowerClusterProducerInfo: ### rechits_map of size " << rechits_map.size() <<
" was created!";
139 reco::SuperClusterCollection::const_iterator it_super;
142 for (it_super=SClusts->begin(); it_super!=SClusts->end(); ++it_super) {
147 if (fabs(it_super->eta()) < 1.9) ieta = 0;
148 else if (fabs(it_super->eta()) >= 1.9 && fabs(it_super->eta()) < 2.1) ieta = 1;
149 else if (fabs(it_super->eta()) >= 2.1 && fabs(it_super->eta()) < 2.3) ieta = 2;
150 else if (fabs(it_super->eta()) >= 2.3) ieta = 3;
154 LogTrace(
"EcalClusters")<<
" superE = " << it_super->energy() <<
" superETA = " << it_super->eta() <<
" superPHI = " << it_super->phi() ;
160 for ( ; bc_iter !=it_super->clustersEnd(); ++bc_iter ) {
164 double X = (*bc_iter)->x();
165 double Y = (*bc_iter)->y();
166 double Z = (*bc_iter)->z();
178 if (status_p1->getStatusCode() == 1) condP1 = 0;
179 if (status_p2->getStatusCode() == 1) condP2 = 0;
180 }
else if (strip1 ==
ESDetId(0))
191 clusters1.push_back(cl1);
198 clusters2.push_back(cl2);
208 LogTrace(
"EcalClusters") <<
" For SC #" << isc-1 <<
", containing "
209 << it_super->clustersSize()
210 <<
" basic clusters, PreshowerClusterAlgo made "
211 << clusters1.size() <<
" in X plane and "
213 <<
" in Y plane " <<
" preshower clusters " ;
216 if(e1+e2 > 1.0
e-10) {
221 if (condP1 == 1 && condP2 == 1) {
223 }
else if (condP1 == 1 && condP2 == 0) {
224 e2 = e1 * (
aEta_[ieta] +
bEta_[ieta] *it_super->energy());
226 }
else if (condP1 == 0 && condP2 == 1) {
228 e1 = e2 / (
aEta_[ieta] +
bEta_[ieta] *it_super->energy());
230 }
else if (condP1 == 0 && condP2 == 0) {
236 float E = it_super->energy() + deltaE;
238 LogTrace(
"EcalClusters") <<
" Creating corrected SC ";
242 else if (condP1 == 1 && condP2 == 0) sc.setPreshowerPlanesStatus(1);
243 else if (condP1 == 0 && condP2 == 1) sc.setPreshowerPlanesStatus(2);
244 else if (condP1 == 0 && condP2 == 0) sc.setPreshowerPlanesStatus(3);
247 new_SC.push_back(sc);
248 LogTrace(
"EcalClusters") <<
" SuperClusters energies: new E = " << sc.energy() <<
" vs. old E =" << it_super->energy();
253 clusters_p1->assign(clusters1.begin(), clusters1.end());
254 clusters_p2->assign(clusters2.begin(), clusters2.end());
258 LogTrace(
"EcalClusters") <<
"Preshower clusters added to the event" ;
261 superclusters_p->assign(new_SC.begin(), new_SC.end());
263 LogTrace(
"EcalClusters") <<
"Corrected SClusters added to the event" ;
const double Z[kNumberCalorimeter]
void push_back(Ptr< T > const &iPtr)
const self & getMap() const
std::string preshClusterCollectionY_
Sin< T >::type sin(const T &t)
std::vector< EcalRecHit >::const_iterator const_iterator
PreshowerClusterAlgo * presh_algo
reco::PreshowerCluster makeOneCluster(ESDetId strip, HitsID *used_strips, RecHitsMap *rechits_map, const CaloSubdetectorGeometry *&geometry_p, CaloSubdetectorTopology *&topology_p)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::ESHandle< ESChannelStatus > esChannelStatus_
void setBCRef(const CaloClusterPtr &r)
DetIds of component RecHits – now inherited from CaloCluster.
const_iterator find(uint32_t rawId) const
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
edm::InputTag endcapSClusterProducer_
double energy() const
cluster energy
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag preshHitProducer_
const_iterator end() const
std::string preshClusterCollectionX_
void setPreshowerPlanesStatus(const uint32_t &status)
void set(const edm::EventSetup &es)
T const * product() const
std::vector< Item >::const_iterator const_iterator
ESHandle< TrackerGeometry > geometry
std::string assocSClusterCollection_
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
const_iterator begin() const