193 using namespace reco;
207 std::auto_ptr<Centrality> creco(
new Centrality());
213 creco->etHFhitSumPlus_ = 0;
214 creco->etHFhitSumMinus_ = 0;
218 for(
size_t ihit = 0; ihit<hits->size(); ++ ihit){
219 const HFRecHit & rechit = (*hits)[ ihit ];
220 if(rechit.
id().
ieta() > 0 )
221 creco->etHFhitSumPlus_ += rechit.
energy();
222 if(rechit.
id().
ieta() < 0)
223 creco->etHFhitSumMinus_ += rechit.
energy();
226 creco->etHFhitSumMinus_ = inputCentrality->EtHFhitSumMinus();
227 creco->etHFhitSumPlus_ = inputCentrality->EtHFhitSumPlus();
231 creco->etHFtowerSumPlus_ = 0;
232 creco->etHFtowerSumMinus_ = 0;
233 creco->etMidRapiditySum_ = 0;
239 for(
size_t i = 0;
i<towers->size(); ++
i){
245 creco->etHFtowerSumPlus_ += tower.
pt();
248 creco->etHFtowerSumMinus_ += tower.
pt();
251 creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus();
252 creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus();
256 }
else creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum();
259 creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus();
260 creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus();
261 creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum();
265 creco->etEESumPlus_ = 0;
266 creco->etEESumMinus_ = 0;
271 for(
size_t i = 0;
i<clusters->size(); ++
i){
273 double eta = cluster.eta();
274 double tg = cluster.position().rho()/cluster.position().r();
275 double et = cluster.energy()*tg;
277 creco->etEESumPlus_ += et;
279 creco->etEESumMinus_ += et;
283 for(
size_t i = 0;
i<clusters->size(); ++
i){
285 double tg = cluster.position().rho()/cluster.position().r();
286 double et = cluster.energy()*tg;
287 creco->etEBSum_ += et;
290 creco->etEESumMinus_ = inputCentrality->EtEESumMinus();
291 creco->etEESumPlus_ = inputCentrality->EtEESumPlus();
292 creco->etEBSum_ = inputCentrality->EtEBSum();
296 creco->pixelMultiplicity_ = 0;
309 recHitIterator != recHitRange.
end(); ++recHitIterator) {
316 double abeta = fabs(rechitPos.eta());
317 int clusterSize = recHit->
cluster()->size();
318 if ( abeta < 0.5 && clusterSize < 1)
continue;
319 if ( abeta > 0.5 && abeta < 1 && clusterSize < 2)
continue;
320 if ( abeta > 1. && abeta < 1.5 && clusterSize < 3)
continue;
321 if ( abeta > 1.5 && abeta < 2. && clusterSize < 4)
continue;
322 if ( abeta > 2. && abeta < 2.5 && clusterSize < 6)
continue;
323 if ( abeta > 2.5 && abeta < 5 && clusterSize < 9)
continue;
328 creco->pixelMultiplicity_ = nPixel;
330 creco->pixelMultiplicity_ = inputCentrality->multiplicityPixel();
338 double trackCounter = 0;
339 double trackCounterEta = 0;
340 double trackCounterEtaPt = 0;
342 for(
unsigned int i = 0 ;
i < tracks->size(); ++
i){
343 const Track& track = (*tracks)[
i];
354 creco->trackMultiplicity_ = nTracks;
355 creco->ntracksPtCut_ = trackCounter;
356 creco->ntracksEtaCut_ = trackCounterEta;
357 creco->ntracksEtaPtCut_ = trackCounterEtaPt;
360 creco->trackMultiplicity_ = inputCentrality->Ntracks();
361 creco->ntracksPtCut_= inputCentrality->NtracksPtCut();
362 creco->ntracksEtaCut_= inputCentrality->NtracksEtaCut();
363 creco->ntracksEtaPtCut_= inputCentrality->NtracksEtaPtCut();
369 int nPixelTracks = pixeltracks->size();
370 creco->nPixelTracks_ = nPixelTracks;
373 creco->nPixelTracks_ = inputCentrality->NpixelTracks();
377 creco->zdcSumPlus_ = 0;
378 creco->zdcSumMinus_ = 0;
383 for(
size_t ihit = 0; ihit<hits->size(); ++ ihit){
384 const ZDCRecHit & rechit = (*hits)[ ihit ];
386 creco->zdcSumPlus_ += rechit.
energy();
388 creco->zdcSumMinus_ += rechit.
energy();
391 creco->zdcSumPlus_ = -9;
392 creco->zdcSumMinus_ = -9;
395 creco->zdcSumMinus_ = inputCentrality->zdcSumMinus();
396 creco->zdcSumPlus_ = inputCentrality->zdcSumPlus();
reco::TrackBase::TrackQuality trackQuality_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
edm::InputTag srcBasicClustersEB_
virtual float pt() const
transverse momentum
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
int zside() const
get the z-side of the cell (1/-1)
const CaloGeometry * caloGeo_
double eta() const
pseudorapidity of momentum vector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual float eta() const
momentum pseudorapidity
double pt() const
track transverse momentum
int ieta() const
get the cell ieta
virtual const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool produceBasicClusters_
bool isHF(int etabin, int depth)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
ClusterRef cluster() const
T const * product() const
T const * product() const
bool quality(const TrackQuality) const
Track quality.
const_iterator find(id_type i, bool update=false) const
const TrackerGeometry * trackGeo_
edm::InputTag srcZDChits_
HcalZDCDetId id() const
get the id
DetId geographicalId() const
virtual LocalPoint localPosition() const
edm::InputTag srcBasicClustersEE_
edm::InputTag srcPixelhits_
const_iterator begin(bool update=false) const
edm::InputTag srcPixelTracks_