Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JTRIGGER::JHitL1 Class Reference

Data structure for L1 hit. More...

#include <JHitL1.hh>

Inheritance diagram for JTRIGGER::JHitL1:
KM3NETDAQ::JDAQModuleIdentifier std::vector< JHitL0 > JMONITOR::JCluster

Public Member Functions

 JHitL1 ()
 Default constructor. More...
 
 JHitL1 (const JDAQModuleIdentifier &id)
 Constructor. More...
 
 JHitL1 (const JHitL0 &hit)
 Constructor. More...
 
template<class T >
 JHitL1 (const JDAQModuleIdentifier &id, T __begin, T __end)
 Constructor. More...
 
const JHitL1sort ()
 Sort L0 hits. More...
 
 operator const JPosition3D & () const
 Type conversion operator. More...
 
 operator const JAxis3D & () const
 Type conversion operator. More...
 
const JPosition3DgetPosition () const
 Get position. More...
 
double getX () const
 Get x position. More...
 
double getY () const
 Get y position. More...
 
double getZ () const
 Get z position. More...
 
double getT (const unsigned int i) const
 Get time of hit i. More...
 
double getT () const
 Get time. More...
 
double getToT () const
 Get overall time over threshold. More...
 
int getN () const
 Get count. More...
 
double getW () const
 Get weight. More...
 
JHitL1add (const JVector3D &pos)
 Add position. More...
 
JHitL1sub (const JVector3D &pos)
 Subtract position. More...
 
JHitL1rotate (const JRotation3D &R)
 Rotate hit. More...
 
JHitL1rotate_back (const JRotation3D &R)
 Rotate back hit. More...
 
void transform (const JRotation3D &R, const JVector3D &pos)
 Transform hit. More...
 
void transform_back (const JRotation3D &R, const JVector3D &pos)
 Transform back hit. More...
 
const JDAQModuleIdentifiergetModuleIdentifier () const
 Get Module identifier. More...
 
void setModuleIdentifier (const JDAQModuleIdentifier &module)
 Set Module identifier. More...
 
int getModuleID () const
 Get module identifier. More...
 
 ClassDefNV (JDAQModuleIdentifier, 1)
 

Protected Attributes

int id
 

Detailed Description

Data structure for L1 hit.

Definition at line 34 of file JHitL1.hh.

Constructor & Destructor Documentation

JTRIGGER::JHitL1::JHitL1 ( )
inline

Default constructor.

Definition at line 42 of file JHitL1.hh.

JTRIGGER::JHitL1::JHitL1 ( const JDAQModuleIdentifier id)
inline

Constructor.

Parameters
idmodule identifier

Definition at line 53 of file JHitL1.hh.

JTRIGGER::JHitL1::JHitL1 ( const JHitL0 hit)
inline

Constructor.

Parameters
hithit

Definition at line 64 of file JHitL1.hh.

64  :
66  std::vector<JHitL0>(1, hit)
67  {}
JDAQModuleIdentifier()
Default constructor.
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.
template<class T >
JTRIGGER::JHitL1::JHitL1 ( const JDAQModuleIdentifier id,
T  __begin,
T  __end 
)
inline

Constructor.

Parameters
idmodule identifier
__beginbegin of L0 hits
__endend of L0 hits

Definition at line 78 of file JHitL1.hh.

80  :
82  {
83  for (T i = __begin; i != __end; ++i) {
84  this->push_back(*i);
85  }
86 
87  this->sort();
88  }
JDAQModuleIdentifier()
Default constructor.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
const JHitL1 & sort()
Sort L0 hits.
Definition: JHitL1.hh:97

Member Function Documentation

const JHitL1& JTRIGGER::JHitL1::sort ( )
inline

Sort L0 hits.

Following the default sort operation, the time slewing implemented in method getT() is applicaple.

Returns
this hit

Definition at line 97 of file JHitL1.hh.

98  {
99  std::sort(this->begin(), this->end(), std::less<JHit>());
100 
101  return *this;
102  }
JTRIGGER::JHitL1::operator const JPosition3D & ( ) const
inline

Type conversion operator.

Returns
position

Definition at line 110 of file JHitL1.hh.

111  {
112  return *(this->begin());
113  }
JTRIGGER::JHitL1::operator const JAxis3D & ( ) const
inline

Type conversion operator.

Returns
axis

Definition at line 121 of file JHitL1.hh.

122  {
123  return *(this->begin());
124  }
const JPosition3D& JTRIGGER::JHitL1::getPosition ( ) const
inline

Get position.

Returns
position

Definition at line 132 of file JHitL1.hh.

133  {
134  return this->begin()->getPosition();
135  }
double JTRIGGER::JHitL1::getX ( ) const
inline

Get x position.

The x position is taken from the first L0 hit.

Returns
x position [m]

Definition at line 144 of file JHitL1.hh.

145  {
146  return this->begin()->getX();
147  }
double JTRIGGER::JHitL1::getY ( ) const
inline

Get y position.

The y position is taken from the first L0 hit.

Returns
y position [m]

Definition at line 156 of file JHitL1.hh.

157  {
158  return this->begin()->getY();
159  }
double JTRIGGER::JHitL1::getZ ( ) const
inline

Get z position.

The z position is taken from the first L0 hit.

Returns
z position [m]

Definition at line 168 of file JHitL1.hh.

169  {
170  return this->begin()->getZ();
171  }
double JTRIGGER::JHitL1::getT ( const unsigned int  i) const
inline

Get time of hit i.

Note that the time is corrected for the average time slewing.

Parameters
iindex
Returns
time [ns]

Definition at line 181 of file JHitL1.hh.

182  {
183  static const double t0 = 1.29; // [ns]
184 
185  return at(i).getT() - t0;
186  }
double JTRIGGER::JHitL1::getT ( ) const
inline

