69 virtual void endJob() ;
149 if(produceEcalhits_){
153 if(produceBasicClusters_){
158 if(producePixelhits_){
165 reuseAny_ = !produceHFhits_ || !produceHFtowers_ || !produceBasicClusters_ || !produceEcalhits_ || !
produceZDChits_;
171 produces<reco::Centrality>();
194 using namespace reco;
208 std::auto_ptr<Centrality> creco(
new Centrality());
214 creco->etHFhitSumPlus_ = 0;
215 creco->etHFhitSumMinus_ = 0;
219 for(
size_t ihit = 0; ihit<hits->size(); ++ ihit){
220 const HFRecHit & rechit = (*hits)[ ihit ];
221 if(rechit.
id().
ieta() > 0 )
222 creco->etHFhitSumPlus_ += rechit.
energy();
223 if(rechit.
id().
ieta() < 0)
224 creco->etHFhitSumMinus_ += rechit.
energy();
227 creco->etHFhitSumMinus_ = inputCentrality->EtHFhitSumMinus();
228 creco->etHFhitSumPlus_ = inputCentrality->EtHFhitSumPlus();
232 creco->etHFtowerSumPlus_ = 0;
233 creco->etHFtowerSumMinus_ = 0;
234 creco->etMidRapiditySum_ = 0;
240 for(
size_t i = 0;
i<towers->size(); ++
i){
246 creco->etHFtowerSumPlus_ += tower.
pt();
249 creco->etHFtowerSumMinus_ += tower.
pt();
252 creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus();
253 creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus();
257 }
else creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum();
260 creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus();
261 creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus();
262 creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum();
266 creco->etEESumPlus_ = 0;
267 creco->etEESumMinus_ = 0;
272 for(
size_t i = 0;
i<clusters->size(); ++
i){
274 double eta = cluster.eta();
275 double tg = cluster.position().rho()/cluster.position().r();
276 double et = cluster.energy()*tg;
278 creco->etEESumPlus_ += et;
280 creco->etEESumMinus_ += et;
284 for(
size_t i = 0;
i<clusters->size(); ++
i){
286 double tg = cluster.position().rho()/cluster.position().r();
287 double et = cluster.energy()*tg;
288 creco->etEBSum_ += et;
291 creco->etEESumMinus_ = inputCentrality->EtEESumMinus();
292 creco->etEESumPlus_ = inputCentrality->EtEESumPlus();
293 creco->etEBSum_ = inputCentrality->EtEBSum();
297 creco->pixelMultiplicity_ = 0;
310 recHitIterator != recHitRange.
end(); ++recHitIterator) {
317 double abeta = fabs(rechitPos.eta());
318 int clusterSize = recHit->cluster()->size();
319 if ( abeta < 0.5 && clusterSize < 1)
continue;
320 if ( abeta > 0.5 && abeta < 1 && clusterSize < 2)
continue;
321 if ( abeta > 1. && abeta < 1.5 && clusterSize < 3)
continue;
322 if ( abeta > 1.5 && abeta < 2. && clusterSize < 4)
continue;
323 if ( abeta > 2. && abeta < 2.5 && clusterSize < 6)
continue;
324 if ( abeta > 2.5 && abeta < 5 && clusterSize < 9)
continue;
329 creco->pixelMultiplicity_ = nPixel;
331 creco->pixelMultiplicity_ = inputCentrality->multiplicityPixel();
339 double trackCounter = 0;
340 double trackCounterEta = 0;
341 double trackCounterEtaPt = 0;
343 for(
unsigned int i = 0 ;
i < tracks->size(); ++
i){
344 const Track& track = (*tracks)[
i];
355 creco->trackMultiplicity_ = nTracks;
356 creco->ntracksPtCut_ = trackCounter;
357 creco->ntracksEtaCut_ = trackCounterEta;
358 creco->ntracksEtaPtCut_ = trackCounterEtaPt;
361 creco->trackMultiplicity_ = inputCentrality->Ntracks();
362 creco->ntracksPtCut_= inputCentrality->NtracksPtCut();
363 creco->ntracksEtaCut_= inputCentrality->NtracksEtaCut();
364 creco->ntracksEtaPtCut_= inputCentrality->NtracksEtaPtCut();
370 int nPixelTracks = pixeltracks->size();
371 creco->nPixelTracks_ = nPixelTracks;
374 creco->nPixelTracks_ = inputCentrality->NpixelTracks();
378 creco->zdcSumPlus_ = 0;
379 creco->zdcSumMinus_ = 0;
384 for(
size_t ihit = 0; ihit<hits->size(); ++ ihit){
385 const ZDCRecHit & rechit = (*hits)[ ihit ];
387 creco->zdcSumPlus_ += rechit.
energy();
389 creco->zdcSumMinus_ += rechit.
energy();
392 creco->zdcSumPlus_ = -9;
393 creco->zdcSumMinus_ = -9;
396 creco->zdcSumMinus_ = inputCentrality->zdcSumMinus();
397 creco->zdcSumPlus_ = inputCentrality->zdcSumPlus();
reco::TrackBase::TrackQuality trackQuality_
T getParameter(std::string const &) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin() const
edm::InputTag srcBasicClustersEB_
TrackQuality
track quality
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_iterator find(id_type i) const
const CaloGeometry * caloGeo_
double eta() const
pseudorapidity of momentum vector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual bool filter(edm::Event &, const edm::EventSetup &)
double pt() const
track transverse momentum
int ieta() const
get the cell ieta
const_iterator end() const
virtual const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool produceBasicClusters_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
static TrackQuality qualityByName(const std::string &name)
bool isHF(int etabin, int depth)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
T const * product() const
T const * product() const
bool quality(const TrackQuality) const
Track quality.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
const TrackerGeometry * trackGeo_
edm::InputTag srcZDChits_
HcalZDCDetId id() const
get the id
virtual float pt() const GCC11_FINAL
transverse momentum
edm::InputTag srcBasicClustersEE_
edm::InputTag srcPixelhits_
edm::InputTag srcPixelTracks_