test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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

auto_ptr< ClusterSequence > cs
 
vector< PseudoJet > input_particles
 
JetDefinition jet_def
 
vector< PseudoJet > jets
 
auto_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 79 of file fastjetfortran_madfks.cc.

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

Referenced by fastjetppgenkt_().

84  {
85 
86  // transfer p[4*ipart+0..3] -> input_particles[i]
88 
89  // perform the clustering
90  if ( ghost_maxrap == 0.0 ) {
91  // cluster without areas
92  cs.reset(new ClusterSequence(input_particles,jet_def));
93  } else {
94  // cluster with areas
95  GhostedAreaSpec area_spec(ghost_maxrap,nrepeat,ghost_area);
96  AreaDefinition area_def(active_area, area_spec);
97  cs.reset(new ClusterSequenceArea(input_particles,jet_def,area_def));
98  }
99  // extract jets (pt-ordered)
100  jets = sorted_by_pt(cs->inclusive_jets(ptmin));
101 
102  // transfer jets -> f77jets[4*ijet+0..3]
103  transfer_jets(f77jets, njets);
104 
105  // Determine which parton/particle ended-up in which jet
106  // set all jet entrie to zero first
107  for(int ii=0; ii<npart; ++ii) whichjet[ii]=0;
108 
109  // Loop over jets and find constituents
110  for (int kk=0; kk<njets; ++kk) {
111  vector<PseudoJet> constit = cs->constituents(jets[kk]);
112  for(unsigned int ll=0; ll<constit.size(); ++ll)
113  whichjet[constit[ll].user_index()]=kk+1;
114  }
115 
116  }
auto_ptr< ClusterSequence > cs
JetDefinition jet_def
double npart
Definition: HydjetWrapper.h:49
int ii
Definition: cuy.py:588
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:90
void fwrapper::transfer_input_particles ( const double *  p,
const int &  npart 
)

helper routine to transfer fortran input particles into

Definition at line 48 of file fastjetfortran_madfks.cc.

References i, input_particles, j, and npart.

Referenced by transfer_cluster_transfer().

48  {
49  input_particles.resize(0);
50  input_particles.reserve(npart);
51  for (int i=0; i<npart; i++) {
52  valarray<double> mom(4); // mom[0..3]
53  for (int j=0;j<=3; j++) {
54  mom[j] = *(p++);
55  // RF-MZ: reorder the arguments because in madfks energy goes first; in fastjet last.
56  // mom[(j+3) % 4] = *(p++);
57  }
58  PseudoJet psjet(mom);
59  psjet.set_user_index(i);
60  input_particles.push_back(psjet);
61  }
62  }
int i
Definition: DBlmapReader.cc:9
double npart
Definition: HydjetWrapper.h:49
int j
Definition: DBlmapReader.cc:9
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 65 of file fastjetfortran_madfks.cc.

References i, j, jets, and HLT_25ns10e33_v2_cff::njets.

Referenced by transfer_cluster_transfer().

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

Variable Documentation

auto_ptr<ClusterSequence> fwrapper::cs
vector<PseudoJet> fwrapper::input_particles

Definition at line 42 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 42 of file fastjetfortran_madfks.cc.

