ATLAS Offline Software
Loading...
Searching...
No Matches
SMCCondition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4#
5#include "./SMCCondition.h"
8
9#include <sstream>
10#include <cmath>
11#include <TLorentzVector.h>
12
14 double massMax):
15m_min(massMin), m_max(massMax){
16}
17
18
19bool
21 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
22
23 auto mass = std::abs(ip->m());
24 bool pass = m_min <= mass and m_max > mass;
25
26 if(collector){
27 const void* address = static_cast<const void*>(this);
28
29 std::stringstream ss0;
30 ss0 << "SMCCondition: (" << address << ") "
31 << " mass[" << m_min << ", " << m_max << "]"
32 << " pass: " << std::boolalpha << pass << '\n';
33
34 auto j_addr = static_cast<const void*>(ip.get());
35 std::stringstream ss1;
36 ss1 << " jet : ("<< j_addr << ") jet mass " << mass << '\n';
37
38 collector->collect(ss0.str(), ss1.str());
39
40 }
41 return pass;
42}
43
44
45bool
47 const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
48 auto result = isSatisfied(ips[0], c);
49 return result;
50}
51
52
53std::string SMCCondition::toString() const {
54 std::stringstream ss;
55 ss << "SMCCondition (" << this << ") mass min "
56 << m_min
57 << " mass max "
58 << m_max
59 <<'\n';
60
61 return ss.str();
62}
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
static Double_t ss
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
std::string toString() const override
SMCCondition(double massMin, double massMax)