/*
$Log$
+Revision 1.13 2000/12/18 11:39:41 alibrary
+Quick fix to avoid crash in display waiting for new version
+
Revision 1.12 2000/12/04 08:48:19 alibrary
Fixing problems in the HEAD
//
// Default constructor for class AliSTART
//
- fIshunt = 0;
+ fIshunt = 1;
fHits = 0;
fDigits = 0;
}
// Initialise Hit array
fHits = new TClonesArray("AliSTARThit", 405);
gAlice->AddHitList(fHits);
- // fDigits = new TClonesArray("AliSTARTdigit",500);
- fIshunt = 0;
+ fIshunt = 1;
fIdSens = 0;
SetMarkerColor(kRed);
}
void AliSTART::AddDigit(Int_t *tracks,Int_t *digits)
{
- // Add a START digit to the list
+ // Add a START digit to the list. Dummy function.
-// printf (" AddDigit*******");
- // TClonesArray &ldigits = *fDigits;
- // new(ldigits[fNdigits++]) AliSTARTdigit(tracks,digits);
}
//_____________________________________________________________________________
//
TNode *node, *top;
const int kColorSTART = 19;
- //
+
top=gAlice->GetGeometry()->GetNode("alice");
// START define the different volumes
TTree *td = gAlice->TreeD();
digits = new AliSTARTdigit();
- td->Branch(branchname,"AliSTARTdigit",digits, buffersize);
+ td->Branch(branchname,"AliSTARTdigit",&digits, buffersize);
printf("Making Branch %s for digits\n",branchname);
/*
timeDiff = (Int_t)(timediff); // time ( ps) channel numbres
digits->Set(timeAv,timeDiff);
}
- else
- {timeAv=999999; timeDiff=99999;}
- td->Fill();
- digits->MyDump();
- printf("digits-> %d \n",digits->GetTime());
- td->Write();
- // } //timediff
-
+ else
+ {timeAv=999999; timeDiff=99999;}
+
+ td->Fill();
+ printf("digits-> %d \n",digits->GetTime());
+ td->Write();
-} // end macro
+}
////////////////////////////////////////////////
#include "AliDetector.h"
-#include "AliHit.h"
-#include "TNamed.h"
#include "TTree.h"
class TDirectory;
R__EXTERN TDirectory * gDirectory;
protected:
Int_t fIdSens; // Sensetive Cherenkov radiator
+
+private:
ClassDef(AliSTART,1) //Base class for the T0 aka START detector
};
virtual ~AliSTARTdigit() {}
void Set(Int_t, Int_t);
Int_t GetTime();
- void MyDump();
+ void Print();
ClassDef(AliSTARTdigit,1) //Digit (Header) object for set:START
inline void AliSTARTdigit::Set(Int_t Timeav, Int_t Timediff)
{fTimeAverage=Timeav; fTimeDiff=Timediff;}
-inline void AliSTARTdigit::MyDump(){
+inline void AliSTARTdigit::Print(){
printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n",
fTimeAverage, fTimeDiff);
}
-#ifndef ALISTARTHIT_H
-#define ALISTARTHIT_H
+#ifndef ALISTARThit_H
+#define ALISTARThit_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// Manager and hits classes for set:START //
////////////////////////////////////////////////
-#include "AliDetector.h"
#include "AliHit.h"
class AliSTARThit : public AliHit {
};
-#endif//AliSTARThit_H
+#endif//ALISTARThit_H
if(gMC->IsTrackInside()) {
Float_t de=gMC->Edep();
edep=edep+de;
- // printf ("E deposition %f\n",edep);
- // for (i=0; i<=6; i++){
- // printf(" HITS on START inside %f\n",hits[i]);
- }
- }
- if(gMC->IsTrackExiting()) {
- Float_t de=gMC->Edep();
- edep=edep+de;
- hits[3]=edep*1e3;
- Int_t i;
- for (i=0; i<=6; i++){
- //printf(" HITS on START Exit %f\n",hits[i]); }
- // for (i=0; i<=1; i++) { printf("START vol %d\n",vol[i]);}
-
- new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->CurrentTrack(),vol,hits);
- }
+ }
+ }
+ if(gMC->IsTrackExiting()) {
+ Float_t de=gMC->Edep();
+ edep=edep+de;
+ hits[3]=edep*1e3;
+ new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->CurrentTrack(),vol,hits);
}
//---------------------------------------------------------------------
}
protected:
Int_t fIdSens1; // Sensetive volume in START
- ClassDef(AliSTARTv1,1) //Class for START version 0
+ ClassDef(AliSTARTv1,1) //Class for START version 1
};
#endif
**************************************************************************/
/*
$Log$
+Revision 1.3 2000/10/02 21:28:13 fca
+Removal of useless dependecies via forward declarations
+
Revision 1.2 2000/07/13 16:41:29 fca
New START corrected for coding conventions
*/
#include <TObject.h>
-#include <TDirectory.h>
-
#include "AliSTARTvertex.h"
#include "AliSTARTdigit.h"
#include "AliSTARThit.h"
#include "AliRun.h"
#include "AliMC.h"
+//#include "TTree.h"
+#include "TDirectory.h"
+
ClassImp(AliSTARTvertex)
AliSTARTvertex::AliSTARTvertex( Int_t * Zposit)
// The creator for the AliSTARTvertex class. This routine fills the
// AliSTARTvertex data members from the array vertex.
// The order of the elements in the vertex array are
- // fEvent = digits[0], fZposition = vertex[1],
- // fTime_diff = Vertex[2]
- // Therefore the array digits is expected to be at least 3 elements long.
+ // fZposition = vertex[0],
//
Zposit = &fZposition ;
void AliSTARTvertex::Reconstruct(Int_t evNumber=1)
{
-
+ /***************************************************
+ Resonstruct digits to vertex position
+ ****************************************************/
+
Int_t timediff;
Float_t timePs;
char nameTD[8],nameTR[8];
bd = td->GetBranch("START");
bd->SetAddress(&digits);
bd->GetEvent(0);
- printf(" Digits: "); digits->MyDump();
sprintf(nameTR,"TreeR%d",evNumber);
TTree *tr = new TTree(nameTR,"START");
bRec = tr->Branch("START","AliSTARTvertex",&vertex,buffersize,split);
-
- // td->Print(); td->Show(0); td->GetBranch("START")->Dump();
- digits->MyDump();
- printf("digits-> %d \n",digits->GetTime());
-
if(digits->GetTime()!=999999)
{
timediff=digits->GetTime(); //time in number of channels
timePs=(timediff-128)*10.; // time in Ps channel_width =10ps
- printf(" timediff %d in PS %f\n",timediff,timePs);
Float_t c = 299792458/1.e9; //speed of light cm/ps
//Float_t c = 0.3; //speed of light mm/ps
Float_t Zposit=timePs*c;// for 0 vertex
- // Float_t Zposit=timePs*c/2.;// for spread vertex
- // printf(" Z position %f\n",Zposit);
- // vertex->GetVertex();
vertex->Set(Zposit);
tr->Fill();
tr->Write();
- //hTimediff->Fill(timePs);
- //hVertex->Fill(Zposit);
}
}