11 #include <boost/bind.hpp>
12 #include <boost/ptr_container/ptr_vector.hpp>
16 #include <HepMC/GenEvent.h>
17 #include <HepMC/SimpleVector.h>
49 void fillDJRSched(
unsigned int min,
unsigned int max);
78 sourceLabel(params.getParameter<edm::InputTag>(
"src")),
79 jetInput(params.getParameter<edm::
ParameterSet>(
"jetInput")),
80 defaultDeltaCut(params.getParameter<double>(
"defaultDeltaCut")),
81 defaultPtCut(params.getParameter<double>(
"defaultPtCut")),
82 maxEta(params.getParameter<double>(
"maxEta")),
83 useEt(params.getParameter<bool>(
"useEt")),
84 ptFraction(params.getUntrackedParameter<double>(
"ptFraction", 0.75)),
85 binsDelta(params.getParameter<unsigned int>(
"binsDelta")),
86 minDelta(params.getParameter<double>(
"minDelta")),
87 maxDelta(params.getParameter<double>(
"maxDelta")),
88 binsPt(params.getParameter<unsigned int>(
"binsPt")),
89 minPt(params.getParameter<double>(
"minPt")),
90 maxPt(params.getParameter<double>(
"maxPt")),
91 minDJR(params.getParameter<unsigned int>(
"minDJR")),
92 maxDJR(params.getParameter<unsigned int>(
"maxDJR"))
116 std::ostringstream ss, ss2;
117 ss << (
i + 1) <<
"#rightarrow" <<
i <<
" jets";
119 TH1 *
h = fs->
make<TH1D>((
"delta" + ss2.str()).c_str(),
120 (
"DJR " + ss.str()).c_str(),
122 h->SetXTitle(
"p_{T} [GeV/c^2]");
123 h->SetYTitle(
"#delta#sigma [mb]");
132 h = fs->
make<TH1D>((
"pt" + ss2.str()).c_str(),
133 (
"DJR " + ss.str()).c_str(),
binsPt,
135 h->SetXTitle((
"log_{10}(" + what +
136 "_{T} [GeV/c^{2}])").c_str());
137 h->SetYTitle(
"#delta#sigma [mb]");
149 unsigned int middle = (min +
max) / 2;
167 std::auto_ptr<HepMC::GenEvent> clonedEvent;
168 const HepMC::GenEvent *
genEvent = hepmc->GetEvent();
169 if (!genEvent->signal_process_vertex()) {
170 clonedEvent.reset(
new HepMC::GenEvent(*genEvent));
171 const HepMC::GenVertex *signalVertex =
172 LHEEvent::findSignalVertex(clonedEvent.get());
173 clonedEvent->set_signal_process_vertex(
174 const_cast<HepMC::GenVertex*>(signalVertex));
175 genEvent = clonedEvent.get();
180 std::vector<Jet> ptJets = (*ptClustering)(particles);
182 bind(std::greater<double>(),
183 bind(
useEt ? &Jet::et : &Jet::pt, _1),
184 bind(
useEt ? &Jet::et : &Jet::pt, _2)));
186 typedef std::pair<int, int> Pair;
190 for(std::vector<unsigned int>::const_iterator djr =
djrSched.begin();
198 for(
int i = *djr;
i >= (int)
minDJR;
i--) {
201 upper = deltaJets[
i -
minDJR].second;
206 for(
int i = *djr + 1;
i <= (int)
maxDJR;
i++) {
208 lower = deltaJets[
i -
minDJR].first;
214 result = (lower + upper + 2) / 2 - 1;
217 else if (result < lower) {
222 std::vector<Jet>
jets =
224 unsigned int nJets = 0;
225 for(std::vector<Jet>::const_iterator iter =
226 jets.begin(); iter != jets.end(); ++iter)
227 if ((
useEt ? iter->et() : iter->pt())
238 for(
int j = nJets;
j >= (int)
minDJR;
j--) {
243 for(
int j = nJets;
j <= (int)
maxDJR;
j++) {
246 result < deltaJets[
j -
minDJR].second)
253 h->Fill(h->GetBinCenter(result + 1));
256 if (*djr >= ptJets.size())
259 h->Fill(std::log10(ptJets[*djr].et()));
261 h->Fill(std::log10(ptJets[*djr].pt()));
266 if (
minDJR >= ptJets.size())
269 h->Fill(std::log10(ptJets[
minDJR].et()));
271 h->Fill(std::log10(ptJets[
minDJR].pt()));
std::auto_ptr< JetClustering > ptClustering
T getParameter(std::string const &) const
std::vector< TH1 * > histoDelta
#define DEFINE_FWK_MODULE(type)
U second(std::pair< T, U > const &p)
const T & max(const T &a, const T &b)
std::vector< unsigned int > djrSched
virtual void analyze(const edm::Event &event, const edm::EventSetup &es)
void addParameter(std::string const &name, T const &value)
void fillDJRSched(unsigned int min, unsigned int max)
LHEAnalyzer(const edm::ParameterSet ¶ms)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::InputTag sourceLabel
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< TH1 * > histoPt
std::vector< std::vector< double > > tmp
T * make() const
make new ROOT object
boost::ptr_vector< JetClustering > deltaClustering