Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8310016
ModeFinderFunctor.cpp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
ModeFinderFunctor.cpp
View Options
//==============================================================================
// ModeFinderFunctor.cpp
//
// Copyright (C) 2010-2013 Tobias Toll and Thomas Ullrich
//
// This file is part of Sartre version: 1.1
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation.
// This program is distributed in the hope that it will be useful,
// but without any warranty; without even the implied warranty of
// merchantability or fitness for a particular purpose. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// Author: Thomas Ullrich
// Last update:
// $Date: 2013-05-29 21:26:19 +0100 (Wed, 29 May 2013) $
// $Author: thomas.ullrich@bnl.gov $
//==============================================================================
#include
"ModeFinderFunctor.h"
#include
"CrossSection.h"
#include
"Kinematics.h"
using
namespace
std
;
ModeFinderFunctor
::
ModeFinderFunctor
()
{
mCrossSection
=
0
;
mQ2
=
mVmMass
=
mMinT
=
mMaxT
=
0
;
}
ModeFinderFunctor
::
ModeFinderFunctor
(
CrossSection
*
cs
,
double
Q2
,
double
vmMass
,
double
tmin
,
double
tmax
)
{
mCrossSection
=
cs
;
mQ2
=
Q2
;
mVmMass
=
vmMass
;
mMinT
=
tmin
;
mMaxT
=
tmax
;
}
void
ModeFinderFunctor
::
setVmMass
(
double
val
)
{
mVmMass
=
val
;}
void
ModeFinderFunctor
::
setQ2
(
double
val
)
{
mQ2
=
val
;}
void
ModeFinderFunctor
::
setMinT
(
double
val
)
{
mMinT
=
val
;}
void
ModeFinderFunctor
::
setMaxT
(
double
val
)
{
mMaxT
=
val
;}
double
ModeFinderFunctor
::
DoEval
(
double
W2
)
const
{
if
(
mCrossSection
)
{
double
t
=
Kinematics
::
tmax
(
0
,
mQ2
,
W2
,
mVmMass
);
// first arg (t) set to 0 here
if
(
t
>
mMaxT
)
t
=
mMaxT
;
// don't exceed given (table) maximum (smallest |t|)
if
(
t
<
mMinT
)
return
0
;
// lower table limits (treat different than max limit)
double
result
=
(
*
mCrossSection
)(
t
,
mQ2
,
W2
);
// t, Q2, W2
return
-
result
;
// minimum=maximum
}
else
{
return
0
;
}
}
ROOT
::
Math
::
IGenFunction
*
ModeFinderFunctor
::
Clone
()
const
{
return
new
ModeFinderFunctor
(
mCrossSection
,
mQ2
,
mVmMass
,
mMinT
,
mMaxT
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Dec 21, 5:09 PM (14 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3955778
Default Alt Text
ModeFinderFunctor.cpp (2 KB)
Attached To
rSARTRESVN sartresvn
Event Timeline
Log In to Comment