////////////////////////////////////////////////////////
//  Particle Class implementation file
//
//  A PParticle is a TLorentzVector with id and weight.
//  Static particle properties from the permanent data
//  base in PStaticData are used. Additional external particles
//  and decay modes may be loaded. See also PData.
//
//                    Author:  M.A. Kagarlis
//                    Written: 15.11.98
//                    Revised: 15.12.2000  R. Holzmann
//                    Revised: 22.03.2005  R. Holzmann
//                    Revised: 23.07.2007  IF (new framework)
//
////////////////////////////////////////////////////////

#include "TF1.h"
#include "TMath.h"
#include "PUtils.h"
#include "PParticle.h"
#include "PKinematics.h"
#include "PDynamicData.h"


void PParticle::defaults(void) {
  
    SetVertex(*makeStaticData()->GetBatchValue("_event_vertex_x"),
	      *makeStaticData()->GetBatchValue("_event_vertex_y"),
	      *makeStaticData()->GetBatchValue("_event_vertex_z"), 0.);
    pParticle  = NULL;
    qParticle1 = NULL; 
    qParticle2 = NULL;
    index = -1;
    decayModeIndex = -1;
    destroyDecayModeIndex= 0;
    decayTime = 0.;
    SetSibling(NULL);
    debug  = "";
    values = NULL;
    make_new_qParticle = 1;
    SetSourceId(-1);
    SetSiblingIndex(-1);
    SetDaughterIndex(-1);
    SetParentId(-1);
    SetParentIndex(-1);
    mult = 1.;
    spectator = 0;
    genwt = invgenwt = 1.;

    ResetDaughters();
}

PParticle::PParticle(int id, Double_t T, Double_t w):
    TLorentzVector(0, 0, sqrt(T*T+2*T*makeStaticData()->GetParticleMass(id)),
		   T+makeStaticData()->GetParticleMass(id)),
    pid( makeStaticData()->IsParticleValid(id) ), wt( (pid)?w:0.), active(kTRUE) {
    // id, lab kinetic energy (GeV), weight

  defaults();
}

PParticle::PParticle(const char *id, Double_t T, Double_t w):
    TLorentzVector(0, 0, sqrt(T*T+2*T*makeStaticData()->GetParticleMass(id)),
		   T+makeStaticData()->GetParticleMass(makeStaticData()->IsParticleValid(id))),
    pid( makeStaticData()->IsParticleValid(id) ), wt( (pid)?w:0.), active(kTRUE) {
    // name, lab kinetic energy (GeV), weight
    defaults();
}

PParticle::PParticle(int id, Double_t px, Double_t py, Double_t pz, Double_t m, Double_t w):
    TLorentzVector(px, py, pz, sqrt(px*px+py*py+pz*pz+
				    ( (m>0.)?m*m:makeStaticData()->GetParticleMass(id)*
				      makeStaticData()->GetParticleMass(id) ) )),
    pid( makeStaticData()->IsParticleValid(id) ), wt( (pid)?w:0.), active(kTRUE) {
    // id, Px, Py, Pz (GeV/c), mass (GeV/c**2) overrides default, weight
    defaults();
}

PParticle::PParticle(const char *id, Double_t px, Double_t py, Double_t pz, Double_t m, Double_t w):
    TLorentzVector(px, py, pz, sqrt(px*px+py*py+pz*pz+
				    ( (m>0.)?m*m:makeStaticData()->GetParticleMass(id)*
				      makeStaticData()->GetParticleMass(id) ) )),
    pid( makeStaticData()->IsParticleValid(id) ), wt( (pid)?w:0.), active(kTRUE) {
    // name, Px, Py, Pz (GeV/c), mass (GeV/c**2) overrides default, weight
    defaults();
}


PParticle::PParticle(int id, const TVector3 &p, Double_t m, Double_t w):
    TLorentzVector(p, sqrt(p.Mag2()+( (m>0.)?m*m:makeStaticData()->GetParticleMass(id)*
				      makeStaticData()->GetParticleMass(id) ))),
    pid(makeStaticData()->IsParticleValid(id) ), wt( (pid)?w:0.), active(kTRUE) {
    // id, 3-momentum vector (GeV/c), mass (GeV/c**2) overrides default, weight
    defaults();
}


PParticle::PParticle(int id, Double_t * pt, Double_t w):
    TLorentzVector( pt ), pid( id ), wt( w ), active(kTRUE) {
    // id, pointer to 4-dim array (Px, Py, Pz, E) (GeV/c, GeV), weight
    defaults();
}

  
PParticle::PParticle(int id, float * pt, Double_t w):
    TLorentzVector( pt ), pid( id ), wt( w ), active(kTRUE) {
    // id, pointer to 4-dim array (Px, Py, Pz, E) (GeV/c, GeV), weight
    defaults();
}


