190 std::auto_ptr<Centrality> creco(
new Centrality());
196 creco->etHFhitSumPlus_ = 0;
197 creco->etHFhitSumMinus_ = 0;
201 for(
size_t ihit = 0; ihit<hits->size(); ++ ihit){
202 const HFRecHit & rechit = (*hits)[ ihit ];
203 if(rechit.
id().
ieta() > 0 )
204 creco->etHFhitSumPlus_ += rechit.
energy();
205 if(rechit.
id().
ieta() < 0)
206 creco->etHFhitSumMinus_ += rechit.
energy();
210 creco->etHFhitSumMinus_ = inputCentrality->EtHFhitSumMinus();
211 creco->etHFhitSumPlus_ = inputCentrality->EtHFhitSumPlus();
216 creco->etHFtowerSumPlus_ = 0;
217 creco->etHFtowerSumMinus_ = 0;
218 creco->etMidRapiditySum_ = 0;
224 for(
size_t i = 0;
i<towers->size(); ++
i){
230 creco->etHFtowerSumPlus_ += tower.
pt();
231 if(eta >
hfEtaCut_) creco->etHFtruncatedPlus_ += tower.
pt();
234 creco->etHFtowerSumMinus_ += tower.
pt();
235 if(eta < -
hfEtaCut_) creco->etHFtruncatedMinus_ += tower.
pt();
239 creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus();
240 creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus();
241 creco->etHFtruncatedMinus_ = inputCentrality->EtHFtruncatedMinus();
242 creco->etHFtruncatedPlus_ = inputCentrality->EtHFtruncatedPlus();
247 }
else if(
reuseAny_) creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum();
251 creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus();
252 creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus();
253 creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum();
258 creco->etEESumPlus_ = 0;
259 creco->etEESumMinus_ = 0;
268 for(
unsigned int i = 0;
i < ebHits->size(); ++
i){
272 creco->etEBSum_ += et;
275 for(
unsigned int i = 0;
i < eeHits->size(); ++
i){
279 double eta = pos.
eta();
281 creco->etEESumPlus_ += et;
283 creco->etEESumMinus_ += et;
288 creco->etEESumMinus_ = inputCentrality->EtEESumMinus();
289 creco->etEESumPlus_ = inputCentrality->EtEESumPlus();
290 creco->etEBSum_ = inputCentrality->EtEBSum();
295 creco->pixelMultiplicity_ = 0;
308 recHitIterator != recHitRange.
end(); ++recHitIterator) {
315 double abeta = fabs(rechitPos.eta());
316 int clusterSize = recHit->cluster()->size();
317 if ( abeta < 0.5 && clusterSize < 1)
continue;
318 if ( abeta > 0.5 && abeta < 1 && clusterSize < 2)
continue;
319 if ( abeta > 1. && abeta < 1.5 && clusterSize < 3)
continue;
320 if ( abeta > 1.5 && abeta < 2. && clusterSize < 4)
continue;
321 if ( abeta > 2. && abeta < 2.5 && clusterSize < 6)
continue;
322 if ( abeta > 2.5 && abeta < 5 && clusterSize < 9)
continue;
327 creco->pixelMultiplicity_ = nPixel;
330 creco->pixelMultiplicity_ = inputCentrality->multiplicityPixel();
339 double vxError=-999.;
340 double vyError=-999.;
341 double vzError=-999.;
346 unsigned int daughter = 0;
349 for (
unsigned int i = 0 ;
i< recoVertices->size(); ++
i){
350 daughter = (*recoVertices)[
i].tracksSize();
351 if( daughter > (*recoVertices)[greatestvtx].tracksSize()) greatestvtx =
i;
354 if(recoVertices->size()>0){
355 vx = (*recoVertices)[greatestvtx].position().x();
356 vy = (*recoVertices)[greatestvtx].position().y();
357 vz = (*recoVertices)[greatestvtx].position().z();
358 vxError = (*recoVertices)[greatestvtx].xError();
359 vyError = (*recoVertices)[greatestvtx].yError();
360 vzError = (*recoVertices)[greatestvtx].zError();
369 double trackCounter = 0;
370 double trackCounterEta = 0;
371 double trackCounterEtaPt = 0;
373 for(
unsigned int i = 0 ;
i < tracks->size(); ++
i){
374 const Track& track = (*tracks)[
i];
384 double dz= track.
dz(v1);
386 double dxy= track.
dxy(v1);
388 if( track.
quality(
trackQuality_) && track.
pt()>0.4 && fabs(track.
eta())<2.4 && track.
ptError()/track.
pt()<0.1 && fabs(dz/dzsigma)<3.0 && fabs(dxy/dxysigma)<3.0) nTracks++;
392 creco->trackMultiplicity_ = nTracks;
393 creco->ntracksPtCut_ = trackCounter;
394 creco->ntracksEtaCut_ = trackCounterEta;
395 creco->ntracksEtaPtCut_ = trackCounterEtaPt;
399 creco->trackMultiplicity_ = inputCentrality->Ntracks();
400 creco->ntracksPtCut_= inputCentrality->NtracksPtCut();
401 creco->ntracksEtaCut_= inputCentrality->NtracksEtaCut();
402 creco->ntracksEtaPtCut_= inputCentrality->NtracksEtaPtCut();
409 int nPixelTracks = pixeltracks->size();
410 creco->nPixelTracks_ = nPixelTracks;
414 creco->nPixelTracks_ = inputCentrality->NpixelTracks();
419 creco->zdcSumPlus_ = 0;
420 creco->zdcSumMinus_ = 0;
425 for(
size_t ihit = 0; ihit<hits->size(); ++ ihit){
426 const ZDCRecHit & rechit = (*hits)[ ihit ];
431 creco->zdcSumPlus_ += rechit.
energy();
438 creco->zdcSumMinus_ += rechit.
energy();
443 creco->zdcSumPlus_ = -9;
444 creco->zdcSumMinus_ = -9;
448 creco->zdcSumMinus_ = inputCentrality->zdcSumMinus();
449 creco->zdcSumPlus_ = inputCentrality->zdcSumPlus();
reco::TrackBase::TrackQuality trackQuality_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin() const
double dxyError() const
error on dxy
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Sin< T >::type sin(const T &t)
int zside() const
get the z-side of the cell (1/-1)
const_iterator find(id_type i) const
virtual double eta() const
momentum pseudorapidity
Geom::Theta< T > theta() const
double eta() const
pseudorapidity of momentum vector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
int ieta() const
get the cell ieta
const_iterator end() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
float lowGainEnergy() const
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
bool isHF(int etabin, int depth)
DetId id() const
get the id
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual double pt() const
transverse momentum
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
edm::ESHandle< CaloGeometry > cGeo
bool quality(const TrackQuality) const
Track quality.
edm::InputTag srcZDChits_
HcalZDCDetId id() const
get the id
edm::ESHandle< TrackerGeometry > tGeo
HcalDetId id() const
get the id
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
edm::InputTag srcPixelhits_
edm::InputTag srcPixelTracks_