# Modelling Systematic Uncertainties

**URL:** <https://root-forum.cern.ch/t/modelling-systematic-uncertainties/32788>\
**Category:** TMVA\
**Tags:** tree\
**Created:** [February 18, 2019, 3:16pm UTC](https://root-forum.cern.ch/t/modelling-systematic-uncertainties/32788 "2019-02-18T15:16:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aelmouss](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aelmouss/32/34915_2.png) [@aelmouss](https://root-forum.cern.ch/u/aelmouss)\
**Post date:** [February 18, 2019, 3:16pm UTC](https://root-forum.cern.ch/t/modelling-systematic-uncertainties/32788/1 "2019-02-18T15:16:00Z")

</div>

Hi all, please I need some help! I would like to see a distribution of MCEventWeight\_MC14, but I find only something wrong like this in the picture?

 ![CT14](https://root-forum.cern.ch/uploads/default/original/3X/5/4/54aa066629074d3a9217f21fec36d297090cbbe0.png)

I do not know exactly if this error means I’m missing something in the code or some other parameter somewhere?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 18, 2019, 3:21pm UTC](https://root-forum.cern.ch/t/modelling-systematic-uncertainties/32788/2 "2019-02-18T15:21:47Z")

</div>

It seems that you have 666 events and for (almost?) all of them: MCEventWeight\_MC14 = 1.0

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [February 18, 2019, 3:33pm UTC](https://root-forum.cern.ch/t/modelling-systematic-uncertainties/32788/3 "2019-02-18T15:33:20Z")

</div>

Hi,

Could you elaborate a bit on what it is we are seeing? What is this variable `MCEventWeight_MC14`, where does it come from and how are you plotting it?

It seems indeed as @Wile_E_Coyote says, all the events are generated with the same weight.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![aelmouss](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aelmouss/32/34915_2.png) [@aelmouss](https://root-forum.cern.ch/u/aelmouss)\
**Post date:** [February 18, 2019, 6:53pm UTC](https://root-forum.cern.ch/t/modelling-systematic-uncertainties/32788/4 "2019-02-18T18:53:21Z")

</div>

Hi,

@kialbert , My goal is to produce the EasyTree distribution for MCEventWeights\_MC14 variable in the output folders. so I add some lines of code to my file.cxx and I run the code over this variable.

here are the lines of code that I added:

if(m\_isMC){  
bool isVJetsFromSherpa = ((364114 \<= m\_eventInfo-\>mcChannelNumber() && m\_eventInfo-\>mcChannelNumber() \<= 364197) || (364100 \<= m\_eventInfo-\>mcChannelNumber() && m\_eventInfo-\>mcChannelNumber() \<= 364113));  
m\_etree-\>SetBranchAndValue(“MCEventWeight\_CT14”, (m\_eventInfo-\>mcChannelNumber() == 410472) ? Props::MCEventWeightSys.get(m\_eventInfo).at(10) : (isVJetsFromSherpa ? Props::MCEventWeightSys.get(m\_eventInfo).at(114) : 1.0), 1.0);  
}

Best,  
Ali
