CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
fwrapper Namespace Reference

Functions

void transfer_cluster_transfer (const double *p, const int &npart, const JetDefinition &jet_def, const double &ptmin, double *f77jets, int &njets, int *whichjet, const double &ghost_maxrap=0.0, const int &nrepeat=0, const double &ghost_area=0.0)
 
void transfer_input_particles (const double *p, const int &npart)
 helper routine to transfer fortran input particles into More...
 
void transfer_jets (double *f77jets, int &njets)
 helper routine to help transfer jets -> f77jets[4*ijet+0..3] More...
 

Variables

unique_ptr< ClusterSequence > cs
 
vector< PseudoJet > input_particles
 
JetDefinition jet_def
 
vector< PseudoJet > jets
 
unique_ptr< JetDefinition::Plugin > plugin
 

Detailed Description

a namespace for the fortran-wrapper which contains commonly-used structures and means to transfer fortran <-> C++

Function Documentation

void fwrapper::transfer_cluster_transfer ( const double *  p,
const int &  npart,
const JetDefinition &  jet_def,
const double &  ptmin,
double *  f77jets,
int &  njets,
int *  whichjet,
const double &  ghost_maxrap = 0.0,
const int &  nrepeat = 0,
const double &  ghost_area = 0.0 
)

helper routine packaging the transfers, the clustering and the extraction of the jets

Definition at line 81 of file fastjetfortran_madfks.cc.

References cs, cuy::ii, input_particles, jet_def, jets, GetRecoTauVFromDQM_MC_cff::kk, HLT_FULL_cff::njets, npart, transfer_input_particles(), and transfer_jets().

Referenced by fastjetppgenkt_().

90  {
91  // transfer p[4*ipart+0..3] -> input_particles[i]
93 
94  // perform the clustering
95  if (ghost_maxrap == 0.0) {
96  // cluster without areas
97  cs = std::make_unique<ClusterSequence>(input_particles, jet_def);
98  } else {
99  // cluster with areas
100  GhostedAreaSpec area_spec(ghost_maxrap, nrepeat, ghost_area);
101  AreaDefinition area_def(active_area, area_spec);
102  cs = std::make_unique<ClusterSequenceArea>(input_particles, jet_def, area_def);
103  }
104  // extract jets (pt-ordered)
105  jets = sorted_by_pt(cs->inclusive_jets(ptmin));
106 
107  // transfer jets -> f77jets[4*ijet+0..3]
108  transfer_jets(f77jets, njets);
109 
110  // Determine which parton/particle ended-up in which jet
111  // set all jet entrie to zero first
112  for (int ii = 0; ii < npart; ++ii)
113  whichjet[ii] = 0;
114 
115  // Loop over jets and find constituents
116  for (int kk = 0; kk < njets; ++kk) {
117  vector<PseudoJet> constit = cs->constituents(jets[kk]);
118  for (unsigned int ll = 0; ll < constit.size(); ++ll)
119  whichjet[constit[ll].user_index()] = kk + 1;
120  }
121  }
JetDefinition jet_def
unique_ptr< ClusterSequence > cs
double npart
Definition: HydjetWrapper.h:46
int ii
Definition: cuy.py:589
void transfer_input_particles(const double *p, const int &npart)
helper routine to transfer fortran input particles into
vector< PseudoJet > jets
vector< PseudoJet > input_particles
void transfer_jets(double *f77jets, int &njets)
helper routine to help transfer jets -&gt; f77jets[4*ijet+0..3]
double ptmin
Definition: HydjetWrapper.h:84
void fwrapper::transfer_input_particles ( const double *  p,
const int &  npart 
)

helper routine to transfer fortran input particles into

Definition at line 50 of file fastjetfortran_madfks.cc.

References mps_fire::i, input_particles, dqmiolumiharvest::j, and npart.

Referenced by transfer_cluster_transfer().

50  {
51  input_particles.resize(0);
52  input_particles.reserve(npart);
53  for (int i = 0; i < npart; i++) {
54  valarray<double> mom(4); // mom[0..3]
55  for (int j = 0; j <= 3; j++) {
56  mom[j] = *(p++);
57  // RF-MZ: reorder the arguments because in madfks energy goes first; in fastjet last.
58  // mom[(j+3) % 4] = *(p++);
59  }
60  PseudoJet psjet(mom);
61  psjet.set_user_index(i);
62  input_particles.push_back(psjet);
63  }
64  }
double npart
Definition: HydjetWrapper.h:46
vector< PseudoJet > input_particles
void fwrapper::transfer_jets ( double *  f77jets,
int &  njets 
)

helper routine to help transfer jets -> f77jets[4*ijet+0..3]

Definition at line 67 of file fastjetfortran_madfks.cc.

