]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCLaser.cxx
Adding new class AliTPCcalibTime
[u/mrichter/AliRoot.git] / TPC / AliTPCLaser.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 //
17 ///////////////////////////////////////////////////////////////////////////////
18 //                                                                           //
19 //  Laser for the TPChamber version 2 -- detailed TPC and slow simulation    //
20 //                                                                           //
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #include <stdlib.h>
24
25 #include <TLorentzVector.h>
26 #include <TMath.h>
27 #include <TPDGCode.h>
28 #include <TVirtualMC.h>
29
30 #include "AliConst.h"
31 #include "AliLog.h"
32 #include "AliMC.h"
33 #include "AliRun.h"
34 #include "AliTPCDigitsArray.h"
35 #include "AliTPCParam.h"
36 #include "AliTPCParamSR.h"
37 #include "AliTPCTrackHitsV2.h"
38 #include "AliTPCLaser.h"
39
40 ClassImp(AliTPCLaser)
41  
42 //_____________________________________________________________________________
43 AliTPCLaser::AliTPCLaser(const char *name, const char *title) :
44   AliTPCv2(name, title) 
45 {
46   // only use the AliTPCv2 constructor
47 }
48 //______________________________________________________________
49 void AliTPCLaser::StepManager()
50 {
51   // laser tracks are muons (PID=13) 
52   // stopped in the the inner containment vessel (PID=14) 
53
54    TVirtualMC* mc = TVirtualMC::GetMC();
55    Int_t copy, vol;
56    vol = mc->CurrentVolID(copy);
57    // Debug
58    // printf("Vol name %s\n",mc->CurrentVolName());
59    if (mc->TrackPid() == 13 // muons
60        && vol == 14) {// 14 = TIIN (inner containment vessel)
61      mc->StopTrack();
62      return;
63    }
64    AliTPCv2::StepManager();   
65 }