@@ -707,39 +707,39 @@ void CheckDROF(bool plot = false, bool write = false, const std::string& tracfil
707707 }
708708 }
709709
710- std ::vector < VertexInfo > vertexInfo ;
711- std ::cout << "** Creating vertices/particles correspondance ... " << std ::flush ;
712- for (int frame = 0 ; frame < recTree -> GetEntriesFast (); frame ++ ) { // Vertices frames
713- if (!recTree -> GetEvent (frame )) {
714- continue ;
715- }
716- int contLabIdx {0 }; // contributor labels are stored as flat vector
717- for (size_t iRecord {0 }; iRecord < recVerROFArr -> size (); ++ iRecord ) {
718- auto& rec = recVerROFArr -> at (iRecord );
719- auto verStartIdx = rec .getFirstEntry (), verSize = rec .getNEntries ();
720- for (int iVertex {rec .getFirstEntry ()}; iVertex < verStartIdx + verSize ; ++ iVertex ) {
721- auto& info = vertexInfo .emplace_back ();
722- info .vertex = recVerArr -> at (iVertex );
723- info .mainLabel = recVerLabelsArr -> at (contLabIdx );
724- info .purity = recVerPurityArr -> at (contLabIdx );
725- info .event = info .mainLabel .getEventID ();
726- ++ contLabIdx ;
727- if (info .mainLabel .isSet ()) {
728- const auto& ir = irs [info .event ];
729- // LOGP(info, "iROF={} {} to {}", iRecord, info.mainLabel.asString(), ir.asString());
730- if (!ir .isDummy ()) {
731- info .bcInROF = (ir .toLong () - roFrameBiasInBC ) % roFrameLengthInBC ;
732- info .rofId = (ir .toLong () - roFrameBiasInBC ) / roFrameLengthInBC ;
710+ //////////////////////
711+ // DROF Vertices
712+ if constexpr (false) {
713+ std ::vector < VertexInfo > vertexInfo ;
714+ std ::cout << "** Creating vertices/particles correspondance ... " << std ::flush ;
715+ for (int frame = 0 ; frame < recTree -> GetEntriesFast (); frame ++ ) { // Vertices frames
716+ if (!recTree -> GetEvent (frame )) {
717+ continue ;
718+ }
719+ int contLabIdx {0 }; // contributor labels are stored as flat vector
720+ for (size_t iRecord {0 }; iRecord < recVerROFArr -> size (); ++ iRecord ) {
721+ auto& rec = recVerROFArr -> at (iRecord );
722+ auto verStartIdx = rec .getFirstEntry (), verSize = rec .getNEntries ();
723+ for (int iVertex {rec .getFirstEntry ()}; iVertex < verStartIdx + verSize ; ++ iVertex ) {
724+ auto& info = vertexInfo .emplace_back ();
725+ info .vertex = recVerArr -> at (iVertex );
726+ info .mainLabel = recVerLabelsArr -> at (contLabIdx );
727+ info .purity = recVerPurityArr -> at (contLabIdx );
728+ info .event = info .mainLabel .getEventID ();
729+ ++ contLabIdx ;
730+ if (info .mainLabel .isSet ()) {
731+ const auto& ir = irs [info .event ];
732+ // LOGP(info, "iROF={} {} to {}", iRecord, info.mainLabel.asString(), ir.asString());
733+ if (!ir .isDummy ()) {
734+ info .bcInROF = (ir .toLong () - roFrameBiasInBC ) % roFrameLengthInBC ;
735+ info .rofId = (ir .toLong () - roFrameBiasInBC ) / roFrameLengthInBC ;
736+ }
733737 }
734738 }
735739 }
736740 }
737- }
738- std ::cout << "done ." << std ::endl ;
741+ std ::cout << "done ." << std ::endl ;
739742
740- //////////////////////
741- // DROF Vertices
742- {
743743 auto hMCVtxZ = new TH1F ("hMCVtxZ ", "MC Vertex;Z" , 50 , -16 , 16 );
744744 auto hReVtxZ = new TH1F ("hRecoVtxZ ", "Reco Vertex;Z" , 50 , -16 , 16 );
745745
@@ -891,7 +891,7 @@ void CheckDROF(bool plot = false, bool write = false, const std::string& tracfil
891891 fOut -> Close ();
892892 }
893893 } else {
894- auto fWO = TFile ::Open ("checkDROF_wo .root ");
894+ auto fWO = TFile ::Open ("checkDROF_w_new .root ");
895895 auto f = TFile ::Open ("checkDROF_w.root" );
896896 plotHistos (fWO , f , "" );
897897 plotHistos (fWO , f , "Val" );
0 commit comments