PParticle::PParticle(const PParticle & p):
    TLorentzVector( p.Vect4() ), pid(p.ID() ),
    sourceId( p.GetSourceId() ),
    parentId( p.GetParentId() ),
    parentIndex( p.GetParentIndex() ),
    daughterIndex( p.GetDaughterIndex() ),
    siblingIndex( p.GetSiblingIndex() ),
    decayTime( p.GetProperTime() ), 
    wt( p.W() ), active( p.IsActive() ) {
    // copy constructor
    SetVertex(p.X(),p.Y(),p.Z(),p.T());
    pParticle = NULL;
    qParticle1= NULL;
    qParticle2= NULL;

    make_new_qParticle = p.make_new_qParticle;
    if (p.make_new_qParticle) {
	qParticle1 = (p.qParticle1 ? 
		      new PParticle(p.qParticle1) : NULL); //Copy, because it will destroy in dtor
    } 

    if (p.make_new_qParticle) {
	qParticle2 = (p.qParticle2 ?
		      new PParticle(p.qParticle2) : NULL);
    }

    sParticle  = p.sParticle;
    //      if (p.debug) 
    // 	     debug=p.debug;
    //       else
    debug  = "";
    values = NULL;
    destroyDecayModeIndex = p.destroyDecayModeIndex;
    decayModeIndex = p.decayModeIndex;

    if (p.values) 
	values = new PValues(*(p.values));
    mult      = p.mult;
    spectator = p.spectator;
    genwt     = p.genwt;
    invgenwt  = p.invgenwt;
}


PParticle::PParticle(const PParticle *p):
    TLorentzVector( p->Vect4() ), pid( p->ID() ), 
    sourceId( p->GetSourceId() ),
    parentId( p->GetParentId() ),
    parentIndex( p->GetParentIndex() ),
    daughterIndex( p->GetDaughterIndex() ),
    siblingIndex( p->GetSiblingIndex() ),
    decayTime( p->GetProperTime() ), 
    wt( p->W() ), active( p->IsActive() ) {
    // copy constructor
    SetVertex(p->X(),p->Y(),p->Z(),p->T());
    pParticle = NULL;
    qParticle1= NULL;
    qParticle2= NULL;

    make_new_qParticle = p->make_new_qParticle;
    if (p->make_new_qParticle) {
	qParticle1 = (p->qParticle1 ?
		      new PParticle(p->qParticle1): NULL); //Copy, because it will destroy in dtor
    } 

    if (p->make_new_qParticle) {
	qParticle2 = (p->qParticle2 ?
		      new PParticle(p->qParticle2): NULL);
    }

    sParticle = p->sParticle;
 
    //      if (p->debug) debug=p->debug;
    //       else 
    debug  = "";
    values = NULL;
    destroyDecayModeIndex = p->destroyDecayModeIndex;
    decayModeIndex = p->decayModeIndex;

    if (p->values) 
	values = new PValues(*(p->values));

    mult      = p->mult;
    spectator = p->spectator;
    genwt     = p->genwt;
    invgenwt  = p->invgenwt;
}


void PParticle::SetKE(Double_t T) {
    // reset by kinetic energy
    Double_t m=M(), th=Theta(), ph=Phi(), 
	ptot=sqrt(T*T+2*T*m), e=T+m, pxy=ptot*sin(th),
	px=pxy*cos(ph), py=pxy*sin(ph), pz=ptot*cos(th);
    SetPxPyPzE(px,py,pz,e);
}

void PParticle::SetM(Double_t m) {
    // reset mass
    Double_t m1, px=Px(), py=Py(), pz=Pz();
    if (m > 0.) m1 = m;        // if non-zero reset mass to argument value
    else {                     // else sample from Breit-Wigner if width > 1 MeV
	Double_t g0 = makeStaticData()->GetParticleTotalWidth(pid), 
	    m0 = makeStaticData()->GetParticleMass(pid);
	if (g0 < 1.e-3) m1 = m0;     // else fix to centroid value
	else do { m1 = PUtils::sampleBW(m0,g0); } while (m1<0.);
    }
    SetXYZM(px,py,pz,m1);
}

