}
}
-
+void AliTPC::CreateDebugStremer(){
+ //
+ // Create Debug streamer to check simulation
+ //
+ fDebugStreamer = new TTreeSRedirector("TPCSimdebug.root");
+}
//_____________________________________________________________________________
AliTPC::~AliTPC()
{
//-----------------------------------------------------------
// summable digits - 16 bit "ADC", no noise, no saturation
//-----------------------------------------------------------
- if (0) fDebugStreamer = new TTreeSRedirector("TPCSimdebug.root");
if (!fTPCParam->IsGeoRead()){
//
AliTPC(const char *name, const char *title);
virtual AliLoader* MakeLoader(const char* topfoldername);
-
+ void CreateDebugStremer();
virtual ~AliTPC();
virtual void AddHit(Int_t a1, Int_t *a2, Float_t *a3);
virtual void CreateGeometry() {}
Float_t fSide; // selects left(-1), right(+1), or both(0) sides of the TPC
Bool_t fPrimaryIonisation; //switch between Fluka(true) and geant3(false)
- private:
+ protected:
AliTPC(const AliTPC& t);
AliTPC &operator = (const AliTPC & param);
//
#include "TGeoPara.h"
#include "TGeoPhysicalNode.h"
#include "TGeoHalfSpace.h"
+#include "TTreeStream.h"
ClassImp(AliTPCv2)
hits[4]=gMC->TrackTime();
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits);
-
+ if (fDebugStreamer){
+ // You can dump here what you need
+ // function CreateDebugStremer() to be called in the Config.C macro
+ // if you want to enable it
+ // By default debug streaemer is OFF
+ Float_t edep = gMC->Edep();
+ Float_t tstep = gMC->TrackStep();
+ Int_t pid=gMC->TrackPid();
+ (*fDebugStreamer)<<"hit"<<
+ "x="<<hits[0]<< // hit position
+ "y="<<hits[1]<<
+ "z="<<hits[2]<<
+ "nel="<<hits[3]<< // number of electorns
+ "tof="<<hits[4]<< // hit TOF
+ "edep="<<edep<< // energy deposit
+ "pid="<<pid<< // pid
+ "step="<<tstep<<
+ "p.="<<&p<<
+ "\n";
+ }
+
} // step>0
} //within sector's limits
// Stemax calculation for the next step