X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=VZERO%2FAliVZEROv6.cxx;h=a9f4a1638b421d9b494d48ddeeb6a42bd1b57c7f;hb=867852c55caaf03669ca78a01dca8c69327c56a5;hp=922e6d81bde7a5e17c0d4b29129aee62b5cae0b7;hpb=60d4344a116ac44e742f091a7c52cbfd31c995f1;p=u%2Fmrichter%2FAliRoot.git diff --git a/VZERO/AliVZEROv6.cxx b/VZERO/AliVZEROv6.cxx index 922e6d81bde..a9f4a1638b4 100644 --- a/VZERO/AliVZEROv6.cxx +++ b/VZERO/AliVZEROv6.cxx @@ -27,51 +27,69 @@ // // ////////////////////////////////////////////////////////////////////// -// --- Standard libraries --- -#include -#include -#include - -// --- ROOT libraries --- -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#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 + #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 @@ -83,41 +101,34 @@ AliVZEROv6::AliVZEROv6(const char *name, const char *title): // 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() { @@ -391,8 +402,8 @@ void AliVZEROv6::CreateMaterials() // 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 @@ -678,8 +689,8 @@ void AliVZEROv6::MakeBranch(Option_t *option) 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)); } @@ -704,37 +715,36 @@ Int_t AliVZEROv6::GetCellId(Int_t *vol, Float_t *hits) // 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;