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 ///////////////////////////////////////////////////////////////////////////////
25 #include <TGeometry.h>
31 //#include "TGeant3.h"
35 //_____________________________________________________________________________
36 AliSTART::AliSTART(): AliDetector()
39 // Default constructor for class AliSTART
44 //_____________________________________________________________________________
45 AliSTART::AliSTART(const char *name, const char *title)
46 : AliDetector(name,title)
49 // Standard constructor for START Detector
53 // Initialise Hit array
54 fHits = new TClonesArray("AliSTARThit", 405);
62 //_____________________________________________________________________________
63 void AliSTART::AddHit(Int_t track, Int_t *vol, Float_t *hits)
68 TClonesArray &lhits = *fHits;
69 new(lhits[fNhits++]) AliSTARThit(fIshunt,track,vol,hits);
72 //_____________________________________________________________________________
73 void AliSTART::BuildGeometry()
76 // Build simple ROOT TNode geometry for event display
79 const int kColorSTART = 19;
81 Top=gAlice->GetGeometry()->GetNode("alice");
83 // START define the different volumes
84 new TRotMatrix("rot999","rot999", 90,0,90,90,180,0);
86 new TTUBE("S_STR1","START volume 1","void",5.,10.7,5.3);
88 Node = new TNode("STR1","STR1","S_STR1",0,0,75.,"");
89 Node->SetLineColor(kColorSTART);
92 new TTUBE("S_STR2","START volume 2","void",5.,10.7,5.3);
94 Node = new TNode("STR2","STR2","S_STR2",0,0,-75,"rot999");
95 Node->SetLineColor(kColorSTART);
99 //_____________________________________________________________________________
100 Int_t AliSTART::DistanceToPrimitive(Int_t px, Int_t py)
103 // Calculate the distance from the mouse to the START on the screen
109 //_____________________________________________________________________________
111 //-------------------------------------------------------------------------
112 void AliSTART::Init()
115 // Initialis the START after it has been built
117 AliMC* pMC = AliMC::GetMC();
120 for(i=0;i<35;i++) printf("*");
121 printf(" START_INIT ");
122 for(i=0;i<35;i++) printf("*");
125 // Here the START initialisation code (if any!)
126 for(i=0;i<80;i++) printf("*");
130 fIdSens1=pMC->VolId("PTOP");
134 //---------------------------------------------------------------------------
135 void AliSTART::MakeBranch(Option_t* option)
138 // Create Tree branches for the START.
139 Int_t buffersize = 4000;
141 sprintf(branchname,"%s",GetName());
143 AliDetector::MakeBranch(option);
145 char *D = strstr(option,"D");
147 if (fDigits && gAlice->TreeD() && D) {
148 gAlice->TreeD()->Branch(branchname,&fDigits, buffersize);
149 printf("Making Branch %s for digits\n",branchname);
154 ClassImp(AliSTARThit)
156 //_____________________________________________________________________________
157 AliSTARThit::AliSTARThit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
167 //printf("fvolume %d\n",fVolume);
168 //printf("fpmt %d\n",fPmt);
175 fParticle=Int_t (hits[5]);
178 //for (i=0; i<=6; i++) {printf("Hits up %f\n",hits[i]);}
181 // ClassImp(AliSTARTdigit)