void PParticle::SetMom(Double_t mom) {
    // reset momentum
    Double_t scaling_factor = mom/Rho();
    Double_t px = Px(), py = Py(), pz = Pz();

    px *= scaling_factor;
    py *= scaling_factor;
    pz *= scaling_factor;

    SetXYZM(px,py,pz,makeStaticData()->GetParticleMass(ID()));
}

Double_t PParticle::Life(Double_t m, int idx) {
    // lifetime in lab frame
    Double_t r, tau=Gamma()*makeDynamicData()->GetParticleLife(pid, m, idx);
    do { r = PUtils::sampleFlat(); } while (r==0.);
    return -tau*log(r);
}    

void PParticle::SetProperTime() {
    // lifetime in particle's frame  (in mm/c)
 
    Double_t r, tau;

    if (makeStaticData()->GetParticleTotalWidth(pid) > 0) {
	tau = 6.582122e-25 / makeStaticData()->GetParticleTotalWidth(pid);  // hbar units (GeV s)
	do { r = PUtils::sampleFlat(); } while (r==0.);
	decayTime = -tau*log(r)*3.0e11;           // go from sec to mm/c
	return;
    }
    else if (pid==50 || makeStaticData()->IsParticle(pid,"dilepton")) { // dilepton decays instantly
	decayTime = 0.0;
	return;
    }
    else if (pid>1000) { //composites as well
	decayTime = 0.0;
	return;
    }
    else decayTime = 1.e16;
}

Double_t PParticle::InvariantT(Double_t m3, Double_t m4, Double_t cos_th_cm) {
    // The Mandelstam invariant t in 1 + 2 --> 3 + 4 scattering,
    // where cos_theta_cm must be between -1 and 1.
    // Use the same function for the Mandelstam variable u, with the
    // changes:  m3 <--> m4 & cos_th_cm -> -cos_th_cm

    if (!qParticle1 || !qParticle2) {
	Warning("InvariantT", "No beam & target found");
	return 0;	
    }

    //Boost into target c.m. frame
    PParticle beam   = *qParticle1;
    PParticle target = *qParticle2;
    PParticle parent = *this;
    beam.Boost(-target.BoostVector());
    parent.Boost(-target.BoostVector());

    Double_t ecm = parent.M();

    Double_t p1  = (beam.Vect()).Mag();   // the beam momentum
    Double_t m1s = beam.M2();             // the beam mass squared
//  if (pdNNN==2){p1 /= 2.; m1s /= 4.;}// beam is deuteron
    Double_t m2 = target.M();             // the target mass (target stationary)
//  if (pdNNN==1) m2 /= 2.;            // target is deuteron
// Quasi-free treated explicetly

    Double_t pcm1 = p1*m2/ecm;             // cm momentum of 1 & 2
    Double_t pcm3 = PKinematics::pcms(ecm,m3,m4);// cm momentum of 3 & 4
    Double_t ecm1 = sqrt(m1s+pcm1*pcm1);   // cm energy of 1
    Double_t ecm3 = sqrt(m3*m3+pcm3*pcm3); // cm energy of 3
    Double_t t    = m1s - 2.*ecm1*ecm3 + 2.*pcm1*pcm3*cos_th_cm + m3*m3;
    return t;
}


PParticle &PParticle::AddTmp( const PParticle &p) {
    // Like "+" but only for tmp reasons in the evtloop
    // No construction of beam+target objects
    SetPxPyPzE(Px()+p[0],Py()+p[1],Pz()+p[2],E()+p[3]);
    wt *= p.W();
    pid = 0;
    active = active&p.IsActive();
    return *this;
}

PParticle &PParticle::SubTmp( const PParticle &p) {
    // Like "-" but only for tmp reasons in the evtloop
    // No construction of beam+target objects
    SetPxPyPzE(Px()-p[0],Py()-p[1],Pz()-p[2],E()-p[3]);
    wt *= p.W();
    pid = 0;
    active = active&p.IsActive();
    return *this;
}

void PParticle::Reconstruct(void) {
    //reconstruct composite from given beam+target

    if ((qParticle1==NULL) || (qParticle2==NULL)) return;

    SetPxPyPzE(qParticle1->Px()+qParticle2->Px(),
	       qParticle1->Py()+qParticle2->Py(),
	       qParticle1->Pz()+qParticle2->Pz(),
	       qParticle1->E()+qParticle2->E());
}

PParticle & PParticle::operator -= ( const PParticle & p) {
    SetPxPyPzE(Px()-p[0],Py()-p[1],Pz()-p[2],E()-p[3]);
    wt*=p.W();
    pid=0;
    active=active&p.IsActive();
    return *this;
}

