97 topology_p =
new EcalPreshowerTopology(geoHandle);
108 LogTrace(
"EcalClusters") <<
"PreshowerPhiClusterProducerInfo: ### Total # of preshower RecHits: "<< rechits->
size();
111 std::map<DetId, EcalRecHit> rechits_map;
113 for (it = rechits->
begin(); it != rechits->
end(); it++) {
115 if (it->recoFlag()==1 || it->recoFlag()==14 || (it->recoFlag()<=10 && it->recoFlag()>=5))
continue;
117 rechits_map.insert(std::make_pair(it->id(), *it));
120 std::set<DetId> used_strips;
122 LogTrace(
"EcalClusters") <<
"PreshowerPhiClusterProducerInfo: ### rechits_map of size " << rechits_map.size() <<
" was created!";
128 reco::SuperClusterCollection::const_iterator it_super;
130 for (it_super=SClusts->begin(); it_super!=SClusts->end(); ++it_super) {
138 LogTrace(
"EcalClusters")<<
" superE = " << it_super->energy() <<
" superETA = " << it_super->eta() <<
" superPHI = " << it_super->phi() ;
151 for ( ; bc_iter !=it_super->clustersEnd(); ++bc_iter) {
153 refPhi = (*bc_iter)->phi();
168 for (bc_iter = it_super->clustersBegin() ; bc_iter !=it_super->clustersEnd(); ++bc_iter) {
172 double X = (*bc_iter)->x();
173 double Y = (*bc_iter)->y();
174 double Z = (*bc_iter)->z();
186 if (status_p1->getStatusCode() == 1) condP1 = 0;
187 if (status_p2->getStatusCode() == 1) condP2 = 0;
188 }
else if (strip1 ==
ESDetId(0)) {
190 }
else if (strip2 ==
ESDetId(0)) {
199 clusters1.push_back(cl1);
205 clusters2.push_back(cl2);
214 LogTrace(
"EcalClusters") <<
" For SC #" << isc-1 <<
", containing "
215 << it_super->clustersSize()
216 <<
" basic clusters, PreshowerPhiClusterAlgo made "
217 << clusters1.size() <<
" in X plane and "
219 <<
" in Y plane " <<
" preshower clusters " ;
222 if(e1+e2 > 1.0
e-10) {
227 if (condP1 == 1 && condP2 == 1) {
229 }
else if (condP1 == 1 && condP2 == 0) {
231 }
else if (condP1 == 0 && condP2 == 1) {
233 }
else if (condP1 == 0 && condP2 == 0) {
239 float E = it_super->energy() + deltaE;
241 LogTrace(
"EcalClusters") <<
" Creating corrected SC ";
245 sc.setPreshowerEnergyPlane2(e2*mip_);
246 if (condP1 == 1 && condP2 == 1) sc.setPreshowerPlanesStatus(0);
247 else if (condP1 == 1 && condP2 == 0) sc.setPreshowerPlanesStatus(1);
248 else if (condP1 == 0 && condP2 == 1) sc.setPreshowerPlanesStatus(2);
249 else if (condP1 == 0 && condP2 == 0) sc.setPreshowerPlanesStatus(3);
251 new_SC.push_back(sc);
256 clusters_p1->assign(clusters1.begin(), clusters1.end());
257 clusters_p2->assign(clusters2.begin(), clusters2.end());
261 LogTrace(
"EcalClusters") <<
"Preshower clusters added to the event" ;
264 superclusters_p->assign(new_SC.begin(), new_SC.end());
266 LogTrace(
"EcalClusters") <<
"Corrected SClusters added to the event" ;
268 if (topology_p)
delete topology_p;
const double Z[kNumberCalorimeter]
edm::InputTag preshHitProducer_
PreshowerPhiClusterAlgo * presh_algo
void push_back(Ptr< T > const &iPtr)
const self & getMap() const
reco::PreshowerCluster makeOneCluster(ESDetId strip, HitsID *used_strips, RecHitsMap *rechits_map, const CaloSubdetectorGeometry *&geometry_p, CaloSubdetectorTopology *&topology_p, double deltaEta, double minDeltaPhi, double maxDeltaPhi)
std::vector< EcalRecHit >::const_iterator const_iterator
edm::InputTag endcapSClusterProducer_
void set(const edm::EventSetup &es)
std::string preshClusterCollectionX_
std::string assocSClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
double energy() const
cluster energy
edm::ESHandle< ESChannelStatus > esChannelStatus_
float esPhiClusterDeltaEta_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::string preshClusterCollectionY_
const_iterator end() const
double deltaPhi(double phi1, double phi2)
T const * product() const
std::vector< Item >::const_iterator const_iterator
ESHandle< TrackerGeometry > geometry
void setPreshowerEnergyPlane1(double preshowerEnergy1)
*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
float esPhiClusterDeltaPhi_