Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-2753

[ FEATURE REQUEST ] RooRealVar for vector/array of variables

    XMLWordPrintable

Details

    • New Feature
    • Status: Reopened (View Workflow)
    • Medium
    • Resolution: Unresolved
    • < v5-28-00
    • None
    • RooFit/RooStats
    • None
    • GNU/Linux

    Description

      Hello,

      one can create a RooDataSet with a given selection on variables by doing :

      RooRealVar myvariable(&quot;myvariable&quot;,...)
      RooDataSet mydataset(&quot;mydataset&quot;,&quot;mydataset&quot;,mytree,myvariable,&quot;condition on
      myvariable&quot

      for which &quot;condition on the variable&quot; could be for example : &quot;myvariable&lt;10&quot;

      this works well if myvariable is a float for example

      but in the case where myvariable is a vector (i mean a array) of float or anything else :

      (myvector_variable[0], myvector_myvariable[1], etc...), how to do to make a selection on the first (or any index) element of the vector, with a condition on the element of the vector ?

      it seems this is not implemented in roofit ?

      i mean, if i do this :

      RooRealVar myvector_variable(&quot;myvariable&quot;,...)
      RooDataSet mydataset(&quot;mydataset&quot;,&quot;mydataset&quot;,mytree,myvector_variable,&quot;myvector_variable[0]&lt;10&quot

      it crashes

      if i do :
      RooRealVar myvector_variable(&quot;myvector_variable&quot;,...)
      RooDataSet mydataset(&quot;mydataset&quot;,&quot;mydataset&quot;,mytree,myvariable[0],&quot;myvector_variable[0]&lt;10&quot

      it is &quot;forbidden&quot; by the root/roofit program

      by the way, it crashes also if i do :

      RooRealVar myvector_variable(&quot;myvariable&quot;,...)
      RooDataSet mydataset(&quot;mydataset&quot;,&quot;mydataset&quot;,mytree,myvector_variable)

      (if myvariable is a vector and not a simple variable)

      thanks

      Attachments

        Activity

          People

            shageboe Stephan Hageboeck
            escalier Marc Escalier
            Votes:
            9 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: