Public Member Functions | Public Attributes | List of all members
CollectionWireHit Class Reference

#include <Solver.h>

Inheritance diagram for CollectionWireHit:
WireHit

Public Member Functions

 CollectionWireHit (int chan, double q, const std::vector< SpaceCharge * > &cross)
 
 ~CollectionWireHit ()
 

Public Attributes

int fChannel
 
double fCharge
 
std::vector< SpaceCharge * > fCrossings
 

Detailed Description

Definition at line 62 of file Solver.h.

Constructor & Destructor Documentation

CollectionWireHit::CollectionWireHit ( int  chan,
double  q,
const std::vector< SpaceCharge * > &  cross 
)

Definition at line 47 of file Solver.cxx.

49  : fChannel(chan), fCharge(q), fCrossings(cross)
50 {
51  if(q < 0){
52  std::cout << "Trying to construct collection wire with negative charge " << q << " this should never happen." << std::endl;
53  abort();
54  }
55 
56  const double p = q/cross.size();
57 
58  for(SpaceCharge* sc: cross) sc->AddCharge(p);
59 }
std::vector< SpaceCharge * > fCrossings
Definition: Solver.h:73
p
Definition: test.py:223
double fCharge
Definition: Solver.h:71
QTextStream & endl(QTextStream &s)
CollectionWireHit::~CollectionWireHit ( )

Definition at line 62 of file Solver.cxx.

63 {
64  // Each SpaceCharge can only be in one collection wire, so we own them. But
65  // not SpaceCharge does not clean up its induction wires since they're
66  // shared.
67  for(SpaceCharge* sc: fCrossings) delete sc;
68 }
std::vector< SpaceCharge * > fCrossings
Definition: Solver.h:73

Member Data Documentation

int CollectionWireHit::fChannel

Definition at line 69 of file Solver.h.

double CollectionWireHit::fCharge

Definition at line 71 of file Solver.h.

std::vector<SpaceCharge*> CollectionWireHit::fCrossings

Definition at line 73 of file Solver.h.


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