References mps_fire::i, dqmiolumiharvest::j, jets, and HLT_FULL_cff::njets.

Referenced by transfer_cluster_transfer().

67  {
68  njets = jets.size();
69  for (int i = 0; i < njets; i++) {
70  for (int j = 0; j <= 3; j++) {
71  *f77jets = jets[i][j];
72  // RF-MZ: reorder the arguments because in madfks energy goes first; in fastjet last.
73  //*f77jets = jets[i][(j+3) % 4];
74  f77jets++;
75  }
76  }
77  }
vector< PseudoJet > jets

Variable Documentation

unique_ptr<ClusterSequence> fwrapper::cs

Definition at line 47 of file fastjetfortran_madfks.cc.

Referenced by PedestalTask::_dump(), RawTask::_process(), DigiTask::_process(), cond::DataProxyWrapperBase::addInfo(), HcalAmplifier::applyQIEdelay(), BeamSpotToCUDA::beginStream(), DigiTask::bookHistograms(), CSCGeometryBuilder::build(), CAHitNtupletGeneratorOnGPU::CAHitNtupletGeneratorOnGPU(), CmsShowCommonPopup::changeGeomColor(), CmsShowCommonPopup::changeSelectionColorSet(), CmsShowModelPopup::clicked(), XrdAdaptor::XrdStatisticsService::condorUpdate(), CMSEmStandardPhysicsEMZ::ConstructProcess(), CMSEmStandardPhysicsXS::ConstructProcess(), edmNew::copyDetSetRange(), HcalTimeSlewSim::delay(), edm::CosMuoGenProducer::endRunProduce(), CSCStripTopology::equationOfStrip(), fastjetarea_(), fastjetconstituents_(), fastjetdmerge_(), fastjetdmergemax_(), fastjetglobalrhoandsigma_(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), LHEJetFilter::filter(), EcalDeadCellBoundaryEnergyFilter::filter(), gen::Pythia6Hadronizer::finalizeEvent(), AnomalousECALVariables::isDeadEcalCluster(), GEMStripTopology::localError(), CSCRadialStripTopology::localError(), TkRadialStripTopology::localError(), GEMStripTopology::measurementError(), CSCRadialStripTopology::measurementError(), TkRadialStripTopology::measurementError(), cms::cuda::numberOfDevices(), l1t::ClusterShapes::operator+(), HBHEPhase1Reconstructor::processData(), L1TrackFastJetProducer::produce(), L1FastTrackingJetProducer::produce(), edm::DataFrameContainer::push_back(), HFPreRecAlgo::reconstruct(), HcalSimpleRecAlgoImpl::removePileup(), SubjetFilterAlgorithm::run(), edm::DataFrameContainer::set_back(), cscdqm::Configuration::setChamberCounterValue(), Model::setCocoaStatus(), HBHENegativeFlagSetter::setPulseShapeFlags(), gen::ExhumeHadronizer::statistics(), gen::Pythia6Hadronizer::statistics(), TestCUDAAnalyzerGPU::TestCUDAAnalyzerGPU(), TestCUDAProducerGPUEW::TestCUDAProducerGPUEW(), TestCUDAProducerGPUEWTask::TestCUDAProducerGPUEWTask(), transfer_cluster_transfer(), L1RCTProducer::updateFedVector(), and CAHitNtupletGeneratorOnGPU::~CAHitNtupletGeneratorOnGPU().

vector<PseudoJet> fwrapper::input_particles

Definition at line 44 of file fastjetfortran_madfks.cc.

Referenced by transfer_cluster_transfer(), and transfer_input_particles().

JetDefinition fwrapper::jet_def
vector<PseudoJet> fwrapper::jets

Definition at line 44 of file fastjetfortran_madfks.cc.

