Step counting added.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Oct 2013 12:18:42 +0000 (12:18 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Oct 2013 12:18:42 +0000 (12:18 +0000)
STEER/STEER/AliTransportMonitor.cxx
STEER/STEER/AliTransportMonitor.h

index 9d28c2d..d388e9c 100644 (file)
@@ -42,6 +42,7 @@ AliTransportMonitor::AliTransportMonitorVol::AliTransportMonitorVol()
                     :TNamed(),
                      fNtypes(0),
                      fTotalTime(0),
+                     fNSteps(0),
                      fPData(0),
                      fTimeRZ(0),
                      fParticles()
@@ -69,6 +70,7 @@ void AliTransportMonitor::AliTransportMonitorVol::StepInfo(
   data.fEdt += energy*dt;
   data.fTime += dt;
   fTotalTime += dt;
+  fNSteps += 1.;
   if (!fTimeRZ) {
     Bool_t status = TH1::AddDirectoryStatus();
     TH1::AddDirectory(kFALSE);
@@ -251,7 +253,7 @@ void AliTransportMonitor::Print(Option_t *volName) const
   TIter next(fVolumeMon);
   AliTransportMonitorVol *volMon;
   Int_t ncrossed = 0;
-  TH1F *hnames = new TH1F("volume timing", "relative volume timing", 3,0,3);
+  TH1F *hnames = new TH1F("volume_timing", "relative volume timing", 3,0,3);
   hnames->SetStats(0);
   hnames->SetFillColor(38);
   hnames->SetBit(TH1::kCanRebin);
index 90d0738..89362b4 100644 (file)
@@ -53,6 +53,7 @@ public:
     Double_t        GetTime(Int_t itype) const {return fPData[itype].fTime;}
     Double_t        GetEmed(Int_t itype) const {return (fTotalTime>0)?fPData[itype].fEdt/fTotalTime : 0.;}
     Int_t           GetPDG(Int_t itype)  const {return fPData[itype].fPDG;}
+    Double_t        GetNSteps() const {return fNSteps;}
     TH2F           *GetHistogram() const {return fTimeRZ;}
     AliPMonData    *GetPMonData(Int_t itype) const {AliPMonData obj = fPData[itype]; return &obj;} 
     void            Merge(AliTransportMonitorVol* volM);
@@ -63,13 +64,14 @@ public:
     private:
       Int_t         fNtypes;     // Number of different particle types
       Double_t      fTotalTime;  // Total time spent in this volume
+      Double_t      fNSteps;     // Total number of steps
       AliPMonData  *fPData;      //[fNtypes] Array of particle data
       TH2F         *fTimeRZ;     // Timing R-Z histogram per volume
       typedef std::map<Int_t, Int_t>         ParticleMap_t;
       typedef ParticleMap_t::iterator        ParticleMapIt_t;
       ParticleMap_t fParticles;  //! Map of stored particla data  
   
-  ClassDef(AliTransportMonitorVol,1)  // Helper to hold particle info per volume
+  ClassDef(AliTransportMonitorVol,2)  // Helper to hold particle info per volume
   };
   //________________________________________________________________
 private: