Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
* Updtating NPCluster.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
Morfouace committed Sep 20, 2018
1 parent e01a586 commit 93b0b90
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Examples/Example4/Analysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void Analysis::TreatEvent(){
TVector3 vX = TVector3(1,0,0);
TVector3 aTrack, vB;

if(TrackMult==2){
if(TrackMult>1){
vTrack = Actar->GetTracks();
double scalarproduct=0;
int BeamTrack=0;
Expand Down
8 changes: 6 additions & 2 deletions Examples/Example4/configs/ConfigActar.dat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ConfigActar
RecoRansac= 1
RecoCluster= 0
RecoRansac= 0
RecoCluster= 1
RecoVisu= 0
HIT_THRESHOLD= 2
Q_THRESHOLD= 0
Expand All @@ -9,6 +9,10 @@ NumberOfPadsX= 128
NumberOfPadsY= 128
PadSizeX= 2
PadSizeY= 2
XBeamMin= 0
XBeamMax= 100
YBeamMin= 60
YBeamMax= 67
Gas= iC4H10
%Gas= D2
%Pressure in mbar
Expand Down
8 changes: 4 additions & 4 deletions NPLib/Detectors/Actar/TActarPhysics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void TActarPhysics::PreTreat() {
}

}
else{
else if(fRecoRansac){
PadCharge.push_back(m_EventReduced->CoboAsad[it].peakheight[hh]);
PadX.push_back(TABLE[4][where]);
PadY.push_back(TABLE[5][where]);
Expand Down Expand Up @@ -207,9 +207,9 @@ void TActarPhysics::PreTreat() {
bool TActarPhysics::IsBeamZone(int X, int Y)
{
bool isBeam=false;
if(X>fXBeamMin && X<fXBeamMax)
if(Y>fYBeamMin && fYBeamMax)
isBeam=true;
if( (X>=fXBeamMin && X<=fXBeamMax) && (Y>=fYBeamMin && Y<=fYBeamMax) ){
isBeam=true;
}

return isBeam;
}
Expand Down
5 changes: 3 additions & 2 deletions NPLib/TrackReconstruction/NPCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void Cluster::ReadParameterValue(string filename)
void Cluster::FindTracks()
{
for(unsigned int i=0; i<fOriginalCloudSize; i++){
FillBigVoxels(vX[i],vY[i],vZ[i],vQ[i]);
FillBigVoxels(vX[i],vY[i],(int)vZ[i],(int)vQ[i]);
}

RegroupZone();
Expand Down Expand Up @@ -172,6 +172,7 @@ void Cluster::FillBigVoxels(int x, int y, int t, int q)
// Case where neither the current box nor the neighbour studied are associated to any track zone yet
it++;


NPL::Track BigTrack;
BigTrack.SetPointX(x/4);
BigTrack.SetPointY(y/4);
Expand Down Expand Up @@ -210,10 +211,10 @@ void Cluster::FillBigVoxels(int x, int y, int t, int q)
unsigned int minid=TMath::Min(LocBigVoxels[x/4+y/4*fNumberOfPadsX/4+t/8*fNumberOfPadsX/4*fNumberOfPadsY/4],LocBigVoxels[xB+yB*fNumberOfPadsX/4+tB*fNumberOfPadsX/4*fNumberOfPadsY/4]);

unsigned int mysize=TrackZone.at(maxid).GetXPoints().size();

int element = TrackZone.at(maxid).GetXPoints().at(0) + fNumberOfPadsX/4*TrackZone.at(maxid).GetYPoints().at(0) + fNumberOfPadsX/4*fNumberOfPadsY/4*TrackZone.at(maxid).GetZPoints().at(0);
int Loc=LocBigVoxels[element];


for(unsigned int i=0;i<mysize;i++){
int element_max = TrackZone.at(maxid).GetXPoints().at(mysize-i-1) + fNumberOfPadsX/4*TrackZone.at(maxid).GetYPoints().at(mysize-i-1) + fNumberOfPadsX/4*fNumberOfPadsY/4*TrackZone.at(maxid).GetZPoints().at(mysize-i-1);

Expand Down

0 comments on commit 93b0b90

Please sign in to comment.