1 ///////////////////////////////////////////////////////////////////////////////
3 // START (T-Zero) Detector //
4 // This class contains the base procedures for the START //
9 <img src="gif/AliSTARTClass.gif">
12 <font size=+2 color=red>
13 <p>The responsible person for this module is
14 <a href="mailto:Alla.Maevskaia@cern.ch">Alla Maevskaia</a>.
21 ///////////////////////////////////////////////////////////////////////////////
26 #include <TGeometry.h>
32 //#include "TGeant3.h"
36 //_____________________________________________________________________________
40 // Default constructor for class AliSTART
45 //_____________________________________________________________________________
46 AliSTART::AliSTART(const char *name, const char *title)
47 : AliDetector(name,title)
50 // Standard constructor for START Detector
53 AliModule *fmd = gAlice->GetModule("FMD");
55 Int_t fmdversion = fmd->IsVersion();
56 if(fmdversion==0 || fmdversion==1) {
57 Error("ctor","Versions 0 and 1 of FMD incompatible with START\n");
62 // Initialise Hit array
63 fHits = new TClonesArray("AliSTARThit", 405);
71 //_____________________________________________________________________________
72 void AliSTART::AddHit(Int_t track, Int_t *vol, Float_t *hits)
77 TClonesArray &lhits = *fHits;
78 new(lhits[fNhits++]) AliSTARThit(fIshunt,track,vol,hits);
81 //_____________________________________________________________________________
82 void AliSTART::BuildGeometry()
85 // Build simple ROOT TNode geometry for event display
88 const int kColorSTART = 19;
90 Top=gAlice->GetGeometry()->GetNode("alice");
92 // START define the different volumes
93 new TRotMatrix("rot999","rot999", 90,0,90,90,180,0);
95 new TTUBE("S_STR1","START volume 1","void",5.,10.7,5.3);
97 Node = new TNode("STR1","STR1","S_STR1",0,0,75.,"");
98 Node->SetLineColor(kColorSTART);
101 new TTUBE("S_STR2","START volume 2","void",5.,10.7,5.3);
103 Node = new TNode("STR2","STR2","S_STR2",0,0,-75,"rot999");
104 Node->SetLineColor(kColorSTART);
108 //_____________________________________________________________________________
109 Int_t AliSTART::DistanceToPrimitive(Int_t px, Int_t py)
112 // Calculate the distance from the mouse to the START on the screen
118 //_____________________________________________________________________________
120 //-------------------------------------------------------------------------
121 void AliSTART::Init()
124 // Initialis the START after it has been built
126 AliMC* pMC = AliMC::GetMC();
129 for(i=0;i<35;i++) printf("*");
130 printf(" START_INIT ");
131 for(i=0;i<35;i++) printf("*");
134 // Here the START initialisation code (if any!)
135 for(i=0;i<80;i++) printf("*");
139 fIdSens1=pMC->VolId("PTOP");
143 //---------------------------------------------------------------------------
144 void AliSTART::MakeBranch(Option_t* option)
147 // Create Tree branches for the START.
148 Int_t buffersize = 4000;
150 sprintf(branchname,"%s",GetName());
152 AliDetector::MakeBranch(option);
154 char *D = strstr(option,"D");
156 if (fDigits && gAlice->TreeD() && D) {
157 gAlice->TreeD()->Branch(branchname,&fDigits, buffersize);
158 printf("Making Branch %s for digits\n",branchname);
163 ClassImp(AliSTARThit)
165 //_____________________________________________________________________________
166 AliSTARThit::AliSTARThit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
176 //printf("fvolume %d\n",fVolume);
177 //printf("fpmt %d\n",fPmt);
184 fParticle=Int_t (hits[5]);
187 //for (i=0; i<=6; i++) {printf("Hits up %f\n",hits[i]);}
190 // ClassImp(AliSTARTdigit)