// //
//////////////////////////////////////////////////////////////////////
-// --- Standard libraries ---
-#include <Riostream.h>
-#include <stdlib.h>
-#include <string.h>
-
-// --- ROOT libraries ---
-#include <TClonesArray.h>
-#include <TGeometry.h>
-#include <TLorentzVector.h>
-#include <TMath.h>
-#include <TNode.h>
-#include <TObjectTable.h>
-#include <TVirtualMC.h>
-#include <TParticle.h>
-
-#include <TGeoManager.h>
-#include <TGeoMaterial.h>
-#include <TGeoMedium.h>
-#include <TGeoNode.h>
-#include <TGeoVolume.h>
-#include "TGeoTube.h"
-#include "TGeoMatrix.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 <TGeoGlobalMagField.h>
+
#include "AliVZEROv6.h"
-#include "AliLog.h"
ClassImp(AliVZEROv6)
//_____________________________________________________________________________
-AliVZEROv6:: AliVZEROv6():AliVZERO()
+AliVZEROv6:: AliVZEROv6():AliVZERO(),
+ fCellId(0),
+ fTrackPosition(),
+ fTrackMomentum(),
+ fV0CHeight1(2.5),
+ fV0CHeight2(4.4),
+ fV0CHeight3(7.4),
+ fV0CHeight4(12.5),
+ fV0CRMin(4.6),
+ fV0CRBox(38.0),
+ fV0CLidThickness(0.30),
+ fV0CCellThickness(2.00),
+ fV0CBoxThickness(4.70),
+ fV0COffsetFibers(1.0),
+ fV0AHeight1(3.3),
+ fV0AHeight2(6.2),
+ fV0AHeight3(8.9),
+ fV0AHeight4(20.9),
+ fV0ARMin(4.30),
+ fV0ACellThickness(2.00),
+ fLightYield(93.75),
+ fLightAttenuation(0.05),
+ fnMeters(15.0),
+ fFibToPhot(0.3),
+ fVersion(6)
{
// Standard default constructor
}
//_____________________________________________________________________________
AliVZEROv6::AliVZEROv6(const char *name, const char *title):
- AliVZERO(name,title)
+ AliVZERO(name,title),
+ fCellId(0),
+ fTrackPosition(),
+ fTrackMomentum(),
+ fV0CHeight1(2.5),
+ fV0CHeight2(4.4),
+ fV0CHeight3(7.4),
+ fV0CHeight4(12.5),
+ fV0CRMin(4.6),
+ fV0CRBox(38.0),
+ fV0CLidThickness(0.30),
+ fV0CCellThickness(2.00),
+ fV0CBoxThickness(4.70),
+ fV0COffsetFibers(1.0),
+ fV0AHeight1(3.3),
+ fV0AHeight2(6.2),
+ fV0AHeight3(8.9),
+ fV0AHeight4(20.9),
+ fV0ARMin(4.30),
+ fV0ACellThickness(2.00),
+ fLightYield(93.75),
+ fLightAttenuation(0.05),
+ fnMeters(15.0),
+ fFibToPhot(0.3),
+ fVersion(6)
{
// Standard constructor for V-zero Detector version 6
// Parameters related to geometry :
// V0 part in front of muon arm absorber
- fV0CHeight1 = 2.5; // height of cell 1, in cm
- fV0CHeight2 = 4.4; // height of cell 2, in cm
- fV0CHeight3 = 7.4; // height of cell 3, in cm
- fV0CHeight4 = 12.5; // height of cell 4, in cm
- fV0CRMin = 4.6;
- fV0CRBox = 38.0; // outer radius of box, in cm
- fV0CLidThickness = 0.30; // thickness of Carbon lid
- fV0CCellThickness = 2.00; // thickness of elementary cell
- fV0CBoxThickness = 4.70; // thickness of V0C Box
- fV0COffsetFibers = 1.0; // offset to output fibers, in cm
+// fV0CHeight1 = 2.5; // height of cell 1, in cm
+// fV0CHeight2 = 4.4; // height of cell 2, in cm
+// fV0CHeight3 = 7.4; // height of cell 3, in cm
+// fV0CHeight4 = 12.5; // height of cell 4, in cm
+// fV0CRMin = 4.6;
+// fV0CRBox = 38.0; // outer radius of box, in cm
+// fV0CLidThickness = 0.30; // thickness of Carbon lid
+// fV0CCellThickness = 2.00; // thickness of elementary cell
+// fV0CBoxThickness = 4.70; // thickness of V0C Box
+// fV0COffsetFibers = 1.0; // offset to output fibers, in cm
// V0 part on the other side with respect to Interaction Point
- fV0AHeight1 = 3.3; // height of cell 1, in cm
- fV0AHeight2 = 6.2; // height of cell 2, in cm
- fV0AHeight3 = 8.9; // height of cell 3, in cm
- fV0AHeight4 = 20.9; // height of cell 4, in cm
- fV0ARMin = 4.30;
- fV0ACellThickness = 2.00; // thickness of elementary cell
-
+// fV0AHeight1 = 3.3; // height of cell 1, in cm
+// fV0AHeight2 = 6.2; // height of cell 2, in cm
+// fV0AHeight3 = 8.9; // height of cell 3, in cm
+// fV0AHeight4 = 20.9; // height of cell 4, in cm
+// fV0ARMin = 4.30;
+// fV0ACellThickness = 2.00; // thickness of elementary cell
+//
// Parameters related to light output :
- fLightYield = 93.75; // Light yield in BC408 (93.75 eV per photon)
- fLightAttenuation = 0.05; // Light attenuation in fiber (0.05 per meter)
- fnMeters = 15.0; // Number of meters of clear fibers to PM
- fFibToPhot = 0.3; // Attenuation at fiber-photocathode interface
+// fLightYield = 93.75; // Light yield in BC408 (93.75 eV per photon)
+// fLightAttenuation = 0.05; // Light attenuation in fiber (0.05 per meter)
+// fnMeters = 15.0; // Number of meters of clear fibers to PM
+// fFibToPhot = 0.3; // Attenuation at fiber-photocathode interface
}
-//_____________________________________________________________________________
-
-void AliVZEROv6::BuildGeometry()
-{
-
-}
-
//_____________________________________________________________________________
void AliVZEROv6::CreateGeometry()
{
AliDebug(2,"VZERO ConstructGeometry");
- TGeoManager *geoManager = gGeoManager;
// TGeoMedium *medAir = gGeoManager->GetMedium("VZERO_Air");
TGeoMedium *medAlu = gGeoManager->GetMedium("VZERO_Aluminum");
TGeoMedium *medCar = gGeoManager->GetMedium("VZERO_Carbon");
gGeoManager->SetTopVolume(top);
gGeoManager->CloseGeometry();
// gGeoManager-> SetVisLevel(4);
- geoManager->Export("VZEROGeometry.root");
}
//_____________________________________________________________________________
// Int_t *idtmed = fIdtmed->GetArray()-2999;
- Int_t fieldType = gAlice->Field()->Integ(); // Field type
- Double_t maxField = gAlice->Field()->Max(); // Field max.
+ Int_t fieldType = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ(); // Field type
+ Double_t maxField = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max(); // Field max.
Double_t maxBending = 0; // Max Angle
Double_t maxStepSize = 0.001; // Max step size
Double_t maxEnergyLoss = 1; // Max Delta E
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
// vol[1] = copy number (1 to 8)
Int_t index = vol[1];
- Int_t RingNumber = Int_t(hits[8]);
+ Int_t ringNumber = Int_t(hits[8]);
fCellId = 0;
// cout << "volID = " << vol[0] << " copy = " << vol[1] << endl;
// cout << "X = " << hits[0] << " Y = " << hits[1] << endl;
Float_t phi = Float_t(TMath::ATan2(Double_t(hits[1]),Double_t(hits[0])) );
- Float_t kRaddeg = 180.0/TMath::Pi();
phi = kRaddeg * phi;
if (index < 7) index = index + 8;
if (hits[2] < 0.0) {
- if(RingNumber < 3) {
- index = (index - 7) + ( ( RingNumber - 1 ) * 8);}
- else if(RingNumber >= 3){
+ if(ringNumber < 3) {
+ index = (index - 7) + ( ( ringNumber - 1 ) * 8);}
+ else if(ringNumber >= 3){
if(gMC->CurrentVolID(vol[1]) == gMC->VolId("V0R3")||
gMC->CurrentVolID(vol[1]) == gMC->VolId("V0R5") )
- {index = (index*2 - 14) + ( ( RingNumber - 2 ) * 16); }
+ {index = (index*2 - 14) + ( ( ringNumber - 2 ) * 16); }
if(gMC->CurrentVolID(vol[1]) == gMC->VolId("V0R4")||
gMC->CurrentVolID(vol[1]) == gMC->VolId("V0R6") )
- {index = (index*2 - 13) + ( ( RingNumber - 2 ) * 16); }
+ {index = (index*2 - 13) + ( ( ringNumber - 2 ) * 16); }
}
fCellId = index;
}
else if (hits[2] > 0.0){
- index = (index - 7 + 48) + ( ( RingNumber - 1 ) * 8);
+ index = (index - 7 + 48) + ( ( ringNumber - 1 ) * 8);
fCellId = index;}
-// cout << " ring = " << RingNumber << " phi = "<< phi << endl;
+// cout << " ring = " << ringNumber << " phi = "<< phi << endl;
// cout << " cellID = " << fCellId << endl;
// cout << "**********" << endl;