///////////////////////////////////////////////////////////////////////////
+// --- Standard libraries ---
#include <Riostream.h>
+// --- ROOT libraries ---
+#include <TNamed.h>
+#include <TTree.h>
+
+// --- AliRoot header files ---
+#include "AliRun.h"
+#include "AliMC.h"
#include "AliVZERO.h"
+#include "AliVZEROLoader.h"
ClassImp(AliVZERO)
-
//_____________________________________________________________________________
AliVZERO::AliVZERO(const char *name, const char *title)
: AliDetector(name,title)
//_____________________________________________________________________________
AliVZERO::~AliVZERO()
{
+ //
+ // Default destructor for VZERO Detector
+ //
+
if (fHits) {
fHits->Delete();
delete fHits;
+ fHits=0;
+ }
+
+ if (fDigits) {
+ fDigits->Delete();
+ delete fDigits;
+ fDigits=0;
}
}
void AliVZERO::BuildGeometry()
{
//
- // Build simple ROOT TNode geometry for event display
+ // Builds simple ROOT TNode geometry for event display
//
}
void AliVZERO::CreateGeometry()
{
//
- // Build simple ROOT TNode geometry for event display
+ // Builds simple Geant3 geometry
//
}
//_____________________________________________________________________________
void AliVZERO::CreateMaterials()
{
//
- // Build simple ROOT TNode geometry for event display
+ // Creates materials used for Geant3 geometry
//
}
-
-
//_____________________________________________________________________________
Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)
{
//
- // Calculate the distance from the mouse to the VZERO on the screen
+ // Calculates the distance from the mouse to the VZERO on the screen
// Dummy routine
//
return 9999;
}
-//-------------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZERO::Init()
{
//
- // Initialise the VZERO after it has been built
+ // Initialises the VZERO class after it has been built
//
}
-//-------------------------------------------------------------------------
-
+//_____________________________________________________________________________
void AliVZERO::SetMaxStepQua(Float_t p1)
{
+ //
+ // Possible parametrisation of steps in active materials
+ //
fMaxStepQua = p1;
}
-//___________________________________________
+//_____________________________________________________________________________
void AliVZERO::SetMaxStepAlu(Float_t p1)
{
+ //
+ // Possible parametrisation of steps in Aluminum foils (not used in
+ // version v2)
+ //
fMaxStepAlu = p1;
}
-//___________________________________________
+//_____________________________________________________________________________
void AliVZERO::SetMaxDestepQua(Float_t p1)
{
+ //
+ // Possible parametrisation of steps in active materials (quartz)
+ //
fMaxDestepQua = p1;
}
-//___________________________________________
+//_____________________________________________________________________________
void AliVZERO::SetMaxDestepAlu(Float_t p1)
{
+ //
+ // Possible parametrisation of steps in Aluminum (not used in
+ // version v2)
+ //
fMaxDestepAlu = p1;
}
-//___________________________________________
+//_____________________________________________________________________________
AliLoader* AliVZERO::MakeLoader(const char* topfoldername)
{
- // builds VZEROgetter (AliLoader type)
+ //
+ // Builds VZEROgetter (AliLoader type)
// if detector wants to use customized getter, it must overload this method
+ //
Info("MakeLoader","Creating AliVZEROLoader. Top folder is %s.",topfoldername);
fLoader = new AliVZEROLoader(GetName(),topfoldername);
return fLoader;
}
-//___________________________________________
-void AliVZERO::SetTreeAddress(){
+//_____________________________________________________________________________
+void AliVZERO::SetTreeAddress()
+{
+ //
// Sets tree address for hits.
+ //
if (fLoader->TreeH() && (fHits == 0x0))
fHits = new TClonesArray("AliVZEROhit", 400);
// Manager and hits classes for set : VZERO //
//////////////////////////////////////////////////
+/*
#include "AliRun.h"
#include "AliMC.h"
#include "AliDetector.h"
#include <TNamed.h>
#include <TTree.h>
+*/
+#include "AliDetector.h"
+
+class TNamed;
+class TTree;
+class AliVZEROLoader;
class AliVZEROhit;
class AliVZEROdigit;
virtual void MakeBranch(Option_t *option) =0;
virtual void DrawModule() {};
virtual void StepManager() {};
- virtual inline void SetThickness(Float_t thick) {fThickness = thick;};
- virtual inline void SetThickness1(Float_t thick) {fThickness1 = thick;};
+ virtual void SetThickness(Float_t thick) {fThickness = thick;};
+ virtual void SetThickness1(Float_t thick) {fThickness1 = thick;};
// Set Stepping Parameters
virtual void SetMaxStepQua(Float_t p1);
virtual void SetMaxStepAlu(Float_t p1);
virtual void SetMaxDestepQua(Float_t p1);
virtual void SetMaxDestepAlu(Float_t p1);
- Float_t fThickness;
- Float_t fThickness1;
-
protected:
- Int_t fIdSens1; // Sensitive volume in VZERO
+ Int_t fIdSens1; // Sensitive volume in VZERO
+ Float_t fThickness; // Total thickness of box holding Right detector V0R i.e. 4.1 cm
+ Float_t fThickness1; // Thickness of elementary cells i.e. 0.7 cm
// Stepping Parameters
- Float_t fMaxStepQua; // Maximum step size inside the quartz volumes
- Float_t fMaxStepAlu; // Maximum step size inside the aluminum volumes
- Float_t fMaxDestepQua; // Maximum relative energy loss in quartz
- Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
+ Float_t fMaxStepQua; // Maximum step size inside the quartz volumes
+ Float_t fMaxStepAlu; // Maximum step size inside the aluminum volumes
+ Float_t fMaxDestepQua; // Maximum relative energy loss in quartz
+ Float_t fMaxDestepAlu; // Maximum relative energy loss in aluminum
ClassDef(AliVZERO,1) //Class for the VZERO detector
};
+/////////////////////////////////////////////////////////////////////
+// //
+// Class AliVZEROLoader //
+// //
+// Base class for VZEROLoaders. //
+// Loader provides base I/O facilities for standard data. //
+// Each detector has a loader data member. //
+// Loader is accessible via folder structure as well. //
+// //
+/////////////////////////////////////////////////////////////////////
+
#include "AliVZEROLoader.h"
const TString AliVZEROLoader::fgkDefaultHitsFileName = "VZERO.Hits.root";
const TString AliVZEROLoader::fgkDefaultDigitsFileName = "VZERO.Digits.root";
ClassImp(AliVZEROLoader)
+
+//_____________________________________________________________________________
AliVZEROLoader::AliVZEROLoader()
- {
+ {
+ // Default constructor
}
-/*****************************************************************************/
+
+//_____________________________________________________________________________
AliVZEROLoader::AliVZEROLoader(const Char_t *name,const Char_t *topfoldername)
:AliLoader(name,topfoldername)
{
if (GetDebug())
Info("AliVZEROLoader"," name = %s; topfolder = %s",name,topfoldername);
}
-/*****************************************************************************/
+//_____________________________________________________________________________
AliVZEROLoader::AliVZEROLoader(const Char_t *name,TFolder *topfolder)
:AliLoader(name,topfolder)
{
}
+//_______________________________________________________________________________
+AliVZEROLoader::~AliVZEROLoader()
+{
+ // Destructor
+}
#ifndef ALIVZEROLOADER_H
#define ALIVZEROLOADER_H
-//base class for loaders
-//loader is common for reading data for all detectors
-//Each detector has a loader data member
-//loader is accessible via folder structure as well
+/////////////////////////////////////////////////////////////////////
+// //
+// Base class for VZEROloaders. //
+// Loader provides base I/O facilities for standard data. //
+// Each detector has a loader data member. //
+// Loader is always accessible via folder structure as well. //
+// //
+/////////////////////////////////////////////////////////////////////
#include <AliLoader.h>
public:
AliVZEROLoader();
AliVZEROLoader(const Char_t *name,const Char_t *topfoldername);
- AliVZEROLoader(const Char_t *name,TFolder *topfolder);
-
- virtual ~AliVZEROLoader(){};//-----------------
-
- protected:
-
+ AliVZEROLoader(const Char_t *name,TFolder *topfolder);
+ virtual ~AliVZEROLoader();
private:
- static const TString fgkDefaultHitsFileName;
- static const TString fgkDefaultDigitsFileName;
+ static const TString fgkDefaultHitsFileName; // Default Name for hit file
+ static const TString fgkDefaultDigitsFileName;// Default Name for digit file
- public:
- ClassDef(AliVZEROLoader,1)
+ ClassDef(AliVZEROLoader,1)
};
#endif
* provided "as is" without express or implied warranty. *
**************************************************************************/
-
-#include "AliVZERO.h"
#include "AliVZEROdigit.h"
-#include "AliRun.h"
+
ClassImp(AliVZEROdigit)
AliVZEROdigit::AliVZEROdigit(Int_t* tracks, Int_t *digits):
AliDigit(tracks){
//
- // Creates VZERO digit
- // The creator for the AliVZEROdigit class. This routine fills the
- // AliVZEROdigit data members from the array digits.
+ // Creates VZERO digits
+ //
+ // Fills the AliVZEROdigit data members from the array digits.
//
fTrack = tracks[0];
fEvent = digits[0];
-
}
#include "AliDigit.h"
-//___________________________________________
+//_____________________________________________________________________________
class AliVZEROdigit: public AliDigit {
public:
- AliVZEROdigit() {}
+ AliVZEROdigit() {};
AliVZEROdigit(Int_t* tracks, Int_t* digits);
- virtual ~AliVZEROdigit() {}
+ virtual ~AliVZEROdigit() {};
private:
Int_t fEvent; // Event number
/* $Id$ */
+//_________________________________________________________________________
+//
+// Hit class for VZERO detector
+//
+//_________________________________________________________________________
+
#include "AliVZEROhit.h"
AliHit(shunt, track)
{
//
- // Add a VZERO hit
+ // Adds a VZERO hit
//
- fVolume = vol[0];
- fCopy = vol[1];
- fX = hits[0];
- fY = hits[1];
- fZ = hits[2];
- fTrackPiD = hits[3];
- fTof = hits[4];
- fCharge = hits[5];
- fTheta = hits[6];
- fPhi = hits[7];
- fRingNumber = hits[8];
+ fVolume = vol[0]; // Volume ID
+ fCopy = vol[1]; // Copy number
+ fX = hits[0]; // X position of hit
+ fY = hits[1]; // Y position of hit
+ fZ = hits[2]; // Z position of hit
+ fTrackPiD = hits[3]; // Track PiD
+ fTof = hits[4]; // Particle time of flight
+ fCharge = hits[5]; // Particle charge
+ fTheta = hits[6]; // Incident theta angle in degrees
+ fPhi = hits[7]; // Incident phi angle in degrees
+ fRingNumber = hits[8]; // Ring number
- fPt = hits[9];
- fPmom = hits[10];
- fPx = hits[11];
- fPy = hits[12];
- fPz = hits[13];
+ fPt = hits[9]; // Local transverse momentum of the particle
+ fPmom = hits[10]; // Local P momentum of the particle
+ fPx = hits[11]; // Local Px momentum of the particle
+ fPy = hits[12]; // Local Py momentum of the particle
+ fPz = hits[13]; // Local Pz momentum of the particle
- fVx = hits[14];
- fVy = hits[15];
- fVz = hits[16];
+ fVx = hits[14]; // Vertex x coordinate
+ fVy = hits[15]; // Vertex y coordinate
+ fVz = hits[16]; // Vertex z coordinate
- fEloss = hits[17];
- fTleng = hits[18];
+ fEloss = hits[17]; // Energy deposited inside volume
+ fTleng = hits[18]; // Track length inside volume
}
/* $Id$ */
////////////////////////////////////////////////
+// //
// Manager and hits classes for set : VZERO //
+// //
////////////////////////////////////////////////
#include "AliHit.h"
AliVZEROhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
virtual ~AliVZEROhit() {};
- Int_t Volume() {return fVolume;};
- Int_t Copy() {return fCopy;};
- Float_t TrackPiD() {return fTrackPiD;};
- Float_t Tof() {return fTof;};
- Float_t Charge() {return fCharge;};
- Float_t RingNumber() {return fRingNumber;};
- Float_t Pt() {return fPt;};
- Float_t Pmom() {return fPmom;};
- Float_t Px() {return fPx;};
- Float_t Py() {return fPy;};
- Float_t Pz() {return fPz;};
- Float_t Vx() {return fVx;};
- Float_t Vy() {return fVy;};
- Float_t Vz() {return fVz;};
- Float_t Eloss() {return fEloss;}
- Float_t Tleng() {return fTleng;}
+ Int_t Volume() const {return fVolume;};
+ Int_t Copy() const {return fCopy;};
+ Float_t TrackPiD() const {return fTrackPiD;};
+ Float_t Tof() const {return fTof;};
+ Float_t Charge() const {return fCharge;};
+ Float_t RingNumber() const {return fRingNumber;};
+ Float_t Pt() const {return fPt;};
+ Float_t Pmom() const {return fPmom;};
+ Float_t Px() const {return fPx;};
+ Float_t Py() const {return fPy;};
+ Float_t Pz() const {return fPz;};
+ Float_t Vx() const {return fVx;};
+ Float_t Vy() const {return fVy;};
+ Float_t Vz() const {return fVz;};
+ Float_t Eloss() const {return fEloss;}
+ Float_t Tleng() const {return fTleng;}
private:
- Int_t fVolume; // Current volume ID
- Int_t fCopy; // Copy number
- Float_t fTrackPiD; // Root particle ID
- Float_t fTof; // Time of flight wrt vertex
- Float_t fCharge; // Charge of particle
- Float_t fTheta;
- Float_t fPhi;
- Float_t fRingNumber; // RingNumber
+ Int_t fVolume; // Current volume ID
+ Int_t fCopy; // Current copy number
+ Float_t fTrackPiD; // Track PiD
+ Float_t fTof; // Particle time of flight wrt vertex
+ Float_t fCharge; // Particle charge
+ Float_t fTheta; // Incident theta angle in degrees
+ Float_t fPhi; // Incident phi angle in degrees
+ Float_t fRingNumber; // RingNumber
- Float_t fPt;
- Float_t fPmom;
- Float_t fPx;
- Float_t fPy;
- Float_t fPz;
- Float_t fVx; // Vertex x coordinate
- Float_t fVy; // Vertex y coordinate
- Float_t fVz; // Vertex z coordinate
- Float_t fEloss; // energy loss in VZERO detector
- Float_t fTleng; // track length in VZERO detector
+ Float_t fPt; // Local transverse momentum of the particle
+ Float_t fPmom; // Local P momentum of the particle
+ Float_t fPx; // Local Px momentum of the particle
+ Float_t fPy; // Local Py momentum of the particle
+ Float_t fPz; // Local Pz momentum of the particle
+ Float_t fVx; // Vertex x coordinate
+ Float_t fVy; // Vertex y coordinate
+ Float_t fVz; // Vertex z coordinate
+ Float_t fEloss; // Energy loss in VZERO detector
+ Float_t fTleng; // Track length in VZERO detector
- ClassDef(AliVZEROhit,2) //Hits for detector VZERO
+ ClassDef(AliVZEROhit,2) // Hits for detector VZERO
};
#endif
#include <TParticle.h>
// --- AliRoot header files ---
+#include "AliRun.h"
+#include "AliMC.h"
#include "AliConst.h"
#include "AliMagF.h"
#include "AliVZEROLoader.h"
#include "AliVZEROdigit.h"
#include "AliVZEROhit.h"
#include "AliVZEROv2.h"
-#include "AliMC.h"
ClassImp(AliVZEROv2)
-//--------------------------------------------------------------------
+//_____________________________________________________________________________
AliVZEROv2:: AliVZEROv2():AliVZERO()
{
// Standard default constructor
}
-//--------------------------------------------------------------------
+
+//_____________________________________________________________________________
AliVZEROv2::AliVZEROv2(const char *name, const char *title):
AliVZERO(name,title)
{
}
-//-------------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZEROv2::CreateGeometry()
{
Float_t r0, r5;
Float_t pi = TMath::Pi();
- height1 = 1.82; // height of cell 1, in cm
- height2 = 3.81; // height of cell 2, in cm
- height3 = 4.72; // height of cell 3, in cm
- height4 = 7.12; // height of cell 4, in cm
- height5 = 10.83; // height of cell 5, in cm
+ height1 = 1.82; // height of cell 1, in cm
+ height2 = 3.81; // height of cell 2, in cm
+ height3 = 4.72; // height of cell 3, in cm
+ height4 = 7.12; // height of cell 4, in cm
+ height5 = 10.83; // height of cell 5, in cm
- theta = pi/6.0/2.0; // half angular opening = 15 degrees
+ theta = pi/6.0/2.0; // half angular opening = 15 degrees
- halfThickQua = fThickness1/2.0; // half thickness of elementary cell (inner ring)
+ halfThickQua= fThickness1/2.0; // half thickness of elementary cell (inner ring)
- zdet = 90.0 - 0.6 -fThickness/2.0; // distance to vertex (along Z axis)
- r0 = 4.05; // closest distance to center of the beam pipe
- height = height1 + height2 + height3 + height4 + height5;
- r5 = r0 + height;
+ zdet = 90.0 - 0.6 -fThickness/2.0; // distance to vertex (along Z axis)
+ r0 = 4.05; // closest distance to center of the beam pipe
+ height = height1 + height2 + height3 + height4 + height5;
+ r5 = r0 + height;
// Creation of mother volume v0LE - left part - :
// Entrance face at +350.0 cm (new coordinate system) ...
v0L0->SetNumberOfDivisions(ndiv);
v0L0->SetLineColor(7);
- Float_t offset_left;
- offset_left = - fThickness1/2.0;
+ Float_t offsetLeft;
+ offsetLeft = - fThickness1/2.0;
Float_t r1Left = r0Left + height1Left;
sprintf(nameNode,"SUBDEL%d",ndetL);
v0Lnode->cd();
- v0Lnode0 = new TNode(nameNode,nameNode,v0L0,0.0,0.0, offset_left + halfThickQua,mat920);
+ v0Lnode0 = new TNode(nameNode,nameNode,v0L0,0.0,0.0, offsetLeft + halfThickQua,mat920);
v0Lnode0->SetLineColor(kColorVZERO);
fNodes->Add(v0Lnode0);
ndetL++;
}
-//------------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZEROv2::CreateMaterials()
{
// gMC->SetCerenkov(idtmed[3002], 14, ppckov, absco_quarz, effic_all,rindex_quarz);
// gMC->SetCerenkov(idtmed[3004], 14, ppckov_alu, absco_alu, effic_alu, rindex_alu);
-
-
+
}
-//---------------------------------------------------------------------
+
+//_____________________________________________________________________________
void AliVZEROv2::DrawModule()
{
}
-//-------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZEROv2::Init()
{
-// Initialises version 1 of the VZERO Detector
+// Initialises version 2 of the VZERO Detector
// Just prints an information message
printf(" VZERO version %d initialized \n",IsVersion());
}
-//-------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZEROv2::StepManager()
{
Float_t theta;
Float_t phi;
- Float_t kRaddeg = 180/TMath::Pi();
+ Float_t kRaddeg = 180.0/TMath::Pi();
Float_t ringNumber;
Int_t ipart;
tlength = 0.0;
eloss = 0.0;
-
}
}
new(lhits[fNhits++]) AliVZEROhit(fIshunt,track,vol,hits);
}
-//---------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZEROv2::AddDigits(Int_t *tracks, Int_t* digits)
{
new(ldigits[fNdigits++]) AliVZEROdigit(tracks, digits);
}
-//---------------------------------------------------------------------
+//_____________________________________________________________________________
void AliVZEROv2::MakeBranch(Option_t *option)
{
}
const char *cD = strstr(option,"D");
- //
+
if (fDigits && fLoader->TreeD() && cD) {
fLoader->TreeD()->Branch(branchname,&fDigits, fBufferSize);
printf("* AliDetector::MakeBranch * Making Branch %s for digits\n",branchname);
///////////////////////////////////////////////////
+// //
// Manager and hits classes for set : VZERO //
+// //
///////////////////////////////////////////////////
#include "AliVZERO.h"