@@ -54,11 +54,16 @@ void CheckTopologiesIOTOF(const char* topoFileName = "TF3ClusterTopologies.root"
5454 int nPixelsB = b .second .mNPixels ;
5555 int frequencyA = a .second .mFrequency ;
5656 int frequencyB = b .second .mFrequency ;
57- if (topoA != topoB ) return topoA < topoB ;
58- if (frequencyA != frequencyB ) return frequencyA > frequencyB ;
59- if (spanRowA != spanRowB ) return spanRowA < spanRowB ;
60- if (spanColA != spanColB ) return spanColA < spanColB ;
61- if (nPixelsA != nPixelsB ) return nPixelsA < nPixelsB ;
57+ if (topoA != topoB )
58+ return topoA < topoB ;
59+ if (frequencyA != frequencyB )
60+ return frequencyA > frequencyB ;
61+ if (spanRowA != spanRowB )
62+ return spanRowA < spanRowB ;
63+ if (spanColA != spanColB )
64+ return spanColA < spanColB ;
65+ if (nPixelsA != nPixelsB )
66+ return nPixelsA < nPixelsB ;
6267 return a .first < b .first ; // Finally sort by bitmask if spans are equal
6368 });
6469
@@ -81,9 +86,9 @@ void CheckTopologiesIOTOF(const char* topoFileName = "TF3ClusterTopologies.root"
8186
8287 // Topology names
8388 const std ::array < std ::string , kNTopologies > topologyNames = {
84- "kSingleDigit" , "kLineOnRow" , "kLineOnCol" , "kSquare" , "kRectangle" , "kDiagonal" ,
85- "kLowerTriangleLeft" , "kLowerTriangleRight" , "kUpperTriangleLeft" , "kUpperTriangleRight" ,
86- "kSnake" , "kSnakeRefl" , "kSnakeRot90" , "kSnakeRot90Refl" , "kHuge" , "kOther" };
89+ "kSingleDigit" , "kLineOnRow" , "kLineOnCol" , "kSquare" , "kRectangle" , "kDiagonal" ,
90+ "kLowerTriangleLeft" , "kLowerTriangleRight" , "kUpperTriangleLeft" , "kUpperTriangleRight" ,
91+ "kSnake" , "kSnakeRefl" , "kSnakeRot90" , "kSnakeRot90Refl" , "kHuge" , "kOther" };
8792
8893 // Create output ROOT file
8994 auto* outFile = TFile ::Open (outFileName , "RECREATE ");
@@ -113,7 +118,7 @@ void CheckTopologiesIOTOF(const char* topoFileName = "TF3ClusterTopologies.root"
113118 float maxRowCoord = chipInfo .PitchRow * (spanRow + 0.5 );
114119 float minColCoord = -1.5 * chipInfo .PitchCol ;
115120 float maxColCoord = chipInfo .PitchCol * (spanCol + 0.5 );
116- TH2F * hTopoDisplay = new TH2F (Form ("spanRow_%i_spanCol_%i_key_%i_all" , spanRow , spanCol , topoKey ), Form ("Cluster Topology %s;Row;Column" , topoName .c_str ()),
121+ TH2F * hTopoDisplay = new TH2F (Form ("spanRow_%i_spanCol_%i_key_%i_all" , spanRow , spanCol , topoKey ), Form ("Cluster Topology %s;Row;Column" , topoName .c_str ()),
117122 spanRow + 2 , minRowCoord , maxRowCoord , spanCol + 2 , minColCoord , maxColCoord );
118123
119124 // One-point TGraph for COG
@@ -125,12 +130,12 @@ void CheckTopologiesIOTOF(const char* topoFileName = "TF3ClusterTopologies.root"
125130 gTopoCOG -> SetMarkerStyle (20 );
126131 gTopoCOG -> SetMarkerColor (kBlue );
127132
128- // Loop over the bits of bitmask and fill the histogram
133+ // Loop over the bits of bitmask and fill the histogram
129134 for (int row = 0 ; row < spanRow ; ++ row ) {
130135 for (int col = 0 ; col < spanCol ; ++ col ) {
131136 int bitIndex = row * spanCol + col ;
132137 if (bitmask & (1 << bitIndex )) {
133- hTopoDisplay -> SetBinContent (row + 2 , col + 2 , frequency );
138+ hTopoDisplay -> SetBinContent (row + 2 , col + 2 , frequency );
134139 }
135140 }
136141 }
0 commit comments