fLHC(kFALSE),
fRandomPz(kFALSE),
fNoHeavyQuarks(kFALSE),
- fEventTime(0.),
- fIsoft(1),
+ fIsoft(4),
fNtMax(150),
fIpop(1),
fXmu(3.2264),
fLHC(kFALSE),
fRandomPz(kFALSE),
fNoHeavyQuarks(kFALSE),
- fEventTime(0.),
fIsoft(1),
fNtMax(150),
fIpop(1),
Float_t polar[3] = {0,0,0};
Float_t origin[3] = {0,0,0};
Float_t origin0[3] = {0,0,0};
+ Float_t time0 = 0.;
Float_t p[3];
Float_t tof;
fTrials = 0;
for (j = 0;j < 3; j++)
origin0[j] = fOrigin[j];
+ time0 = fTimeOrigin;
if(fVertexSmear == kPerEvent) {
Vertex();
for (j=0; j < 3; j++)
origin0[j] = fVertex[j];
+ time0 = fTime;
}
Float_t sign = (fRandomPz && (Rndm() < 0.5))? -1. : 1.;
TParticle *iparticle = (TParticle *)fParticles.At(i);
if (!Stable(iparticle))
continue;
- kf = iparticle->GetPdgCode();
+ kf = TMath::Abs(iparticle->GetPdgCode());
if (kf==92)
continue;
if (0) { // this turned out to be too cumbersome!
fVertex[0] = origin0[0];
fVertex[1] = origin0[1];
fVertex[2] = origin0[2];
+ fTime = time0;
// First select parent particles
for (Int_t i = 0; i < np; i++) {
if (selected) {
nc++;
pSelected[i] = 1;
- if (1) printf("---> %d %d %d %s\n",i,nc,kf,iparticle->GetName());
+ if (0) printf("---> %d %d %d %s\n",i,nc,kf,iparticle->GetName());
} // selected
} // particle loop final state
- //Time of the interactions
- Float_t tInt = 0.;
- if (fPileUpTimeWindow > 0.)
- tInt = fPileUpTimeWindow * (2. * gRandom->Rndm() - 1.);
-
// Write particles to stack
for (Int_t i = 0; i<np; i++) {
TParticle *iparticle = (TParticle *) fParticles.At(i);
origin[0] = origin0[0]+iparticle->Vx()/10;
origin[1] = origin0[1]+iparticle->Vy()/10;
origin[2] = origin0[2]+iparticle->Vz()/10;
- fEventTime = 0.;
-
- if (TestBit(kVertexRange)) {
- fEventTime = sign * origin0[2] / 2.99792458e10;
- tof = kconv * iparticle->T() + fEventTime;
- } else {
- tof = kconv * iparticle->T();
- fEventTime = tInt;
- if (fPileUpTimeWindow > 0.) tof += tInt;
- }
+ tof = time0+kconv * iparticle->T();
+
imo = -1;
TParticle* mother = 0;
if (hasMother) {
fHeader->SetTrials(fTrials);
// Event Vertex
fHeader->SetPrimaryVertex(fVertex);
- fHeader->SetInteractionTime(fEventTime);
+ fHeader->SetInteractionTime(fTime);
fCollisionGeometry = fHeader;
AddHeader(fHeader);