X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=VZERO%2FAliVZERO.cxx;h=51c1a2e7d9665eadd51e96cf56dab0cbb3222b0b;hp=223ddb4fe0be9781c9cc462dac81c60359d1f40f;hb=2f77b1462b78905df4eae0e8708caca7deefdf38;hpb=652e94c3daf24b45551c3074f30c55a585c11b2d diff --git a/VZERO/AliVZERO.cxx b/VZERO/AliVZERO.cxx index 223ddb4fe0b..51c1a2e7d96 100755 --- a/VZERO/AliVZERO.cxx +++ b/VZERO/AliVZERO.cxx @@ -19,6 +19,8 @@ // // // V-Zero Detector // // This class contains the base procedures for the VZERO detector // +// Geometry of November 2003 : V0R box is now 4.4 cm thick // +// scintillators are 2 cm thick // // All comments should be sent to Brigitte CHEYNIS : // // b.cheynis@ipnl.in2p3.fr // // // @@ -26,16 +28,21 @@ /////////////////////////////////////////////////////////////////////////// +// --- Standard libraries --- #include +// --- ROOT libraries --- +#include +#include + +// --- AliRoot header files --- #include "AliRun.h" +#include "AliMC.h" #include "AliVZERO.h" -#include "AliVZEROdigit.h" -#include "AliVZEROhit.h" +#include "AliVZEROLoader.h" ClassImp(AliVZERO) - //_____________________________________________________________________________ AliVZERO::AliVZERO(const char *name, const char *title) : AliDetector(name,title) @@ -49,12 +56,10 @@ AliVZERO::AliVZERO(const char *name, const char *title) fHits = new TClonesArray("AliVZEROhit", 400); fDigits = new TClonesArray("AliVZEROdigit",400); - gAlice->AddHitList(fHits); - -// fDigits = new TClonesArray("AliVZEROdigit",400) ; + gAlice->GetMCApp()->AddHitList(fHits); - fThickness = 4.1; // total thickness of the V0R box - fThickness1 = 0.7; // thickness of the thickest cell (2.5 in version 0) + fThickness = 4.4; // total thickness of the V0R box in cm + fThickness1 = 2.0; // thickness of scintillating cells in cm fMaxStepQua = 0.05; fMaxStepAlu = 0.01; @@ -68,9 +73,20 @@ AliVZERO::AliVZERO(const char *name, const char *title) //_____________________________________________________________________________ AliVZERO::~AliVZERO() { + // + // Default destructor for VZERO Detector + // + if (fHits) { fHits->Delete(); delete fHits; + fHits=0; + } + + if (fDigits) { + fDigits->Delete(); + delete fDigits; + fDigits=0; } } @@ -78,7 +94,7 @@ AliVZERO::~AliVZERO() void AliVZERO::BuildGeometry() { // - // Build simple ROOT TNode geometry for event display + // Builds simple ROOT TNode geometry for event display // } @@ -86,60 +102,99 @@ void AliVZERO::BuildGeometry() 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) + // 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() +{ + // + // Sets tree address for hits. + // + + if (fLoader->TreeH() && (fHits == 0x0)) + fHits = new TClonesArray("AliVZEROhit", 400); + + AliDetector::SetTreeAddress(); +} + +