PParticle & PParticle::operator += ( const PParticle & p) {
    //Make a composite particle
    //This requires some checks, keeping beam+target
    //For loop calculations use the AddTmp()-method

    if (pid/1000>0) {
	Warning("operator+","No more than two constituent particles");
	return *this;
    }
    int id2=1000*p.ID();
    if (makeStaticData()->IsParticleValid(ID())==0 ||
	makeStaticData()->IsParticleValid(p.ID())==0) {
	printf("PParticle:: cannot add invalid particles\n");
	return *this;
    }

    make_new_qParticle=kTRUE;
    qParticle1 = new PParticle(this); 
    qParticle2 = new PParticle(p);
    Info("operator+","(%s) Keeping beam and target particle for further reference", PRINT_AUTO_ALLOC);
    make_new_qParticle=kTRUE;
    if (makeDataBase()->GetEntryInt("pid", id2+ID())<0) {
	Int_t len=strlen(makeStaticData()->GetParticleName(ID()))+
	    strlen(makeStaticData()->GetParticleName(p.ID()))+6;
	char * delme=new char[len];
	
	sprintf(delme,"%s + %s",makeStaticData()->GetParticleName(ID()),
		makeStaticData()->GetParticleName(p.ID()));
	if (!makeStaticData()->AddParticle(id2+ID(), delme,M()+p.M())) {
	    Warning("operator+","Could not add composite");
	} else {
	    char * delme2=new char[len];
	    //Without spaces
	    sprintf(delme2,"%s+%s",makeStaticData()->GetParticleName(ID()),
		    makeStaticData()->GetParticleName(p.ID()));
	    makeStaticData()->AddAlias(delme,delme2);
	    Info("operator+","(%s) The composite %s has been added", 
		 PRINT_AUTO_ALLOC,makeStaticData()->GetParticleName(id2+ID()));
	}
    }

    SetSibling(NULL);
    SetPxPyPzE(Px()+p[0],Py()+p[1],Pz()+p[2],E()+p[3]);

    wt*=p.W();

    pid+=id2;


    active=active&p.IsActive();
    debug="";
    return *this;
}

void PParticle::Scatter(PParticle *p1, PParticle *p2) {
    //Like the "+" but without making new particles

    if (p1->pid/1000>0 || p2->pid/1000>0) {
	Warning("Scatter","No more than two constituent particles");
	return;
    }

    int id1=p1->ID();
    int id2=p2->ID();
    if (makeStaticData()->IsParticleValid(id1)==0 ||
	makeStaticData()->IsParticleValid(id2)==0) {
	printf("PParticle:: cannot add invalid particles\n");
	return;
    }

    make_new_qParticle=kFALSE;
    qParticle1 = p1; 
    qParticle2 = p2;
    pid =id1 + id2*1000;

    if (makeDataBase()->GetEntryInt("pid", pid)<0) {
	Int_t len=strlen(makeStaticData()->GetParticleName(id1))+
	    strlen(makeStaticData()->GetParticleName(id2))+6;
	char * delme=new char[len];
	
	sprintf(delme,"%s + %s",makeStaticData()->GetParticleName(id1),
		makeStaticData()->GetParticleName(id2));
	if (!makeStaticData()->AddParticle(pid, delme,p1->M()+p2->M())) {
	    Warning("Scatter","Could not add composite");
	} else {
	    char * delme2=new char[len];
	    //Without spaces
	    sprintf(delme2,"%s+%s",makeStaticData()->GetParticleName(id1),
		    makeStaticData()->GetParticleName(id2));
	    makeStaticData()->AddAlias(delme,delme2);
	    Info("Scatter","(%s) The composite %s has been added", 
		 PRINT_AUTO_ALLOC,makeStaticData()->GetParticleName(pid));
	}
    }

    SetSibling(NULL);
    SetPxPyPzE(p1->Px()+p2->Px(),p1->Py()+p2->Py(),p1->Pz()+p2->Pz(),p1->E()+p2->E());

    wt = p1->W() * p2->W();

    active = p1->active & p2->IsActive();
    debug="";
}


