ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CITCommon/FitModels/RooCMSShape.cc
Revision: 1.1
Committed: Sat Jul 21 13:39:48 2012 UTC (12 years, 9 months ago) by sixie
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
add various functional models

File Contents

# User Rev Content
1 sixie 1.1 /*****************************************************************************
2     * Project: CMS detector at the CERN
3     *
4     * Package: PhysicsTools/TagAndProbe/RooCMSShape
5     *
6     *
7     * Authors:
8     * Nadia Adam, Princeton - neadam@princeton.edu
9     * Adam Hunt, Princeton - ahunt@princeton.edu
10     * Kalanand Mishra, Fermilab - kalanand@fnal.gov
11     *
12     * Description:
13     * Defines a probability density function which has exponential decay
14     * distribution at high mass beyond the pole position (say, Z peak)
15     * but turns over (i.e., error function) at low mass due to threshold
16     * effect. We use this to model the background shape in Z->ll invariant
17     * mass.
18     * History:
19     *
20     *
21     * Copyright (C) 2008 FNAL
22     *****************************************************************************/
23    
24     #include "RooCMSShape.h"
25    
26     ClassImp(RooCMSShape)
27    
28     RooCMSShape::RooCMSShape(const char *name, const char *title,
29     RooAbsReal& _x,
30     RooAbsReal& _alpha,
31     RooAbsReal& _beta,
32     RooAbsReal& _gamma,
33     RooAbsReal& _peak) :
34     RooAbsPdf(name,title),
35     x("x","x",this,_x),
36     alpha("alpha","alpha",this,_alpha),
37     beta("beta","beta",this,_beta),
38     gamma("gamma","gamma",this,_gamma),
39     peak("peak","peak",this,_peak)
40     { }
41    
42    
43     RooCMSShape::RooCMSShape(const RooCMSShape& other, const char* name):
44     RooAbsPdf(other,name),
45     x("x",this,other.x),
46     alpha("alpha",this,other.alpha),
47     beta("beta",this,other.beta),
48     gamma("gamma",this,other.gamma),
49     peak("peak",this,other.peak)
50     { }
51    
52    
53    
54     Double_t RooCMSShape::evaluate() const
55     {
56     // ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE
57    
58     //Double_t erf = TMath::Erfc((alpha - x) * beta);
59     Double_t erf = RooMath::erfc((alpha - x) * beta);
60     Double_t u = (x - peak)*gamma;
61    
62     if(u < -70) u = 1e20;
63     else if( u>70 ) u = 0;
64     else u = exp(-u); //exponential decay
65     return erf*u;
66     }