Referenced by TtFullHadKinFitter::addKinFitInfo(), TtSemiLepKinFitter::addKinFitInfo(), FlavorJetCorrectionExample::analyze(), PartonJetCorrectionExample::analyze(), PFMCTruthTreeProducer::analyze(), CaloMCTruthTreeProducer::analyze(), myFastSimVal::analyze(), JetPlotsExample< Jet >::analyze(), JetCorExample< Jet >::analyze(), JetAnaPythia< Jet >::analyze(), PatZjetsJetAnalyzer::analyze(), TopJetAnalyzer::analyze(), QcdHighPtDQM::analyze(), PatTopSelectionAnalyzer::analyze(), JetResolutionDemo::analyze(), PatBasicAnalyzer::analyze(), PatBTagAnalyzer::analyze(), TtFullHadSignalSelMVATrainer::analyze(), TtSemiLepJetCombMVATrainer::analyze(), JetCorrectorOnTheFly< Jet >::analyze(), TtSemiLepSignalSelMVATrainer::analyze(), TkAlCaRecoMonitor::analyze(), l1t::L1TStage2CaloAnalyzer::analyze(), DQMHcalDiJetsAlCaReco::analyze(), ResolutionCreator::analyze(), cms::ProducerAnalyzer::analyze(), PatJetAnalyzer::analyze(), HLTInclusiveVBFSource::analyze(), B2GSingleLeptonHLTValidation::analyze(), TopSingleLeptonHLTValidation::analyze(), B2GHadronicHLTValidation::analyze(), TopDiLeptonHLTValidation::analyze(), l1t::GtInputDump::analyze(), TTbar_GenJetAnalyzer::analyze(), SusyDQM< Mu, Ele, Jet, Met >::analyze(), l1t::L1TGlobalAnalyzer::analyze(), l1t::GtRecordDump::analyze(), CastorMonitorModule::analyze(), IsolatedTracksNxN::analyze(), MCEmbeddingValidationAnalyzer::analyze(), FFTJetCorrectionProducer::applyCorrections(), GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts(), TtFullLepHypKinSolution::buildHypo(), TtSemiLepHypWMassMaxSumPt::buildHypo(), TtFullHadHypGenMatch::buildHypo(), TtFullLepHypGenMatch::buildHypo(), TtSemiLepHypGenMatch::buildHypo(), TtSemiLepHypMaxSumPtWMass::buildHypo(), TtSemiLepHypMVADisc::buildHypo(), TtSemiLepHypWMassDeltaTopMass::buildHypo(), TtSemiLepHypGeom::buildHypo(), TtSemiLepHypothesis::buildHypo(), HiFJGridEmptyAreaCalculator::calculateAreaFractionOfJets(), PrimaryVertexAssignment::chargedHadronVertex(), AlignmentGlobalTrackSelector::checkIsolation(), AlignmentGlobalTrackSelector::checkJetCount(), RazorComputer::compute(), TtSemiLepKinFitProducer< LeptonCollection >::doBTagging(), HLTTauRefProducer::doJets(), l1t::GtRecordDump::dumpTestVectors(), fastjetarea_(), fastjetconstituents_(), SingleTopTChannelLepton_miniAOD::MonitorEnsemble::fill(), TopSingleLepton_miniAOD::MonitorEnsemble::fill(), HLTOfflineDQMTopSingleLepton::MonitorSingleLepton::fill(), HLTOfflineDQMTopDiLepton::MonitorDiLepton::fill(), TopSingleLepton::MonitorEnsemble::fill(), SingleTopTChannelLepton::MonitorEnsemble::fill(), TopDiLeptonOffline::MonitorEnsemble::fill(), AdHocNTupler::fill(), myFilter::filter(), JetIDFailureFilter::filter(), TrackingFailureFilter::filter(), HLTRHemisphere::filter(), EgammaProbeSelector::filter(), HeavyChHiggsToTauNuSkim::filter(), JetConstituentSelector< T, C >::filter(), pat::PATMHTProducer::getJets(), HLTJetPairDzMatchFilter< T >::hltFilter(), HLTAlphaTFilter< T >::hltFilter(), HLTMinDPhiMETFilter::hltFilter(), HLTFiltCand::hltFilter(), HLTJetSortedVBFFilter< T >::hltFilter(), HLTJetHbbFilter< T >::hltFilter(), HLTTauRefProducer::HLTTauRefProducer(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), TtSemiLepJetCombGeom::isValid(), TtFullHadHypothesis::isValid(), TtFullLepHypothesis::isValid(), TtSemiLepHypothesis::isValid(), FFTJetProducer::iterateJetReconstruction(), MvaMEtUtilities::jetP4(), main(), IPProducerHelpers::FromJetAndCands::makeBaseVector(), 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(), PseudoTopProducer::produce(), TtSemiLepJetCombMaxSumPtWMass::produce(), ECFAdder::produce(), TtSemiLepJetCombGeom::produce(), TtSemiLepJetCombWMassMaxSumPt::produce(), QGTagger::produce(), StEvtSolutionMaker::produce(), TtDilepEvtSolutionMaker::produce(), TtSemiLepKinFitProducer< LeptonCollection >::produce(), TtSemiLepJetCombWMassDeltaTopMass::produce(), cms::SubEventGenJetProducer::produce(), HLTJetL1MatchProducer< T >::produce(), AnyJetToCaloJetProducer::produce(), HLTJetL1TMatchProducer< T >::produce(), TtFullHadSignalSelMVAComputer::produce(), TtFullLepKinSolutionProducer::produce(), PileupJPTJetIdProducer::produce(), JetTracksAssociationToTrackRefs::produce(), TtSemiLepHitFitProducer< LeptonCollection >::produce(), MVAJetPuIdProducer::produce(), TtSemiEvtSolutionMaker::produce(), TtSemiLepSignalSelMVAComputer::produce(), TtSemiLepJetCombMVAComputer::produce(), TtHadEvtSolutionMaker::produce(), RecoTauPiZeroFlattener::produce(), TtFullHadKinFitProducer::produce(), L2TauPixelIsoTagProducer::produce(), reco::CorrectedJetProducer< T >::produce(), QjetsAdder::produce(), JVFJetIdProducer::produce(), cms::JetVertexAssociation::produce(), HiFJRhoProducer::produce(), cms::JetCorrectionProducer< T >::produce(), HLTMETCleanerUsingJetID::produce(), TtFullHadHypothesis::produce(), HLTMhtProducer::produce(), RecoTauJetRegionProducer::produce(), NoPileUpPFMEtProducer::produce(), HLTHtMhtProducer::produce(), pat::PATJetUpdater::produce(), TtSemiLepHypothesis::produce(), TtFullLepHypothesis::produce(), JetEnergyShift::produce(), PrimaryVertexSorter< ParticlesCollection >::produce(), pat::__class__Producer::produce(), HLTJetCollectionsForBoostedLeptonPlusJets< jetType >::produce(), HLTTrackMETProducer::produce(), HiGenCleaner< T2 >::produce(), TestBXVectorRefProducer::produce(), NjettinessAdder::produce(), NoPileUpPFMEtDataProducer::produce(), ShiftedPFCandidateProducerForNoPileUpPFMEt::produce(), ShiftedPFCandidateProducerForPFNoPUMEt::produce(), cms::METSignificanceProducer::produce(), TtJetPartonMatch< C >::produce(), l1t::FakeInputProducer::produce(), pat::PATJetProducer::produce(), RecoTauProducer::produce(), PileupJetIdProducer::produce(), HiL1Subtractor::produce(), PFRecoTauChargedHadronProducer::produce(), FastPrimaryVertexWithWeightsProducer::produce(), PixelJetPuId::produce(), L1TStage2Layer2Producer::produce(), l1t::GenToInputProducer::produce(), l1t::BXVectorInputProducer::produce(), JetIdSelector< T >::produce(), pat::JetCorrFactorsProducer::produce(), JetCrystalsAssociator::produce(), L1TStage1Layer2Producer::produce(), FastPrimaryVertexProducer::produce(), HLTJetsCleanedFromLeadingLeptons< JetType >::produce(), BoostedTopProducer::produce(), SoftLepton::produce(), CaloJetMETcorrInputProducerT< T, Textractor >::produce(), JetCleanerForType1METT< T, Textractor >::produce(), JetFlavourClustering::produce(), PFJetMETcorrInputProducerT< T, Textractor >::produce(), SmearedJetProducerT< T >::produce(), FastjetJetProducer::produceTrackJets(), QGTagger::putInEvent(), HITRegionalPixelSeedGenerator::regions(), HLTL1TSeed::seedsL1TriggerObjectMaps(), transfer_cluster_transfer(), transfer_jets(), GctFormatTranslateMCLegacy::writeGctOutJetBlock(), VirtualJetProducer::writeJets(), and FFTJetProducer::writeJets().

auto_ptr<JetDefinition::Plugin> fwrapper::plugin