/[PAMELA software]/DarthVader/OrbitalInfo/src/OrbitalInfo.cpp
ViewVC logotype

Diff of /DarthVader/OrbitalInfo/src/OrbitalInfo.cpp

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

revision 1.16 by pam-mep, Fri Mar 28 20:47:15 2014 UTC revision 1.17 by pam-fi, Wed Oct 15 12:06:49 2014 UTC
# Line 61  void OrbitalInfo::Set(){//ELENA Line 61  void OrbitalInfo::Set(){//ELENA
61    if ( !OrbitalInfoTrk ) OrbitalInfoTrk = new TClonesArray("OrbitalInfoTrkVar",2); //ELENA}      if ( !OrbitalInfoTrk ) OrbitalInfoTrk = new TClonesArray("OrbitalInfoTrkVar",2); //ELENA}  
62    //  if ( !Iij ) Iij = new TMatrixD(3,3);    //  if ( !Iij ) Iij = new TMatrixD(3,3);
63  }//ELENA  }//ELENA
64    //--------------------------------------
65    //
66    //
67    //--------------------------------------
68    void OrbitalInfo::SetTrackArray(TClonesArray *track){//ELENA
69    //    if(track && strcmp(track->GetClass()->GetName(),"OrbitalInfoTrkVar")==0){
70            if(OrbitalInfoTrk)OrbitalInfoTrk->Clear("C");
71            OrbitalInfoTrk = track;
72    //    }
73    }
74    
75  OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoTrkVar(Int_t itrk){  OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoTrkVar(Int_t itrk){
76    //        //    
# Line 75  OrbitalInfoTrkVar *OrbitalInfo::GetOrbit Line 85  OrbitalInfoTrkVar *OrbitalInfo::GetOrbit
85    OrbitalInfoTrkVar *orbtrack = (OrbitalInfoTrkVar*)t[itrk];    OrbitalInfoTrkVar *orbtrack = (OrbitalInfoTrkVar*)t[itrk];
86    return orbtrack;    return orbtrack;
87  }  }
88    /**
89     * Retrieves the tof track matching the seqno-th tracker stored track.
90     *
91     */
92    OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoStoredTrack(int seqno){
93    
94      if( ntrk()==0 ){
95        printf("OrbitalInfo::GetOrbitalInfoStoredTrack(int) : requested tracker SeqNo %i but no OrbitalInforimeter tracks are stored\n",seqno);
96        return NULL;
97      };
98      
99      OrbitalInfoTrkVar *c = 0;
100      Int_t it_tof=0;
101        
102      do {
103        c = GetOrbitalInfoTrkVar(it_tof);
104        it_tof++;
105      } while( c && seqno != c->trkseqno && it_tof < ntrk());      
106      
107      if(!c || seqno != c->trkseqno){
108        c = 0;
109        if(seqno!=-1 ) printf("OrbitalInfo::GetOrbitalInfoStoredTrack(int) : requested tracker SeqNo %i does not match OrbitalInfo stored tracks\n",seqno);
110      };
111      return c;
112        
113    }
114    
115  void OrbitalInfo::Clear(Option_t *t){  void OrbitalInfo::Clear(Option_t *t){
116    //    //

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.23