PParticle & PParticle::operator = ( const PParticle & p ) {
    // assignment
    
    SetVect4(p.Vect4());
    wt = p.W();
    pid = p.ID();
    parentId = p.GetParentId();
    sourceId = p.GetSourceId();
    parentIndex = p.GetParentIndex();
    daughterIndex= p.GetDaughterIndex();
    siblingIndex = p.GetSiblingIndex();
    decayTime = p.GetProperTime();
    active = p.IsActive();
    SetVertex(p.X(),p.Y(),p.Z(),p.T());

    // pParticle = NULL;
    // qParticle1  = NULL;
    // qParticle2  = NULL;
    make_new_qParticle = p.make_new_qParticle;

    if (!qParticle1 && p.make_new_qParticle) {
	qParticle1 = (p.qParticle1 ?
		      new PParticle(p.qParticle1): NULL); //Copy, because it will destroy in dtor
    } //do not make new, but rather overwrite the beam+target particle
    else if (p.qParticle1 && p.make_new_qParticle) *qParticle1=*p.qParticle1;

    if (!qParticle2 && p.make_new_qParticle) {
	qParticle2 = (p.qParticle2 ?
		      new PParticle(p.qParticle2): NULL);
    } //do not make new, but rather overwrite the beam+target particle
    else if (p.qParticle2 && p.make_new_qParticle) *qParticle2=*p.qParticle2;

    sParticle  = p.sParticle;
    destroyDecayModeIndex= p.destroyDecayModeIndex;

    debug="";
    values=NULL;
    return *this;
}

PParticle & PParticle::operator *= (const TRotation & m) {
    // multiplication by rotation matrix
    TLorentzVector v=Vect4();
    v*=m;
    SetVect4(v);
    return *this;
}

PParticle & PParticle::operator *= (const TLorentzRotation & m) {
    // multiplication by Lorentz rotation matrix
    TLorentzVector v=Vect4();
    v*=m;
    SetVect4(v);
    return *this;
}

PParticle & PParticle::Transform(const TRotation & m) {
    // Rotation
    TLorentzVector v=Vect4();
    v.Transform(m);
    SetVect4(v);
    return *this;
}

PParticle & PParticle::Transform(const TLorentzRotation & m) {
    // Lorentz-rotation
    TLorentzVector v=Vect4();
    v.Transform(m);
    SetVect4(v);
    return *this;
}

PParticle* PParticle::Clone(const char*) const {
    return new PParticle((const PParticle &)* this);
}

void PParticle::Print(const Option_t* delme) const {
    printf( "  %s (%f,%f,%f;%f) wt = %f, m = %f",
	    (pid/1000==0) ? makeStaticData()->GetParticleName(pid) : "quasi-particle",
	    Px(), Py(), Pz(), E(), wt, M() );
    int id1=pid%1000, id2=pid/1000;
    if (id2==0) {
	printf( " pid = %i\n", id1);
    } else {
	printf( " pid1 = %i, pid2 = %i\n", id1, id2);
    }

    if (values) values->Print();

    printf( "  Vertex = %f %f %f\n", fV.X(), fV.Y(), fV.Z());
    if (delme)
    	if (strcmp(delme,"scatter") == 0) {
	    cout << "<scatter>" << endl;
	    if (qParticle1) qParticle1->Print("");
	    if (qParticle2) qParticle2->Print("");
	    cout << "</scatter>" << endl;
	}
}