Get time.

The time is taken from the first L0 hit corrected for time slewing.

Returns
time [ns]

Definition at line 195 of file JHitL1.hh.

196  {
197  static std::vector<double> t0;
198 
199  if (t0.empty()) {
200 
201  t0.push_back(+0.00);
202  t0.push_back(+0.39);
203  t0.push_back(+0.21);
204  t0.push_back(-0.59);
205  t0.push_back(-1.15);
206  t0.push_back(-1.59);
207  t0.push_back(-1.97);
208  t0.push_back(-2.30);
209  t0.push_back(-2.56);
210  t0.push_back(-2.89);
211  t0.push_back(-3.12);
212  t0.push_back(-3.24);
213  t0.push_back(-3.56);
214  t0.push_back(-3.69);
215  t0.push_back(-4.00);
216  t0.push_back(-4.10);
217  t0.push_back(-4.16);
218  t0.push_back(-4.49);
219  t0.push_back(-4.71);
220  t0.push_back(-4.77);
221  t0.push_back(-4.81);
222  t0.push_back(-4.87);
223  t0.push_back(-4.88);
224  t0.push_back(-4.83);
225  t0.push_back(-5.21);
226  t0.push_back(-5.06);
227  t0.push_back(-5.27);
228  t0.push_back(-5.18);
229  t0.push_back(-5.24);
230  t0.push_back(-5.79);
231  t0.push_back(-6.78);
232  t0.push_back(-6.24);
233  }
234 
235  if (this->size() >= t0.size())
236  return this->begin()->getT() - t0.back();
237  else
238  return this->begin()->getT() - t0[this->size()];
239  }
double JTRIGGER::JHitL1::getToT ( ) const
inline

Get overall time over threshold.

Returns
time over threshold [ns]

Definition at line 247 of file JHitL1.hh.

248  {
249  return JHit(this->begin(), this->end()).getToT();
250  }
Acoustics hit.
int JTRIGGER::JHitL1::getN ( ) const
inline

Get count.

Returns
count

Definition at line 258 of file JHitL1.hh.

259  {
260  return this->size();
261  }
double JTRIGGER::JHitL1::getW ( ) const
inline

Get weight.


The weight is equal to the number of L0 hits.

Returns
weight

Definition at line 270 of file JHitL1.hh.

271  {
272  return this->size();
273  }
JHitL1& JTRIGGER::JHitL1::add ( const JVector3D pos)
inline

Add position.

Parameters
posposition
Returns
this hit

Definition at line 282 of file JHitL1.hh.

283  {
284  for (iterator i = this->begin(); i != this->end(); ++i) {
285  i->add(pos);
286  }
287 
288  return *this;
289  }
JHitL1& JTRIGGER::JHitL1::sub ( const JVector3D pos)
inline

Subtract position.

Parameters
posposition
Returns
this hit

Definition at line 298 of file JHitL1.hh.

299  {
300  for (iterator i = this->begin(); i != this->end(); ++i) {
301  i->sub(pos);
302  }
303 
304  return *this;
305  }
JHitL1& JTRIGGER::JHitL1::rotate ( const JRotation3D R)
inline

Rotate hit.

Parameters
Rrotation matrix
Returns
this hit

Definition at line 314 of file JHitL1.hh.

315  {
316  for (iterator i = this->begin(); i != this->end(); ++i) {
317  i->rotate(R);
318  }
319 
320  return *this;
321  }
JHitL1& JTRIGGER::JHitL1::rotate_back ( const JRotation3D R)
inline

Rotate back hit.

Parameters
Rrotation matrix
Returns
this hit

Definition at line 330 of file JHitL1.hh.

331  {
332  for (iterator i = this->begin(); i != this->end(); ++i) {
333  i->rotate_back(R);
334  }
335 
336  return *this;
337  }
void JTRIGGER::JHitL1::transform ( const JRotation3D R,
const JVector3D pos 
)
inline

Transform hit.

Parameters
Rrotation matrix
posposition of origin (after rotation)

Definition at line 346 of file JHitL1.hh.

348  {
349  for (iterator i = this->begin(); i != this->end(); ++i) {
350  i->transform(R, pos);
351  }
352  }
void JTRIGGER::JHitL1::transform_back ( const JRotation3D R,
const JVector3D pos 
)
inline

Transform back hit.

Parameters
Rrotation matrix
posposition of origin (before rotation)

Definition at line 361 of file JHitL1.hh.

363  {
364  for (iterator i = this->begin(); i != this->end(); ++i) {
365  i->transform_back(R, pos);
366  }
367  }
const JDAQModuleIdentifier& KM3NETDAQ::JDAQModuleIdentifier::getModuleIdentifier ( ) const
inlineinherited

Get Module identifier.

Returns
Module identifier

Definition at line 50 of file JDAQModuleIdentifier.hh.

51  {
52  return *this;
53  }
void KM3NETDAQ::JDAQModuleIdentifier::setModuleIdentifier ( const JDAQModuleIdentifier module)
inlineinherited

Set Module identifier.

Parameters
moduleModule identifier

Definition at line 61 of file JDAQModuleIdentifier.hh.

62  {
63  *this = module;
64  }
int KM3NETDAQ::JDAQModuleIdentifier::getModuleID ( ) const
inlineinherited

Get module identifier.

Returns
module identifier

Definition at line 72 of file JDAQModuleIdentifier.hh.

73  {
74  return id;
75  }
KM3NETDAQ::JDAQModuleIdentifier::ClassDefNV ( JDAQModuleIdentifier  ,
 
)
inherited

Member Data Documentation

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 112 of file JDAQModuleIdentifier.hh.


The documentation for this class was generated from the following file: