Correct treatment of tracks with pT<pTmin
[u/mrichter/AliRoot.git] / ITS / AliITSDetTypeSim.cxx
index ba09e78..8be79cd 100644 (file)
@@ -73,6 +73,8 @@ const Int_t AliITSDetTypeSim::fgkDefaultNModulesSPD =  240;
 const Int_t AliITSDetTypeSim::fgkDefaultNModulesSDD =  260;
 const Int_t AliITSDetTypeSim::fgkDefaultNModulesSSD = 1698;
 
+using std::endl;
+using std::cout;
 ClassImp(AliITSDetTypeSim)
 
 //----------------------------------------------------------------------
@@ -183,41 +185,41 @@ AliITSDetTypeSim::~AliITSDetTypeSim(){
     fDigits=0;
 }
 //----------------------------------------------------------------------
-AliITSDetTypeSim::AliITSDetTypeSim(const AliITSDetTypeSim &source) : TObject(source),
-fSimulation(source.fSimulation),   // [NDet]
-fSegmentation(source.fSegmentation), // [NDet]
-fCalibration(source.fCalibration),     // [NMod]
-fSSDCalibration(source.fSSDCalibration),
-fSPDNoisy(source.fSPDNoisy),
-fSPDSparseDead(source.fSPDSparseDead),
-fNSDigits(source.fNSDigits),    //! number of SDigits
-fSDigits(*((TClonesArray*)source.fSDigits.Clone())),
-fNDigits(source.fNDigits),     //! number of Digits
-fRunNumber(source.fRunNumber),   //! Run number (to access DB)
-fDigits(source.fDigits),       //! [NMod][NDigits]
-fSimuPar(source.fSimuPar),
-fDDLMapSDD(source.fDDLMapSDD),
-fRespSDD(source.fRespSDD),
-fAveGainSDD(source.fAveGainSDD),
-fkDigClassName(), // String with digit class name.
-fLoader(source.fLoader),      // local pointer to loader
-fFirstcall(source.fFirstcall),
-fFOGenerator(source.fFOGenerator),
-fTriggerConditions(source.fTriggerConditions) 
-{
-    // Copy Constructor for object AliITSDetTypeSim not allowed
-  for(Int_t i=0;i<fgkNdettypes;i++){
-    fkDigClassName[i] = source.fkDigClassName[i];
-  }
-}
-//----------------------------------------------------------------------
-AliITSDetTypeSim& AliITSDetTypeSim::operator=(const AliITSDetTypeSim &source){
-    // The = operator for object AliITSDetTypeSim
+// AliITSDetTypeSim::AliITSDetTypeSim(const AliITSDetTypeSim &source) : TObject(source),
+// fSimulation(source.fSimulation),   // [NDet]
+// fSegmentation(source.fSegmentation), // [NDet]
+// fCalibration(source.fCalibration),     // [NMod]
+// fSSDCalibration(source.fSSDCalibration),
+// fSPDNoisy(source.fSPDNoisy),
+// fSPDSparseDead(source.fSPDSparseDead),
+// fNSDigits(source.fNSDigits),    //! number of SDigits
+// fSDigits(*((TClonesArray*)source.fSDigits.Clone())),
+// fNDigits(source.fNDigits),     //! number of Digits
+// fRunNumber(source.fRunNumber),   //! Run number (to access DB)
+// fDigits(source.fDigits),       //! [NMod][NDigits]
+// fSimuPar(source.fSimuPar),
+// fDDLMapSDD(source.fDDLMapSDD),
+// fRespSDD(source.fRespSDD),
+// fAveGainSDD(source.fAveGainSDD),
+// fkDigClassName(), // String with digit class name.
+// fLoader(source.fLoader),      // local pointer to loader
+// fFirstcall(source.fFirstcall),
+// fFOGenerator(source.fFOGenerator),
+// fTriggerConditions(source.fTriggerConditions) 
+// {
+//     // Copy Constructor for object AliITSDetTypeSim not allowed
+//   for(Int_t i=0;i<fgkNdettypes;i++){
+//     fkDigClassName[i] = source.fkDigClassName[i];
+//   }
+// }
+// //----------------------------------------------------------------------
+// AliITSDetTypeSim& AliITSDetTypeSim::operator=(const AliITSDetTypeSim &source){
+//     // The = operator for object AliITSDetTypeSim
  
-  this->~AliITSDetTypeSim();
-  new(this) AliITSDetTypeSim(source);
-  return *this;
-}
+//   this->~AliITSDetTypeSim();
+//   new(this) AliITSDetTypeSim(source);
+//   return *this;
+// }
 
 //______________________________________________________________________
 void AliITSDetTypeSim::SetITSgeom(AliITSgeom *geom){
@@ -891,6 +893,8 @@ void AliITSDetTypeSim::SDigitsToDigits(Option_t* opt, Char_t* name){
     fLoader->TreeD()->Fill();
     ResetDigits();
   }
+
+  WriteFOSignals(); 
   fLoader->TreeD()->GetEntries();
   fLoader->TreeD()->AutoSave();
   fLoader->TreeD()->Reset();
@@ -1058,5 +1062,6 @@ void AliITSDetTypeSim::WriteFOSignals() {
   TTree *tree = fLoader->TreeD();
   AliITSFOSignalsSPD *foSignals = new AliITSFOSignalsSPD(*GetFOSignals()); 
   tree->GetUserInfo()->Add(foSignals);
+  fFOGenerator.ResetSignals();
 }