18 #include "TParameter.h"
19 #include "TObjString.h"
21 #include <boost/range/adaptor/reversed.hpp>
22 #include <boost/timer/timer.hpp>
23 #include <boost/archive/xml_iarchive.hpp>
24 #include <boost/archive/xml_oarchive.hpp>
25 #include <boost/archive/text_oarchive.hpp>
26 #include <boost/archive/text_iarchive.hpp>
33 <<
" event.omtfGpResultsPdfSum.num_elements() " << endl;
36 edm::LogVerbatim(
"l1tOmtfEventPrint") <<
" DataROOTDumper2 created" << std::endl;
42 rootFile =
new TFile(rootFileName.c_str(),
"RECREATE");
43 rootTree =
new TTree(
"OMTFHitsTree",
"");
62 ptGenPos =
new TH1I(
"ptGenPos",
"ptGenPos", 400, 0, 200);
63 ptGenNeg =
new TH1I(
"ptGenNeg",
"ptGenNeg", 400, 0, 200);
76 std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) {
115 auto& gpResult =
omtfCand->getGpResult();
123 for (
unsigned int iLogicLayer = 0; iLogicLayer < gpResult.getStubResults().size(); ++iLogicLayer) {
124 auto& stubResult = gpResult.getStubResults()[iLogicLayer];
125 if (stubResult.getMuonStub()) {
127 hit.
layer = iLogicLayer;
128 hit.
quality = stubResult.getMuonStub()->qualityHw;
129 hit.
eta = stubResult.getMuonStub()->etaHw;
130 hit.
valid = stubResult.getValid();
132 int hitPhi = stubResult.getMuonStub()->phiHw;
134 int phiRefHit = gpResult.getStubResults()[refLayerLogicNum].getMuonStub()->phiHw;
137 hitPhi = stubResult.getMuonStub()->phiBHw;
142 hit.
phiDist = hitPhi - phiRefHit;
154 << stubResult.getValid() <<
" !!!!!!!!!!!!!!!!!!!!!!!!" << endl;
157 DetId detId(stubResult.getMuonStub()->detId);
Log< level::Info, true > LogVerbatim
AlgoMuons::value_type omtfCand
unsigned int omtfFiredLayers
const int hwQual() const
Get quality code.
virtual double hwEtaToEta(int hwEta) const
center of eta bin
l1t::RegionalMuonCand regionalMuonCand
void initializeTTree(std::string rootFileName)
Abs< T >::type abs(const T &t)
double hwPtToGev(int hwPt) const override
uGMT pt scale conversion
DataROOTDumper2(const edm::ParameterSet &edmCfg, const OMTFConfiguration *omtfConfig, std::string rootFileName)
unsigned int candProcIndx
const std::vector< int > & getRefToLogicNumber() const
int type() const
particle type (HEP PDT convension)
const math::XYZTLorentzVectorD & momentum() const
std::vector< unsigned long > hits
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
unsigned int omtfRefLayer
const OMTFConfiguration * omtfConfig
void observeEventEnd(const edm::Event &iEvent, std::unique_ptr< l1t::RegionalMuonCandBxCollection > &finalCandidates) override
Power< A, B >::type pow(const A &a, const B &b)
~DataROOTDumper2() override
unsigned int nTestRefHits() const
bool isBendingLayer(unsigned int iLayer) const override