/[PAMELA software]/calo/flight/CaloNuclei/src/CaloNuclei.cpp
ViewVC logotype

Diff of /calo/flight/CaloNuclei/src/CaloNuclei.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mocchiut, Thu May 24 07:50:48 2007 UTC revision 1.8 by mocchiut, Fri Sep 28 10:05:00 2007 UTC
# Line 106  void CaloNuclei::Process(Int_t ntr){ Line 106  void CaloNuclei::Process(Int_t ntr){
106    if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime);    if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime);
107    //    //
108    Clear();    Clear();
109      if ( debug ) printf(" Always calculate stdedx1 \n");
110    //    //
111    // Always calculate stdedx1    // Always calculate stdedx1
112    //    //
# Line 132  void CaloNuclei::Process(Int_t ntr){ Line 133  void CaloNuclei::Process(Int_t ntr){
133      //      //
134    };    };
135    //    //
136      if ( debug ) printf(" find energy released along the strip of maximum on the first plane and on the two neighbour strips \n");
137      //
138    // find energy released along the strip of maximum on the first plane and on the two neighbour strips    // find energy released along the strip of maximum on the first plane and on the two neighbour strips
139    //    //
140    if ( indx > 0 ){    if ( indx > 0 ){
# Line 145  void CaloNuclei::Process(Int_t ntr){ Line 148  void CaloNuclei::Process(Int_t ntr){
148      stdedx1 = 0.;      stdedx1 = 0.;
149    };    };
150    //    //
151      if ( debug ) printf(" if ( !usetrack ) return: usetrack %i ntr %i \n",usetrack,ntr);
152    //    //
153    //    //
154    if ( !usetrack ) return;    //  if ( !usetrack ) return;
155    //    //
156    PamTrack *ptrack = 0;    PamTrack *ptrack = 0;
157    CaloTrkVar *track = 0;    CaloTrkVar *track = 0;
   if ( ntr >= 0 ){  
     ptrack = L2->GetTrack(ntr);  
     track = ptrack->GetCaloTrack();  
   } else {  
     track = L2->GetCaloStoredTrack(ntr);  
   };  
158    //    //
159    if ( !track && ntr >= 0 ){    if ( usetrack ){
160      printf(" ERROR: cannot find any track!\n");      if ( ntr >= 0 ){
161      printf(" ERROR: CaloNuclei variables not completely filled \n");        ptrack = L2->GetTrack(ntr);
162      return;          if ( ptrack ) track = ptrack->GetCaloTrack();
163        } else {
164          track = L2->GetCaloStoredTrack(ntr);
165        };
166        //
167        if ( !track && ntr >= 0 ){
168          printf(" ERROR: cannot find any track!\n");
169          printf(" ERROR: CaloNuclei variables not completely filled \n");
170          return;  
171        };
172      } else {
173        if ( ntr >= 0 ){
174          printf(" ERROR: you asked not to use a track but you are looking for track number %i !\n",ntr);
175          printf(" ERROR: CaloNuclei variables not completely filled \n");
176          return;      
177        };
178    };    };
179    //    //
180    //  Float_t defethr = 6. * 0.90;    //  Float_t defethr = 6. * 0.90;
# Line 498  void CaloNuclei::Process(Int_t ntr){ Line 511  void CaloNuclei::Process(Int_t ntr){
511          mesethr = mesethr2;          mesethr = mesethr2;
512        };        };
513        aldone = true;        aldone = true;
514        if ( mesethr > defethr ) goto retry;        if ( mesethr > defethr ){
515            interplane = 0;
516            preq = 0.;
517            postq = 0.;
518            qpremean = 0.;
519            qpremeanN = 0.;
520            multhit = false;
521            gap = false;
522            goto retry;
523          };
524      };      };
525    };    };
526    //    //

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23