New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centrality reco modification for 2018 heavy ion run #24892
Changes from 4 commits
f5d3f4f
dcfd784
3067e92
7cb46bc
16baa76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,6 +213,8 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
if(produceHFtowers_ || produceETmidRap_){ | ||
creco->etHFtowerSumPlus_ = 0; | ||
creco->etHFtowerSumMinus_ = 0; | ||
creco->etHFtowerSumECutPlus_ = 0; | ||
creco->etHFtowerSumECutMinus_ = 0; | ||
creco->etMidRapiditySum_ = 0; | ||
|
||
Handle<CaloTowerCollection> towers; | ||
|
@@ -226,16 +228,20 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
if(produceHFtowers_){ | ||
if(isHF && eta > 0){ | ||
creco->etHFtowerSumPlus_ += tower.pt(); | ||
if(tower.energy() > 1.5) creco->etHFtowerSumECutPlus_ += tower.pt(); | ||
if(eta > hfEtaCut_) creco->etHFtruncatedPlus_ += tower.pt(); | ||
} | ||
if(isHF && eta < 0){ | ||
creco->etHFtowerSumMinus_ += tower.pt(); | ||
if(tower.energy() > 1.5) creco->etHFtowerSumECutMinus_ += tower.pt(); | ||
if(eta < -hfEtaCut_) creco->etHFtruncatedMinus_ += tower.pt(); | ||
} | ||
}else{ | ||
if(reuseAny_){ | ||
creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus(); | ||
creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus(); | ||
creco->etHFtowerSumECutMinus_ = inputCentrality->EtHFtowerSumECutMinus(); | ||
creco->etHFtowerSumECutPlus_ = inputCentrality->EtHFtowerSumECutPlus(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please indent consistently |
||
creco->etHFtruncatedMinus_ = inputCentrality->EtHFtruncatedMinus(); | ||
creco->etHFtruncatedPlus_ = inputCentrality->EtHFtruncatedPlus(); | ||
} | ||
|
@@ -248,6 +254,8 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
if(reuseAny_){ | ||
creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus(); | ||
creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus(); | ||
creco->etHFtowerSumECutMinus_ = inputCentrality->EtHFtowerSumECutMinus(); | ||
creco->etHFtowerSumECutPlus_ = inputCentrality->EtHFtowerSumECutPlus(); | ||
creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum(); | ||
} | ||
} | ||
|
@@ -295,6 +303,8 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
iEvent.getByToken(srcPixelhits_,rchts); | ||
rechits = rchts.product(); | ||
int nPixel =0 ; | ||
int nPixel_plus =0 ; | ||
int nPixel_minus =0 ; | ||
for (SiPixelRecHitCollection::const_iterator it = rechits->begin(); it!=rechits->end();it++) | ||
{ | ||
SiPixelRecHitCollection::DetSet hits = *it; | ||
|
@@ -303,14 +313,16 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
const SiPixelRecHitCollection::DetSet recHitRange = *recHitMatch; | ||
for ( SiPixelRecHitCollection::DetSet::const_iterator recHitIterator = recHitRange.begin(); | ||
recHitIterator != recHitRange.end(); ++recHitIterator) { | ||
|
||
// add selection if needed, now all hits. | ||
if(doPixelCut_){ | ||
const SiPixelRecHit * recHit = &(*recHitIterator); | ||
const PixelGeomDetUnit* pixelLayer = dynamic_cast<const PixelGeomDetUnit*> (tGeo->idToDet(recHit->geographicalId())); | ||
GlobalPoint gpos = pixelLayer->toGlobal(recHit->localPosition()); | ||
math::XYZVector rechitPos(gpos.x(),gpos.y(),gpos.z()); | ||
double eta = rechitPos.eta(); | ||
double abeta = std::abs(rechitPos.eta()); | ||
int clusterSize = recHit->cluster()->size(); | ||
if(doPixelCut_){ | ||
if ( abeta < 0.5 && clusterSize < 1) continue; | ||
if ( abeta > 0.5 && abeta < 1 && clusterSize < 2) continue; | ||
if ( abeta > 1. && abeta < 1.5 && clusterSize < 3) continue; | ||
|
@@ -319,12 +331,19 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
if ( abeta > 2.5 && abeta < 5 && clusterSize < 9) continue; | ||
} | ||
nPixel++; | ||
if(eta>=0) nPixel_plus++; | ||
if(eta<0) nPixel_minus++; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation |
||
|
||
} | ||
} | ||
creco->pixelMultiplicity_ = nPixel; | ||
creco->pixelMultiplicityPlus_ = nPixel_plus; | ||
creco->pixelMultiplicityMinus_ = nPixel_minus; | ||
}else{ | ||
if(reuseAny_){ | ||
creco->pixelMultiplicity_ = inputCentrality->multiplicityPixel(); | ||
creco->pixelMultiplicityPlus_ = inputCentrality->multiplicityPixelPlus(); | ||
creco->pixelMultiplicityMinus_ = inputCentrality->multiplicityPixelMinus(); | ||
} | ||
} | ||
|
||
|
@@ -414,11 +433,24 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | |
Handle<TrackCollection> pixeltracks; | ||
iEvent.getByToken(srcPixelTracks_,pixeltracks); | ||
int nPixelTracks = pixeltracks->size(); | ||
int nPixelTracksPlus = 0; | ||
int nPixelTracksMinus = 0; | ||
|
||
for(unsigned int i = 0 ; i < pixeltracks->size(); ++i){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
const Track& track = (*pixeltracks)[i]; | ||
|
||
if(track.eta()<0) nPixelTracksMinus++; | ||
else nPixelTracksPlus++; | ||
} | ||
creco->nPixelTracks_ = nPixelTracks; | ||
creco->nPixelTracksPlus_ = nPixelTracksPlus; | ||
creco->nPixelTracksMinus_ = nPixelTracksMinus; | ||
} | ||
else{ | ||
if(reuseAny_){ | ||
creco->nPixelTracks_ = inputCentrality->NpixelTracks(); | ||
creco->nPixelTracksPlus_ = inputCentrality->NpixelTracksPlus(); | ||
creco->nPixelTracksMinus_ = inputCentrality->NpixelTracksMinus(); | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,8 @@ | |
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 | ||
for e in [pp_on_XeXe_2017, pp_on_AA_2018]: | ||
e.toModify(hiCentrality, | ||
producePixelTracks = False, | ||
producePixelTracks = True, | ||
srcPixelTracks = cms.InputTag("hiConformalPixelTracks"), | ||
srcTracks = cms.InputTag("generalTracks"), | ||
srcVertex = cms.InputTag("offlinePrimaryVertices") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please drop type specifications for all parameters which already exist. |
||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please drop the intermediate class versions.
the only new addition should be
<version ClassVersion="11" checksum="688182903"/>
and the change in the line above from 10 to 11 instead of 13.