]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Optional scoring for background studies in HALL.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Jan 2012 13:19:32 +0000 (13:19 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Jan 2012 13:19:32 +0000 (13:19 +0000)
STEER/STEERBase/AliTrackReference.h
STRUCT/AliHALLv3.cxx
STRUCT/AliHALLv3.h

index 0ed841244c65ca2f5441437c5f25074ff94bc5a4..3bd385d0eb5dc134433528823b18baeb0c35798a 100644 (file)
@@ -30,7 +30,8 @@ public:
                    kPMD   = 10,
                    kFMD   = 12,
                    kVZERO = 14,
                    kPMD   = 10,
                    kFMD   = 12,
                    kVZERO = 14,
-                   kMFT   = 16
+                   kMFT   = 16,
+                   kHALL  = 17
     };
   AliTrackReference();
   AliTrackReference(Int_t label, Int_t id = -999);
     };
   AliTrackReference();
   AliTrackReference(Int_t label, Int_t id = -999);
index d1c5422a23a1ecf949a2da75e639a429465457e3..48260d99323742203543d2273b05022fa4edacac 100644 (file)
@@ -32,6 +32,8 @@
 #include "AliMagF.h"
 #include "AliRun.h"
 #include "AliLog.h"
 #include "AliMagF.h"
 #include "AliRun.h"
 #include "AliLog.h"
+#include "AliMC.h"
+#include "AliTrackReference.h"
 #include <TGeoVolume.h>
 #include <TGeoManager.h>
 #include <TGeoMatrix.h>
 #include <TGeoVolume.h>
 #include <TGeoManager.h>
 #include <TGeoMatrix.h>
@@ -47,7 +49,7 @@
 ClassImp(AliHALL)
  
 //_____________________________________________________________________________
 ClassImp(AliHALL)
  
 //_____________________________________________________________________________
-AliHALLv3::AliHALLv3() : fNewShield24(0)
+AliHALLv3::AliHALLv3() : fNewShield24(0), fRefVolumeId(-1), fScoring(0)
 {
   //
   // Default constructor for the experimental Hall
 {
   //
   // Default constructor for the experimental Hall
@@ -56,7 +58,7 @@ AliHALLv3::AliHALLv3() : fNewShield24(0)
  
 //_____________________________________________________________________________
 AliHALLv3::AliHALLv3(const char *name, const char *title)
  
 //_____________________________________________________________________________
 AliHALLv3::AliHALLv3(const char *name, const char *title)
-  : AliHALL(name,title), fNewShield24(0)
+  : AliHALL(name,title), fNewShield24(0), fRefVolumeId(-1), fScoring(0)
 {
   //
   // Standard constructor for the experimental Hall
 {
   //
   // Standard constructor for the experimental Hall
@@ -476,8 +478,60 @@ void AliHALLv3::CreateGeometry()
   TGeoVolume* voPx24Pl = new TGeoVolume("Px24Pl", shPx24Pl, kMedST);
   asShPx24->AddNode(voPx24Pl, 1, new TGeoTranslation(55., 0., -1205./2. + 40.));
   asHall->AddNode(asFMS, 1, new TGeoTranslation(0.,  0., 0.));
   TGeoVolume* voPx24Pl = new TGeoVolume("Px24Pl", shPx24Pl, kMedST);
   asShPx24->AddNode(voPx24Pl, 1, new TGeoTranslation(55., 0., -1205./2. + 40.));
   asHall->AddNode(asFMS, 1, new TGeoTranslation(0.,  0., 0.));
-  
+
+  //
+  // Scoring plane for beam background simulations
   //
   //
+  TGeoVolume* voRB24Scoring = new TGeoVolume("RB24Scoring", new TGeoTube(4.3, 300., 1.), kMedAir);
+  asHall->AddNode(voRB24Scoring, 1, new TGeoTranslation(0., 0., 735.));
+  //
+
   top->AddNode(asHall, 1, gGeoIdentity);
   
 }
   top->AddNode(asHall, 1, gGeoIdentity);
   
 }
+
+void AliHALLv3::Init()
+{
+  //
+  // Initialise the module after the geometry has been defined
+  //
+    if(AliLog::GetGlobalDebugLevel()>0) {
+       printf("%s: **************************************"
+              " HALL "
+              "**************************************\n",ClassName());
+       printf("\n%s:      Version 3 of HALL initialised\n\n",ClassName());
+       printf("%s: **************************************"
+              " HALL "
+              "**************************************\n",ClassName());
+    }
+//
+// The reference volume id
+    fRefVolumeId = gMC->VolId("RB24Scoring");
+}
+
+void AliHALLv3::StepManager()
+{
+//
+// Stepmanager of AliHALLv2
+// Used for recording of reference tracks entering scoring plane
+//
+  if (!fScoring) return;
+  Int_t   copy, id;
+  
+  //
+  // Only charged tracks
+  if( !(gMC->TrackCharge()) ) return; 
+  //
+  // Only tracks entering mother volume
+  // 
+
+  id=gMC->CurrentVolID(copy);
+
+  if ((id != fRefVolumeId))   return;
+  if(!gMC->IsTrackEntering()) return;
+  //
+  // Add the reference track
+  //
+  AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kHALL);
+}
+
index dd1e477f68b7ed0a4e8f4fe413e666256bd550da..64fd60b5b818ac22799c2bd3c989535ea82e984f 100644 (file)
@@ -19,9 +19,14 @@ public:
    AliHALLv3(const char *name, const char *title);
    virtual      ~AliHALLv3() {}
    virtual void  CreateGeometry();
    AliHALLv3(const char *name, const char *title);
    virtual      ~AliHALLv3() {}
    virtual void  CreateGeometry();
+   virtual void  StepManager();
+   virtual void  Init();
    virtual void  SetNewShield24() {fNewShield24 = 1;}
    virtual void  SetNewShield24() {fNewShield24 = 1;}
+   virtual void  SetScoring()     {fScoring     = 1;}
 private:
    Bool_t fNewShield24;   // Option for new shielding in PX24 and RB24
 private:
    Bool_t fNewShield24;   // Option for new shielding in PX24 and RB24
+   Int_t  fRefVolumeId;   // Volume ID of scoring plane
+   Bool_t fScoring;       // Scoring Option
    ClassDef(AliHALLv3,1)  //Class for ALICE experimental hall
 };
 
    ClassDef(AliHALLv3,1)  //Class for ALICE experimental hall
 };