ClassImp(PParticle)


 PParticle.cc:1
 PParticle.cc:2
 PParticle.cc:3
 PParticle.cc:4
 PParticle.cc:5
 PParticle.cc:6
 PParticle.cc:7
 PParticle.cc:8
 PParticle.cc:9
 PParticle.cc:10
 PParticle.cc:11
 PParticle.cc:12
 PParticle.cc:13
 PParticle.cc:14
 PParticle.cc:15
 PParticle.cc:16
 PParticle.cc:17
 PParticle.cc:18
 PParticle.cc:19
 PParticle.cc:20
 PParticle.cc:21
 PParticle.cc:22
 PParticle.cc:23
 PParticle.cc:24
 PParticle.cc:25
 PParticle.cc:26
 PParticle.cc:27
 PParticle.cc:28
 PParticle.cc:29
 PParticle.cc:30
 PParticle.cc:31
 PParticle.cc:32
 PParticle.cc:33
 PParticle.cc:34
 PParticle.cc:35
 PParticle.cc:36
 PParticle.cc:37
 PParticle.cc:38
 PParticle.cc:39
 PParticle.cc:40
 PParticle.cc:41
 PParticle.cc:42
 PParticle.cc:43
 PParticle.cc:44
 PParticle.cc:45
 PParticle.cc:46
 PParticle.cc:47
 PParticle.cc:48
 PParticle.cc:49
 PParticle.cc:50
 PParticle.cc:51
 PParticle.cc:52
 PParticle.cc:53
 PParticle.cc:54
 PParticle.cc:55
 PParticle.cc:56
 PParticle.cc:57
 PParticle.cc:58
 PParticle.cc:59
 PParticle.cc:60
 PParticle.cc:61
 PParticle.cc:62
 PParticle.cc:63
 PParticle.cc:64
 PParticle.cc:65
 PParticle.cc:66
 PParticle.cc:67
 PParticle.cc:68
 PParticle.cc:69
 PParticle.cc:70
 PParticle.cc:71
 PParticle.cc:72
 PParticle.cc:73
 PParticle.cc:74
 PParticle.cc:75
 PParticle.cc:76
 PParticle.cc:77
 PParticle.cc:78
 PParticle.cc:79
 PParticle.cc:80
 PParticle.cc:81
 PParticle.cc:82
 PParticle.cc:83
 PParticle.cc:84
 PParticle.cc:85
 PParticle.cc:86
 PParticle.cc:87
 PParticle.cc:88
 PParticle.cc:89
 PParticle.cc:90
 PParticle.cc:91
 PParticle.cc:92
 PParticle.cc:93
 PParticle.cc:94
 PParticle.cc:95
 PParticle.cc:96
 PParticle.cc:97
 PParticle.cc:98
 PParticle.cc:99
 PParticle.cc:100
 PParticle.cc:101
 PParticle.cc:102
 PParticle.cc:103
 PParticle.cc:104
 PParticle.cc:105
 PParticle.cc:106
 PParticle.cc:107
 PParticle.cc:108
 PParticle.cc:109
 PParticle.cc:110
 PParticle.cc:111
 PParticle.cc:112
 PParticle.cc:113
 PParticle.cc:114
 PParticle.cc:115
 PParticle.cc:116
 PParticle.cc:117
 PParticle.cc:118
 PParticle.cc:119
 PParticle.cc:120
 PParticle.cc:121
 PParticle.cc:122
 PParticle.cc:123
 PParticle.cc:124
 PParticle.cc:125
 PParticle.cc:126
 PParticle.cc:127
 PParticle.cc:128
 PParticle.cc:129
 PParticle.cc:130
 PParticle.cc:131
 PParticle.cc:132
 PParticle.cc:133
 PParticle.cc:134
 PParticle.cc:135
 PParticle.cc:136
 PParticle.cc:137
 PParticle.cc:138
 PParticle.cc:139
 PParticle.cc:140
 PParticle.cc:141
 PParticle.cc:142
 PParticle.cc:143
 PParticle.cc:144
 PParticle.cc:145
 PParticle.cc:146
 PParticle.cc:147
 PParticle.cc:148
 PParticle.cc:149
 PParticle.cc:150
 PParticle.cc:151
 PParticle.cc:152
 PParticle.cc:153
 PParticle.cc:154
 PParticle.cc:155
 PParticle.cc:156
 PParticle.cc:157
 PParticle.cc:158
 PParticle.cc:159
 PParticle.cc:160
 PParticle.cc:161
 PParticle.cc:162
 PParticle.cc:163
 PParticle.cc:164
 PParticle.cc:165
 PParticle.cc:166
 PParticle.cc:167
 PParticle.cc:168
 PParticle.cc:169
 PParticle.cc:170
 PParticle.cc:171
 PParticle.cc:172
 PParticle.cc:173
 PParticle.cc:174
 PParticle.cc:175
 PParticle.cc:176
 PParticle.cc:177
 PParticle.cc:178
 PParticle.cc:179
 PParticle.cc:180
 PParticle.cc:181
 PParticle.cc:182
 PParticle.cc:183
 PParticle.cc:184
 PParticle.cc:185
 PParticle.cc:186
 PParticle.cc:187
 PParticle.cc:188
 PParticle.cc:189
 PParticle.cc:190
 PParticle.cc:191
 PParticle.cc:192
 PParticle.cc:193
 PParticle.cc:194
 PParticle.cc:195
 PParticle.cc:196
 PParticle.cc:197
 PParticle.cc:198
 PParticle.cc:199
 PParticle.cc:200
 PParticle.cc:201
 PParticle.cc:202
 PParticle.cc:203
 PParticle.cc:204
 PParticle.cc:205
 PParticle.cc:206
 PParticle.cc:207
 PParticle.cc:208
 PParticle.cc:209
 PParticle.cc:210
 PParticle.cc:211
 PParticle.cc:212
 PParticle.cc:213
 PParticle.cc:214
 PParticle.cc:215
 PParticle.cc:216
 PParticle.cc:217
 PParticle.cc:218
 PParticle.cc:219
 PParticle.cc:220
 PParticle.cc:221
 PParticle.cc:222
 PParticle.cc:223
 PParticle.cc:224
 PParticle.cc:225
 PParticle.cc:226
 PParticle.cc:227
 PParticle.cc:228
 PParticle.cc:229
 PParticle.cc:230
 PParticle.cc:231
 PParticle.cc:232
 PParticle.cc:233
 PParticle.cc:234
 PParticle.cc:235
 PParticle.cc:236
 PParticle.cc:237
 PParticle.cc:238
 PParticle.cc:239
 PParticle.cc:240
 PParticle.cc:241
 PParticle.cc:242
 PParticle.cc:243
 PParticle.cc:244
 PParticle.cc:245
 PParticle.cc:246
 PParticle.cc:247
 PParticle.cc:248
 PParticle.cc:249
 PParticle.cc:250
 PParticle.cc:251
 PParticle.cc:252
 PParticle.cc:253
 PParticle.cc:254
 PParticle.cc:255
 PParticle.cc:256
 PParticle.cc:257
 PParticle.cc:258
 PParticle.cc:259
 PParticle.cc:260
 PParticle.cc:261
 PParticle.cc:262
 PParticle.cc:263
 PParticle.cc:264
 PParticle.cc:265
 PParticle.cc:266
 PParticle.cc:267
 PParticle.cc:268
 PParticle.cc:269
 PParticle.cc:270
 PParticle.cc:271
 PParticle.cc:272
 PParticle.cc:273
 PParticle.cc:274
 PParticle.cc:275
 PParticle.cc:276
 PParticle.cc:277
 PParticle.cc:278
 PParticle.cc:279
 PParticle.cc:280
 PParticle.cc:281
 PParticle.cc:282
 PParticle.cc:283
 PParticle.cc:284
 PParticle.cc:285
 PParticle.cc:286
 PParticle.cc:287
 PParticle.cc:288
 PParticle.cc:289
 PParticle.cc:290
 PParticle.cc:291
 PParticle.cc:292
 PParticle.cc:293
 PParticle.cc:294
 PParticle.cc:295
 PParticle.cc:296
 PParticle.cc:297
 PParticle.cc:298
 PParticle.cc:299
 PParticle.cc:300
 PParticle.cc:301
 PParticle.cc:302
 PParticle.cc:303
 PParticle.cc:304
 PParticle.cc:305
 PParticle.cc:306
 PParticle.cc:307
 PParticle.cc:308
 PParticle.cc:309
 PParticle.cc:310
 PParticle.cc:311
 PParticle.cc:312
 PParticle.cc:313
 PParticle.cc:314
 PParticle.cc:315
 PParticle.cc:316
 PParticle.cc:317
 PParticle.cc:318
 PParticle.cc:319
 PParticle.cc:320
 PParticle.cc:321
 PParticle.cc:322
 PParticle.cc:323
 PParticle.cc:324
 PParticle.cc:325
 PParticle.cc:326
 PParticle.cc:327
 PParticle.cc:328
 PParticle.cc:329
 PParticle.cc:330
 PParticle.cc:331
 PParticle.cc:332
 PParticle.cc:333
 PParticle.cc:334
 PParticle.cc:335
 PParticle.cc:336
 PParticle.cc:337
 PParticle.cc:338
 PParticle.cc:339
 PParticle.cc:340
 PParticle.cc:341
 PParticle.cc:342
 PParticle.cc:343
 PParticle.cc:344
 PParticle.cc:345
 PParticle.cc:346
 PParticle.cc:347
 PParticle.cc:348
 PParticle.cc:349
 PParticle.cc:350
 PParticle.cc:351
 PParticle.cc:352
 PParticle.cc:353
 PParticle.cc:354
 PParticle.cc:355
 PParticle.cc:356
 PParticle.cc:357
 PParticle.cc:358
 PParticle.cc:359
 PParticle.cc:360
 PParticle.cc:361
 PParticle.cc:362
 PParticle.cc:363
 PParticle.cc:364
 PParticle.cc:365
 PParticle.cc:366
 PParticle.cc:367
 PParticle.cc:368
 PParticle.cc:369
 PParticle.cc:370
 PParticle.cc:371
 PParticle.cc:372
 PParticle.cc:373
 PParticle.cc:374
 PParticle.cc:375
 PParticle.cc:376
 PParticle.cc:377
 PParticle.cc:378
 PParticle.cc:379
 PParticle.cc:380
 PParticle.cc:381
 PParticle.cc:382
 PParticle.cc:383
 PParticle.cc:384
 PParticle.cc:385
 PParticle.cc:386
 PParticle.cc:387
 PParticle.cc:388
 PParticle.cc:389
 PParticle.cc:390
 PParticle.cc:391
 PParticle.cc:392
 PParticle.cc:393
 PParticle.cc:394
 PParticle.cc:395
 PParticle.cc:396
 PParticle.cc:397
 PParticle.cc:398
 PParticle.cc:399
 PParticle.cc:400
 PParticle.cc:401
 PParticle.cc:402
 PParticle.cc:403
 PParticle.cc:404
 PParticle.cc:405
 PParticle.cc:406
 PParticle.cc:407
 PParticle.cc:408
 PParticle.cc:409
 PParticle.cc:410
 PParticle.cc:411
 PParticle.cc:412
 PParticle.cc:413
 PParticle.cc:414
 PParticle.cc:415
 PParticle.cc:416
 PParticle.cc:417
 PParticle.cc:418
 PParticle.cc:419
 PParticle.cc:420
 PParticle.cc:421
 PParticle.cc:422
 PParticle.cc:423
 PParticle.cc:424
 PParticle.cc:425
 PParticle.cc:426
 PParticle.cc:427
 PParticle.cc:428
 PParticle.cc:429
 PParticle.cc:430
 PParticle.cc:431
 PParticle.cc:432
 PParticle.cc:433
 PParticle.cc:434
 PParticle.cc:435
 PParticle.cc:436
 PParticle.cc:437
 PParticle.cc:438
 PParticle.cc:439
 PParticle.cc:440
 PParticle.cc:441
 PParticle.cc:442
 PParticle.cc:443
 PParticle.cc:444
 PParticle.cc:445
 PParticle.cc:446
 PParticle.cc:447
 PParticle.cc:448
 PParticle.cc:449
 PParticle.cc:450
 PParticle.cc:451
 PParticle.cc:452
 PParticle.cc:453
 PParticle.cc:454
 PParticle.cc:455
 PParticle.cc:456
 PParticle.cc:457
 PParticle.cc:458
 PParticle.cc:459
 PParticle.cc:460
 PParticle.cc:461
 PParticle.cc:462
 PParticle.cc:463
 PParticle.cc:464
 PParticle.cc:465
 PParticle.cc:466
 PParticle.cc:467
 PParticle.cc:468
 PParticle.cc:469
 PParticle.cc:470
 PParticle.cc:471
 PParticle.cc:472
 PParticle.cc:473
 PParticle.cc:474
 PParticle.cc:475
 PParticle.cc:476
 PParticle.cc:477
 PParticle.cc:478
 PParticle.cc:479
 PParticle.cc:480
 PParticle.cc:481
 PParticle.cc:482
 PParticle.cc:483
 PParticle.cc:484
 PParticle.cc:485
 PParticle.cc:486
 PParticle.cc:487
 PParticle.cc:488
 PParticle.cc:489
 PParticle.cc:490
 PParticle.cc:491
 PParticle.cc:492
 PParticle.cc:493
 PParticle.cc:494
 PParticle.cc:495
 PParticle.cc:496
 PParticle.cc:497
 PParticle.cc:498
 PParticle.cc:499
 PParticle.cc:500
 PParticle.cc:501
 PParticle.cc:502
 PParticle.cc:503
 PParticle.cc:504
 PParticle.cc:505
 PParticle.cc:506
 PParticle.cc:507
 PParticle.cc:508
 PParticle.cc:509
 PParticle.cc:510
 PParticle.cc:511
 PParticle.cc:512
 PParticle.cc:513
 PParticle.cc:514
 PParticle.cc:515
 PParticle.cc:516
 PParticle.cc:517
 PParticle.cc:518
 PParticle.cc:519
 PParticle.cc:520
 PParticle.cc:521
 PParticle.cc:522
 PParticle.cc:523
 PParticle.cc:524
 PParticle.cc:525
 PParticle.cc:526
 PParticle.cc:527
 PParticle.cc:528
 PParticle.cc:529
 PParticle.cc:530
 PParticle.cc:531
 PParticle.cc:532
 PParticle.cc:533
 PParticle.cc:534
 PParticle.cc:535
 PParticle.cc:536
 PParticle.cc:537
 PParticle.cc:538
 PParticle.cc:539
 PParticle.cc:540
 PParticle.cc:541
 PParticle.cc:542
 PParticle.cc:543
 PParticle.cc:544
 PParticle.cc:545
 PParticle.cc:546
 PParticle.cc:547
 PParticle.cc:548