Skip to content

Commit

Permalink
code-format and remove L1Trigger/Vertex.h dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
rekovic committed Jun 15, 2020
1 parent d81cdd1 commit 07db6c7
Show file tree
Hide file tree
Showing 87 changed files with 9,592 additions and 0 deletions.
17 changes: 17 additions & 0 deletions L1Trigger/Phase2L1ParticleFlow/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/Utilities"/>
<use name="DataFormats/L1TParticleFlow"/>
<use name="CommonTools/BaseParticlePropagator"/>
<use name="FastSimulation/Particle"/>
<use name="DataFormats/ParticleFlowReco"/>

<use name="L1Trigger/L1THGCal"/>
<use name="CommonTools/Utils"/>
<use name="CommonTools/MVAUtils"/>
<use name="roottmva"/>
<use name="hls"/>
<export>
<lib name="1"/>
</export>
<flags ADD_SUBDIR="1"/>
37 changes: 37 additions & 0 deletions L1Trigger/Phase2L1ParticleFlow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
1) Basic Instructions

```
cmsrel CMSSW_10_1_0_pre3
cd CMSSW_10_1_0_pre3/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline phase2-l1t-integration-CMSSW_10_1_0_pre3
git cms-merge-topic -u cms-l1t-offline:l1t-phase2-v2.7
#
# Tracklet Tracks
#
git remote add rekovic git@github.com:rekovic/cmssw.git
git fetch rekovic Tracklet-10_1_0_pre3
git cms-merge-topic -u rekovic:Tracklet-10_1_0_pre3-from-skinnari
# Remove tracklets from history
git reset --soft cms-l1t-offline/l1t-phase2-v2.7
git reset HEAD L1Trigger
# Get L1PF_CMSSW
git remote add p2l1pfp git@github.com:p2l1pfp/cmssw.git
git fetch p2l1pfp L1PF_CMSSW
echo -e '/DataFormats/L1TParticleFlow/\n/L1Trigger/Phase2L1ParticleFlow/' >> .git/info/sparse-checkout
git read-tree -mu HEAD
git checkout -b L1PF_CMSSW p2l1pfp/L1PF_CMSSW
scram b -j8
```

2) Ntuple for jets, jet HT and MET studies

```
cmsRun test/l1pfJetMetTreeProducer.py
```
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 22 additions & 0 deletions L1Trigger/Phase2L1ParticleFlow/interface/BitwisePFAlgo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef L1Trigger_Phase2L1ParticleFlow_BitwisePFAlgo_h
#define L1Trigger_Phase2L1ParticleFlow_BitwisePFAlgo_h

#include "L1Trigger/Phase2L1ParticleFlow/interface/PFAlgoBase.h"

struct pfalgo_config;

namespace l1tpf_impl {
class BitwisePFAlgo : public PFAlgoBase {
public:
BitwisePFAlgo(const edm::ParameterSet&);
~BitwisePFAlgo();
virtual void runPF(Region& r) const override;

protected:
enum AlgoChoice { algo3, algo2hgc } algo_;
pfalgo_config* config_;
};

} // namespace l1tpf_impl

#endif
43 changes: 43 additions & 0 deletions L1Trigger/Phase2L1ParticleFlow/interface/COEFile.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#ifndef L1Trigger_Phase2L1ParticleFlow_CoeFile_h
#define L1Trigger_Phase2L1ParticleFlow_CoeFile_h

// system include files
#include <vector>
#include <string>
#include <numeric>
#include <boost/dynamic_bitset.hpp>
#include <boost/multiprecision/cpp_int.hpp>

// user include files
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/L1TParticleFlow/interface/PFCandidate.h"
#include "L1Trigger/Phase2L1ParticleFlow/interface/DiscretePFInputs.h"
#include "L1Trigger/Phase2L1ParticleFlow/interface/Region.h"

namespace l1tpf_impl {
class COEFile {
public:
COEFile(const edm::ParameterSet&);
~COEFile();

void close() { fclose(file); }
template <typename T>
bool getBit(T value, unsigned bit) {
return (value >> bit) & 1;
}
bool is_open() { return (file != nullptr); }
void writeHeaderToFile();
void writeTracksToFile(const std::vector<Region>& regions, bool print = false);

protected:
FILE* file;
std::string coeFileName, bset_string_;
unsigned int ntracksmax, phiSlices;
static constexpr unsigned int tracksize = 96;
boost::dynamic_bitset<> bset_;
const std::vector<uint32_t> track_word_block_sizes = {14, 1, 12, 16, 12, 13, 4, 3, 7, 14};
int debug_;
};
} // namespace l1tpf_impl

#endif
Loading

0 comments on commit 07db6c7

Please sign in to comment.