Skip to content

Commit

Permalink
sync options in scopedf
Browse files Browse the repository at this point in the history
  • Loading branch information
pitzl committed Feb 10, 2019
1 parent a8219ee commit ba64ca3
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions scopedf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,10 @@ int main( int argc, char* argv[] )
// MOD:

int iMOD = 6;
int isync = 999200100;
if( run == 35331 ) isync = 60000;
if( run == 35336 ) isync = 10200;
if( run == 35342 ) isync = 88600;

int MODaligniteration = 0;
double MODalignx = 0.0;
Expand Down Expand Up @@ -1398,6 +1402,10 @@ int main( int argc, char* argv[] )
TProfile( "modlkvst5",
"triplet-MOD links vs time;time [s];triplets with MOD links / min",
1100, 0, 66000, -0.5, 1.5 );
TProfile modlkvsev =
TProfile( "modlkvsev",
"triplet-MOD links in run;events in run;triplets with MOD links / 200",
600, 0, 120*1000 );

TH1I ntrimHisto = TH1I( "ntrim", "triplet - MOD links;triplet - MOD links;events",
11, -0.5, 10.5 );
Expand Down Expand Up @@ -2004,6 +2012,8 @@ int main( int argc, char* argv[] )

bool ldbt = 0;

vector < vector <cluster> > cl0(9); // previous

do {

// Get next eudaq event:
Expand Down Expand Up @@ -2248,6 +2258,10 @@ int main( int argc, char* argv[] )

} // eudaq planes

if( iev < isync )
for( unsigned ipl = 0; ipl < 6; ++ipl )
cl0[ipl] = cl[ipl]; // use this

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// read R4S DUT stream:

Expand Down Expand Up @@ -2615,7 +2629,7 @@ int main( int argc, char* argv[] )

double triCut = 0.1; // [mm]

for( vector<cluster>::iterator cA = cl[0].begin(); cA != cl[0].end(); ++cA ) {
for( vector<cluster>::iterator cA = cl0[0].begin(); cA != cl0[0].end(); ++cA ) {

double xA = cA->col*ptchx[0] - alignx[0];
double yA = cA->row*ptchy[0] - aligny[0];
Expand All @@ -2624,7 +2638,7 @@ int main( int argc, char* argv[] )
xA = xmid - ymid*rotx[0];
yA = ymid + xmid*roty[0];

for( vector<cluster>::iterator cC = cl[2].begin(); cC != cl[2].end(); ++cC ) {
for( vector<cluster>::iterator cC = cl0[2].begin(); cC != cl0[2].end(); ++cC ) {

double xC = cC->col*ptchx[2] - alignx[2];
double yC = cC->row*ptchy[2] - aligny[2];
Expand All @@ -2651,7 +2665,7 @@ int main( int argc, char* argv[] )

// middle plane B = 1:

for( vector<cluster>::iterator cB = cl[1].begin(); cB != cl[1].end(); ++cB ) {
for( vector<cluster>::iterator cB = cl0[1].begin(); cB != cl0[1].end(); ++cB ) {

double xB = cB->col*ptchx[1] - alignx[1];
double yB = cB->row*ptchy[1] - aligny[1];
Expand Down Expand Up @@ -3665,12 +3679,16 @@ int main( int argc, char* argv[] )
modlkvst1.Fill( evsec, nm ); // MOD yield vs time
modlkvst3.Fill( evsec, nm );
modlkvst5.Fill( evsec, nm );
modlkvsev.Fill( iev, nm );
ntrimHisto.Fill( ntrim );

if( ldb ) cout << "done ev " << iev << endl << flush;

++iev;

for( unsigned ipl = 0; ipl < 6; ++ipl )
cl0[ipl] = cl[ipl]; // remember

} while( reader->NextEvent() && iev < lev );

delete reader;
Expand Down

0 comments on commit ba64ca3

Please sign in to comment.