AmpTools
AmpVecs.h
Go to the documentation of this file.
1 #ifndef AMPVECS
2 #define AMPVECS
3 
4 //******************************************************************************
5 // This file is part of AmpTools, a package for performing Amplitude Analysis
6 //
7 // Copyright Trustees of Indiana University 2010, all rights reserved
8 //
9 // This software written by Matthew Shepherd, Ryan Mitchell, and
10 // Hrayr Matevosyan at Indiana University, Bloomington
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions
14 // are met:
15 // 1. Redistributions of source code must retain the above copyright
16 // notice and author attribution, this list of conditions and the
17 // following disclaimer.
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice and author attribution, this list of conditions and the
20 // following disclaimer in the documentation and/or other materials
21 // provided with the distribution.
22 // 3. Neither the name of the University nor the names of its contributors
23 // may be used to endorse or promote products derived from this software
24 // without specific prior written permission.
25 //
26 // Creation of derivative forms of this software for commercial
27 // utilization may be subject to restriction; written permission may be
28 // obtained from the Trustees of Indiana University.
29 //
30 // INDIANA UNIVERSITY AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES,
31 // EXPRESS OR IMPLIED. By way of example, but not limitation, INDIANA
32 // UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCANTABILITY OR
33 // FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THIS SOFTWARE OR
34 // DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS,
35 // OR OTHER RIGHTS. Neither Indiana University nor the authors shall be
36 // held liable for any liability with respect to any claim by the user or
37 // any other party arising from use of the program.
38 //******************************************************************************
39 
41 
42 #ifdef GPU_ACCELERATION
43 #include "GPUManager/GPUManager.h"
44 #endif
45 
46 class DataReader;
47 class IntensityManager;
48 class Kinematics;
49 
61 //A helper struct for parameter passing
62 struct AmpVecs
63 {
64 
68  unsigned long long m_iNEvents;
69 
75  unsigned long long m_iNTrueEvents;
76 
84 
88  unsigned int m_iNParticles;
89 
94  unsigned int m_iNTerms;
95 
100  unsigned int m_maxFactPerEvent;
101 
107 
112 
118 
125 
133 
138 
146 
154 
155 #ifdef GPU_ACCELERATION
156 
160 
161 #endif
162 
167  AmpVecs();
168 
176 
189  void allocateTerms( const IntensityManager& intenMan,
190  bool bAllocIntensity = false );
191 
192 #ifdef GPU_ACCELERATION
193 
203  void allocateCPUAmpStorage( const IntensityManager& intenMan );
204 #endif
205 
218  void loadData( DataReader* pDataReader, bool bForceNegativeWeight = false );
219 
235  void loadEvent( const Kinematics* pKinematics, unsigned long long iEvent = 0,
236  unsigned long long iNTrueEvents = 1,
237  bool bForceNegativeWeight = false );
238 
246  Kinematics* getEvent( int i );
247 
252  void deallocAmpVecs();
253 };
254 
255 #endif
256 
unsigned long long m_iNEvents
Definition: AmpVecs.h:68
void allocateTerms(const IntensityManager &intenMan, bool bAllocIntensity=false)
Definition: AmpVecs.cc:235
bool m_termsValid
Definition: AmpVecs.h:145
AmpVecs()
Definition: AmpVecs.cc:49
unsigned int m_maxFactPerEvent
Definition: AmpVecs.h:100
GPUManager m_gpuMan
Definition: AmpVecs.h:159
void allocateCPUAmpStorage(const IntensityManager &intenMan)
Definition: AmpVecs.cc:280
~AmpVecs()
Definition: AmpVecs.h:175
double GDouble
void deallocAmpVecs()
Definition: AmpVecs.cc:73
bool m_integralValid
Definition: AmpVecs.h:153
GDouble * m_pdAmps
Definition: AmpVecs.h:117
unsigned long long m_iNTrueEvents
Definition: AmpVecs.h:75
GDouble * m_pdWeights
Definition: AmpVecs.h:111
double m_dAbsSumWeights
Definition: AmpVecs.h:83
unsigned int m_iNParticles
Definition: AmpVecs.h:88
void loadData(DataReader *pDataReader, bool bForceNegativeWeight=false)
Definition: AmpVecs.cc:193
GDouble * m_pdIntensity
Definition: AmpVecs.h:137
Kinematics * getEvent(int i)
Definition: AmpVecs.cc:299
GDouble * m_pdData
Definition: AmpVecs.h:106
void loadEvent(const Kinematics *pKinematics, unsigned long long iEvent=0, unsigned long long iNTrueEvents=1, bool bForceNegativeWeight=false)
Definition: AmpVecs.cc:128
GDouble * m_pdAmpFactors
Definition: AmpVecs.h:124
GDouble * m_pdIntegralMatrix
Definition: AmpVecs.h:132
unsigned int m_iNTerms
Definition: AmpVecs.h:94