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 |
// |
// |
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 |
|
|
913 |
|
if(!trkl1)return; |
914 |
|
|
915 |
|
// ------------------------- |
916 |
|
// ****general variables**** |
917 |
|
// ------------------------- |
918 |
|
for(Int_t i=0; i<12 ; i++){ |
919 |
|
good[i] = trkl1->good[i]; |
920 |
|
for(Int_t j=0; j<24 ; j++){ |
921 |
|
cn[j][i] = trkl1->cn[j][i]; |
922 |
|
cnn[j][i] = trkl1->cnn[j][i]; |
923 |
|
}; |
924 |
|
}; |
925 |
|
// ------------------------- |
926 |
|
// ****cluster array**** |
927 |
|
// ------------------------- |
928 |
|
|
929 |
|
if(Cluster)Cluster->Clear("C"); |
930 |
|
Cluster = new TClonesArray("TrkCluster"); |
931 |
|
TClonesArray &t = *Cluster; |
932 |
|
|
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 |
ClassImp(TrkLevel1); |
ClassImp(TrkLevel1); |
955 |
ClassImp(TrkCluster); |
ClassImp(TrkCluster); |