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 80 of file fastjetfortran_madfks.cc.

References cs, cuy::ii, input_particles, jets, npart, transfer_input_particles(), and transfer_jets().

Referenced by fastjetppgenkt_().

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

helper routine to transfer fortran input particles into

Definition at line 49 of file fastjetfortran_madfks.cc.

References i, input_particles, j, and npart.

Referenced by transfer_cluster_transfer().

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

References i, j, and jets.

Referenced by transfer_cluster_transfer().

66  {
67  njets = jets.size();
68  for (int i=0; i<njets; i++) {
69  for (int j=0;j<=3; j++) {
70  *f77jets = jets[i][j];
71  // RF-MZ: reorder the arguments because in madfks energy goes first; in fastjet last.
72  //*f77jets = jets[i][(j+3) % 4];
73  f77jets++;
74  }
75  }
76  }
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 43 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 43 of file fastjetfortran_madfks.cc.

Referenced by TtFullHadKinFitter::addKinFitInfo(), TtSemiLepKinFitter::addKinFitInfo(), CaloMCTruthTreeProducer::analyze(), FlavorJetCorrectionExample::analyze(), PartonJetCorrectionExample::analyze(), PFMCTruthTreeProducer::analyze(), myFastSimVal::analyze(), JetCorExample< Jet >::analyze(), JetPlotsExample< Jet >::analyze(), TopJetAnalyzer::analyze(), JetAnaPythia< Jet >::analyze(), HLTTauDQML1Plotter::analyze(), TtFullHadSignalSelMVATrainer::analyze(), TtSemiLepSignalSelMVATrainer::analyze(), TtSemiLepJetCombMVATrainer::analyze(), TkAlCaRecoMonitor::analyze(), DQMHcalDiJetsAlCaReco::analyze(), cms::ProducerAnalyzer::analyze(), JetCorrectorOnTheFly< Jet >::analyze(), QcdHighPtDQM::analyze(), LHEAnalyzer::analyze(), ResolutionCreator::analyze(), cms::DiJetAnalyzer::analyze(), cms::GammaJetAnalysis::analyze(), HLTInclusiveVBFSource::analyze(), Rivet::CMS_EWK_11_021::analyze(), Rivet::CMS_2011_I930319::analyze(), TTbar_GenJetAnalyzer::analyze(), SusyDQM< Mu, Ele, Jet, Met >::analyze(), TopValidation::analyze(), Rivet::MC_LES_HOUCHES_SYSTEMATICS_CMS::analyze(), IsolatedTracksNxN::analyze(), FFTJetCorrectionProducer::applyCorrections(), GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts(), TtFullLepHypKinSolution::buildHypo(), TtSemiLepHypMVADisc::buildHypo(), TtSemiLepHypGeom::buildHypo(), TtFullHadHypGenMatch::buildHypo(), TtFullLepHypGenMatch::buildHypo(), TtSemiLepHypGenMatch::buildHypo(), TtSemiLepHypMaxSumPtWMass::buildHypo(), TtSemiLepHypWMassDeltaTopMass::buildHypo(), TtSemiLepHypWMassMaxSumPt::buildHypo(), TtSemiLepHypothesis::buildHypo(), AlignmentGlobalTrackSelector::checkIsolation(), AlignmentGlobalTrackSelector::checkJetCount(), TtSemiLepKinFitProducer< LeptonCollection >::doBTagging(), HLTTauRefProducer::doJets(), fastjetarea_(), fastjetconstituents_(), TopSingleLepton::MonitorEnsemble::fill(), TopHLTSingleLepton::MonitorEnsemble::fill(), TopDiLeptonOffline::MonitorEnsemble::fill(), myFilter::filter(), JetIDFailureFilter::filter(), TrackingFailureFilter::filter(), HLTRHemisphere::filter(), HeavyChHiggsToTauNuSkim::filter(), EgammaProbeSelector::filter(), JetConstituentSelector< T >::filter(), pat::PATMHTProducer::getJets(), HLTJetPairDzMatchFilter< T >::hltFilter(), HLTAlphaTFilter< T >::hltFilter(), HLTFiltCand::hltFilter(), HLTJetSortedVBFFilter< T >::hltFilter(), HLTTauRefProducer::HLTTauRefProducer(), Rivet::CMS_EWK_11_021::init(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), TtSemiLepJetCombGeom::isValid(), TtFullHadHypothesis::isValid(), TtFullLepHypothesis::isValid(), TtSemiLepHypothesis::isValid(), FFTJetProducer::iterateJetReconstruction(), main(), lhef::JetMatchingMLM::match(), TtDilepLRSignalSelObservables::operator()(), TtSemiLRJetCombObservables::operator()(), egHLT::EgJetTagProbeCut< T >::pass(), egHLT::EgJetB2BCut< T >::pass(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), TtFullHadronicEvent::print(), TtSemiLepJetCombWMassMaxSumPt::produce(), HLTJetL1MatchProducer< T >::produce(), TtSemiLepJetCombMaxSumPtWMass::produce(), TtSemiLepJetCombWMassDeltaTopMass::produce(), AnyJetToCaloJetProducer::produce(), TtSemiLepJetCombGeom::produce(), TtSemiLepKinFitProducer< LeptonCollection >::produce(), StEvtSolutionMaker::produce(), TtDilepEvtSolutionMaker::produce(), cms::SubEventGenJetProducer::produce(), HLTMhtProducer::produce(), TtSemiLepJetCombMVAComputer::produce(), TtSemiLepSignalSelMVAComputer::produce(), TtFullHadSignalSelMVAComputer::produce(), HLTHtMhtProducer::produce(), L2TauPixelIsoTagProducer::produce(), TtFullLepKinSolutionProducer::produce(), TtSemiLepHitFitProducer< LeptonCollection >::produce(), RecoTauJetRegionProducer::produce(), TtSemiEvtSolutionMaker::produce(), RecoTauPiZeroFlattener::produce(), TtFullHadKinFitProducer::produce(), cms::JetVertexAssociation::produce(), TtHadEvtSolutionMaker::produce(), cms::JetCorrectionProducer< T >::produce(), SoftPFElectronTagInfoProducer::produce(), TtFullHadHypothesis::produce(), AlCaGammaJetProducer::produce(), TtSemiLepHypothesis::produce(), SoftPFMuonTagInfoProducer::produce(), TtFullLepHypothesis::produce(), cms::AlCaDiJetsProducer::produce(), pat::__class__Producer::produce(), ShiftedPFCandidateProducerForNoPileUpPFMEt::produce(), RecoTauProducer::produce(), pat::PATJetProducer::produce(), TtJetPartonMatch< C >::produce(), PileupJetIdProducer::produce(), HiL1Subtractor::produce(), HiGenCleaner< T2 >::produce(), JetIdSelector< T >::produce(), pat::JetCorrFactorsProducer::produce(), JetCrystalsAssociator::produce(), FastPrimaryVertexProducer::produce(), SoftLepton::produce(), BoostedTopProducer::produce(), CaloJetMETcorrInputProducerT< T, Textractor >::produce(), PFJetMETcorrInputProducerT< T, Textractor >::produce(), SmearedJetProducerT< T, Textractor >::produce(), cms::METProducer::produce_PFMET(), FastjetJetProducer::produceTrackJets(), HITRegionalPixelSeedGenerator::regions(), FastJetFWLiteWrapper::run(), PFSpecificAlgo::runSignificance(), transfer_cluster_transfer(), transfer_jets(), GctFormatTranslateMCLegacy::writeGctOutJetBlock(), VirtualJetProducer::writeJets(), and FFTJetProducer::writeJets().

auto_ptr<JetDefinition::Plugin> fwrapper::plugin