]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New class for testing new Stepmanager added. (G. Martinez)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Feb 2003 15:40:53 +0000 (15:40 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Feb 2003 15:40:53 +0000 (15:40 +0000)
MUON/AliMUONv3.cxx [new file with mode: 0644]
MUON/AliMUONv3.h [new file with mode: 0644]
MUON/MUONLinkDef.h
MUON/libMUON.pkg

diff --git a/MUON/AliMUONv3.cxx b/MUON/AliMUONv3.cxx
new file mode 100644 (file)
index 0000000..c91261b
--- /dev/null
@@ -0,0 +1,119 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpeateose. It is      *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+// AliMUONv3 Addapted for AliMUONv1 
+// This was the last revision of AliMUONv1
+// $Log$
+// Revision 1.40  2003/01/28 13:21:06  morsch
+// Improved response simulation for station 1.
+// (M. Mac Cormick, I. Hrivnacova, D. Guez)
+//
+// Gines Martinez (Subatech) jan 2003
+
+/////////////////////////////////////////////////////////
+//  Manager and hits classes for set:MUON version 2    //
+/////////////////////////////////////////////////////////
+
+#include <Riostream.h>
+#include <TClonesArray.h>
+#include <TLorentzVector.h> 
+#include <TNode.h> 
+#include <TRandom.h> 
+#include <TTUBE.h>
+
+#include "AliMUONv3.h"
+#include "AliRun.h"
+#include "AliMagF.h"
+#include "AliCallf77.h"
+#include "AliConst.h" 
+#include "AliMUONChamber.h"
+#include "AliMUONHit.h"
+#include "AliMUONPadHit.h"
+#include "AliMUONConstants.h"
+#include "AliMUONTriggerCircuit.h"
+#include "AliMUONFactory.h"
+
+ClassImp(AliMUONv3)
+//___________________________________________
+AliMUONv3::AliMUONv3() : AliMUONv1()
+{
+// Constructor
+    fChambers = 0;
+    fStations = 0;
+}
+//___________________________________________
+AliMUONv3::AliMUONv3(const char *name, const char *title)
+       : AliMUONv1(name,title)
+{
+// Constructor
+    // By default include all stations
+    fStations = new Int_t[5];
+    for (Int_t i=0; i<5; i++) fStations[i] = 1;
+
+    AliMUONFactory factory;
+    factory.Build(this, title);
+}
+//___________________________________________
+void AliMUONv3::StepManager()
+{
+
+  // Volume id
+  Int_t   copy, id;
+  Int_t   idvol;
+  Int_t   iChamber=0;
+  // Particule id, pos and mom vectors, 
+  // theta, phi angles with respect the normal of the chamber, 
+  // spatial step, delta_energy and time of flight
+  Int_t          ipart;
+  TLorentzVector pos, mom;
+  Float_t        theta, phi, tof;
+  Float_t        destep, step;
+
+  TClonesArray &lhits = *fHits;
+
+  // Only charged tracks
+  if( !(gMC->TrackCharge()) ) return; 
+
+  // Only gas gap inside chamber
+  // Tag chambers and record hits when track enters 
+  idvol=-1;
+  id=gMC->CurrentVolID(copy);
+  for (Int_t i = 1; i <= AliMUONConstants::NCh(); i++) {
+    if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()) {
+      iChamber = i;
+      idvol  = i-1;
+    }
+  }
+  if (idvol == -1) return;
+
+  // Get current particle id (ipart), track position (pos)  and momentum (mom)
+  gMC->TrackPosition(pos);
+  gMC->TrackMomentum(mom);
+  ipart    = gMC->TrackPid();
+  theta    = mom.Theta()*kRaddeg;     // theta of track
+  phi      = mom.Phi()  *kRaddeg;     // phi of the track
+  tof      = gMC->TrackTime();        // Time of flight
+  //
+  // momentum loss and steplength in last step
+  destep = gMC->Edep();
+  step   = gMC->TrackStep();
+  //    new hit       
+  new(lhits[fNhits++]) 
+    AliMUONHit(fIshunt, gAlice->CurrentTrack(), iChamber, ipart, pos.X(), pos.Y(), pos.Z(), tof, mom.P(), theta, phi, step, destep);
+}
+
+
diff --git a/MUON/AliMUONv3.h b/MUON/AliMUONv3.h
new file mode 100644 (file)
index 0000000..5137f21
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef ALIMUONV3_H
+#define ALIMUONV3_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/////////////////////////////////////////////////////////
+//  Manager and hits classes for set:MUON version 3    //
+/////////////////////////////////////////////////////////
+#include "AliMUONv1.h"
+
+class AliMUONv3 : public AliMUONv1 {
+public:
+   AliMUONv3();
+   AliMUONv3(const char *name, const char *title);
+   virtual  ~AliMUONv3() {}
+   virtual void   StepManager();
+protected:
+   
+private:
+
+   ClassDef(AliMUONv3,1)  // MUON Detector class Version 3
+};
+#endif
+
+
+
+
+
+
+
index 6db2a402a8d3da63c67cf2b30784ce5d31059c29..11c1535fa306c22ad260aa37b69563c6332fe17f 100644 (file)
@@ -5,6 +5,7 @@
 #pragma link C++ class  AliMUON+;
 #pragma link C++ class  AliMUONv0+;
 #pragma link C++ class  AliMUONv1+;
+#pragma link C++ class  AliMUONv3+;
 #pragma link C++ class  AliMUONHit+;
 #pragma link C++ class  AliMUONPadHit+;
 #pragma link C++ class  AliMUONDigit+;
index 2caf629f8a91517867e8d9997a6dd9d2c192715d..efe84d4e380da94ca1c440d69ffaf08b6ab49580 100644 (file)
@@ -9,7 +9,7 @@ SRCS         = AliMUONChamber.cxx AliMUONChamberTrigger.cxx \
               AliMUONSegmentationTrigger.cxx  AliMUONResponseTrigger.cxx\
                AliMUONResponseTriggerV1.cxx\
               AliMUONSegmentationTriggerX.cxx AliMUONSegmentationTriggerY.cxx \
-               AliMUONSegmentationV1.cxx AliMUON.cxx AliMUONv0.cxx AliMUONv1.cxx \
+               AliMUONSegmentationV1.cxx AliMUON.cxx AliMUONv0.cxx AliMUONv1.cxx AliMUONv3.cxx \
                AliMUONDisplay.cxx AliMUONPoints.cxx \
                AliMUONClusterFinderVS.cxx \
                AliMUONHitMapA1.cxx \