/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkLevel1.cpp
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/TrkLevel1.cpp

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

revision 1.27 by pam-fi, Thu Feb 27 11:24:43 2014 UTC revision 1.29 by mocchiut, Thu Jul 3 10:38:00 2014 UTC
# Line 11  using namespace std; Line 11  using namespace std;
11  extern "C" {  extern "C" {
12                    
13  //      int readetaparam_();  //      int readetaparam_();
14      float cog_(int*,int*);    float cog_(int*,int*);
15      float pfaeta_(int*,float*);    float pfaeta_(int*,float*);
16      float pfaeta2_(int*,float*);    float pfaeta2_(int*,float*);
17      float pfaeta3_(int*,float*);    float pfaeta3_(int*,float*);
18      float pfaeta4_(int*,float*);    float pfaeta4_(int*,float*);
19      float pfaetal_(int*,float*);    float pfaetal_(int*,float*);
20      float digsat_(int*);    float digsat_(int*);
21      int   npfastrips_(int*,float*);    int   npfastrips_(int*,float*);
22              
23      float fbad_cog_(int*,int*);
24      float risx_cog_(float*);
25      float risy_cog_(float*);
26  }  }
27  //--------------------------------------  //--------------------------------------
28  //  //
# Line 894  int TrkLevel1::ProcessEvent(){ Line 897  int TrkLevel1::ProcessEvent(){
897    
898  }  }
899    
900    //--------------------------------------
901    //
902    //
903    //--------------------------------------
904    /**
905     * Method to fill a TrkLevel1 object from an existing one, by cleaning low-signal clusters.
906     *
907     */
908    void TrkLevel1::Set(TrkLevel1 *trkl1, float mipCut, float fCut){
909    
910    
911        
912        if(!trkl1)return;
913    
914        //  -------------------------
915        //  ****general variables****
916        //  -------------------------    
917        for(Int_t i=0; i<12 ; i++){
918            good[i] = trkl1->good[i];
919            for(Int_t j=0; j<24 ; j++){
920                cn[j][i]     = trkl1->cn[j][i];
921                cnn[j][i]    = trkl1->cnn[j][i];
922            };
923        };
924        //  -------------------------
925        //  ****cluster array****
926        //  -------------------------    
927    
928        if(Cluster)Cluster->Clear("C");
929        Cluster = new TClonesArray("TrkCluster");
930        TClonesArray &t = *Cluster;
931    
932        if ( trkl1->GetClusters() ){ // EM: crash nuclei alg when  DSP status: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
933          int isel=0;
934          for(int icl=0 ; icl< trkl1->GetClusters()->GetEntries(); icl++){
935            TrkCluster *cl = trkl1->GetCluster(icl);
936            
937            float mip = TrkParams::GetMIP(cl->GetLadder()-1,cl->view-1);
938            float smip = cl->GetSignal()/(mip>0.?mip:1.);
939            float smax =  cl->clsignal[cl->indmax]/(mip>0.?mip:1.);
940            if(smax/smip<fCut)continue;
941            if(smip<mipCut)continue;
942            if(smax<0.5*mipCut)continue;
943            
944            
945            
946            new(t[isel]) TrkCluster(*cl); // <<< store cluster
947            isel++;
948          }
949        }
950    
951    
952    
953    }
954    
955  ClassImp(TrkLevel1);  ClassImp(TrkLevel1);
956  ClassImp(TrkCluster);  ClassImp(TrkCluster);

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.23