herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
LeptonsJetsAnalysis.h
1// -*- C++ -*-
2#ifndef Herwig_LeptonsJetsAnalysis_H
3#define Herwig_LeptonsJetsAnalysis_H
4//
5// This is the declaration of the LeptonsJetsAnalysis class.
6//
7
8#include "ThePEG/Handlers/AnalysisHandler.h"
9#include "ThePEG/Cuts/JetFinder.h"
10#include "ThePEG/Cuts/JetRegion.h"
11#include "ThePEG/Repository/EventGenerator.h"
12#include "Herwig/Utilities/Statistics/Histogram.h"
13
14namespace Herwig {
15
16using namespace ThePEG;
17
25
26public:
27
32
33public:
34
54 virtual void analyze(tEventPtr event, long ieve, int loop, int state);
56
57protected:
58
62 void analyze(ParticleVector&, long, double);
63
67 void clear() {
68 theJets.clear();
69 theEWIDs.clear();
70 theChargedLeptons.clear();
71 theNeutrinos.clear();
72 theHiggs.clear();
73 }
74
78 virtual void reconstructJets(const ParticleVector&);
79
83 Ptr<JetFinder>::tptr jetFinder() const {
84 return theJetFinder;
85 }
86
90 const vector<Ptr<JetRegion>::ptr>& jetRegions() const { return theJetRegions; }
91
95 unsigned int nJets() const { return theJets.size(); }
96
100 LorentzMomentum& jetMomentum(const unsigned int id) {
101 return theJets[id];
102 }
103
108
112 LorentzMomentum& eWIDMomentum(const unsigned int id) {
113 return theEWIDs[id];
114 }
115
119 LorentzMomentum& chargedLeptonMomentum(const unsigned int id) {
120 return theChargedLeptons[id];
121 }
122
126 LorentzMomentum& neutrinoMomentum(const unsigned int id) {
127 return theNeutrinos[id];
128 }
129
133 LorentzMomentum& pTmissMomentum() {
134 return thePTmiss;
135 }
136
140 LorentzMomentum& higgsMomentum(const unsigned int id) {
141 return theHiggs[id];
142 }
143
144protected:
145
150 virtual void dofinish();
151
152public:
153
161
167 void persistentInput(PersistentIStream & is, int version);
169
176 static void Init();
177
178protected:
179
186 virtual IBPtr clone() const;
187
192 virtual IBPtr fullclone() const;
194
195
196// If needed, insert declarations of virtual function defined in the
197// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
198
199protected:
200
206
212 Statistics::Histogram pt_logx;
213
218
223
228 Statistics::Histogram masslow;
229
234
238 ObjectProperties(const string& name, Energy)
239 : pt(name + "Pt",Statistics::Histogram::regularBinEdges(0,1000,200),true,false),
240 ptlow(name + "Ptlow",Statistics::Histogram::regularBinEdges(0,200,100),true,false),
241 pt_logx(name + "PtLogX",Statistics::Histogram::logBinEdges(0.1,1000,100),true,false),
242 y(name + "Y",Statistics::Histogram::regularBinEdges(-6,6,120),false,false),
243 phi(name + "Phi",Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,62),
244 make_pair(-Constants::pi,Constants::pi)),
245 mass(name + "Mass",Statistics::Histogram::regularBinEdges(0,5000,500),true,false),
246 masslow(name + "Masslow",Statistics::Histogram::regularBinEdges(0,250,100),true,false) {}
247
251 void count(const LorentzMomentum& p, double weight, unsigned int id) {
252 pt.count(Statistics::EventContribution(p.perp()/GeV,weight,5.),id);
253 ptlow.count(Statistics::EventContribution(p.perp()/GeV,weight,2.),id);
254 pt_logx.count(Statistics::EventContribution(p.perp()/GeV,weight,1.),id);
255 y.count(Statistics::EventContribution(p.rapidity(),weight,0.1),id);
256 phi.count(Statistics::EventContribution(p.phi(),weight,0.1),id);
257 mass.count(Statistics::EventContribution(p.m()/GeV,weight,10.),id);
258 masslow.count(Statistics::EventContribution(p.m()/GeV,weight,2.5),id);
259 }
260
264 void count(Energy perp, double rapidity,
265 double xphi, Energy m,
266 double weight, unsigned int id) {
267 pt.count(Statistics::EventContribution(perp/GeV,weight,5.),id);
268 ptlow.count(Statistics::EventContribution(perp/GeV,weight,1.),id);
269 pt_logx.count(Statistics::EventContribution(perp/GeV,weight,1.),id);
270 y.count(Statistics::EventContribution(rapidity,weight,0.1),id);
271 phi.count(Statistics::EventContribution(xphi,weight,0.1),id);
272 mass.count(Statistics::EventContribution(m/GeV,weight,5.),id);
273 masslow.count(Statistics::EventContribution(m/GeV,weight,1.25),id);
274 }
275
279 void finalize(XML::Element& elem) {
280 pt.finalize(); elem.append(pt.toXML());
281 ptlow.finalize(); elem.append(ptlow.toXML());
282 pt_logx.finalize(); elem.append(pt_logx.toXML());
283 y.finalize(); elem.append(y.toXML());
284 phi.finalize(); elem.append(phi.toXML());
285 mass.finalize(); elem.append(mass.toXML());
286 masslow.finalize(); elem.append(masslow.toXML());
287 }
288
289 };
290
296 : public ObjectProperties {
297
301 static double dPhi(const LorentzMomentum& a,
302 const LorentzMomentum& b){
303 double phi1 = a.phi();
304 double phi2 = b.phi();
305 double diff=phi1-phi2;
306 if(diff<-Constants::pi){
307 diff+=(2.0*Constants::pi);
308 }
309 else if (diff>Constants::pi){
310 diff-=(2.0*Constants::pi);
311 }
312 return diff;
313 }
314
318 static double dY(const LorentzMomentum& a,
319 const LorentzMomentum& b){
320 return abs(a.rapidity()-b.rapidity());
321 }
322
326 static double dR(const LorentzMomentum& a,
327 const LorentzMomentum& b){
328 return sqrt(sqr(dPhi(a,b))+sqr(dY(a,b)));
329 }
330
334 static double yy(const LorentzMomentum& a,
335 const LorentzMomentum& b){
336 double ya = a.rapidity();
337 double yb = b.rapidity();
338 double yres = sqrt(abs(ya*yb));
339 return ya*yb < 0. ? -yres : yres;
340 }
341
346
351
356
361
366 : ObjectProperties() {}
367
371 PairProperties(const string& name, Energy ecm)
372 : ObjectProperties(name,ecm),
373 deltaY(name + "DeltaY",Statistics::Histogram::regularBinEdges(0,6,60),true,false),
374 deltaPhi(name + "DeltaPhi",Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
375 make_pair(-Constants::pi,Constants::pi)),
376 deltaR(name + "DeltaR",Statistics::Histogram::regularBinEdges(0,10,100),true,false),
377 yDotY(name + "YDotY",Statistics::Histogram::regularBinEdges(-6,6,120),false,false) {}
378
382 void count(const LorentzMomentum& p, const LorentzMomentum& q, double weight, unsigned int id) {
383 ObjectProperties::count(p+q,weight,id);
384 deltaY.count(Statistics::EventContribution(dY(p,q),weight,0.1),id);
386 deltaR.count(Statistics::EventContribution(dR(p,q),weight,0.1),id);
387 yDotY.count(Statistics::EventContribution(yy(p,q),weight,0.1),id);
388 }
389
393 void finalize(XML::Element& elem) {
395 deltaY.finalize(); elem.append(deltaY.toXML());
397 deltaR.finalize(); elem.append(deltaR.toXML());
398 yDotY.finalize(); elem.append(yDotY.toXML());
399 }
400
401 };
402
408 : public ObjectProperties {
409
413 static double dYstar(const LorentzMomentum& a,
414 const LorentzMomentum& b,
415 const LorentzMomentum& c){
416 return c.rapidity()-(a.rapidity()+b.rapidity())/2.;
417 }
418
422 static double dZstar(const LorentzMomentum& a,
423 const LorentzMomentum& b,
424 const LorentzMomentum& c){
425 return dYstar(a,b,c)*2./abs(a.rapidity()-b.rapidity());
426 }
427
432
437
442 : ObjectProperties() {}
443
447 TripleProperties(const string& name, Energy ecm)
448 : ObjectProperties(name,ecm),
449 deltaYstar(name + "DeltaYstar",Statistics::Histogram::regularBinEdges(-6,6,120),true,false),
450 deltaZstar(name + "DeltaZstar",Statistics::Histogram::regularBinEdges(-3,3,120),true,false) {}
451
455 void count(const LorentzMomentum& p, const LorentzMomentum& q, const LorentzMomentum& r,
456 double weight, unsigned int id) {
457 ObjectProperties::count(p+q+r,weight,id);
460 }
461
465 void finalize(XML::Element& elem) {
469 }
470
471 };
472
473private:
474
479
484
488 Ptr<JetFinder>::ptr theJetFinder;
489
493 vector<Ptr<JetRegion>::ptr> theJetRegions;
494
498 map<unsigned int,LorentzMomentum> theJets;
499
503 map<unsigned int,LorentzMomentum> theEWIDs;
504
508 map<unsigned int,LorentzMomentum> theChargedLeptons;
509
513 map<unsigned int,LorentzMomentum> theNeutrinos;
514
518 LorentzMomentum thePTmiss;
519
523 map<unsigned int,LorentzMomentum> theHiggs;
524
528 map<unsigned int,ObjectProperties> theJetProperties;
529
533 map<unsigned int,ObjectProperties> theExclusiveJetProperties;
534
539
544
549
554
559
563 map<unsigned int,ObjectProperties> theEWIDProperties;
564
568 map<unsigned int,ObjectProperties> theChargedLeptonProperties;
569
573 map<unsigned int,ObjectProperties> theNeutrinoProperties;
574
579
583 map<unsigned int,ObjectProperties> theHiggsProperties;
584
588 map<pair<unsigned int,unsigned int>,PairProperties> theJetPairProperties;
589
593 map<pair<unsigned int,unsigned int>,PairProperties> theJetEWIDPairProperties;
594
598 map<pair<unsigned int,unsigned int>,PairProperties> theJetChargedLeptonPairProperties;
599
603 map<pair<unsigned int,unsigned int>,PairProperties> theJetNeutrinoPairProperties;
604
608 map<unsigned int,PairProperties> theJetPTmissPairProperties;
609
613 map<pair<unsigned int,unsigned int>,PairProperties> theJetHiggsPairProperties;
614
618 map<pair<unsigned int,unsigned int>,PairProperties> theEWIDPairProperties;
619
623 map<pair<unsigned int,unsigned int>,PairProperties> theChargedLeptonPairProperties;
624
628 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theThreeJetProperties;
629
633 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairEWIDTripleProperties;
634
638 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairChargedLeptonTripleProperties;
639
643 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairNeutrinoTripleProperties;
644
648 map<pair<unsigned int,unsigned int>,TripleProperties> theJetPairPTmissTripleProperties;
649
653 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairHiggsTripleProperties;
654
658 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theThreeEWIDProperties;
659
663 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theThreeChargedLeptonProperties;
664
668 map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourJetProperties;
669
673 map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourEWIDProperties;
674
678 map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourChargedLeptonProperties;
679
680protected:
681
685 ObjectProperties& jetProperties(const unsigned int id) {
686 map<unsigned int,ObjectProperties>::iterator h =
687 theJetProperties.find(id);
688 if ( h != theJetProperties.end() )
689 return h->second;
690 ostringstream ids; ids << "Jet" << id;
691 return
692 theJetProperties[id] =
693 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
694 }
695
699 ObjectProperties& exclusiveJetProperties(const unsigned int id) {
700 map<unsigned int,ObjectProperties>::iterator h =
702 if ( h != theExclusiveJetProperties.end() )
703 return h->second;
704 ostringstream ids; ids << "ExclusiveJet" << id;
705 return
707 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
708 }
709
714 if ( !theJetInclusiveProperties.pt.bins().empty() )
716 return
718 ObjectProperties("JetInclusive",generator()->maximumCMEnergy());
719 }
720
725 if ( !theJetSummedProperties.pt.bins().empty() )
727 return
729 ObjectProperties("JetSummed",generator()->maximumCMEnergy());
730 }
731
736 if ( !theJetAverageProperties.pt.bins().empty() )
738 return
740 ObjectProperties("JetAverage",generator()->maximumCMEnergy());
741 }
742
743
748 if ( !theNJetsInclusive.bins().empty() )
749 return theNJetsInclusive;
750 return
752 Statistics::Histogram("NJetsInclusive",
754 theJetRegions.size()+1),
755 true,true);
756 }
757
762 if ( !theNJetsExclusive.bins().empty() )
763 return theNJetsExclusive;
764 return
766 Statistics::Histogram("NJetsExclusive",
768 theJetRegions.size()+1),
769 true,true);
770 }
771
775 ObjectProperties& eWIDProperties(const unsigned int id) {
776 map<unsigned int,ObjectProperties>::iterator h =
777 theEWIDProperties.find(id);
778 if ( h != theEWIDProperties.end() )
779 return h->second;
780 ostringstream ids; ids << "EWID" << id;
781 return
782 theEWIDProperties[id] =
783 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
784 }
785
790 map<unsigned int,ObjectProperties>::iterator h =
792 if ( h != theChargedLeptonProperties.end() )
793 return h->second;
794 ostringstream ids; ids << "ChargedLepton" << id;
795 return
797 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
798 }
799
803 ObjectProperties& neutrinoProperties(const unsigned int id) {
804 map<unsigned int,ObjectProperties>::iterator h =
805 theNeutrinoProperties.find(id);
806 if ( h != theNeutrinoProperties.end() )
807 return h->second;
808 ostringstream ids; ids << "Neutrino" << id;
809 return
811 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
812 }
813
818 if ( !thePTmissProperties.pt.bins().empty() )
819 return thePTmissProperties;
820 return
822 ObjectProperties("PTmiss",generator()->maximumCMEnergy());
823 }
824
828 ObjectProperties& higgsProperties(const unsigned int id) {
829 map<unsigned int,ObjectProperties>::iterator h =
830 theHiggsProperties.find(id);
831 if ( h != theHiggsProperties.end() )
832 return h->second;
833 ostringstream ids; ids << "Higgs" << id;
834 return
835 theHiggsProperties[id] =
836 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
837 }
838
842 PairProperties& jetPairProperties(const unsigned int id, const unsigned int jd) {
843 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
844 theJetPairProperties.find(make_pair(id,jd));
845 if ( h != theJetPairProperties.end() )
846 return h->second;
847 ostringstream ids; ids << "Jet" << id << jd;
848 return theJetPairProperties[make_pair(id,jd)] =
849 PairProperties(ids.str(),generator()->maximumCMEnergy());
850 }
851
855 PairProperties& jetEWIDPairProperties(const unsigned int id, const unsigned int jd) {
856 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
857 theJetEWIDPairProperties.find(make_pair(id,jd));
858 if ( h != theJetEWIDPairProperties.end() )
859 return h->second;
860 ostringstream ids; ids << "Jet" << id << "EWID" << jd;
861 return theJetEWIDPairProperties[make_pair(id,jd)] =
862 PairProperties(ids.str(),generator()->maximumCMEnergy());
863 }
864
868 PairProperties& jetChargedLeptonPairProperties(const unsigned int id, const unsigned int jd) {
869 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
870 theJetChargedLeptonPairProperties.find(make_pair(id,jd));
871 if ( h != theJetChargedLeptonPairProperties.end() )
872 return h->second;
873 ostringstream ids; ids << "Jet" << id << "ChargedLepton" << jd;
874 return theJetChargedLeptonPairProperties[make_pair(id,jd)] =
875 PairProperties(ids.str(),generator()->maximumCMEnergy());
876 }
877
881 PairProperties& jetNeutrinoPairProperties(const unsigned int id, const unsigned int jd) {
882 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
883 theJetNeutrinoPairProperties.find(make_pair(id,jd));
884 if ( h != theJetNeutrinoPairProperties.end() )
885 return h->second;
886 ostringstream ids; ids << "Jet" << id << "Neutrino" << jd;
887 return theJetNeutrinoPairProperties[make_pair(id,jd)] =
888 PairProperties(ids.str(),generator()->maximumCMEnergy());
889 }
890
894 PairProperties& jetPTmissPairProperties(const unsigned int id) {
895 map<unsigned int,PairProperties>::iterator h =
897 if ( h != theJetPTmissPairProperties.end() )
898 return h->second;
899 ostringstream ids; ids << "Jet" << id << "PTmiss";
900 return theJetPTmissPairProperties[id] =
901 PairProperties(ids.str(),generator()->maximumCMEnergy());
902 }
903
907 PairProperties& jetHiggsPairProperties(const unsigned int id, const unsigned int jd) {
908 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
909 theJetHiggsPairProperties.find(make_pair(id,jd));
910 if ( h != theJetHiggsPairProperties.end() )
911 return h->second;
912 ostringstream ids; ids << "Jet" << id << "Higgs" << jd;
913 return theJetHiggsPairProperties[make_pair(id,jd)] =
914 PairProperties(ids.str(),generator()->maximumCMEnergy());
915 }
916
920 PairProperties& eWIDPairProperties(const unsigned int id, const unsigned int jd) {
921 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
922 theEWIDPairProperties.find(make_pair(id,jd));
923 if ( h != theEWIDPairProperties.end() )
924 return h->second;
925 ostringstream ids; ids << "EWID" << id << jd;
926 return theEWIDPairProperties[make_pair(id,jd)] =
927 PairProperties(ids.str(),generator()->maximumCMEnergy());
928 }
929
933 PairProperties& chargedLeptonPairProperties(const unsigned int id, const unsigned int jd) {
934 map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
935 theChargedLeptonPairProperties.find(make_pair(id,jd));
936 if ( h != theChargedLeptonPairProperties.end() )
937 return h->second;
938 ostringstream ids; ids << "ChargedLepton" << id << jd;
939 return theChargedLeptonPairProperties[make_pair(id,jd)] =
940 PairProperties(ids.str(),generator()->maximumCMEnergy());
941 }
942
946 TripleProperties& threeJetProperties(const unsigned int id1, const unsigned int id2,
947 const unsigned int id3) {
948 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
949 theThreeJetProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
950 if ( it != theThreeJetProperties.end() )
951 return it->second;
952 ostringstream ids;
953 ids << "Jet" << id1 << id2 << id3;
954 return theThreeJetProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
955 TripleProperties(ids.str(),generator()->maximumCMEnergy());
956 }
957
961 TripleProperties& jetPairEWIDTripleProperties(const unsigned int id1, const unsigned int id2,
962 const unsigned int id3) {
963 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
964 theJetPairEWIDTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
965 if ( it != theJetPairEWIDTripleProperties.end() )
966 return it->second;
967 ostringstream ids;
968 ids << "Jet" << id1 << id2 << "EWID" << id3;
969 return theJetPairEWIDTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
970 TripleProperties(ids.str(),generator()->maximumCMEnergy());
971 }
972
976 TripleProperties& jetPairChargedLeptonTripleProperties(const unsigned int id1, const unsigned int id2,
977 const unsigned int id3) {
978 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
979 theJetPairChargedLeptonTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
981 return it->second;
982 ostringstream ids;
983 ids << "Jet" << id1 << id2 << "ChargedLepton" << id3;
984 return theJetPairChargedLeptonTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
985 TripleProperties(ids.str(),generator()->maximumCMEnergy());
986 }
987
991 TripleProperties& jetPairNeutrinoTripleProperties(const unsigned int id1, const unsigned int id2,
992 const unsigned int id3) {
993 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
994 theJetPairNeutrinoTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
995 if ( it != theJetPairNeutrinoTripleProperties.end() )
996 return it->second;
997 ostringstream ids;
998 ids << "Jet" << id1 << id2 << "Neutrino" << id3;
999 return theJetPairNeutrinoTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
1000 TripleProperties(ids.str(),generator()->maximumCMEnergy());
1001 }
1002
1006 TripleProperties& jetPairPTmissTripleProperties(const unsigned int id1, const unsigned int id2) {
1007 map<pair<unsigned int,unsigned int>,TripleProperties>::iterator it =
1008 theJetPairPTmissTripleProperties.find(pair<unsigned int,unsigned int>(id1,id2));
1009 if ( it != theJetPairPTmissTripleProperties.end() )
1010 return it->second;
1011 ostringstream ids;
1012 ids << "Jet" << id1 << id2 << "PTmiss";
1013 return theJetPairPTmissTripleProperties[pair<unsigned int,unsigned int>(id1,id2)] =
1014 TripleProperties(ids.str(),generator()->maximumCMEnergy());
1015 }
1016
1020 TripleProperties& jetPairHiggsTripleProperties(const unsigned int id1, const unsigned int id2,
1021 const unsigned int id3) {
1022 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
1023 theJetPairHiggsTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
1024 if ( it != theJetPairHiggsTripleProperties.end() )
1025 return it->second;
1026 ostringstream ids;
1027 ids << "Jet" << id1 << id2 << "Higgs" << id3;
1028 return theJetPairHiggsTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
1029 TripleProperties(ids.str(),generator()->maximumCMEnergy());
1030 }
1031
1035 TripleProperties& threeEWIDProperties(const unsigned int id1, const unsigned int id2,
1036 const unsigned int id3) {
1037 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
1038 theThreeEWIDProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
1039 if ( it != theThreeEWIDProperties.end() )
1040 return it->second;
1041 ostringstream ids;
1042 ids << "EWID" << id1 << id2 << id3;
1043 return theThreeEWIDProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
1044 TripleProperties(ids.str(),generator()->maximumCMEnergy());
1045 }
1046
1050 TripleProperties& threeChargedLeptonProperties(const unsigned int id1, const unsigned int id2,
1051 const unsigned int id3) {
1052 map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
1053 theThreeChargedLeptonProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
1054 if ( it != theThreeChargedLeptonProperties.end() )
1055 return it->second;
1056 ostringstream ids;
1057 ids << "ChargedLepton" << id1 << id2 << id3;
1058 return theThreeChargedLeptonProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
1059 TripleProperties(ids.str(),generator()->maximumCMEnergy());
1060 }
1061
1065 ObjectProperties& fourJetProperties(const unsigned int id1, const unsigned int id2,
1066 const unsigned int id3, const unsigned int id4) {
1067 map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
1068 theFourJetProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
1069 if ( it != theFourJetProperties.end() )
1070 return it->second;
1071 ostringstream ids;
1072 ids << "Jet" << id1 << id2 << id3 << id4;
1073 return theFourJetProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
1074 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
1075 }
1076
1080 ObjectProperties& fourEWIDProperties(const unsigned int id1, const unsigned int id2,
1081 const unsigned int id3, const unsigned int id4) {
1082 map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
1083 theFourEWIDProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
1084 if ( it != theFourEWIDProperties.end() )
1085 return it->second;
1086 ostringstream ids;
1087 ids << "EWID" << id1 << id2 << id3 << id4;
1088 return theFourEWIDProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
1089 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
1090 }
1091
1095 ObjectProperties& fourChargedLeptonProperties(const unsigned int id1, const unsigned int id2,
1096 const unsigned int id3, const unsigned int id4) {
1097 map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
1098 theFourChargedLeptonProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
1099 if ( it != theFourChargedLeptonProperties.end() )
1100 return it->second;
1101 ostringstream ids;
1102 ids << "ChargedLepton" << id1 << id2 << id3 << id4;
1103 return theFourChargedLeptonProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
1104 ObjectProperties(ids.str(),generator()->maximumCMEnergy());
1105 }
1106
1110 virtual void analyzeSpecial(long, double) {}
1111
1115 virtual void finalize(XML::Element&) {}
1116
1117private:
1118
1124
1125};
1126
1127}
1128
1129#endif /* Herwig_LeptonsJetsAnalysis_H */
The Histogram class is a simple histogram for the Analysis handlers.
Definition: Histogram.h:43
Here is the documentation of the LeptonsJetsAnalysis class.
ObjectProperties & jetProperties(const unsigned int id)
Jet properties.
TripleProperties & threeJetProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Trijet properties.
ObjectProperties theJetSummedProperties
Jet-summed properties.
map< unsigned int, ObjectProperties > theExclusiveJetProperties
Exclusive jet properties.
Statistics::Histogram theNJetsExclusive
Exclusive jet multiplicities.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theJetPairChargedLeptonTripleProperties
Jet-pair/charged lepton triple properties.
ObjectProperties theJetInclusiveProperties
Jet-inclusive properties.
ObjectProperties & fourChargedLeptonProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3, const unsigned int id4)
Four charged lepton properties.
LeptonsJetsAnalysis()
The default constructor.
LorentzMomentum & eWIDMomentum(const unsigned int id)
Set the momentum of the indicated electroweak particle.
Ptr< JetFinder >::ptr theJetFinder
The jet finder to use.
map< pair< unsigned int, unsigned int >, PairProperties > theEWIDPairProperties
Electroweak pair properties.
map< pair< unsigned int, unsigned int >, PairProperties > theJetPairProperties
Jet pair properties.
LorentzMomentum thePTmiss
The reconstructed missing pT.
TripleProperties & jetPairChargedLeptonTripleProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Jet-pair/charged lepton triple properties.
ObjectProperties & jetInclusiveProperties()
Jet-inclusive properties.
TripleProperties & jetPairHiggsTripleProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Jet-pair/Higgs triple properties.
TripleProperties & jetPairEWIDTripleProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Jet-pair/electroweak triple properties.
map< pair< unsigned int, unsigned int >, PairProperties > theJetNeutrinoPairProperties
Jet/neutrino pair properties.
virtual void reconstructEWParticles(ParticleVector &)
Reconstruct all the variables for EW particles and fill the respective momenta.
map< std::tuple< unsigned int, unsigned int, unsigned int, unsigned int >, ObjectProperties > theFourJetProperties
Fourjet properties.
map< unsigned int, PairProperties > theJetPTmissPairProperties
Jet/missing pT pair properties.
PairProperties & jetPTmissPairProperties(const unsigned int id)
Jet/missing pT pair properties.
PairProperties & jetHiggsPairProperties(const unsigned int id, const unsigned int jd)
Jet/Higgs pair properties.
map< unsigned int, ObjectProperties > theJetProperties
Jet properties.
virtual void analyze(tEventPtr event, long ieve, int loop, int state)
Analyze a given Event.
Statistics::Histogram theNJetsInclusive
Inclusive jet multiplicities.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
bool theApplyCuts
Switch whether to apply extra analysis cuts.
ObjectProperties & exclusiveJetProperties(const unsigned int id)
Exclusive jet properties.
virtual void reconstructJets(const ParticleVector &)
Reconstruct the jets and fill the respective momenta.
virtual void analyzeSpecial(long, double)
Perform any additional analysis required.
ObjectProperties & pTmissProperties()
Missing pT properties.
map< unsigned int, ObjectProperties > theEWIDProperties
Electroweak properties.
virtual void dofinish()
Finalize this object.
PairProperties & jetNeutrinoPairProperties(const unsigned int id, const unsigned int jd)
Jet/neutrino pair properties.
map< unsigned int, LorentzMomentum > theNeutrinos
The reconstructed neutrinos.
ObjectProperties & neutrinoProperties(const unsigned int id)
Neutrino properties.
map< unsigned int, LorentzMomentum > theHiggs
The reconstructed Higgs.
map< std::tuple< unsigned int, unsigned int, unsigned int, unsigned int >, ObjectProperties > theFourEWIDProperties
Four electroweak properties.
LorentzMomentum & neutrinoMomentum(const unsigned int id)
Set the momentum of the indicated neutrino.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theThreeChargedLeptonProperties
Triple charged lepton properties.
LorentzMomentum & pTmissMomentum()
Set the missing pT momentum.
PairProperties & eWIDPairProperties(const unsigned int id, const unsigned int jd)
Electroweak pair properties.
TripleProperties & jetPairNeutrinoTripleProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Jet-pair/neutrino triple properties.
vector< Ptr< JetRegion >::ptr > theJetRegions
The jet regions to match.
PairProperties & jetEWIDPairProperties(const unsigned int id, const unsigned int jd)
Jet/lepton(all sorted by ID) pair properties.
Ptr< JetFinder >::tptr jetFinder() const
The jet finder to use.
LorentzMomentum & chargedLeptonMomentum(const unsigned int id)
Set the momentum of the indicated charged lepton.
ObjectProperties & fourEWIDProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3, const unsigned int id4)
Four electroweak properties.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theThreeEWIDProperties
Triple electroweak properties.
TripleProperties & threeChargedLeptonProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Triple charged lepton properties.
map< pair< unsigned int, unsigned int >, PairProperties > theJetHiggsPairProperties
Jet/Higgs pair properties.
map< unsigned int, LorentzMomentum > theChargedLeptons
The reconstructed charged leptons.
TripleProperties & jetPairPTmissTripleProperties(const unsigned int id1, const unsigned int id2)
Jet-pair/missing pT triple properties.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theThreeJetProperties
Trijet properties.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theJetPairNeutrinoTripleProperties
Jet-pair/neutrino triple properties.
ObjectProperties thePTmissProperties
missing pT properties
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theJetPairEWIDTripleProperties
Jet-pair/electroweak triple properties.
PairProperties & chargedLeptonPairProperties(const unsigned int id, const unsigned int jd)
Charged lepton pair properties.
map< pair< unsigned int, unsigned int >, PairProperties > theJetEWIDPairProperties
Jet/electroweak pair properties.
unsigned int nJets() const
Return the number of matched jets.
Statistics::Histogram & nJetsInclusive()
Inclusive jet multiplicities.
map< unsigned int, LorentzMomentum > theEWIDs
The reconstructed electroweak particles.
const vector< Ptr< JetRegion >::ptr > & jetRegions() const
The jet regions to match.
static void Init()
The standard Init function used to initialize the interfaces.
map< unsigned int, ObjectProperties > theChargedLeptonProperties
Charged lepton properties.
LorentzMomentum & higgsMomentum(const unsigned int id)
Set the momentum of the indicated Higgs.
LeptonsJetsAnalysis & operator=(const LeptonsJetsAnalysis &)=delete
The assignment operator is private and must never be called.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
map< std::tuple< unsigned int, unsigned int, unsigned int, unsigned int >, ObjectProperties > theFourChargedLeptonProperties
Four charged lepton properties.
ObjectProperties & jetAverageProperties()
Jet-average properties.
ObjectProperties & higgsProperties(const unsigned int id)
Higgs properties.
map< pair< unsigned int, unsigned int >, PairProperties > theJetChargedLeptonPairProperties
Jet/charged lepton pair properties.
PairProperties & jetPairProperties(const unsigned int id, const unsigned int jd)
Jet pair properties.
map< unsigned int, ObjectProperties > theHiggsProperties
Higgs properties.
TripleProperties & threeEWIDProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3)
Triple electroweak properties – all sorted by ID.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual void finalize(XML::Element &)
Append any additional histograms to the given histogram element.
map< unsigned int, LorentzMomentum > theJets
The reconstructed jets.
ObjectProperties & jetSummedProperties()
Jet-summed properties.
map< pair< unsigned int, unsigned int >, TripleProperties > theJetPairPTmissTripleProperties
Jet-pair/missing pT triple properties.
ObjectProperties & eWIDProperties(const unsigned int id)
Lepton properties – all sorted by ID.
ObjectProperties & fourJetProperties(const unsigned int id1, const unsigned int id2, const unsigned int id3, const unsigned int id4)
Fourjet properties.
ObjectProperties & chargedLeptonProperties(const unsigned int id)
Charged lepton properties.
ObjectProperties theJetAverageProperties
Jet-average properties.
LorentzMomentum & jetMomentum(const unsigned int id)
Set the momentum of the indicated jet.
bool theIsShowered
Switch between fixed order and showered.
PairProperties & jetChargedLeptonPairProperties(const unsigned int id, const unsigned int jd)
Jet/charged lepton pair properties.
void analyze(ParticleVector &, long, double)
Analyze one subprocess, given the event number it belongs to.
void clear()
Clear the electroweak objects and jets for the next event.
map< std::tuple< unsigned int, unsigned int, unsigned int >, TripleProperties > theJetPairHiggsTripleProperties
Jet-pair/Higgs triple properties.
map< unsigned int, ObjectProperties > theNeutrinoProperties
Neutrino properties.
Statistics::Histogram & nJetsExclusive()
Exclusive jet multiplicities.
map< pair< unsigned int, unsigned int >, PairProperties > theChargedLeptonPairProperties
Charged lepton pair properties.
A pointlike or boxlike eventContribution; serves to define the EventContribution concept.
A (one dimensional) histogram.
void finalize()
Finalize this histogram.
bool count(EventContribution event, size_t id)
Book a contribution to the current event.
const std::vector< Bin > & bins() const
Return the bins.
XML::Element toXML() const
Return an XML element for the data of this histogram.
static std::vector< double > regularBinEdges(double lower, double upper, size_t nBins)
Create equally spaced bin edges.
InitState state() const
string name() const
tEGPtr generator() const
Element represents a (tree of) XML elements.
Definition: Element.h:56
Element & append(const Element &)
Append a child element to this element.
-*- C++ -*-
constexpr double pi
double sqrt(int x)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::Ptr< Event >::transient_pointer tEventPtr
vector< PPtr > ParticleVector
constexpr auto sqr(const T &x) -> decltype(x *x)
Collection of object histograms; ranges are adjusted to the maximum, so range constraints and rebinni...
void count(const LorentzMomentum &p, double weight, unsigned int id)
Count given momentum, weight and id.
void count(Energy perp, double rapidity, double xphi, Energy m, double weight, unsigned int id)
Count given momentum components, weight and id.
Statistics::Histogram pt
Transverse momentum.
ObjectProperties(const string &name, Energy)
Construct given Ecm.
void finalize(XML::Element &elem)
Convert to XML.
Collection of pair histograms; ranges are adjusted to the maximum, so range constraints and rebinning...
static double dR(const LorentzMomentum &a, const LorentzMomentum &b)
Calculate deltaR.
PairProperties(const string &name, Energy ecm)
Construct given Ecm.
void finalize(XML::Element &elem)
Convert to XML.
Statistics::Histogram deltaPhi
Delta phi.
void count(const LorentzMomentum &p, const LorentzMomentum &q, double weight, unsigned int id)
Count given momentum, weight and id.
static double dPhi(const LorentzMomentum &a, const LorentzMomentum &b)
Calculate deltaPhi.
Statistics::Histogram yDotY
Product of the rapidities.
static double dY(const LorentzMomentum &a, const LorentzMomentum &b)
Calculate deltaY.
static double yy(const LorentzMomentum &a, const LorentzMomentum &b)
Calculate ydoty.
Collection of triple histograms; ranges are adjusted to the maximum, so range constraints and rebinni...
static double dZstar(const LorentzMomentum &a, const LorentzMomentum &b, const LorentzMomentum &c)
Calculate deltaZ^* – normalized deltaY^*.
static double dYstar(const LorentzMomentum &a, const LorentzMomentum &b, const LorentzMomentum &c)
Calculate deltaY^*.
TripleProperties(const string &name, Energy ecm)
Construct given Ecm.
void finalize(XML::Element &elem)
Convert to XML.
void count(const LorentzMomentum &p, const LorentzMomentum &q, const LorentzMomentum &r, double weight, unsigned int id)
Count given momentum, weight and id.