Skip to content

Commit

Permalink
Clang format.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kaspar committed Aug 17, 2020
1 parent 4a2d1cd commit 429c6a9
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions CondTools/RunInfo/plugins/XangleBetaStarFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,34 @@

//----------------------------------------------------------------------------------------------------

class XangleBetaStarFilter : public edm::EDFilter
{
public:
explicit XangleBetaStarFilter(const edm::ParameterSet&);
class XangleBetaStarFilter : public edm::EDFilter {
public:
explicit XangleBetaStarFilter(const edm::ParameterSet &);

static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);

private:
edm::ESGetToken<LHCInfo, LHCInfoRcd> lhcInfoToken_;
private:
edm::ESGetToken<LHCInfo, LHCInfoRcd> lhcInfoToken_;

double xangle_min_;
double xangle_max_;
double xangle_min_;
double xangle_max_;

double beta_star_min_;
double beta_star_max_;
double beta_star_min_;
double beta_star_max_;

virtual bool filter(edm::Event &, const edm::EventSetup &) override;
virtual bool filter(edm::Event &, const edm::EventSetup &) override;
};

//----------------------------------------------------------------------------------------------------

XangleBetaStarFilter::XangleBetaStarFilter(const edm::ParameterSet& iConfig) :
lhcInfoToken_(esConsumes<LHCInfo, LHCInfoRcd>(edm::ESInputTag{"", iConfig.getParameter<std::string>("lhcInfoLabel")})),
XangleBetaStarFilter::XangleBetaStarFilter(const edm::ParameterSet &iConfig)
: lhcInfoToken_(
esConsumes<LHCInfo, LHCInfoRcd>(edm::ESInputTag{"", iConfig.getParameter<std::string>("lhcInfoLabel")})),

xangle_min_(iConfig.getParameter<double>("xangle_min")),
xangle_max_(iConfig.getParameter<double>("xangle_max")),
beta_star_min_(iConfig.getParameter<double>("beta_star_min")),
beta_star_max_(iConfig.getParameter<double>("beta_star_max"))
{
}
xangle_min_(iConfig.getParameter<double>("xangle_min")),
xangle_max_(iConfig.getParameter<double>("xangle_max")),
beta_star_min_(iConfig.getParameter<double>("beta_star_min")),
beta_star_max_(iConfig.getParameter<double>("beta_star_max")) {}

//----------------------------------------------------------------------------------------------------

Expand All @@ -65,12 +63,11 @@ void XangleBetaStarFilter::fillDescriptions(edm::ConfigurationDescriptions &desc

//----------------------------------------------------------------------------------------------------

bool XangleBetaStarFilter::filter(edm::Event& /*iEvent*/, const edm::EventSetup& iSetup)
{
bool XangleBetaStarFilter::filter(edm::Event & /*iEvent*/, const edm::EventSetup &iSetup) {
const auto &lhcInfo = iSetup.getData(lhcInfoToken_);

return (xangle_min_ <= lhcInfo.crossingAngle() && lhcInfo.crossingAngle() < xangle_max_)
&& (beta_star_min_ <= lhcInfo.betaStar() && lhcInfo.betaStar() < beta_star_max_);
return (xangle_min_ <= lhcInfo.crossingAngle() && lhcInfo.crossingAngle() < xangle_max_) &&
(beta_star_min_ <= lhcInfo.betaStar() && lhcInfo.betaStar() < beta_star_max_);
}

//----------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 429c6a9

Please sign in to comment.