# Spectator variables not define in AddVariable

**URL:** <https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421>\
**Category:** TMVA\
**Created:** [September 1, 2022, 5:30am UTC](https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421 "2022-09-01T05:30:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chanchal](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@chanchal](https://root-forum.cern.ch/u/chanchal)\
**Post date:** [September 1, 2022, 5:30am UTC](https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421/1 "2022-09-01T05:30:23Z")

</div>

Dear Expert,

I want to add a few spectator variables but don’t want to use them for classifications i.e. can not add as an input variable (can not define in AddVariable).  
Only wants to have them in the output file for some correlation tests with classifier output.

Is it possible?

Regards  
Chanchal

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [September 1, 2022, 1:09pm UTC](https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421/2 "2022-09-01T13:09:28Z")

</div>

Hi,

Instead of `AddVariable` you should use `AddSpectator`

Lorenzo

---

<div class="post-metadata">

**Author:** ![chanchal](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@chanchal](https://root-forum.cern.ch/u/chanchal)\
**Post date:** [September 2, 2022, 7:59am UTC](https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421/3 "2022-09-02T07:59:29Z")

</div>

Thanks.