Referenced by TtFullHadKinFitter::addKinFitInfo(), TtSemiLepKinFitter::addKinFitInfo(), PartonJetCorrectionExample::analyze(), FlavorJetCorrectionExample::analyze(), CaloMCTruthTreeProducer::analyze(), PFMCTruthTreeProducer::analyze(), myFastSimVal::analyze(), PatZjetsJetAnalyzer::analyze(), JetCorExample< Jet >::analyze(), JetPlotsExample< Jet >::analyze(), JetAnaPythia< Jet >::analyze(), QcdHighPtDQM::analyze(), NoBPTXMonitor::analyze(), PatBTagAnalyzer::analyze(), PatTopSelectionAnalyzer::analyze(), JetResolutionDemo::analyze(), PatBasicAnalyzer::analyze(), METplusTrackMonitor::analyze(), JetCorrectorOnTheFly< Jet >::analyze(), TkAlCaRecoMonitor::analyze(), l1t::L1TStage2CaloAnalyzer::analyze(), METMonitor::analyze(), ObjMonitor::analyze(), PhotonMonitor::analyze(), DQMHcalDiJetsAlCaReco::analyze(), ResolutionCreator::analyze(), RazorMonitor::analyze(), TopMonitor::analyze(), HTMonitor::analyze(), PatJetAnalyzer::analyze(), cms::ProducerAnalyzer::analyze(), l1t::GtInputDump::analyze(), HLTInclusiveVBFSource::analyze(), B2GSingleLeptonHLTValidation::analyze(), B2GHadronicHLTValidation::analyze(), TTbar_GenJetAnalyzer::analyze(), SusyDQM< Mu, Ele, Jet, Met >::analyze(), l1t::L1TGlobalAnalyzer::analyze(), l1t::GtRecordDump::analyze(), CastorMonitorModule::analyze(), SMPDQM::analyze(), IsolatedTracksNxN::analyze(), FFTJetCorrectionProducer::applyCorrections(), GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts(), TtFullLepHypKinSolution::buildHypo(), TtSemiLepHypGenMatch::buildHypo(), TtSemiLepHypGeom::buildHypo(), TtSemiLepHypMaxSumPtWMass::buildHypo(), TtSemiLepHypMVADisc::buildHypo(), TtSemiLepHypWMassMaxSumPt::buildHypo(), TtSemiLepHypWMassDeltaTopMass::buildHypo(), TtFullLepHypGenMatch::buildHypo(), TtFullHadHypGenMatch::buildHypo(), TtSemiLepHypothesis::buildHypo(), Phase1L1TJetProducer::buildJetsFromSeeds(), Phase1L1TJetProducer::buildJetsFromSeedsWithPUSubtraction(), HiFJGridEmptyAreaCalculator::calculateAreaFractionOfJets(), PrimaryVertexAssignment::chargedHadronVertex(), AlignmentGlobalTrackSelector::checkIsolation(), AlignmentGlobalTrackSelector::checkJetCount(), Rivet::HiggsTemplateCrossSections::classifyEvent(), L1TStage2CaloLayer2Comp::compareJets(), RazorComputer::compute(), TtSemiLepKinFitProducer< LeptonCollection >::doBTagging(), HLTTauRefProducer::doJets(), l1t::GtRecordDump::dumpTestVectors(), fastjetarea_(), fastjetconstituents_(), TopSingleLepton_miniAOD::MonitorEnsemble::fill(), SingleTopTChannelLepton_miniAOD::MonitorEnsemble::fill(), TopSingleLepton::MonitorEnsemble::fill(), TopDiLeptonOffline::MonitorEnsemble::fill(), SingleTopTChannelLepton::MonitorEnsemble::fill(), JetIDFailureFilter::filter(), TrackingFailureFilter::filter(), LHEJetFilter::filter(), HLTRHemisphere::filter(), HLTPPSJetComparisonFilter::filter(), pat::PATMHTProducer::getJets(), HLTJetPairDzMatchFilter< T >::hltFilter(), HLTJetTimingFilter< T >::hltFilter(), HLTAlphaTFilter< T >::hltFilter(), HLTMinDPhiMETFilter::hltFilter(), HLTFiltCand::hltFilter(), HLTJetSortedVBFFilter< T >::hltFilter(), HLTJetHbbFilter< T >::hltFilter(), HLTTauRefProducer::HLTTauRefProducer(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), TtSemiLepJetCombMaxSumPtWMass::isValid(), TtSemiLepJetCombGeom::isValid(), TtSemiLepJetCombWMassMaxSumPt::isValid(), TtSemiLepJetCombWMassDeltaTopMass::isValid(), TtFullHadHypothesis::isValid(), TtFullLepHypothesis::isValid(), TtSemiLepHypothesis::isValid(), FFTJetProducer::iterateJetReconstruction(), MvaMEtUtilities::jetP4(), main(), IPProducerHelpers::FromJetAndCands::makeBaseVector(), HTXS::MakeTLVs(), TemplatedSecondaryVertexProducer< IPTI, VTX >::matchGroomedJets(), JetFlavourClustering::matchGroomedJets(), JetFlavourClustering::matchReclusteredJets(), TtDilepLRSignalSelObservables::operator()(), TtSemiLRJetCombObservables::operator()(), l1t::stage2::JetPacker::pack(), l1t::stage1::CentralJetPacker::pack(), l1t::stage1::ForwardJetPacker::pack(), egHLT::EgJetTagProbeCut< T >::pass(), egHLT::EgJetB2BCut< T >::pass(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), TtFullHadronicEvent::print(), TtSemiLepJetCombMaxSumPtWMass::produce(), TtSemiLepJetCombGeom::produce(), TtSemiLepJetCombWMassMaxSumPt::produce(), PseudoTopProducer::produce(), L1TCorrectedPFJetProducer::produce(), ECFAdder::produce(), TtSemiLepKinFitProducer< LeptonCollection >::produce(), TtSemiLepJetCombWMassDeltaTopMass::produce(), TtDilepEvtSolutionMaker::produce(), StEvtSolutionMaker::produce(), ParticleLevelProducer::produce(), TtFullHadSignalSelMVAComputer::produce(), HiSignalGenJetProducer::produce(), QGTagger::produce(), TtFullLepKinSolutionProducer::produce(), AnyJetToCaloJetProducer::produce(), HLTJetL1MatchProducer< T >::produce(), TtSemiLepJetCombMVAComputer::produce(), PileupJPTJetIdProducer::produce(), HLTJetL1TMatchProducer< T >::produce(), TtSemiLepHitFitProducer< LeptonCollection >::produce(), TtSemiLepSignalSelMVAComputer::produce(), TtSemiEvtSolutionMaker::produce(), PATPuppiJetSpecificProducer::produce(), TtHadEvtSolutionMaker::produce(), JetTracksAssociationToTrackRefs::produce(), PFJetsMaxInvMassModule::produce(), MVAJetPuIdProducer::produce(), L2TauPixelIsoTagProducer::produce(), TtFullHadKinFitProducer::produce(), reco::CorrectedJetProducer< T >::produce(), JVFJetIdProducer::produce(), cms::JetVertexAssociation::produce(), QjetsAdder::produce(), cms::JetCorrectionProducer< T >::produce(), HLTJetTimingProducer< T >::produce(), HiFJRhoProducer::produce(), HLTMhtProducer::produce(), NoPileUpPFMEtProducer::produce(), HLTHtMhtProducer::produce(), HLTMETCleanerUsingJetID::produce(), TtFullHadHypothesis::produce(), TtSemiLepHypothesis::produce(), pat::PATJetUpdater::produce(), DeepBoostedJetTagInfoProducer::produce(), JetEnergyShift::produce(), TtFullLepHypothesis::produce(), RecoTauGenericJetRegionProducer< JetType, CandType >::produce(), ShiftedPFCandidateProducerForPFNoPUMEt::produce(), ShiftedPFCandidateProducerForNoPileUpPFMEt::produce(), HLTTrackMETProducer::produce(), NjettinessAdder::produce(), PrimaryVertexSorter< ParticlesCollection >::produce(), NoPileUpPFMEtDataProducer::produce(), HLTJetCollectionsForBoostedLeptonPlusJets< jetType >::produce(), HiGenCleaner< T2 >::produce(), TestBXVectorRefProducer::produce(), GenJetFlavourTableProducer::produce(), GenJetTauTaggerProducer::produce(), cms::METSignificanceProducer::produce(), HiFJRhoFlowModulationProducer::produce(), TtJetPartonMatch< C >::produce(), JetPlusTrackAddonSeedProducer::produce(), l1t::FakeInputProducer::produce(), DeepDoubleXTagInfoProducer::produce(), HiL1Subtractor::produce(), PATObjectCrossLinker::produce(), NanoAODBaseCrossCleaner::produce(), PFRecoTauChargedHadronProducer::produce(), pat::PATJetProducer::produce(), FastPrimaryVertexWithWeightsProducer::produce(), JetConstituentSelector< T, C >::produce(), PixelJetPuId::produce(), L1TStage2Layer2Producer::produce(), l1t::BXVectorInputProducer::produce(), JetIdSelector< T >::produce(), l1t::GenToInputProducer::produce(), pat::JetCorrFactorsProducer::produce(), DeepFlavourTagInfoProducer::produce(), L1TStage1Layer2Producer::produce(), FastPrimaryVertexProducer::produce(), HLTJetsCleanedFromLeadingLeptons< JetType >::produce(), CaloJetMETcorrInputProducerT< T, Textractor >::produce(), PileupJetIdProducer::produce(), SoftLepton::produce(), JetCleanerForType1METT< T, Textractor >::produce(), PFJetMETcorrInputProducerT< T, Textractor >::produce(), BTagSFProducer::produce(), JetFlavourClustering::produce(), SmearedJetProducerT< T >::produce(), FastjetJetProducer::produceTrackJets(), QGTagger::putInEvent(), HFJetShowerShape::putInEvent(), HITRegionalPixelSeedGenerator::regions(), HLTL1TSeed::seedsL1TriggerObjectMaps(), transfer_cluster_transfer(), transfer_jets(), GctFormatTranslateMCLegacy::writeGctOutJetBlock(), VirtualJetProducer::writeJets(), and FFTJetProducer::writeJets().

unique_ptr<JetDefinition::Plugin> fwrapper::plugin