1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 ///////////////////////////////////////////////////////////////////////////////
19 // Laser for the TPChamber version 2 -- detailed TPC and slow simulation //
21 ///////////////////////////////////////////////////////////////////////////////
23 #include <TLorentzVector.h>
27 #include "AliTPCLaser.h"
32 //_____________________________________________________________________________
33 AliTPCLaser::AliTPCLaser(const char *name, const char *title) :
34 AliTPCv2(name, title),
36 fLaserPID(13), // muons
41 //______________________________________________________________
42 void AliTPCLaser::StepManager()
44 // laser tracks are particles with PID fLaserPID (default PID=13)
45 // stopped in the the TPC inner containment vessel (14)
47 if (gMC->TrackPid() != fLaserPID) {
48 // in this way we can prevent delta-electrons
55 vol[0] = gMC->CurrentVolID(copy);
57 if (gMC->TrackPid() == fLaserPID
58 && vol[0] == 14) {// 14 = TIIN (inner containment vessel)
64 Float_t hits[5]={0,0,0,0,0};
65 gMC->TrackPosition(p);
69 hits[3]=fNelPerCollision;
70 hits[4]=gMC->TrackTime();
73 vol[0]=fTPCParam->Transform0to1(hits,index);
74 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits);
76 Double_t rnd = gMC->GetRandom()->Rndm();
77 gMC->SetMaxStep(-TMath::Log(rnd)/fCollisionsPerCm);