* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.22 2002/10/14 14:57:29 hristov
-Merging the VirtualMC branch to the main development branch (HEAD)
-
-Revision 1.20.6.2 2002/07/24 10:07:21 alibrary
-Updating VirtualMC
-
-Revision 1.21 2002/07/23 10:02:46 morsch
-All volume names start with "S".
-
-Revision 1.20 2001/10/30 12:18:45 morsch
-Place station 3 into DDIP only if DDIP is present.
-
-Revision 1.19 2001/07/17 09:51:38 morsch
-Place station 3 inside Dipole.
-
-Revision 1.18 2001/04/06 11:24:43 morsch
-Dependency on implementations of AliSegmentation and AliMUONResponse moved to AliMUONFactory class.
-Static method Build() builds the MUON system out of chambers, segmentation and response.
-
-Revision 1.17 2001/03/17 10:07:20 morsch
-Correct inconsistent variable name / method name / comments.
-
-Revision 1.16 2001/01/27 08:50:50 morsch
-Call non default constructors of segmentation classes.
-
-Revision 1.15 2001/01/17 20:57:45 hristov
-Unused variable removed
-
-Revision 1.14 2000/12/21 22:42:55 morsch
-Constructor contains default set-up for segmentation.
-Record charged particles only.
-
-Revision 1.13 2000/10/06 10:03:38 morsch
-Call to gMC->VolId() moved to Init()
-
-Revision 1.12 2000/10/02 21:28:09 fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.11 2000/06/27 07:31:07 morsch
-fChambers = 0; deleted from constructor.
-
-Revision 1.10 2000/06/26 14:02:38 morsch
-Add class AliMUONConstants with MUON specific constants using static memeber data and access methods.
-
-Revision 1.9 2000/06/15 07:58:49 morsch
-Code from MUON-dev joined
-
-Revision 1.8.4.9 2000/06/12 19:20:49 morsch
-Constructor sets default geometry, segmentation and response parameters.
-
-Revision 1.8.4.8 2000/06/09 21:55:28 morsch
-Most coding rule violations corrected.
-
-Revision 1.8.4.7 2000/05/02 13:15:18 morsch
-Coding rule violations RS3, RN13 corected
-
-Revision 1.8.4.6 2000/05/02 10:24:26 morsch
-Public access to fdGas and fdAlu of AliMUONChamber replaced by getters.
-
-Revision 1.8.4.5 2000/04/26 19:58:47 morsch
-Obsolete reference to trig_ removed.
-
-Revision 1.8.4.4 2000/04/19 19:42:47 morsch
-change NCH to kNCH
-
-Revision 1.8.4.3 2000/02/17 08:17:43 morsch
-Gammas and neutrons are also scored in the stepmanager
-*/
+/* $Id$ */
/////////////////////////////////////////////////////////
// Manager and hits classes for set:MUON version 0 //
/////////////////////////////////////////////////////////
-#include <TTUBE.h>
-#include <TNode.h>
-#include <TRandom.h>
#include <TLorentzVector.h>
-#include <Riostream.h>
+#include <TVirtualMC.h>
-#include "AliMUONv0.h"
-#include "AliMUONChamber.h"
-#include "AliRun.h"
-#include "AliMC.h"
-#include "AliMagF.h"
-#include "AliMUONHit.h"
-#include "AliMUONPadHit.h"
-#include "AliCallf77.h"
#include "AliConst.h"
+#include "AliMUONChamber.h"
+#include "AliMUONChamberGeometry.h"
#include "AliMUONConstants.h"
#include "AliMUONFactory.h"
+#include "AliMUONHit.h"
+#include "AliMUONv0.h"
+#include "AliMagF.h"
+#include "AliRun.h"
+#include "AliMC.h"
+
ClassImp(AliMUONv0)
//___________________________________________
-AliMUONv0::AliMUONv0() : AliMUON()
+AliMUONv0::AliMUONv0()
+ : AliMUON()
{
// Constructor
fChambers = 0;
//___________________________________________
AliMUONv0::AliMUONv0(const char *name, const char *title)
- : AliMUON(name,title)
+ : AliMUON(name,title)
{
// Constructor
- AliMUONFactory::Build(this, "default");
+ AliMUONFactory factory;
+ factory.Build(this, title);
}
+//___________________________________________
void AliMUONv0::CreateGeometry()
{
// Creates coarse geometry for hit density simulations
// trigger chambers
sprintf(vName,"SG%2d",i);
}
- ((AliMUONChamber*) (*fChambers)[i])->SetGid(gMC->VolId(vName));
+ //((AliMUONChamber*) (*fChambers)[i])->SetGid(gMC->VolId(vName));
+ ((AliMUONChamber*) (*fChambers)[i])
+ ->GetGeometry()->SetSensitiveVolume(gMC->VolId(vName));
}
}
id=gMC->CurrentVolID(copy);
for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) {
- if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){
+ //if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){
+ if ( ((AliMUONChamber*)(*fChambers)[i-1])->IsSensId(id) ) {
vol[0]=i;
idvol=i-1;
}
hits[13] = mom[2]; // Pz
hits[14] = gMC->TrackTime(); // time of flight
new(lhits[fNhits++])
- AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ AliMUONHit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits);
}
// if( gMC->IsTrackExiting()) gMC->StopTrack();