Hall-D Software
alpha
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
sc_t.h
Go to the documentation of this file.
1
// $Id$
2
//
3
// File: sc_t.h
4
// Created: Wed Dec 30 13:50:43 EST 2009
5
// Creator: davidl (on Darwin harriet.jlab.org 9.8.0 i386)
6
//
7
8
#ifndef _sc_t_
9
#define _sc_t_
10
11
#include <math.h>
12
13
#include <iostream>
14
15
#include <TObject.h>
16
#include <TVector3.h>
17
#include <TLorentzVector.h>
18
19
class
sc_t
:
public
TObject{
20
public
:
21
22
sc_t
(
void
){}
23
24
float
phi_center
;
// phi angle of center of paddle hit (rad)
25
float
phi_diff
;
// difference in phi between paddle center and eta_best
26
27
// This is used to sort the TClonesArray fcal in Event
28
Bool_t
IsSortable
(
void
)
const
{
return
kTRUE;}
29
Int_t
Compare
(
const
TObject *a)
const
{
30
// sort by decreasing energy
31
Double32_t diff = fabs(((
sc_t
*)a)->
phi_diff
) - fabs(((
sc_t
*)
this
)->
phi_diff
);
32
if
(diff>0.0)
return
-1;
33
if
(diff<0.0)
return
+1;
34
return
0;
35
}
36
37
sc_t
&
operator=
(
const
sc_t
&ti){
38
this->
phi_center
= ti.
phi_center
;
39
this->
phi_diff
= ti.
phi_diff
;
40
return
*
this
;
41
}
42
43
private
:
44
ClassDef
(
sc_t
,1);
45
};
46
47
48
49
#endif // _sc_t_
50
sc_t::sc_t
sc_t(void)
Definition:
sc_t.h:22
sc_t::phi_diff
float phi_diff
Definition:
sc_t.h:25
sc_t::IsSortable
Bool_t IsSortable(void) const
Definition:
sc_t.h:28
sc_t
Definition:
sc_t.h:19
sc_t::Compare
Int_t Compare(const TObject *a) const
Definition:
sc_t.h:29
sc_t::operator=
sc_t & operator=(const sc_t &ti)
Definition:
sc_t.h:37
sc_t::phi_center
float phi_center
Definition:
sc_t.h:24
sc_t::ClassDef
ClassDef(sc_t, 1)
plugins
Analysis
eta_ntuple
sc_t.h
Generated on Fri Jul 26 2019 14:03:02 for Hall-D Software by
1.8.5