]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALv2.cxx
explicit initializations
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALv2.cxx
index 4ca0f071d6ed276f06ec420671c60566e8b54ae4..4f93f9fc40300ad856e66a54adc6909f802333e6 100644 (file)
@@ -89,11 +89,9 @@ void AliEMCALv2::AddHit(Int_t shunt, Int_t primary, Int_t tracknumber, Int_t ipa
     // Add a hit to the hit list.
     // An EMCAL hit is the sum of all hits in a tower section
     //   originating from the same entering particle 
-    static Int_t hitCounter;
-    static AliEMCALHit *newHit, *curHit;
-    static Bool_t deja;
-
-    deja = kFALSE;
+    static Int_t hitCounter=0.;
+    static AliEMCALHit *newHit=0, *curHit=0;
+    static Bool_t deja=kFALSE;
 
     newHit = new AliEMCALHit(shunt, primary, tracknumber, iparent, ienergy, id, hits, p);
     for ( hitCounter = fNhits-1; hitCounter >= 0 && !deja; hitCounter-- ) {
@@ -127,8 +125,8 @@ void AliEMCALv2::StepManager(void){
   static TLorentzVector pos;  // Lorentz vector of the track current position.
   static TLorentzVector mom;  // Lorentz vector of the track current momentum.
   static Float_t ienergy = 0; // part->Energy();
-  static TString curVolName;
-  static int supModuleNumber, moduleNumber, yNumber, xNumber, absid;
+  static TString curVolName="";
+  static int supModuleNumber=-1, moduleNumber=-1, yNumber=-1, xNumber=-1, absid=-1;
   static int keyGeom=1;  //real TRD1 geometry
   static const char *vn = "SCMX"; // Apr 13, 2006 - only TRD1 case now
   static int nSMOP[7]={1,3,5,7,9,11}; // 30-mar-05
@@ -146,8 +144,8 @@ void AliEMCALv2::StepManager(void){
     if(gMC->VolId("WSUC")==1) printf(" WSUC - cosmic ray stand geometry \n");
   }
   Int_t tracknumber =  gAlice->GetMCApp()->GetCurrentTrackNumber();
-  Int_t parent;
-  TParticle* part;
+  Int_t parent=0;
+  TParticle* part=0;
 
   curVolName = gMC->CurrentVolName();
   if(curVolName.Contains(vn) || curVolName.Contains("SCX")) { // We are in a scintillator layer; SCX for 3X3
@@ -271,7 +269,7 @@ void AliEMCALv2::StepManager(void){
          else                                   birkC1Mod = fBirkC1;
        }
 
-       Float_t dedxcm;
+       Float_t dedxcm=0.;
        if (gMC->TrackStep()>0)  dedxcm=1000.*gMC->Edep()/gMC->TrackStep();
        else                     dedxcm=0;
        lightYield=lightYield/(1.+birkC1Mod*dedxcm+fBirkC2*dedxcm*dedxcm);
@@ -454,7 +452,7 @@ void AliEMCALv2::DrawAlicWithHits(int mode)
   TClonesArray *hits = Hits();
   Int_t nhits = hits->GetEntries(), absId, nSupMod, nModule, nIphi, nIeta, iphi, ieta;
   AliEMCALHit *hit = 0;
-  Double_t de, des=0.;
+  Double_t de=0., des=0.;
   for(Int_t i=0; i<nhits; i++) {
     hit   = (AliEMCALHit*)hits->UncheckedAt(i);
     absId = hit->GetId();