Skip to content
Dylan Teague edited this page Jul 24, 2017 · 3 revisions

Met Vector

The met vector is split up into a class of its own to accommodate different systematics. If a systematic is set, the Met is naturally altered due to the shifting, smearing, etc. of the vectors. So, the Met vectors are put into a map which correspond to each systematic.

To use the Met object, one needs to first set the correct systematic one is using with the setCurrentP function. Then, the respective getter functions can be called to get the values associated with that systematics' Met Vector.

Constructor and Destructor

Met();
virtual ~Met() {}

Not defined, just default constructor and destructor


Met(TTree* BOOM, string GenName, vector<string> syst_names);

This constructor is formatted in the same way as the Particle Objects. There is the TTree, BOOM that holds the branches to the values needed, and the GenName which is the general name used to generically find the branches in the TTree. The syst_names are there to set up the maps in the object for later setting.


Setter and Getter

double pt() const;
double px() const;
double py() const;
double eta() const;
double phi() const;
double energy() const;
double HT() const;
double MHT() const;
double MHTphi() const;
TLorentzVector p4() const;
TLorentzVector& p4();

Basic getters for variables of the MET vector


void addPtEtaPhiESyst(double pt, double eta, double phi, double e, string syst);
void addP4Syst(TLorentzVector mp4, string syst);

These are the Met setters which specify a certain systematic. When the Met is recalculated and needs to be inserted for a systematic, these functions allow for that systematic


void setCurrentP(string syst);

Set which systematic vector to point to. Essential for setting up the met, so the getter functions grab the correct met values corresponding to the specific systematic case


string getName() {return GenName;};

Return the name corresponding to the branch name in a root file used for smearing.


Public Functions

void init();

Called at the start of every event so to clear all of the systematic met vectors and reset the object to the regular "orig" systematic (ie no systematic at all)


void unBranch();

Stops the TTree from updating the branches in the Met object


void update(string syst="orig");

Takes all of the changes in the Met vector that come from smearing or shift, etc. to update the Met vector to its final value. This is only done for the systematic vector specified in the syst value. Lastly, the current Met vector is set to the one at syst


Public Values

TLorentzVector Reco;
TLorentzVector *cur_P;
unordered_map<string, TLorentzVector* > systVec;
unordered_map<string, double > systdeltaMEx;
unordered_map<string, double > systdeltaMEy;
unordered_map<string, double > syst_HT;
unordered_map<string, double > syst_MHT;
unordered_map<string, double > syst_MHTphi;
string activeSystematic;
  • Reco: Default reco met vector that comes from the Ntuple
  • cur_P: pointer to the current momentum vector set by setCurrentP
  • systVec: map that holds all different Met vectors corresponding to systematics The other syst_* are simply maps pointing to their respective values as well for each systematic

Protected Values

TTree* BOOM;
string GenName;
double mMet[3] = {0, 0, 0};
double MetUnclUp[2] = {0, 0};
double MetUnclDown[2] = {0, 0};
bool hasUncl=false;
  • BOOM: TTree of the Met related values
  • GenName: General name used to specify the Met related values in the Ntuples
  • mMet: vector with raw Met values
  • MetUnclUp/Down: Shifts up and down, but only in Pt and Phi
  • hasUncl: boolean to speed up code, only true if there are shifts

Clone this wiki locally