User Tools

Site Tools


root:custompdfsandworkspace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
root:custompdfsandworkspace [2012/01/28 15:52] decianmroot:custompdfsandworkspace [2012/04/25 20:07] decianm
Line 52: Line 52:
    
 </code> </code>
- +you need to define something like:
- +
- +
- +
- +
- you need to define something like:+
 <code C> <code C>
 + RooExpAndGauss::RooExpAndGauss()
 + {
 +   RooRealVar xRV("xRV","x", 0.0, 1.0);
 +   RooRealVar sh_meanRV("sh_meanRV", "sh_mean", 0.0, 1.0);
 +   RooRealVar sh_sigmaRV("sh_sigmaRV","sh_sigma", 0.0, 1.0);
 +   RooRealVar sh_transRV("sh_transRV","sh_trans", 0.0, 1.0);
  
 +   RooExpAndGauss("RooExpAndGauss", "RooExpAndGauss", xRV, sh_meanRV, sh_sigmaRV, sh_transRV);
 +}
 +</code>
 +to initialize the member variables (which are use in the evaluate-method).
  
 +You then can compile the class as all other private classes and add the library to you rootlogon to have it at hand.
  
 +**Note:** Make sure you have set the number in "ClassDef(myClass, number)" to something larger than 0. Otherwise the class won't allow I/O.
 +**Note:** Don't even think of using the constructor "x("x","x"this,other.x)" in the copy constructor of your class. It will compile but will ever let you wonder why it segfaults afterwards (http://root.cern.ch/phpBB3/viewtopic.php?f=15&t=12788)
  
  
root/custompdfsandworkspace.txt · Last modified: 2012/04/25 20:07 by decianm