128 << rechits->
size() << std::endl;
131 std::map<DetId, EcalRecHit> rechits_map;
133 for (it = rechits->
begin(); it != rechits->
end(); it++) {
135 if (it->recoFlag()==14 || (it->recoFlag()<=10 && it->recoFlag()>=5))
continue;
137 rechits_map.insert(std::make_pair(it->id(), *it));
140 std::set<DetId> used_strips;
144 << rechits_map.size() <<
" was created!" << std::endl;
151 reco::SuperClusterCollection::const_iterator it_super;
153 for ( it_super=SClusts->begin(); it_super!=SClusts->end(); it_super++ ) {
161 <<
" superPHI = " << it_super->phi() << std::endl;
168 for ( ; 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))
196 std::cout <<
" Intersected preshower strips are: " << std::endl;
199 }
else if ( strip1 ==
ESDetId(0) )
200 std::cout <<
" No intersected strip in plane 1 " << std::endl;
201 else if ( strip2 ==
ESDetId(0) )
202 std::cout <<
" No intersected strip in plane 2 " << std::endl;
210 clusters1.push_back(cl1);
217 clusters2.push_back(cl2);
228 <<
" basic clusters, PreshowerClusterAlgo made "
229 << clusters1.size() <<
" in X plane and " << clusters2.size()
230 <<
" in Y plane " <<
" preshower clusters " << std::endl;
233 if(e1+e2 > 1.0e-10) {
238 if (condP1 == 1 && condP2 == 1) deltaE =
gamma0_*(e1 +
alpha0_*e2);
239 else if (condP1 == 1 && condP2 == 0) deltaE =
gamma1_*(e1 +
alpha1_*e2);
240 else if (condP1 == 0 && condP2 == 1) deltaE =
gamma2_*(e1 +
alpha2_*e2);
241 else if (condP1 == 0 && condP2 == 0) deltaE =
gamma3_*(e1 +
alpha3_*e2);
245 float E = it_super->energy() + deltaE;
250 else if (condP1 == 1 && condP2 == 0) sc.setPreshowerPlanesStatus(1);
251 else if (condP1 == 0 && condP2 == 1) sc.setPreshowerPlanesStatus(2);
252 else if (condP1 == 0 && condP2 == 0) sc.setPreshowerPlanesStatus(3);
255 new_SC.push_back(sc);
257 <<
" vs. old E =" << it_super->energy() << std::endl;
262 clusters_p1->assign(clusters1.begin(), clusters1.end());
263 clusters_p2->assign(clusters2.begin(), clusters2.end());
270 superclusters_p->assign(new_SC.begin(), new_SC.end());
const double Z[kNumberCalorimeter]
PreshowerClusterAlgo::DebugLevel debugL
void push_back(Ptr< T > const &iPtr)
const self & getMap() const
std::string preshClusterCollectionY_
Sin< T >::type sin(const T &t)
std::vector< T >::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