--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Cosmic Rays ALICE Trigger //
+// This class contains the basic functions for the Cosmic Ray ALICE //
+// detector. Functions specific to one particular geometry are //
+// contained in the derived classes //
+//
+// Begin_Html
+/*
+<img src="picts/AliCRTClass.gif">
+</pre>
+<p>The responsible person for this module is
+<a href="mailto:Enrique.Gamez.Flores@cern.ch">Enrique Gamez Flores</a>.
+</font>
+<pre>
+*/
+//End_Html
+//
+//
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include <iostream>
+#include <fstream>
+
+#include <TTree.h>
+
+
+#include "AliMC.h"
+#include "AliRun.h"
+#include "AliMagF.h"
+
+#include "AliCRT.h"
+#include "AliCRTConstants.h"
+#include "AliCRTdigit.h"
+#include "AliCRThit.h"
+
+
+ClassImp(AliCRT)
+
+
+static AliCRTdigit *digits;
+
+//_____________________________________________________________________________
+AliCRT::AliCRT()
+{
+ //
+ // Default constructor for L3 magnet
+ //
+
+ fIshunt = 1;
+ fHits = 0;
+ fDigits = 0;
+}
+
+//_____________________________________________________________________________
+AliCRT::AliCRT(const char *name, const char *title)
+ : AliDetector(name,title)
+{
+ //
+ // Standard constructor for the CRT module
+ //
+
+ fIshunt = 1; // All hits are associated with primary particles
+
+ fHits = new TClonesArray("AliCRThit",400) ;
+ fDigits = new TClonesArray("AliCRTdigit",400) ;
+
+ gAlice->AddHitList(fHits);
+
+ SetMarkerColor(7);
+ SetMarkerStyle(2);
+ SetMarkerSize(0.4);
+
+}
+
+//_____________________________________________________________________________
+AliCRT::~AliCRT()
+{
+ //
+ // Standar destructor.
+ //
+ if (fHits) {
+ fHits->Delete();
+ delete fHits;
+ }
+}
+
+//_____________________________________________________________________________
+void AliCRT::AddHit(Int_t track, Int_t *vol, Float_t *hits)
+{
+ //
+ // Add a CRT hit
+ //
+ TClonesArray &lhits = *fHits;
+ new(lhits[fNhits++]) AliCRThit(fIshunt,track,vol,hits);
+}
+
+//_____________________________________________________________________________
+void AliCRT::AddDigit(Int_t *tracks,Int_t *digits)
+{
+
+ // Add a CRT digit to the list. Dummy function.
+
+}
+
+//_____________________________________________________________________________
+void AliCRT::Init() const
+{
+ //
+ // Initialise ...
+ //
+
+ Int_t i;
+ //
+ if(fDebug) {
+ printf("\n%s: ",ClassName());
+ for(i=0;i<35;i++) printf("*");
+ printf(" CRT_INIT ");
+ for(i=0;i<35;i++) printf("*");
+ printf("\n%s: ",ClassName());
+ //
+ // Here the CRT initialisation code (if any!)
+ for(i=0;i<80;i++) printf("*");
+ printf("\n");
+ }
+}
+
+//_____________________________________________________________________________
+void AliCRT::ResetHits ()
+{
+ // Reset number of clusters and the cluster array for this detector
+ AliDetector::ResetHits ();
+}
+
+//_____________________________________________________________________________
+void AliCRT::ResetDigits ()
+{
+ //
+ // Reset number of digits and the digits array for this detector
+ AliDetector::ResetDigits ();
+ //
+}
+
+//____________________________________________________________________________
+void AliCRT::FinishEvent()
+{
+// do nothing
+}
+
+//_____________________________________________________________________________
+void AliCRT::BuildGeometry()
+{
+ //
+ // Build simple ROOT TNode geometry for event display
+ //
+}
+
+//_____________________________________________________________________________
+void AliCRT::CreateGeometry()
+{
+ //
+ // Build simple ROOT TNode geometry for GEANT simulations
+ //
+}
+
+//_____________________________________________________________________________
+void AliCRT::CreateMaterials()
+{
+ // Magnatic field inside the pit
+ Int_t isxfld = gAlice->Field()->Integ();
+ Float_t sxmgmx = gAlice->Field()->Max();
+
+ //Magnetic field above the Magnet.
+ Int_t xfield = 0; // no Magnetic field.
+ Float_t xfieldm = 0;
+ Float_t xepsil = 0.1; // Tracking precission in cm. obove the pit
+
+ // --- Define the various materials for GEANT ---
+ Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
+ Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
+ Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
+
+ Float_t epsil, stmin, tmaxfd, deemax, stemax;
+ //
+ // Aluminum
+ AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
+ AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
+ AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
+ //
+ // Iron
+ AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
+ AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
+ AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
+ //
+ // Air
+ AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
+ AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
+ AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
+ //
+ // Vacuum
+ AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
+ AliMaterial(36, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
+ AliMaterial(56, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
+ //
+ // Concrete
+ AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
+ AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
+ AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
+
+
+ // Scintillator material polystyrene
+ Float_t aP[2] = {12.011, 1.00794};
+ Float_t zP[2] = {6.0, 1.0};
+ Float_t wP[2] = {1.0, 1.0};
+ Float_t dP = 1.032;
+ AliMixture(3, "Polystyrene$", aP, zP, dP, -2, wP);
+ // Standard ROCK, ROCK1 and molasse.
+ Float_t aRock[1] = {22.};
+ Float_t zRock[1] = {11.};
+ Float_t wRock[1] = {1.};
+ Float_t dRock = 2.65;
+ AliMixture(4, "Standard Rock$", aRock, zRock, dRock, 1, wRock);
+ Float_t dRock1 = 2.2;
+ AliMixture(5, "Rock1$", aRock, zRock, dRock1, 1, wRock);
+ Float_t dMolasse = 2.50;
+ AliMixture(6, "Molasse$", aRock, zRock, dMolasse, 1, wRock);
+
+ // ****************
+ // Defines tracking media parameters.
+ // Les valeurs sont commentees pour laisser le defaut
+ // a GEANT (version 3-21, page CONS200), f.m.
+ epsil = .001; // Tracking precision, Inside the pit
+ stemax = -1.; // Maximum displacement for multiple scattering
+ tmaxfd = -20.; // Maximum angle due to field deflection
+ deemax = -.3; // Maximum fractional energy loss, DLS
+ stmin = -.8;
+ // ***************
+
+ //
+ // Aluminum
+ AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(49, "ALU_C2 ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ //
+ // Iron
+ AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ //
+ // Air
+ AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ //
+ // Vacuum
+ AliMedium(16, "VA_C0 ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(36, "VA_C1 ", 36, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(56, "VA_C2 ", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ //
+ // Concrete
+ AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(37, "CC_C1 ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(57, "CC_C2 ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+
+
+ // The scintillator of the CPV made of Polystyrene
+ // scintillator -> idtmed[1102]
+ AliMedium(3, "CPV scint. ", 3, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+
+ // Standard ROCK -> idtmed[1103]
+ AliMedium(4, "Standard Rock ", 4, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
+
+ // ROCK1 -> idtmed[1104]
+ AliMedium(5, "Rock 1 ", 5, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
+
+
+ // Molasse -> idtmed[1105]
+ AliMedium(6, "Molasse ", 6, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
+
+
+}
+
+//_____________________________________________________________________________
+void AliCRT::MakeBranch(Option_t* option, const char *file)
+{
+ //
+ // Specific CRT branches
+ //
+ // Create Tree branches for the CRT.
+ Int_t buffersize = 400;
+ char branchname[10];
+ sprintf(branchname,"%s",GetName());
+
+ AliDetector::MakeBranch(option,file);
+
+ const char *cD = strstr(option,"D");
+
+ if (cD) {
+ digits = new AliCRTdigit();
+ MakeBranchInTree(gAlice->TreeD(), branchname, "AliCRTdigit",
+ digits, buffersize, 1, file);
+ }
+
+}
+//_____________________________________________________________________________
--- /dev/null
+#ifndef ALICRT_H
+#define ALICRT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+// Manager class for detector: ACORDE //
+////////////////////////////////////////////////
+
+#include <TObject.h>
+#include <TTree.h>
+
+#include "AliDetector.h"
+
+class TFile;
+class TDirectory;
+class TString ;
+class TTask ;
+class TFolder ;
+
+class AliCRT : public AliDetector {
+
+public:
+
+ AliCRT();
+ AliCRT(const char *name, const char *title);
+ virtual ~AliCRT();
+
+ virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
+ virtual void AddDigit( Int_t* tracks, Int_t* digits);
+ virtual void BuildGeometry();
+ virtual void CreateGeometry();
+ virtual void Init() const;
+ virtual void CreateMaterials();
+ virtual Int_t IsVersion() const {return 0;}
+ virtual void DrawDetector() const {};
+ virtual void DrawModule() const {};
+ virtual void StepManager() = 0;
+ virtual void MakeBranch(Option_t *opt=" ", const char *file=0);
+
+ virtual void FinishEvent();
+ virtual void ResetHits();
+ virtual void ResetDigits();
+
+private:
+ ClassDef(AliCRT,1) //Class manager for CRT(ACORDE)
+};
+
+#endif // ALICRT_H
--- /dev/null
+ /**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+
+*/
+
+////////////////////////////////////////////////////////////////////////
+//
+// AliCRTConstants class
+//
+// This class serves to group constants needed by CRT detector in 1
+// easily accessible place. All constants are public const static data
+// members. The class is never instatiated.
+//
+//
+// Author: Arturo Fernandez, Enrique Gamez
+// FCFM-UAP, Mexico.
+//
+////////////////////////////////////////////////////////////////////////
+
+#include "AliCRTConstants.h"
+
+const Float_t AliCRTConstants::fgCageLenght = 477.6;
+const Float_t AliCRTConstants::fgCageWidth = 166.7;
+const Float_t AliCRTConstants::fgCageHeight = 10.7;
+const Float_t AliCRTConstants::fgSinglePaletteLenght = 363.0;
+const Float_t AliCRTConstants::fgSinglePaletteWidth = 19.7;
+const Float_t AliCRTConstants::fgSinglePaletteHeight = 1.0;
+const Float_t AliCRTConstants::fgActiveAreaGap = 0.7;
+const Float_t AliCRTConstants::fgActiveAreaLenght = fgSinglePaletteLenght;
+const Float_t AliCRTConstants::fgActiveAreaWidth = 156.7;
+const Float_t AliCRTConstants::fgActiveAreaHeight = 2*fgSinglePaletteHeight + fgActiveAreaGap;
+const Float_t AliCRTConstants::fgMagnetWidth = 654.4;
+const Float_t AliCRTConstants::fgMagnetLenght = 1200.;
+
+ClassImp(AliCRTConstants)
--- /dev/null
+#ifndef ALICRTCONSTANTS_H
+#define ALICRTCONSTANTS_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////
+//
+// AliCRTConstants class
+//
+// This class serves to group constants needed by ACORDE detector in 1
+// easily accessible place. All constants are public const static data
+// members. The class is never instatiated.
+//
+//
+// Author: Arturo Fernandez, Enrique Gamez
+// FCFM-UAP, Mexico.
+//
+/////////////////////////////////////////////////////////////////////////
+
+#include <TObject.h>
+
+class AliCRTConstants {
+ public:
+ // Modules
+ static const Float_t fgCageLenght; // Module lenght
+ static const Float_t fgCageWidth; // Module width
+ static const Float_t fgCageHeight; // Module height
+
+// The dimensions of the active area of a single palette are:
+ static const Float_t fgSinglePaletteLenght; //
+ static const Float_t fgSinglePaletteWidth; //
+ static const Float_t fgSinglePaletteHeight; //
+
+ static const Float_t fgActiveAreaGap; //
+
+ // Aproximate dimensions of the active area of the module.
+ static const Float_t fgActiveAreaLenght;
+ static const Float_t fgActiveAreaWidth; //
+ static const Float_t fgActiveAreaHeight;
+
+ // Magnet
+ static const Float_t fgMagnetWidth; //
+ static const Float_t fgMagnetLenght; //
+
+ private:
+ AliCRTConstants() {}
+ virtual ~AliCRTConstants() {}
+
+ ClassDef(AliCRTConstants, 0) // CRT(ACORDE) global constants
+};
+
+#endif // ALICRTCONSTANTS_H
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log:
+
+*/
+
+#include "AliCRT.h"
+#include "AliCRTdigit.h"
+#include "AliRun.h"
+
+ClassImp(AliCRTdigit)
+
+//_____________________________________________________________________________
+AliCRTdigit::AliCRTdigit()
+{
+ // Default ctor.
+
+ fNDigits = 0;
+ fTdc = 0;
+ fAdc = 0;
+ fTracks = 0;
+}
+
+//_____________________________________________________________________________
+AliCRTdigit::AliCRTdigit(Int_t tracknum, Int_t *vol,Float_t *digit)
+{
+
+ //
+ // Creates CRT digit
+ // The creator for the AliCRTdigit class. This routine fills the
+ // AliCRTdigit data members from the array digits.
+ //
+
+ fSector = vol[0];
+ fPlate = vol[1];
+ fStrip = vol[2];
+ fPadx = vol[3];
+ fPadz = vol[4];
+ fNDigits = 1;
+ fTdc = new TArrayF(fNDigits);
+ (*fTdc)[0] = digit[0];
+ fAdc = new TArrayF(fNDigits);
+ (*fAdc)[0] = digit[1];
+ //fTracks = new TArrayI(kMAXDIGITS*fNDigits);
+ fTracks = new TArrayI(fNDigits);
+ (*fTracks)[0] = tracknum;
+ //for (Int_t i = 1; i <kMAXDIGITS*fNDigits; i++) {
+ for (Int_t i = 1; i <fNDigits; i++) {
+ (*fTracks)[i] = -1;
+ }
+
+}
+
+//_____________________________________________________________________________
+AliCRTdigit::AliCRTdigit(const AliCRTdigit & digit)
+{
+ //
+ //-- Copy ctor.
+ //
+ fSector = digit.fSector;
+ fPlate = digit.fPlate;
+ fStrip = digit.fStrip;
+ fPadx = digit.fPadx;
+ fPadz = digit.fPadz;
+ fNDigits = digit.fNDigits;
+ fTdc = new TArrayF(*digit.fTdc);
+ fAdc = new TArrayF(*digit.fAdc);
+ fTracks = new TArrayI(*digit.fTracks);
+
+}
--- /dev/null
+#ifndef ALICRTDIGIT_H
+#define ALICRTDIGIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#include <TArrayF.h>
+#include <TArrayI.h>
+
+#include "AliDigit.h"
+#include "AliCRT.h"
+
+//___________________________________________
+class AliCRTdigit: public TObject {
+
+ public:
+ AliCRTdigit();
+ AliCRTdigit(Int_t tracknum, Int_t* vol, Float_t* digit);
+ AliCRTdigit(const AliCRTdigit & digit);
+ virtual ~AliCRTdigit() {}
+
+protected:
+ Int_t fSector; // number of sector
+ Int_t fPlate; // number of plate
+ Int_t fStrip; // number of strip
+ Int_t fPadx; // number of pad along x
+ Int_t fPadz; // number of pad along z
+ Int_t fNDigits; // dimension of fTdc array
+ TArrayF *fTdc; // tdc values for sdigit
+ TArrayF *fAdc; // adc values for sdigit
+ TArrayI *fTracks; // contributing tracks, kMAXDIGITS entries per
+ // 1 tdc value
+
+
+private:
+ ClassDef(AliCRTdigit,1) //Digit (Header) object for set : CRT (ACORDE)
+};
+#endif // ALICRTDIGIT_H
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log:
+
+*/
+
+#include "AliCRThit.h"
+
+ClassImp(AliCRThit)
+
+//____________________________________________________________________________
+AliCRThit::AliCRThit(const AliCRThit & hit)
+{
+ //
+ // copy ctor for AliCRThit object
+ //
+
+ fnmou = hit.fnmou;
+ fmtyp = hit.fmtyp;
+ fxpit = hit.fxpit;
+ fypit = hit.fypit;
+ fzpit = hit.fzpit;
+ fpxug = hit.fpxug;
+ fpyug = hit.fpyug;
+ fpzug = hit.fpzug;
+ flay = hit.flay;
+ fxver = hit.fxver;
+ fyver = hit.fyver;
+ fzver = hit.fzver;
+}
+
+//______________________________________________________________________________
+AliCRThit::AliCRThit(Int_t shunt, Int_t track, Int_t *vol,
+ Float_t *hits) :AliHit(shunt, track)
+{
+//
+// Constructor of hit object
+//
+
+ fnmou = hits[0];
+ fmtyp = hits[1];
+ fxpit = hits[2];
+ fypit = hits[3];
+ fzpit = hits[4];
+ fpxug = hits[5];
+ fpyug = hits[6];
+ fpzug = hits[7];
+ flay = hits[8];
+ fxver = hits[9];
+ fyver = hits[10];
+ fzver = hits[11];
+}
+
--- /dev/null
+////////////////////////////////////////////////
+// //
+// Hit class for CRT //
+// Interface //
+// Getters, Setters and member variables //
+// declared here //
+// //
+////////////////////////////////////////////////
+
+#ifndef ALICRTHIT_H
+#define ALICRTHIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#include "AliHit.h"
+
+
+class AliCRThit : public AliHit {
+
+public:
+ AliCRThit() {}
+ AliCRThit(Int_t shunt, Int_t track, Int_t* vol, Float_t *hits);
+ AliCRThit(const AliCRThit & hit) ;
+ virtual ~AliCRThit() {}
+
+ // getters for AliCRThit object
+ Float_t Getnmou() const {return fnmou;}
+ Float_t Getmtyp() const {return fmtyp;}
+ Float_t Getxpit() const {return fxpit;}
+ Float_t Getypit() const {return fypit;}
+ Float_t Getzpit() const {return fzpit;}
+ Float_t Getpxug() const {return fpxug;}
+ Float_t Getpyug() const {return fpyug;}
+ Float_t Getpzug() const {return fpzug;}
+ Float_t Getlay() const {return flay;}
+ Float_t Getxver() const {return fxver;}
+ Float_t Getyver() const {return fyver;}
+ Float_t Getzver() const {return fzver;}
+
+ Int_t fVolume;
+ Int_t fCopy;
+ Float_t fnmou;
+ Float_t fmtyp;
+ Float_t fxpit; //
+ Float_t fypit; //
+ Float_t fzpit; //
+ Float_t fpxug; //
+ Float_t fpyug; //
+ Float_t fpzug; //
+ Float_t flay; //
+ Float_t fxver; //
+ Float_t fyver; //
+ Float_t fzver; //
+
+private:
+
+ ClassDef(AliCRThit,1) // Hit for CRT (ACORDE)
+
+};
+
+#endif /* ALICRTHIT_H */
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Alice COsmic Ray Trigger //
+// //
+// This class contains the functions for version 0 of the Cosmic Rays ALICE //
+// detector. //
+//
+// Authors:
+//
+// Arturo Fernandez <afernand@fcfm.buap.mx>
+// Enrique Gamez <egamez@fcfm.buap.mx>
+//
+// Universidad Autonoma de Puebla
+//
+//
+//Begin_Html
+/*
+<img src="picts/AliCRTv0Class.gif">
+</pre>
+<br clear=left>
+<p>The responsible person for this module is
+<a href="mailto:egamez@fcfm.buap.mx">Enrique Gamez</a>.
+</font>
+<pre>
+*/
+//End_Html
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+#include <iostream>
+
+#include <TMath.h>
+#include <TGeometry.h>
+#include <TTUBE.h>
+#include <TNode.h>
+#include <TLorentzVector.h>
+
+#include "AliCRTv0.h"
+#include "AliCRTConstants.h"
+
+#include "AliRun.h"
+#include "AliMC.h"
+#include "AliMagF.h"
+#include "AliConst.h"
+#include "AliPDG.h"
+
+ClassImp(AliCRTv0)
+
+//_____________________________________________________________________________
+AliCRTv0::AliCRTv0() : AliCRT()
+{
+ //
+ // Default constructor for CRT
+ //
+ fMucur = 0;
+}
+
+//_____________________________________________________________________________
+AliCRTv0::AliCRTv0(const char *name, const char *title)
+ : AliCRT(name,title)
+{
+ //
+ // Standard constructor for CRT
+ //
+ //Begin_Html
+ /*
+ <img src="picts/AliCRTv0.gif">
+ */
+ //End_Html
+}
+
+//_____________________________________________________________________________
+void AliCRTv0::BuildGeometry()
+{
+
+}
+
+//_____________________________________________________________________________
+void AliCRTv0::CreateGeometry()
+{
+ //
+ // Create geometry for the CRT array
+ //
+
+ //
+ //-- Create the hall
+ CreateHall();
+
+ Int_t idrotm[2499]; // The rotation matrix.
+
+ // idtmed[1099->1198] equivalent to fIdtmed[0->100]
+ Int_t * idtmed = fIdtmed->GetArray() - 1099 ;
+
+ // In order to generate the more correctly the modules (more datails)
+ // we will create a box (air box) as a (sub)mother volume.
+ // Inside this box we'll put the scintillator tiles, the PMTs the frame
+ // and, maybe, some other things.
+
+ Float_t box[3];
+ box[0] = AliCRTConstants::fgCageLenght/2.; // Half Length of the box along the X axis, cm.
+ box[1] = AliCRTConstants::fgCageHeight/2.; // Half Length of the box along the Y axis, cm.
+ box[2] = AliCRTConstants::fgCageWidth/2.; // Half Length of the box along the Z axis, cm.
+
+
+ // Define the Scintillators. as a big box.
+ Float_t scint[3];
+ scint[0] = AliCRTConstants::fgActiveAreaLenght/2.; // Half Length in X
+ scint[1] = AliCRTConstants::fgActiveAreaHeight/2.; // Half Length in Y
+ scint[2] = AliCRTConstants::fgActiveAreaWidth/2.; // Half Length in Z
+ gMC->Gsvolu("CRT1", "BOX ", idtmed[1102], scint, 3); // Scintillators
+ // Divide the modules in 2 planes.
+ //gMC->Gsdvn("CRT2", "CRT1", 2, 2);
+ // Now divide each plane in 8 palettes
+ //gMC->Gsdvn("CRT3", "CRT1", 8, 3);
+
+
+ //
+ // Define the coordinates where the draw will begin.
+ //
+
+ //
+ // -- X axis.
+ // we'll start dawing from the center.
+ Float_t initX = 0.;
+
+ //
+ // -- Y axis
+ Float_t gapY = 30.; // 30 cms. above the barrel.
+ // For the height we staimate the from the center of the ceiling,
+ // if were a cilinder, must be about 280cm.
+ Float_t barrel = 790.; // Barrel radius.
+ Float_t height = barrel + gapY - 30.;
+ Float_t initY = height;
+
+ //
+ // -- Z axis.
+ // we'll start dawing from the center.
+
+ //
+ // Put 4 modules on the top of the magnet
+ Int_t step = 4;
+ for ( Int_t i = 1 ; i <= 4 ; i++ ) {
+ gMC->Gspos("CRT1", i, "CRTA", initX, initY, (i-step)*box[2], 0, "ONLY");
+ step--;
+ }
+
+ // Modules on the barrel sides.
+ // Because the openenig angle for each face is 22.5, and if we want to
+ // put the modules right in the middle
+ Float_t xtragap = 10.;
+ Float_t initXside = (height+xtragap)*TMath::Sin(2*22.5*kDegrad); //rigth side
+ Float_t initYside = (height+xtragap)*TMath::Cos(2*22.5*kDegrad);
+
+ // Put 4 modules on the left side of the magnet
+ // The rotation matrix parameters, for the left side.
+ AliMatrix(idrotm[232], 90., 315., 90., 45., 0., 337.5);
+ Int_t stepl = 4;
+ for ( Int_t i = 1 ; i <= 4 ; i++ ) {
+ gMC->Gspos("CRT1", i+4, "CRTA", initXside, initYside, (i-stepl)*box[2],
+ idrotm[232], "ONLY");
+ stepl--;
+ }
+
+ // Put 4 modules on the right side of the magnet
+ // The rotation matrix parameters for the right side.
+ AliMatrix(idrotm[231], 90., 45., 90., 315., 180., 202.5);
+ Int_t stepr = 4;
+ for ( Int_t i = 1 ; i <= 4 ; i++ ) {
+ gMC->Gspos("CRT1", i+8, "CRTA", -initXside, initYside, (i-stepr)*box[2],
+ idrotm[231], "ONLY");
+ stepr--;
+ }
+
+}
+
+//_____________________________________________________________________________
+void AliCRTv0::CreateHall()
+{
+
+ Float_t r2;
+ Float_t phid, phim, pbox[3], h, r, tspar[5];
+ Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
+ Int_t idrotm[1999];
+ Float_t trdpar[4], trapar[11];
+ Float_t phi;
+
+ Int_t *idtmed = fIdtmed->GetArray()-1899;
+
+ // Because the BODY, was "filled with vaccum", we're goin to superimpose
+ // a volume with molasse, then using the boolenaq operations with volumes
+ // we are going the replace, with air, the part closed by the hall walls
+
+ // For the moment, just use the simple mother volume ...
+ Float_t mola[3];
+ mola[0] = 2000.;
+ mola[1] = 2000.;
+ mola[2] = 3000.;
+ gMC->Gsvolu("CRTA", "BOX", idtmed[1905], mola, 3);
+ gMC->Gspos("CRTA", 1, "ALIC", 0., 0., 0., 0, "MANY");
+
+ // Now make a cilinder with the size of the hall (raughtly)
+ // and fill it with air.
+ Float_t hall[3];
+ hall[0] = 0.; // Inner radius
+ hall[1] = 1170.; // Outer radius
+ hall[2] = 2625. + 200.; // Hall lenght
+ gMC->Gsvolu("CRTB", "TUBE", idtmed[1914], hall, 3);
+ // perform the substraction SMOL - SALL, asigning SMOL as MANY and
+ // SALL as ONLY.
+ gMC->Gspos("CRTB", 1, "CRTA", 0., 500., -2*375., 0, "ONLY");
+
+ // RB24/26 TUNNEL FLOOR
+
+ r = 220.;
+ h = 140.;
+ phi = TMath::ACos(h / r);
+ xl = r * TMath::Sin(phi);
+ dr = 100.;
+ dh = dr * TMath::Cos(phi);
+ dl = dr * TMath::Sin(phi);
+
+ AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.);
+ AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.);
+ // END WALL
+
+ pbox[0] = 1200.;
+ pbox[1] = 1300.;
+ pbox[2] = 60.;
+ gMC->Gsvolu("CRTC", "BOX ", idtmed[1956], pbox, 3);
+ gMC->Gspos("CRTC", 1, "CRTA", 0., 404., 1960, 0, "ONLY");
+
+ // hall floor, the interior part (left)
+
+ phid = 16.197;
+ trdpar[0] = 700.;
+ trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.;
+ trdpar[2] = 550.;
+ trdpar[3] = 95.;
+ gMC->Gsvolu("CRTD", "TRD1", idtmed[1956], trdpar, 4);
+ gMC->Gspos("CRTD", 1, "CRTA", 0., -801., 1350., idrotm[1900], "ONLY");
+
+ // hall floor, the outside part
+
+ phid = 16.197;
+ trdpar[0] = 700.;
+ trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.;
+ trdpar[2] = 1325.;
+ trdpar[3] = 95.;
+ gMC->Gsvolu("CRTE", "TRD1", idtmed[1956], trdpar, 4);
+ gMC->Gspos("CRTE", 2, "CRTA", 0., -801., -2125., idrotm[1900], "ONLY");
+
+ // hall side walls
+
+ // Interior walls
+ trapar[0] = 550.;
+ trapar[1] = 0.;
+ trapar[2] = 0.;
+ trapar[3] = 1273.78/2;
+ trapar[4] = 235.;
+ trapar[5] = 50.;
+ trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
+ trapar[7] = trapar[3];
+ trapar[8] = trapar[4];
+ trapar[9] = trapar[5];
+ trapar[10] = trapar[6];
+ dx = trapar[4] * 1.5 + 700. - trapar[5] * .5;
+ gMC->Gsvolu("CRTF", "TRAP", idtmed[1956], trapar, 11);// interior wall
+ gMC->Gspos("CRTF", 1, "CRTA", dx, -896+trapar[3], 1350., 0, "ONLY");
+ gMC->Gspos("CRTF", 2, "CRTA",-dx, -896+trapar[3], 1350., idrotm[1901], "ONLY");
+
+ // Exterior walls
+ Float_t trapare[11];
+ trapare[0] = 275.;
+ for ( Int_t i = 1 ; i <= 10 ; i++ ) {
+ trapare[i] = trapar[i];
+ }
+ gMC->Gsvolu("CRTG", "TRAP", idtmed[1956], trapare, 11);// exterior wall
+ gMC->Gspos("CRTG", 1, "CRTA", dx, -896+trapar[3], -1075., 0, "ONLY");
+ gMC->Gspos("CRTG", 2, "CRTA",-dx, -896+trapar[3], -1075., idrotm[1901], "ONLY");
+
+ pbox[0] = 50.;
+ pbox[1] = (500. - (trapar[3] * 2. - 896.)) / 2.;
+ pbox[2] = 1625.;
+ gMC->Gsvolu("CRTH", "BOX ", idtmed[1956], pbox, 3);
+ gMC->Gspos("CRTH", 1, "CRTA", 1120., 500-pbox[1], 275., 0, "ONLY");
+ gMC->Gspos("CRTH", 2, "CRTA", -1120., 500-pbox[1], 275., 0, "ONLY");
+
+ // slanted wall close to L3 magnet
+
+ phim = 45.;
+ hm = 790.;
+ //rm = hm / TMath::Cos(phim / 2. * kDegrad);
+ am = hm * TMath::Tan(phim / 2. * kDegrad);
+ bm = (hm + 76.) / hm * am;
+ cm = bm * 2. / TMath::Sqrt(2.);
+ trapar[0] = 800.;
+ trapar[1] = 0.;
+ trapar[2] = 0.;
+ trapar[3] = (1273.78 - cm) / 2.;
+ trapar[4] = 235. - cm * TMath::Tan(phid * kDegrad) / 2.;
+ trapar[5] = 50.;
+ trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
+ trapar[7] = trapar[3];
+ trapar[8] = trapar[4];
+ trapar[9] = trapar[5];
+ trapar[10] = trapar[6];
+ w1 = trapar[4];
+ dx = cm*TMath::Tan(phid * kDegrad) + 700. + trapar[4] * 1.5 - trapar[5] * .5;
+ gMC->Gsvolu("CRTI", "TRAP", idtmed[1956], trapar, 11);
+ r2 = cm - 896. + trapar[3];
+ gMC->Gspos("CRTI", 1, "CRTA", dx, r2, 0., 0, "ONLY");
+ gMC->Gspos("CRTI", 2, "CRTA",-dx, r2, 0., idrotm[1901], "ONLY");
+ trapar[3] = cm / 2.;
+ trapar[4] = w1 + cm / 2.;
+ trapar[5] = w1;
+ trapar[6] = TMath::ATan(.5) * kRaddeg;
+ trapar[7] = trapar[3];
+ trapar[8] = trapar[4];
+ trapar[9] = trapar[5];
+ trapar[10] = trapar[6];
+ dx = 1170. - trapar[4] * .5 - trapar[5] * .5;
+ gMC->Gsvolu("CRTJ", "TRAP", idtmed[1956], trapar, 11);
+ r2 = trapar[3] - 896.;
+ gMC->Gspos("CRTJ", 1, "CRTA", dx, r2, 0., 0, "ONLY");
+ gMC->Gspos("CRTJ", 2, "CRTA",-dx, r2, 0., idrotm[1901], "ONLY");
+
+ tspar[0] = 1070.;
+ tspar[1] = 1170.;
+ tspar[2] = pbox[2];
+ tspar[3] = 0.;
+ tspar[4] = 180.;
+ gMC->Gsvolu("CRTK", "TUBS", idtmed[1956], tspar, 5);
+ gMC->Gspos("CRTK", 1, "CRTA", 0., 500., 300., 0, "ONLY");
+ trdpar[0] = 1170 - trapar[4] * 2.;
+ trdpar[1] = trdpar[0] + TMath::Tan(phim * kDegrad) * 76.;
+ trdpar[2] = 800.;
+ trdpar[3] = 38.;
+ gMC->Gsvolu("CRTL", "TRD1", idtmed[1956], trdpar, 4);
+ gMC->Gspos("CRTL", 1, "CRTA", 0., -858., 0., idrotm[1900], "ONLY");
+
+
+
+ // Define the setion tube of the PX24, at the same level of hall
+ // rotate the tubes around X, Z'=Y, Y'=-Z
+ AliMatrix(idrotm[2001], 0., 0., 90., 0., 90., 90.);
+ Float_t pxi[5];
+ pxi[0] = 1150.; // inside radius
+ pxi[1] = 1250.; // outside radius
+ pxi[2] = 1300.; // half lenght in Z
+ pxi[3] = kRaddeg*TMath::ASin(tspar[0]/pxi[0]);//starting angle of the segment
+ pxi[4] = 360.-pxi[3]; // ending angle of the segment
+ gMC->Gsvolu("CRTM", "TUBS", idtmed[1956], pxi, 5);
+ gMC->Gspos("CRTM", 1, "CRTA", 0., 404., -2300., idrotm[2001], "MANY");
+
+ // Define the setion tube of the PX24, above the hall
+ Float_t pxa[3];
+ pxa[0] = pxi[0];
+ pxa[1] = pxi[1];
+ pxa[2] = 2550. - pxi[2]; // Half lenght
+ gMC->Gsvolu("CRTN", "TUBE", idtmed[1956], pxa, 3);
+ gMC->Gspos("CRTN", 1, "CRTA", 0.,pxi[2]+404+pxa[2], -2300., idrotm[2001], "MANY");
+ // Fill this section with air.
+ Float_t pxb[3];
+ pxb[0] = 0.;
+ pxb[1] = pxa[0];
+ pxb[2] = pxa[2];
+ gMC->Gsvolu("CRTO", "TUBE", idtmed[1914], pxb, 3);
+ gMC->Gspos("CRTO", 1, "CRTA", 0., pxi[2]+404+pxa[2], -2300., idrotm[2001], "ONLY");
+
+
+ // PM25 Acces shaft.
+ Float_t pma[3];
+ pma[0] = 910./2.;// Inner radius
+ pma[1] = pma[0] + 100.; // Outer Radius
+ pma[2] = 5100./2.; // Half lenght
+ gMC->Gsvolu("CRTP", "TUBE", idtmed[1956], pma, 3);
+ gMC->Gspos("CRTP", 1, "CRTA", -2100., 1654., 0., idrotm[2001], "ONLY");
+ // Fill it with air.
+ Float_t pmb[3];
+ pmb[0] = 0.;
+ pmb[1] = pma[0];
+ pmb[2] = pma[2];
+ gMC->Gsvolu("CRTQ", "TUBE", idtmed[1914], pmb, 3);
+ gMC->Gspos("CRTQ", 1, "CRTA", -2100., 1654., 0., idrotm[2001], "ONLY");
+
+
+ // PGC2 Acces shaft.
+ Float_t pgc[3];
+ pgc[0] = 1200./2.;// Inner Radius
+ pgc[1] = pgc[0] + 100.; // outer Radius
+ pgc[2] = 5100./2.; // Half lenght
+ gMC->Gsvolu("CRTR", "TUBE", idtmed[1956], pgc, 3);
+ gMC->Gspos("CRTR", 1, "CRTA", 375., 1654., 4850., idrotm[2001], "ONLY");
+ // Fill it with air.
+ Float_t pgd[3];
+ pgd[0] = 0.;
+ pgd[1] = pgc[0];
+ pgd[2] = pgc[2];
+ gMC->Gsvolu("CRTS", "TUBE", idtmed[1914], pgd, 3);
+ gMC->Gspos("CRTS", 1, "CRTA", 375., 1654., 4850., idrotm[2001], "ONLY");
+
+}
+//_____________________________________________________________________________
+void AliCRTv0::CreateMaterials()
+{
+ //
+ //--
+ //
+
+ // Use the standard materials.
+ AliCRT::CreateMaterials();
+}
+
+
+//_____________________________________________________________________________
+void AliCRTv0::DrawDetector()
+{
+
+}
+
+//_____________________________________________________________________________
+void AliCRTv0::DrawModule()
+{
+ //
+ // Draw a shaded view of the L3 magnet
+ //
+ cout << "AliCRTv0::DrawModule() : Drawing the module" << endl;
+
+ gMC->Gsatt("*", "seen", -1);
+ gMC->Gsatt("alic", "seen", 0);
+
+ gMC->Gsatt("ALIC","seen",0); // Mother volume, pit ceiling
+ gMC->Gsatt("L3MO","seen",1); // L3 Magnet
+ gMC->Gsatt("CRT1","seen",1); // Scintillators (air) box.
+
+ // Draw the volumes for all the hall.
+ gMC->Gsatt("CRTA","seen",1);
+ gMC->Gsatt("CRTB","seen",1);
+ gMC->Gsatt("CRTC","seen",1);
+ gMC->Gsatt("CRTD","seen",1);
+ gMC->Gsatt("CRTE","seen",1);
+ gMC->Gsatt("CRTF","seen",1);
+ gMC->Gsatt("CRTG","seen",1);
+ gMC->Gsatt("CRTH","seen",1);
+ gMC->Gsatt("CRTI","seen",1);
+ gMC->Gsatt("CRTJ","seen",1);
+ gMC->Gsatt("CRTK","seen",1);
+ gMC->Gsatt("CRTL","seen",1);
+ gMC->Gsatt("CRTM","seen",1);
+ gMC->Gsatt("CRTN","seen",1);
+ gMC->Gsatt("CRTO","seen",1);
+ gMC->Gsatt("CRTP","seen",1);
+ gMC->Gsatt("CRTQ","seen",1);
+ gMC->Gsatt("CRTR","seen",1);
+ gMC->Gsatt("CRTS","seen",1);
+
+
+ gMC->Gdopt("hide", "on");
+ gMC->Gdopt("edge","off");
+ gMC->Gdopt("shad", "on");
+ gMC->Gsatt("*", "fill", 7);
+ gMC->SetClipBox("ALIC", 0, 3000, -3000, 3000, -6000, 6000);
+ gMC->DefaultRange();
+ gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .009, .009);
+ gMC->Gdhead(1111, "View of CRT(ACORDE)");
+ gMC->Gdman(18, 4, "MAN");
+
+
+}
+
+//_____________________________________________________________________________
+void AliCRTv0::Init()
+{
+ //
+ // Initialise L3 magnet after it has been built
+ Int_t i;
+ //
+ if(fDebug) {
+ printf("\n%s: ",ClassName());
+ for(i=0;i<35;i++) printf("*");
+ printf(" CRTv0_INIT ");
+ for(i=0;i<35;i++) printf("*");
+ printf("\n%s: ",ClassName());
+ //
+ // Here the CRTv0 initialisation code (if any!)
+ for(i=0;i<80;i++) printf("*");
+ printf("\n");
+ }
+
+}
+
+//_____________________________________________________________________________
+void AliCRTv0::StepManager()
+{
+ //
+ // Called for every step in the CRT Detector
+ //
+ Float_t hits[12];
+ Int_t vol[5];
+
+ // Check if this is the last step of the track in the current volume
+ Bool_t laststepvol = gMC->IsTrackEntering();
+ // Obtain the medium
+ TLorentzVector xyz;
+ gMC->TrackPosition(xyz);
+ TLorentzVector pxyz;
+ gMC->TrackMomentum(pxyz);
+
+ if ( laststepvol && (strcmp(gMC->CurrentVolName(),"CRT1") == 0) ) {
+ if ( gMC->TrackCharge() != 0 || gMC->TrackPid() == kGamma ) {
+ Float_t vert[3];
+
+ hits[0] = fMucur++;
+
+ if ( (gMC->TrackPid() != kMuonPlus) && (gMC->TrackPid() != kMuonMinus)) {
+ hits[1] = -(Float_t)gMC->TrackPid();
+ } else {
+ hits[1] = (Float_t)gMC->TrackPid();
+ }
+
+ TLorentzVector xyz;
+ gMC->TrackPosition(xyz);
+ TLorentzVector pxyz;
+ gMC->TrackMomentum(pxyz);
+
+ hits[2] = xyz[0]; // X pit
+ hits[3] = xyz[1]; // Y pit
+ hits[4] = xyz[2]; // Z pit
+ hits[5] = pxyz[0]; // pxug
+ hits[6] = pxyz[1]; // pyug
+ hits[7] = pxyz[2]; // pzug
+
+ hits[8] = gMC->GetMedium(); // layer
+ hits[9] = vert[0]; // xver
+ hits[10] = vert[1]; // yver
+ hits[11] = vert[2]; // zver
+ }
+ }
+
+ // Store the hit.
+ AddHit(gAlice->CurrentTrack(),vol, hits);
+}
--- /dev/null
+#ifndef ALICRTV1_H
+#define ALICRTV1_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+// Manager class for detector: CRTv0 //
+////////////////////////////////////////////////
+
+#include "AliCRT.h"
+
+
+class AliCRTv0 : public AliCRT
+{
+
+public:
+ AliCRTv0();
+ AliCRTv0(const char *name, const char *title);
+ virtual ~AliCRTv0() {}
+ virtual void CreateGeometry();
+ virtual void BuildGeometry();
+ virtual void CreateMaterials();
+ virtual void Init();
+ virtual Int_t IsVersion() const {return 0;}
+ virtual void DrawDetector();
+ virtual void DrawModule();
+ virtual TString Version(void) {return TString("v0");}
+ virtual void StepManager();
+
+ void CreateHall();
+
+
+private:
+ Int_t fMucur;
+
+ ClassDef(AliCRTv0,1) //Class for CRT, version 0
+
+};
+
+#endif
--- /dev/null
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliCRT+;
+#pragma link C++ class AliCRTConstants+;
+#pragma link C++ class AliCRTv0+;
+#pragma link C++ class AliCRTdigit+;
+#pragma link C++ class AliCRThit+;
+
+
+#endif
--- /dev/null
+void DrawACORDE()
+{
+ gMC->Gsatt("*", "seen", -1);
+ gMC->Gsatt("alic", "seen", 0);
+ gROOT->LoadMacro("ViewACORDE.C");
+ gInterpreter->ProcessLine("ViewACORDE()");
+ //gMC->Gdopt("proj", "pers");
+ gMC->Gdopt("hide", "on");
+ gMC->Gdopt("shad", "on");
+ gMC->Gsatt("*", "fill", 7);
+ gMC->SetClipBox(".");
+ gMC->SetClipBox("ALIC", 0, 3000, -3000, 3000, -6000, 6000);
+ gMC->DefaultRange();
+ gMC->Gdraw("alic", 0, 90, 0, 10, 9.5, .009, .009);
+ gMC->Gdhead(1111, "View of ACORDE");
+ gMC->Gdman(18, 4, "MAN");
+}
--- /dev/null
+############################### CRT Makefile ##################################
+
+# Include machine specific definitions
+
+include $(ALICE_ROOT)/conf/GeneralDef
+include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
+
+PACKAGE = TOF
+
+# C++ sources
+
+SRCS = AliCRT.cxx AliCRTv0.cxx AliCRThit.cxx AliCRTdigit.cxx AliCRTConstants.cxx
+
+# C++ Headers
+
+HDRS = $(SRCS:.cxx=.h) CRTLinkDef.h
+
+# Library dictionary
+
+DICT = CRTCint.cxx
+DICTH = $(DICT:.cxx=.h)
+DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
+
+# FORTRAN Objectrs
+
+FOBJS = $(patsubst %.f,tgt_$(ALICE_TARGET)/%.o,$(FSRCS))
+
+# C Objects
+
+COBJS = $(patsubst %.c,tgt_$(ALICE_TARGET)/%.o,$(CSRCS))
+
+# C++ Objects
+
+OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
+
+# C++ compilation flags
+
+CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/
+
+# FORTRAN compilation flags
+
+FFLAGS = $(FOPT)
+
+##### TARGETS #####
+
+# Target
+
+SLIBRARY = $(LIBDIR)/libCRT.$(SL)
+ALIBRARY = $(LIBDIR)/libCRT.a
+
+default: $(SLIBRARY)
+
+$(LIBDIR)/libCRT.$(SL): $(OBJS)
+
+$(DICT): $(HDRS)
+
+depend: $(SRCS)
+
+TOCLEAN = $(OBJS) *Cint.cxx *Cint.h
+
+CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
+
+############################### General Macros ################################
+
+include $(ALICE_ROOT)/conf/GeneralMacros
+
+############################ Dependencies #####################################
+
+-include tgt_$(ALICE_TARGET)/Make-depend
+# DO NOT DELETE
--- /dev/null
+void ViewACORDE()
+{
+ //gMC->Gsatt("HHC1","seen",0); // Mother Volume
+ gMC->Gsatt("L3MO","seen",1); // Magnet
+ //gMC->Gsatt("SCNB","seen",0); // Module Box
+ gMC->Gsatt("SCNS","seen",1); // Scintillator.
+ gMC->Gsatt("SPLA","seen",1);
+ gMC->Gsatt("SPAL","seen",1);
+ //gMC->Gsatt("SCLL","seen",1);
+ //gMC->Gsatt("SCLR","seen",1);
+ //gMC->Gsatt("SCSL","seen",1);
+ //gMC->Gsatt("SCSR","seen",1);
+
+}
--- /dev/null
+SRCS = AliCRT.cxx AliCRTConstants.cxx AliCRTv0.cxx AliCRTdigit.cxx AliCRThit.cxx
+
+HDRS = AliCRT.h AliCRTConstants .h AliCRTv0.h AliCRTdigit.h AliCRThit.h
+
+DHDR:=CRTLinkDef.h