Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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

Classes

struct  compare
 Auxiliary data structure for sorting of hits. More...
 

Public Member Functions

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

Static Public Attributes

static const struct JTRIGGER::JHitL1::compare compare
 

Protected Attributes

int id
 

Detailed Description

Data structure for L1 hit.

Definition at line 34 of file JHitL1.hh.

Constructor & Destructor Documentation

◆ JHitL1() [1/4]

JTRIGGER::JHitL1::JHitL1 ( )
inline

Default constructor.

Definition at line 42 of file JHitL1.hh.

◆ JHitL1() [2/4]

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

Constructor.

Parameters
idmodule identifier

Definition at line 53 of file JHitL1.hh.

53 :
56 {}

◆ JHitL1() [3/4]

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

Constructor.

Parameters
hithit

Definition at line 64 of file JHitL1.hh.

64 :
67 {}
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.

◆ JHitL1() [4/4]

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 }
const JHitL1 & sort()
Sort L0 hits.
Definition JHitL1.hh:97

Member Function Documentation

◆ sort()

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 }

◆ operator const JPosition3D &()

JTRIGGER::JHitL1::operator const JPosition3D & ( ) const
inline

Type conversion operator.

Returns
position

Definition at line 110 of file JHitL1.hh.

111 {
112 return this->getPosition();
113 }
const JPosition3D & getPosition() const
Get position.
Definition JHitL1.hh:121

◆ getPosition()

const JPosition3D & JTRIGGER::JHitL1::getPosition ( ) const
inline

Get position.

Returns
position

Definition at line 121 of file JHitL1.hh.

122 {
123 return this->begin()->getPosition();
124 }

◆ getX()

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 133 of file JHitL1.hh.

134 {
135 return this->begin()->getX();
136 }

◆ getY()

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 145 of file JHitL1.hh.

146 {
147 return this->begin()->getY();
148 }

◆ getZ()

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 157 of file JHitL1.hh.

158 {
159 return this->begin()->getZ();
160 }

◆ getT() [1/2]

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 170 of file JHitL1.hh.

171 {
172 static const double t0 = 1.29; // [ns]
173
174 return at(i).getT() - t0;
175 }

◆ getT() [2/2]

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 184 of file JHitL1.hh.

185 {
186 static std::vector<double> t0;
187
188 if (t0.empty()) {
189
190 t0.push_back(+0.00);
191 t0.push_back(+0.39);
192 t0.push_back(+0.21);
193 t0.push_back(-0.59);
194 t0.push_back(-1.15);
195 t0.push_back(-1.59);
196 t0.push_back(-1.97);
197 t0.push_back(-2.30);
198 t0.push_back(-2.56);
199 t0.push_back(-2.89);
200 t0.push_back(-3.12);
201 t0.push_back(-3.24);
202 t0.push_back(-3.56);
203 t0.push_back(-3.69);
204 t0.push_back(-4.00);
205 t0.push_back(-4.10);
206 t0.push_back(-4.16);
207 t0.push_back(-4.49);
208 t0.push_back(-4.71);
209 t0.push_back(-4.77);
210 t0.push_back(-4.81);
211 t0.push_back(-4.87);
212 t0.push_back(-4.88);
213 t0.push_back(-4.83);
214 t0.push_back(-5.21);
215 t0.push_back(-5.06);
216 t0.push_back(-5.27);
217 t0.push_back(-5.18);
218 t0.push_back(-5.24);
219 t0.push_back(-5.79);
220 t0.push_back(-6.78);
221 t0.push_back(-6.24);
222 }
223
224 if (this->size() >= t0.size())
225 return this->begin()->getT() - t0.back();
226 else
227 return this->begin()->getT() - t0[this->size()];
228 }

◆ getToT()

double JTRIGGER::JHitL1::getToT ( ) const
inline

Get overall time over threshold.

Returns
time over threshold [ns]

Definition at line 236 of file JHitL1.hh.

237 {
238 return JHit(this->begin(), this->end()).getToT();
239 }
Acoustics hit.

◆ getN()

int JTRIGGER::JHitL1::getN ( ) const
inline

Get count.

Returns
count

Definition at line 247 of file JHitL1.hh.

248 {
249 return this->size();
250 }

◆ getW()

double JTRIGGER::JHitL1::getW ( ) const
inline

Get weight.


The weight is equal to the number of L0 hits.

Returns
weight

Definition at line 259 of file JHitL1.hh.

260 {
261 return this->size();
262 }

◆ add()

JHitL1 & JTRIGGER::JHitL1::add ( const JVector3D & pos)
inline

Add position.

Parameters
posposition
Returns
this hit

Definition at line 271 of file JHitL1.hh.

272 {
273 for (iterator i = this->begin(); i != this->end(); ++i) {
274 i->add(pos);
275 }
276
277 return *this;
278 }

◆ sub()

JHitL1 & JTRIGGER::JHitL1::sub ( const JVector3D & pos)
inline

Subtract position.

Parameters
posposition
Returns
this hit

Definition at line 287 of file JHitL1.hh.

288 {
289 for (iterator i = this->begin(); i != this->end(); ++i) {
290 i->sub(pos);
291 }
292
293 return *this;
294 }

◆ rotate()

JHitL1 & JTRIGGER::JHitL1::rotate ( const JRotation3D & R)
inline

Rotate hit.

Parameters
Rrotation matrix
Returns
this hit

Definition at line 303 of file JHitL1.hh.

304 {
305 for (iterator i = this->begin(); i != this->end(); ++i) {
306 i->rotate(R);
307 }
308
309 return *this;
310 }

◆ rotate_back()

JHitL1 & JTRIGGER::JHitL1::rotate_back ( const JRotation3D & R)
inline

Rotate back hit.

Parameters
Rrotation matrix
Returns
this hit

Definition at line 319 of file JHitL1.hh.

320 {
321 for (iterator i = this->begin(); i != this->end(); ++i) {
322 i->rotate_back(R);
323 }
324
325 return *this;
326 }

◆ transform()

void JTRIGGER::JHitL1::transform ( const JRotation3D & R,
const JVector3D & pos )
inline

Transform hit.

Parameters
Rrotation matrix
posposition of origin (after rotation)

Definition at line 335 of file JHitL1.hh.

337 {
338 for (iterator i = this->begin(); i != this->end(); ++i) {
339 i->transform(R, pos);
340 }
341 }

◆ transform_back()

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 350 of file JHitL1.hh.

352 {
353 for (iterator i = this->begin(); i != this->end(); ++i) {
354 i->transform_back(R, pos);
355 }
356 }

◆ getModuleIdentifier()

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 }

◆ setModuleIdentifier()

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 }

◆ getModuleID()

int KM3NETDAQ::JDAQModuleIdentifier::getModuleID ( ) const
inlineinherited

Get module identifier.

Returns
module identifier

Definition at line 72 of file JDAQModuleIdentifier.hh.

◆ ClassDefNV()

KM3NETDAQ::JDAQModuleIdentifier::ClassDefNV ( JDAQModuleIdentifier ,
1  )
inherited

Member Data Documentation

◆ compare

const struct JTRIGGER::JHitL1::compare JTRIGGER::JHitL1::compare
static

◆ id

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 112 of file JDAQModuleIdentifier.hh.


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