@@ -834,6 +834,7 @@ struct TauThreeProngEventTableProducer {
834834 // different events flags
835835 int8_t bcSels[8 ] = {-99 , -99 , -99 , -99 , -99 , -99 , -99 , -99 };
836836 uint8_t bcSelBits = 0 ;
837+ const int nBitsMax = 8 ;
837838 bcSels[0 ] = dgcand.trs ();
838839 bcSels[1 ] = dgcand.trofs ();
839840 bcSels[2 ] = dgcand.hmpr ();
@@ -845,7 +846,7 @@ struct TauThreeProngEventTableProducer {
845846
846847 const int offset = 1 ;
847848 bcSelBits = bcSels[0 ]; // initialization
848- for (int ibit = 1 ; ibit < 8 ; ibit++) {
849+ for (int ibit = 1 ; ibit < nBitsMax ; ibit++) {
849850 bcSelBits = (bcSelBits << offset); // shift by 1 position towards left
850851 bcSelBits += bcSels[ibit]; // add next bit to the pool
851852 }
@@ -1257,7 +1258,7 @@ struct TauThreeProngEventTableProducer {
12571258 continue ;
12581259 }
12591260
1260- registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (3 ., 1 .); // particles from tau in |eta|<0.9
1261+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (3 ., 1 .); // charged particles from tau in |eta|<0.9
12611262
12621263 registrySkim.get <TH1 >(HIST (" skim/nChPartMC" ))->Fill (nChargedDaughtersTau[0 ] + nChargedDaughtersTau[1 ]); // N charged particles from taus
12631264 // check number of charged particles in MC event
@@ -1267,18 +1268,12 @@ struct TauThreeProngEventTableProducer {
12671268 continue ;
12681269 }
12691270
1270- registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (4 ., 1 .); // 1+3 (3+3) topology
1271- if (nChargedDaughtersTau[0 ] + nChargedDaughtersTau[1 ] == fourTracks) { // 4
1272- registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (5 ., 1 .);
1273- } else if (nChargedDaughtersTau[0 ] + nChargedDaughtersTau[1 ] == sixTracks) { // 6
1274- registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (6 ., 1 .);
1275- }
1276-
1277- // if (nChargedDaughtersTau[0] + nChargedDaughtersTau[1] == fourTracks) { // 4
1278- // registrySkim.get<TH1>(HIST("skim/efficiencyMC"))->Fill(7., 1.);
1279- // } else if (nChargedDaughtersTau[0] + nChargedDaughtersTau[1] == sixTracks) { // 6
1280- // registrySkim.get<TH1>(HIST("skim/efficiencyMC"))->Fill(8., 1.);
1281- // }
1271+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (4 ., 1 .); // 1+3 (3+3) topology = 4 or 6 tracks
1272+ // if (nChargedDaughtersTau[0] + nChargedDaughtersTau[1] == fourTracks) { // 4
1273+ // registrySkim.get<TH1>(HIST("skim/efficiencyMC"))->Fill(5., 1.);
1274+ // } else if (nChargedDaughtersTau[0] + nChargedDaughtersTau[1] == sixTracks) { // 6
1275+ // registrySkim.get<TH1>(HIST("skim/efficiencyMC"))->Fill(6., 1.);
1276+ // }
12821277
12831278 if ((nChargedDaughtersTau[0 ] == oneProng) || // 1
12841279 (nChargedDaughtersTau[0 ] == threeProng && nChargedDaughtersTau[1 ] == threeProng)) // 3 and 3
@@ -1303,6 +1298,7 @@ struct TauThreeProngEventTableProducer {
13031298 double hadronicRate = -999 .;
13041299 int8_t bcSels[8 ] = {-99 , -99 , -99 , -99 , -99 , -99 , -99 , -99 };
13051300 uint8_t bcSelBits = 0 ;
1301+ const int nBitsMax = 8 ;
13061302 // zdc information - there is no information in MC
13071303 // float energyZNA = -999.;
13081304 // float energyZNC = -999.;
@@ -1350,7 +1346,7 @@ struct TauThreeProngEventTableProducer {
13501346 float trueDaugY[6 ] = {-998 ., -998 ., -998 ., -998 ., -998 ., -998 .};
13511347 float trueDaugZ[6 ] = {-998 ., -998 ., -998 ., -998 ., -998 ., -998 .};
13521348 int trueDaugPdgCode[6 ] = {-999 , -999 , -999 , -999 , -999 , -999 };
1353- // bool problem = false;
1349+
13541350 MyRecoProblem problem = NO_PROBLEM ;
13551351 registrySkim.get <TH1 >(HIST (" skim/problemMC" ))->Fill (NO_PROBLEM );
13561352
@@ -1360,14 +1356,19 @@ struct TauThreeProngEventTableProducer {
13601356 // 3 = pi+3pi
13611357 // 4 = 3pi+3pi
13621358
1363- if (nElec == oneProng && nPi == threeProng) // 1 + 3
1359+ if (nElec == oneProng && nPi == threeProng) { // 1 + 3
13641360 trueChannel = 1 ;
1365- else if (nMuon == oneProng && nPi == threeProng) // 1 + 3
1361+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (5 ., 1 .);
1362+ } else if (nMuon == oneProng && nPi == threeProng) { // 1 + 3
13661363 trueChannel = 2 ;
1367- else if (nPi == fourTracks) // 4
1364+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (6 ., 1 .);
1365+ } else if (nPi == fourTracks) { // 4
13681366 trueChannel = 3 ;
1369- else if (nPi == sixTracks) // 6
1367+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (7 ., 1 .);
1368+ } else if (nPi == sixTracks) { // 6
13701369 trueChannel = 4 ;
1370+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (8 ., 1 .);
1371+ }
13711372
13721373 // LOGF(info, "MC Coll global index %d", mccoll.globalIndex());
13731374 // LOGF(info, "2. <MC> UDMcCollision size %d, Collisions size %d, UDtracks %d, UDMcParticles %d", mcCollisions.size(), collisions.size(), tracks.size(), mcParticles.size());
@@ -1383,6 +1384,7 @@ struct TauThreeProngEventTableProducer {
13831384 if (collFromMcColls.size () > 0 ) { // get the truth and reco-level info
13841385 if (verbose)
13851386 LOGF (info, " --- MC Collision has reconstructed collision!" );
1387+ registrySkim.get <TH1 >(HIST (" skim/efficiencyMC" ))->Fill (9 ., 1 .);
13861388 // trueHasRecoColl = true;
13871389 // check there is exactly one reco-level collision associated to generated collision
13881390 if (collFromMcColls.size () > 1 ) {
@@ -1446,7 +1448,7 @@ struct TauThreeProngEventTableProducer {
14461448
14471449 const int offset = 1 ;
14481450 bcSelBits = bcSels[0 ]; // initialization
1449- for (int ibit = 1 ; ibit < 8 ; ibit++) {
1451+ for (int ibit = 1 ; ibit < nBitsMax ; ibit++) {
14501452 bcSelBits = (bcSelBits << offset); // shift by 1 position towards left
14511453 bcSelBits += bcSels[ibit]; // add next bit to the pool
14521454 }
@@ -1839,7 +1841,7 @@ struct TauThreeProngEventTableProducer {
18391841 continue ;
18401842 }
18411843
1842- registrySkim.get <TH1 >(HIST (" gen/efficiencyMC" ))->Fill (3 ., 1 .); // particles from tau in |eta|<=0.9
1844+ registrySkim.get <TH1 >(HIST (" gen/efficiencyMC" ))->Fill (3 ., 1 .); // charged particles from tau in |eta|<=0.9
18431845
18441846 registrySkim.get <TH1 >(HIST (" gen/nChPartMC" ))->Fill (nChargedDaughtersTau[0 ] + nChargedDaughtersTau[1 ]); // N charged particles from taus
18451847 // check number of charged particles in MC event
@@ -1850,11 +1852,6 @@ struct TauThreeProngEventTableProducer {
18501852 }
18511853
18521854 registrySkim.get <TH1 >(HIST (" gen/efficiencyMC" ))->Fill (4 ., 1 .); // 1+3 (3+3) topology = 4 or 6 tracks
1853- // if (nChargedDaughtersTau[0] + nChargedDaughtersTau[1] == fourTracks) { // 4
1854- // registrySkim.get<TH1>(HIST("gen/efficiencyMC"))->Fill(5., 1.);
1855- // } else if (nChargedDaughtersTau[0] + nChargedDaughtersTau[1] == sixTracks) { // 6
1856- // registrySkim.get<TH1>(HIST("gen/efficiencyMC"))->Fill(6., 1.);
1857- // }
18581855
18591856 if ((nChargedDaughtersTau[0 ] == oneProng) || // 1
18601857 (nChargedDaughtersTau[0 ] == threeProng && nChargedDaughtersTau[1 ] == threeProng)) // 3 and 3
0 commit comments