#include "honlinemonhist.h" #include "honlinehistarray.h" #include "honlinetrendhist.h" #include "haddef.h" #include "htrbnetdebuginfo.h" #include "hcategory.h" #include "hstartdef.h" #include "hstart2raw.h" #include "hstart2cal.h" #include "htboxchan.h" #include "helpers.h" #include "TList.h" #include "TString.h" #include #include using namespace std; map < TString , HOnlineMonHistAddon* > startMap; #define START_MODULES 9 #define START_STRIPS 60 const Float_t HodoTimeCut_start = 80.; struct startP { HOnlineMonHistAddon* hLatch_Trend = 0; HOnlineMonHistAddon* hLatch_TrendTemp = 0; HOnlineMonHistAddon* hLatch_Norm = 0; HOnlineMonHistAddon* hLatch_Mult = 0; HOnlineMonHistAddon* hScalers_Trend = 0; HOnlineMonHistAddon* hScalers_TrendTemp = 0; HOnlineMonHistAddon* hTrbNetDebug = 0; HOnlineMonHistAddon* hStart_Raw_Mod_Strip = 0; HOnlineMonHistAddon* hStart_Cal_Mod_Strip = 0; HOnlineMonHistAddon* hStart_Raw_Mult = 0; HOnlineMonHistAddon* hStart_Raw_Mult_All = 0; HOnlineMonHistAddon* hStart_Cal_Mult_All = 0; HOnlineMonHistAddon* hStart_Raw_Width = 0; HOnlineMonHistAddon* hStart_Raw_Times = 0; HOnlineMonHistAddon* hStart_Cal_TimeDiff = 0; HOnlineMonHistAddon* hStart_Cal_XY = 0; HOnlineMonHistAddon* hStart_EventID = 0; HOnlineMonHistAddon* hStartHodoRawXY_LR = 0; HOnlineMonHistAddon* hHodoRawXY_StartX = 0; HOnlineMonHistAddon* hHodoRawXY_StartY = 0; HOnlineMonHistAddon* hHodoRawXY_StartXY = 0; HOnlineMonHistAddon* hHodoRawXY_Ratio_XY_X = 0; HOnlineMonHistAddon* hHodoRawXY_Ratio_XY_Y = 0; HOnlineMonHistAddon* hStartTDiffVsToT = 0; HOnlineMonHistAddon* hStartRawXY = 0; HOnlineMonHistAddon* hStartRawX = 0; HOnlineMonHistAddon* hStartRawY = 0; HOnlineMonHistAddon* hStartRawX_ToT = 0; HOnlineMonHistAddon* hStartRawY_ToT = 0; HOnlineMonHistAddon* ZPrimeNoCuts = 0; HOnlineMonHistAddon* ZPrimeTargetCut=0; HOnlineMonHistAddon* ZPrimeShoulderCut=0; HOnlineMonHistAddon* hStart_beamSpot=0; HOnlineMonHistAddon* hStart_clustSizeMult=0; HOnlineMonHistAddon* hStart_clustSize=0; HOnlineMonHistAddon* hStart_CalHits_Mult=0; HOnlineMonHistAddon* hStart_CalClus_Mult=0; HOnlineMonHistAddon* hStart_CalHits_tDiff=0; HOnlineMonHistAddon* hStart_Veto_tot=0; HOnlineMonHistAddon* hStartTimes=0; HOnlineMonHistAddon* hStartTimesRaw=0; HOnlineMonHistAddon* hStart_Veto_tdiff0=0; HOnlineMonHistAddon* hStart_Veto_tdiff1=0; HOnlineMonHistAddon* hStart_Veto_tdiff=0; HOnlineMonHistAddon* hStart_beamProf=0; }; startP* pS; Bool_t createHistStart(TList& histpool){ mapHolder::setMap(startMap); // make startMap currentMap //####################### USER CODE ############################################## // define monitoring hists // IF NUMBER OF MODULES OR STRIPS CHANGE , SIZES HAVE TO BE ADAPTED! const Char_t* hists[] = { "FORMAT#trendarray TYPE#1F NAME#hLatch_Trend TITLE#_hLatch_TBit ACTIVE#1 RESET#0 REFRESH#1000 BIN#50:0:50:0:0:0 SIZE#1:32 AXIS#time:counts:no DIR#no OPT#l STATS#0 LOG#0:0:0 GRID#0:1 LINE#0:0 FILL#0:0 MARKER#1:20:0.5 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#hLatch_TrendTemp TITLE#_hLatch_TBit ACTIVE#1 RESET#0 REFRESH#500000 BIN#32:0:32:0:0:0 SIZE#0:0 AXIS#TBit:multiplicity:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:1 LINE#0:0 FILL#0:0 MARKER#1:20:0.5 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#hLatch_Norm TITLE#_hLatch_Norm ACTIVE#1 RESET#1 REFRESH#5000 BIN#32:0:32:0:0:0 SIZE#0:0 AXIS#TBit:multiplicity:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:1 LINE#0:0 FILL#1:0 MARKER#1:20:0.5 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#hLatch_Mult TITLE#_hLatch_Mult ACTIVE#1 RESET#1 REFRESH#5000 BIN#10:0:10:0:0:0 SIZE#0:0 AXIS#multiplicity:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:1 LINE#0:0 FILL#1:0 MARKER#1:20:0.5 RANGE#-99:-99" ,"FORMAT#trendarray TYPE#1F NAME#hScalers_Trend TITLE#_hScalers_Trend ACTIVE#1 RESET#0 REFRESH#2000 BIN#50:0:50:0:0:0 SIZE#1:135 AXIS#trend:multiplicity:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:1 LINE#1:0 FILL#1:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#hScalers_TrendTemp TITLE#_hScalers_Int ACTIVE#1 RESET#0 REFRESH#50000 BIN#135:0:135:0:0:0 SIZE#0:0 AXIS#scaler:multiplicity:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:1 LINE#0:0 FILL#0:0 MARKER#1:20:0.5 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hTrbNetDebug TITLE#hTrbNetDebug ACTIVE#1 RESET#1 REFRESH#50000 BIN#32:0:32 SIZE#1:27 AXIS#Bit:counts:counts DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#1:0 MARKER#1:20:0.5 RANGE#-99:-99" // depends on mod+strip //,"FORMAT#mon TYPE#2F NAME#hStart_Raw_Mod_Strip TITLE#hStart_Raw_Mod_Strip ACTIVE#1 RESET#1 REFRESH#5000 BIN#5:0:4:16:0:16 SIZE#0:0 AXIS#module:strip:counts DIR#no OPT#LEGO2 STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#mon TYPE#2F NAME#hStart_Cal_Mod_Strip TITLE#hStart_Cal_Mod_Strip ACTIVE#1 RESET#1 REFRESH#5000 BIN#5:0:4:16:0:16 SIZE#0:0 AXIS#module:strip:counts DIR#no OPT#LEGO2 STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_Raw_Mod_Strip TITLE#hStart_Raw_Mod_Strip ACTIVE#1 RESET#1 REFRESH#5000 BIN#9:0:9:60:0:60 SIZE#0:0 AXIS#module:strip:counts DIR#no OPT#colz STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_Cal_Mod_Strip TITLE#hStart_Cal_Mod_Strip ACTIVE#1 RESET#1 REFRESH#5000 BIN#9:0:9:60:0:60 SIZE#0:0 AXIS#module:strip:counts DIR#no OPT#colz STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#array TYPE#1F NAME#hStart_Raw_Mult TITLE#hStart_Raw_Mult ACTIVE#1 RESET#1 REFRESH#5000 BIN#10:0:10:0:0:0 SIZE#5:16 AXIS#nr_of_times:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#array TYPE#1F NAME#hStart_Raw_Mult_All TITLE#hStart_Raw_Mult_All ACTIVE#1 RESET#1 REFRESH#5000 BIN#16:0:16:0:0:0 SIZE#1:5 AXIS#nr_of_strips:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#array TYPE#1F NAME#hStart_Cal_Mult_All TITLE#hStart_Cal_Mult_All ACTIVE#1 RESET#1 REFRESH#5000 BIN#16:0:16:0:0:0 SIZE#1:5 AXIS#nr_of_strips:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#array TYPE#1F NAME#hStart_Raw_Width TITLE#hStart_Raw_Width ACTIVE#1 RESET#1 REFRESH#5000 BIN#501:-10:5000:0:0:0 SIZE#5:16 AXIS#width:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#array TYPE#1F NAME#hStart_Raw_Times TITLE#hStart_Raw_Times ACTIVE#1 RESET#1 REFRESH#5000 BIN#600:-40000:20000:0:0:0 SIZE#5:16 AXIS#width:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" //,"FORMAT#array TYPE#1F NAME#hStart_Cal_TimeDiff TITLE#_hStart_Cal_TimeDiff ACTIVE#1 RESET#1 REFRESH#5000 BIN#500:-5000:5000:0:0:0 SIZE#80:80 AXIS#timedifference:counts:no DIR#no OPT#0 STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#1:20:0.5 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_Raw_Mult TITLE#hStart_Raw_Mult ACTIVE#1 RESET#1 REFRESH#5000 BIN#10:0:10:0:0:0 SIZE#9:60 AXIS#nr_of_times:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_Raw_Mult_All TITLE#hStart_Raw_Mult_All ACTIVE#1 RESET#1 REFRESH#5000 BIN#48:0:48:0:0:0 SIZE#1:9 AXIS#nr_of_strips:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_Cal_Mult_All TITLE#hStart_Cal_Mult_All ACTIVE#1 RESET#1 REFRESH#5000 BIN#48:0:48:0:0:0 SIZE#1:9 AXIS#nr_of_strips:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_Raw_Width TITLE#hStart_Raw_Width ACTIVE#1 RESET#1 REFRESH#5000 BIN#501:-10:5000:0:0:0 SIZE#9:60 AXIS#width:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_Raw_Times TITLE#hStart_Raw_Times ACTIVE#1 RESET#1 REFRESH#5000 BIN#600:-40000:20000:0:0:0 SIZE#9:60 AXIS#width:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" // ,"FORMAT#array TYPE#1F NAME#hStart_Cal_TimeDiff TITLE#_hStart_Cal_TimeDiff ACTIVE#1 RESET#1 REFRESH#5000 BIN#500:-5000:5000:0:0:0 SIZE#432:432 AXIS#timedifference:counts:no DIR#no OPT#0 STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#1:20:0.5 RANGE#-99:-99" // JAM2021: the above histogram arrays works with such boundaries, but is still a lot of overhead (memory!). Disable this for the moment. later we could plot only strip time differences that are reasonable. // depends on strip //,"FORMAT#mon TYPE#2F NAME#hStart_Cal_XY TITLE#Start_Cal_XY ACTIVE#1 RESET#1 REFRESH#1000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#X:Y:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_Cal_XY TITLE#Start_Cal_XY ACTIVE#1 RESET#1 REFRESH#1000 BIN#60:0:60:60:0:60 SIZE#0:0 AXIS#X:Y:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" // ,"FORMAT#mon TYPE#1F NAME#hStart_EventID TITLE#Event_ID ACTIVE#1 RESET#1 REFRESH#5000 BIN#16:0:16:0:0:0 SIZE#0:0 AXIS#no:counts:no DIR#no OPT#no STATS#0 LOG#0:1:0 GRID#1:0 LINE#0:0 FILL#2:0 MARKER#0:0:0 RANGE#-99:-99" //by Willy and Vadym (implemented by L.Ch.) ,"FORMAT#mon TYPE#2F NAME#hStartHodoRawXY_LR TITLE#StartHodoRawXY_LR ACTIVE#1 RESET#1 REFRESH#10000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#stripX:stripY:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:1 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hHodoRawXY_StartX TITLE#HodoRawXY_StartX ACTIVE#1 RESET#1 REFRESH#10000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#stripX:stripY:counts DIR#no OPT#TEXT,COLZ STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hHodoRawXY_StartY TITLE#HodoRawXY_StartY ACTIVE#1 RESET#1 REFRESH#10000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#stripX:stripY:counts DIR#no OPT#TEXT,COLZ STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hHodoRawXY_StartXY TITLE#HodoRawXY_StartXY ACTIVE#1 RESET#1 REFRESH#10000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#stripX:stripY:counts DIR#no OPT#TEXT,COLZ STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hHodoRawXY_Ratio_XY_X TITLE#HodoRawXY_Ratio_XY_X ACTIVE#1 RESET#1 REFRESH#10000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#stripX:stripY:counts DIR#no OPT#TEXT,COLZ STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hHodoRawXY_Ratio_XY_Y TITLE#HodoRawXY_Ratio_XY_Y ACTIVE#1 RESET#1 REFRESH#10000 BIN#16:0:16:16:0:16 SIZE#0:0 AXIS#stripX:stripY:counts DIR#no OPT#TEXT,COLZ STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#2F NAME#hStartTDiffVsToT TITLE#StartTDiffVsToT ACTIVE#1 RESET#1 REFRESH#50000 BIN#70:0:35:200:-10:10 SIZE#2:10 AXIS#ToT:Tdiff:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStartRawXY TITLE#StartRawXY ACTIVE#1 RESET#1 REFRESH#10000 BIN#50:0:50:60:0:60 SIZE#0:0 AXIS#X:Y:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#hStartRawX TITLE#StartRawX ACTIVE#1 RESET#1 REFRESH#10000 BIN#96:0:96:0:0:0 SIZE#0:0 AXIS#strip:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#hStartRawY TITLE#StartRawY ACTIVE#1 RESET#1 REFRESH#10000 BIN#96:0:96:0:0:0 SIZE#0:0 AXIS#strip:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStartRawX_ToT TITLE#StartRawX_ToT ACTIVE#1 RESET#1 REFRESH#50000 BIN#98:0:98:35:0:35 SIZE#0:0 AXIS#strip:ToT:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStartRawY_ToT TITLE#StartRawY_ToT ACTIVE#1 RESET#1 REFRESH#50000 BIN#98:0:98:35:0:35 SIZE#0:0 AXIS#strip:ToT:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#ZPrimeNoCuts TITLE#ZPrimeNoCuts ACTIVE#1 RESET#1 REFRESH#50000 BIN#350:-300:50:0:0:0 SIZE#0:0 AXIS#zPrime(mm):no:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#ZPrimeTargetCut TITLE#ZPrimeTargetCut ACTIVE#1 RESET#1 REFRESH#50000 BIN#350:-300:50:0:0:0 SIZE#0:0 AXIS#zPrime(mm):no:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#1F NAME#ZPrimeShoulderCut TITLE#ZPrimeShoulderCut ACTIVE#1 RESET#1 REFRESH#50000 BIN#350:-300:50:0:0:0 SIZE#0:0 AXIS#zPrime(mm):no:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" // for feb24, can merge with previously exsisting later ,"FORMAT#mon TYPE#2F NAME#hStart_beamSpot TITLE#beamSpot ACTIVE#1 RESET#1 REFRESH#5000 BIN#20:0:20:20:0:20 SIZE#0:0 AXIS#X:Y:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_clustSizeMult TITLE#hitMultiplicity ACTIVE#1 RESET#1 REFRESH#5000 BIN#4:0:4:20:0:20 SIZE#0:0 AXIS#Module:hit_size:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_clustSize TITLE#clusterSizeHitsTimeWindow5 ACTIVE#1 RESET#1 REFRESH#5000 BIN#4:0:4:10:0:10 SIZE#0:0 AXIS#Module:cluster_size:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_CalHits_Mult TITLE#Start_CalHits_Mult ACTIVE#1 RESET#1 REFRESH#5000 BIN#48:0:48:0:0:0 SIZE#1:4 AXIS#nr_of_hits:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_CalClus_Mult TITLE#Start_CalClus_Mult ACTIVE#1 RESET#1 REFRESH#5000 BIN#10:0:10:0:0:0 SIZE#1:4 AXIS#nr_of_clus:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_CalHits_tDiff TITLE#hStart_CalHits_tDiffNeighbors ACTIVE#1 RESET#1 REFRESH#15000 BIN#800:0:400:0:0:0 SIZE#1:4 AXIS#dT ns:counts:no DIR#no OPT#no STATS#0 LOG#0:1:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_Veto_tot TITLE#TotAllChannels ACTIVE#1 RESET#1 REFRESH#50000 BIN#80:0:80:40:0:20 SIZE#0:0 AXIS#mod*20+strip:tot:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStartTimes TITLE#hStartTimes ACTIVE#1 RESET#1 REFRESH#50000 BIN#80:0:80:50:-200:200 SIZE#0:0 AXIS#mod*20+strip:TimeOfArrival:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStartTimesRaw TITLE#hStartTimesRaw ACTIVE#1 RESET#1 REFRESH#25000 BIN#80:0:80:250:-2500:1500 SIZE#0:0 AXIS#mod*20+strip:TimeOfArrival:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_Veto_tdiff0 TITLE#tdiff_mod01_allClust ACTIVE#1 RESET#1 REFRESH#50000 BIN#80:0:80:1001:-100:100 SIZE#0:0 AXIS#mod*20+strip:t_diff ns:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#mon TYPE#2F NAME#hStart_Veto_tdiff1 TITLE#tdiff_mod1_closestClust ACTIVE#1 RESET#1 REFRESH#50000 BIN#80:0:80:201:-20:20 SIZE#0:0 AXIS#mod*20+strip:t_diff ns:counts DIR#no OPT#COLZ STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#2F NAME#hStart_Veto_tdiff TITLE#tdiff_vetoX_startAllClust ACTIVE#1 RESET#1 REFRESH#1000 BIN#40:0:40:4001:-100:100 SIZE#1:4 AXIS#mod*20+strip:t_diff ns:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#0:0 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" ,"FORMAT#array TYPE#1F NAME#hStart_beamProf TITLE#beamProfile_mod ACTIVE#1 RESET#1 REFRESH#5000 BIN#20:0:20:0:0:0 SIZE#1:4 AXIS#strip:counts:no DIR#no OPT#no STATS#0 LOG#0:0:0 GRID#1:1 LINE#0:0 FILL#0:0 MARKER#0:0:0 RANGE#-99:-99" }; //############################################################################### // create hists and add them to the pool mapHolder::createHists(sizeof(hists)/sizeof(Char_t*),hists,histpool); Int_t colorsLatch[6] = {2,4,6,8}; Int_t colorsScal[80] = {2,4,6,8,20,24,38,46, //8 2,4,6,8,20,24,38,46, //16 2,4,6,8,38,46, //22 2,4,6,8,38,46, //28 2,4,6,8, //32 2,4, //34 2,4,6,8, //38 2,4,6,8,20,24,38,46,50, //56 1,1,1,1,1,1,1,1, //64 1,1,1,1,1,1,1,1, //72 1,1,1,1,1,1,1,1 //80 }; TString titleDebug[27] = {"UNKNOWN", "START", "RICH_1", "RICH_2", "RICH_3", "inner_MDC_1", "inner_MDC_2", "inner_MDC_3", "inner_MDC_4", "inner_MDC_5", "inner_MDC_6", "outer_MDC_1", "outer_MDC_2", "outer_MDC_3", "outer_MDC_4", "outer_MDC_5", "outer_MDC_6", "Shower_1","Shower_2","Shower_3","Shower_4","Shower_5","Shower_6", "RPC_1","RPC_2","TOF","WALL"}; TString titleScaler[70] = {"Start_1","Start_2","Start_3", "Start_4","Start_5","Start_6","Start_7","Start_8", "Veto_1","Veto_2","Veto_3", "Veto_4","Veto_5","Veto_6","Veto_7","Veto_8", "TOF_1","TOF_2","TOF_3", "TOF_4","TOF_5","TOF_6", "RPC_1","RPC_2","RPC_3", "RPC_4","RPC_5","RPC_6", "PT1","PT2","PT3","PT4", "DS_Start_OR","DS_Veto_OR", "DS_Mult_TOFRPC_1","DS_Mult_TOFRPC_2","DS_Mult_TOFRPC_3","DS_Mult_TOFRPC_4","DS_Mult_TOFRPC_5", "DS_Mult_TOFRPC_6","DS_Mult_TOFRPC_7","DS_Mult_TOFRPC_8","DS_Mult_TOFRPC_9", "DS_PT1","DS_PT2","DS_PT3","DS_PT4", "DS_Start_OR","DS_Veto_OR", "ACC_Mult_TOFRPC_1","ACC_Mult_TOFRPC_2","ACC_Mult_TOFRPC_3","ACC_Mult_TOFRPC_4","ACC_Mult_TOFRPC_5", "ACC_Mult_TOFRPC_6","ACC_Mult_TOFRPC_7","ACC_Mult_TOFRPC_8","ACC_Mult_TOFRPC_9", "ACC_PT1","ACC_PT2","ACC_PT3","ACC_PT4","","","","","","","",""}; TString evtids[]={ "sim", //0 "real", //1 "start", //2 "stop", //3 "", //4 "", //5 "", //6 "", //7 "", //8 "Mcal" , //9 "SHcal", //10 "SHped", //11 "RIped", //12 "", //13 "CTS", //14 "" //15 }; pS = new startP(); pS->hLatch_Trend = get("hLatch_Trend"); pS->hLatch_TrendTemp = get("hLatch_TrendTemp"); pS->hLatch_Norm = get("hLatch_Norm"); pS->hLatch_Mult = get("hLatch_Mult"); pS->hScalers_Trend = get("hScalers_Trend"); pS->hScalers_TrendTemp = get("hScalers_TrendTemp"); pS->hTrbNetDebug = get("hTrbNetDebug"); pS->hStart_Raw_Mod_Strip = get("hStart_Raw_Mod_Strip"); pS->hStart_Cal_Mod_Strip = get("hStart_Cal_Mod_Strip"); pS->hStart_Raw_Mult = get("hStart_Raw_Mult"); pS->hStart_Raw_Mult_All = get("hStart_Raw_Mult_All"); pS->hStart_Cal_Mult_All = get("hStart_Cal_Mult_All"); pS->hStart_Raw_Width = get("hStart_Raw_Width"); pS->hStart_Raw_Times = get("hStart_Raw_Times"); //pS->hStart_Cal_TimeDiff = get("hStart_Cal_TimeDiff"); pS->hStart_Cal_XY = get("hStart_Cal_XY"); pS->hStart_EventID = get("hStart_EventID"); pS->hStartHodoRawXY_LR = get("hStartHodoRawXY_LR"); pS->hHodoRawXY_StartX = get("hHodoRawXY_StartX"); pS->hHodoRawXY_StartY = get("hHodoRawXY_StartY"); pS->hHodoRawXY_StartXY = get("hHodoRawXY_StartXY"); pS->hHodoRawXY_Ratio_XY_X = get("hHodoRawXY_Ratio_XY_X"); pS->hHodoRawXY_Ratio_XY_Y = get("hHodoRawXY_Ratio_XY_Y"); pS->hStartTDiffVsToT = get("hStartTDiffVsToT"); pS->hStartRawXY = get("hStartRawXY"); pS->hStartRawX = get("hStartRawX"); pS->hStartRawY = get("hStartRawY"); pS->hStartRawX_ToT = get("hStartRawX_ToT"); pS->hStartRawY_ToT = get("hStartRawY_ToT"); pS->ZPrimeNoCuts = get("ZPrimeNoCuts"); pS->ZPrimeTargetCut = get("ZPrimeTargetCut"); pS->ZPrimeShoulderCut = get("ZPrimeShoulderCut"); pS->hStart_beamSpot = get("hStart_beamSpot"); pS->hStart_clustSizeMult = get("hStart_clustSizeMult"); pS->hStart_clustSize = get("hStart_clustSize"); pS->hStart_CalHits_Mult = get("hStart_CalHits_Mult"); pS->hStart_CalClus_Mult = get("hStart_CalClus_Mult"); pS->hStart_CalHits_tDiff = get("hStart_CalHits_tDiff"); pS->hStart_Veto_tot = get("hStart_Veto_tot"); pS->hStartTimes = get("hStartTimes"); pS->hStartTimesRaw = get("hStartTimesRaw"); pS->hStart_Veto_tdiff0 = get("hStart_Veto_tdiff0"); pS->hStart_Veto_tdiff1 = get("hStart_Veto_tdiff1"); pS->hStart_Veto_tdiff = get("hStart_Veto_tdiff"); pS->hStart_beamProf = get("hStart_beamProf"); HOnlineMonHistAddon* addon = 0; if((addon = pS->hStart_EventID)) { addon->getP()->SetFillColor(colorsLatch[0]); for (Int_t i=0;igetP()->GetNbinsX();i++){ addon->getP()->GetXaxis()->SetBinLabel(i+1,evtids[i].Data()); } addon->getP()->LabelsOption("v"); addon->getP()->GetXaxis()->SetLabelSize(0.05); } if((addon = pS->hLatch_Trend)) { for(Int_t s = 0; s < 4; s ++){ addon->getP(0,s)->SetLineColor(colorsLatch[s]); addon->getP(0,s)->SetFillColor(colorsLatch[s]); addon->getP(0,s+11)->SetLineColor(colorsLatch[s]); addon->getP(0,s+11)->SetFillColor(colorsLatch[s]); } } if((addon = pS->hLatch_Mult)) { addon->getP()->SetFillColor(colorsLatch[0]); } if((addon = pS->hLatch_Norm)) { addon->getP()->SetFillColor(colorsLatch[1]); } if((addon = pS->hScalers_Trend)) { for(Int_t s = 0; s < 70; s ++){ addon->getP(0,s)->SetLineColor(2); addon->getP(0,s)->SetFillColor(4); //addon->getP(0,s)->SetLineColor(colorsScal[s]); //addon->getP(0,s)->SetFillColor(colorsScal[s]); addon->getP(0,s)->SetTitle(titleScaler[s]); } } if(NULL != (addon = pS->hStart_Raw_Mult_All) ){ for(Int_t m = 0; m < START_MODULES; m ++){ addon->getP(0,m)->SetLineWidth(2); addon->getP(0,m)->SetLineColor(colorsScal[m]); } } if(NULL != (addon = pS->hStart_Cal_Mult_All) ){ for(Int_t m = 0; m < START_MODULES; m ++){ addon->getP(0,m)->SetLineWidth(2); addon->getP(0,m)->SetLineColor(colorsScal[m]); } } if((addon = pS->hStart_CalHits_Mult) ){ TLegend* leg = new TLegend(0.74,0.78,0.98,0.93,"","brNDC"); leg->AddEntry(pS->hStart_CalHits_Mult->getP(0,0),"module 1","lpf"); leg->AddEntry(pS->hStart_CalHits_Mult->getP(0,1),"module 2","lpf"); leg->AddEntry(pS->hStart_CalHits_Mult->getP(0,3),"veto","lpf"); pS->hStart_CalHits_Mult->setLegend(leg); if (pS->hStart_CalHits_tDiff) pS->hStart_CalHits_tDiff->setLegend(leg); if(pS->hStart_CalClus_Mult) pS->hStart_CalClus_Mult->setLegend(leg); for(Int_t m = 0; m < 4; m ++){ addon->getP(0,m)->SetLineWidth(2); addon->getP(0,m)->SetLineColor(colorsScal[m]); addon->getP(0,m)->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.065); addon->getP()->GetYaxis()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } } if((addon = pS->hStart_CalClus_Mult) ){ for(Int_t m = 0; m < 4; m ++){ addon->getP(0,m)->SetLineWidth(2); addon->getP(0,m)->SetLineColor(colorsScal[m]); addon->getP(0,m)->SetTitleSize(0.065); addon->getP(0,m)->GetXaxis()->SetTitleSize(0.065); addon->getP(0,m)->GetYaxis()->SetTitleSize(0.065); addon->getP(0,m)->GetXaxis()->SetTitleOffset(0.8); addon->getP(0,m)->GetYaxis()->SetTitleOffset(0.9); } } if((addon = pS->hStart_CalHits_tDiff) ){ for(Int_t m = 0; m < 4; m ++){ addon->getP(0,m)->SetLineWidth(2); addon->getP(0,m)->SetLineColor(colorsScal[m]); addon->getP(0,m)->SetTitleSize(0.065); addon->getP(0,m)->GetXaxis()->SetTitleSize(0.065); addon->getP(0,m)->GetYaxis()->SetTitleSize(0.065); addon->getP(0,m)->GetXaxis()->SetTitleOffset(0.8); addon->getP(0,m)->GetYaxis()->SetTitleOffset(0.9); } } if((addon = pS->hStart_Raw_Mult)) { for(Int_t m = 0; m < START_MODULES; m ++){ for(Int_t s = 0; s < START_STRIPS; s ++){ addon->getP(m,s)->SetLineColor(colorsScal[s+16]); addon->getP(m,s)->SetFillColor(colorsScal[s+16]); } } } if((addon = pS->hStart_Raw_Width)) { for(Int_t m = 0; m < START_MODULES; m ++){ for(Int_t s = 0; s < START_STRIPS; s ++){ addon->getP(m,s)->SetLineColor(colorsScal[s+16]); addon->getP(m,s)->SetFillColor(colorsScal[s+16]); } } } if((addon = pS->hStart_Raw_Times)) { for(Int_t m = 0; m < START_MODULES; m ++){ for(Int_t s = 0; s < START_STRIPS; s ++){ addon->getP(m,s)->SetLineColor(colorsScal[s+16]); addon->getP(m,s)->SetFillColor(colorsScal[s+16]); } } } if((addon = pS->hTrbNetDebug)) { for(Int_t s = 0; s < 27; s ++){ addon->getP(0,s)->SetLineColor(1); addon->getP(0,s)->SetFillColor(2); addon->getP(0,s)->SetTitle(titleDebug[s]); } } if ((addon = pS->hStart_beamProf)){ for(Int_t s = 0; s < 4; s ++){ TString newTitle = Form("beamProfile_mod%d",s); addon->getP(0,s)->SetTitle(newTitle); addon->getP(0,s)->SetTitleSize(0.065); //addon->getP(0,s)->SetLineWidth(2); addon->getP(0,s)->GetXaxis()->SetTitleSize(0.055); addon->getP(0,s)->GetYaxis()->SetTitleSize(0.055); addon->getP(0,s)->GetXaxis()->SetTitleOffset(0.8); addon->getP(0,s)->GetYaxis()->SetTitleOffset(0.9); } } if ((addon = pS->hStart_beamSpot)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStart_clustSizeMult)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStart_clustSize)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStart_Veto_tot)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStartTimes)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStartTimesRaw)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStart_Veto_tdiff0)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStart_Veto_tdiff1)){ addon->getP()->SetTitleSize(0.065); addon->getP()->GetXaxis()->SetTitleSize(0.055); addon->getP()->GetYaxis()->SetTitleSize(0.055); addon->getP()->GetXaxis()->SetTitleOffset(0.8); addon->getP()->GetYaxis()->SetTitleOffset(0.9); } if ((addon = pS->hStart_Veto_tdiff)){ for(Int_t s = 0; s < 4; s ++){ TString newTitle = Form("hStart_Veto_tdiffStrip%d",s); addon->getP(0,s)->SetTitle(newTitle); } } return kTRUE; } struct StartHitInfo { HStart2Cal* cal; Int_t multIndex; }; struct StartCluster { std::vector hits; Double_t clusterTime; // time of the hit with largest ToT Double_t maxToT; // largest ToT int maxToThit; // hit index with the largest ToT }; Bool_t fillHistStart(Int_t evtCt){ mapHolder::setMap(startMap); // make wallMap currentMap //####################### USER CODE ############################################## // Fill Histograms // categorys to loop HCategory* startRawCat = gHades->getCurrentEvent()->getCategory(catStart2Raw); HCategory* startCalCat = gHades->getCurrentEvent()->getCategory(catStart2Cal); HCategory* tboxChanCat = gHades->getCurrentEvent()->getCategory(catTBoxChan); HCategory* trbNetCat = gHades->getCurrentEvent()->getCategory(catTrbNet); HCategory* candCat = gHades->getCurrentEvent()->getCategory(catParticleCand); HEventHeader* header = gHades->getCurrentEvent()->getHeader(); if(pS->hStart_EventID) pS->hStart_EventID->getP()->Fill(header->getId()&0xFF); Int_t nLatchWord = 0; Int_t bScal = 0; Int_t ch; UInt_t cnt; Int_t latchCnt; Int_t strip, mod, mult, width,time; Int_t strip1, mod1, strip2, mod2 ; Float_t width1 =-1; Float_t width2 =-1; Float_t time1_0, time2_0 ; mod=-1; // TRB Net Debug Info if(trbNetCat){ HTrbNetDebugInfo* debug; Int_t add; Int_t hadd; Int_t nDebugWord; for(Int_t i = 0; i < trbNetCat->getEntries(); i ++){ debug = (HTrbNetDebugInfo*)trbNetCat->getObject(i); add = debug->getAddress(); nDebugWord = debug->getStatusWord(); if (add==0x8800) hadd = 1; else if(add==0x8300) hadd = 2; else if(add==0x8310) hadd = 3; else if(add==0x8320) hadd = 4; else if(add==0x1000) hadd = 5; else if(add==0x1010) hadd = 6; else if(add==0x1020) hadd = 7; else if(add==0x1030) hadd = 8; else if(add==0x1040) hadd = 9; else if(add==0x1050) hadd = 10; else if(add==0x1100) hadd = 11; else if(add==0x1110) hadd = 12; else if(add==0x1120) hadd = 13; else if(add==0x1130) hadd = 14; else if(add==0x1140) hadd = 15; else if(add==0x1150) hadd = 16; else if(add==0x3200) hadd = 17; else if(add==0x3210) hadd = 18; else if(add==0x3220) hadd = 19; else if(add==0x3230) hadd = 20; else if(add==0x3240) hadd = 21; else if(add==0x3250) hadd = 22; else if(add==0x8400) hadd = 23; else if(add==0x8410) hadd = 24; else if(add==0x8600) hadd = 25; else if(add==0x8700) hadd = 26; else hadd = 0; if(pS->hTrbNetDebug){ for(Int_t b = 0; b < 32; b++){ if(( nDebugWord & (1<hTrbNetDebug->fill(0,hadd,b); } } } } } } // LATCH data latchCnt = 0; nLatchWord = gHades->getCurrentEvent()->getHeader()->getTBit(); for(Int_t i=0;i<32;i++){ if(( nLatchWord & (1<hLatch_TrendTemp) pS->hLatch_TrendTemp->getP()->Fill(i); if(pS->hLatch_Norm) pS->hLatch_Norm->getP()->Fill(i); latchCnt ++ ; } } if(pS->hLatch_Mult) pS->hLatch_Mult->getP()->Fill(latchCnt); if(pS->hLatch_TrendTemp&&pS->hLatch_Trend){ if(evtCt%pS->hLatch_Trend->getRefreshRate() == 0 && evtCt > 0){ for(Int_t bit = 0; bit < 32; bit ++){ pS->hLatch_Trend->fill(0,bit,pS->hLatch_TrendTemp->getP()->GetBinContent(bit+1)/pS->hLatch_Trend->getRefreshRate()); } pS->hLatch_TrendTemp->getP()->Reset(); } } //scalers data if(tboxChanCat){ HTBoxChan* scaler; for(Int_t i = 0; i < tboxChanCat->getEntries(); i ++){ bScal ++; scaler = (HTBoxChan*)tboxChanCat->getObject(i); if(scaler){ scaler -> getScalerData(ch,cnt); if(pS->hScalers_TrendTemp) pS->hScalers_TrendTemp->getP()->Fill(ch,cnt); } } } if(pS->hScalers_TrendTemp&&pS->hScalers_Trend){ if(bScal > 0 && evtCt > 0){ for(Int_t bit = 0; bit < 135; bit ++){ pS->hScalers_Trend->fill(0,bit,pS->hScalers_TrendTemp->getP()->GetBinContent(bit+1)); } pS->hScalers_TrendTemp->getP()->Reset(); } } // Start data // RAW Int_t nrStrips[START_MODULES]; for(Int_t i=0; igetEntries(); i++) { HStart2Raw* raw = (HStart2Raw *) startRawCat->getObject(i); mod = raw->getModule(); // if((mod < 0) || (mod > 1) ) continue; // exclude VETO/iTOF modules until histograms are adjusted strip = raw->getStrip(); mult = raw->getMultiplicity(); width =(Int_t) raw->getWidth(1); time =(Int_t) raw->getTime(1); // printf("Start got module %d, strip:%d, mult:%d \n", mod, strip, mult); // avoid reference time if (raw->getTime(1) != 0) nrStrips[mod]++; if (mod < 9 && pS->hStart_Raw_Mod_Strip && raw->getTime(1) != 0) ((TH2F *)pS->hStart_Raw_Mod_Strip->getP())->Fill(mod, strip, 1); if (pS->hStart_Raw_Mult) pS->hStart_Raw_Mult->getP(mod, strip)->Fill(mult); if (pS->hStart_Raw_Width) pS->hStart_Raw_Width->getP(mod, strip)->Fill(width); if (pS->hStart_Raw_Times) pS->hStart_Raw_Times->getP(mod, strip)->Fill(time); if (pS->hStartTimesRaw) pS->hStartTimesRaw->getP()->Fill(mod*20+strip,time); } //} // L.Chlad // V. Kedych and W.Krueger since 21.01.22 HStart2Raw *rawI; HStart2Raw *rawII; vector goodHodoStripX, goodHodoStripY; vector goodHodoTimeX, goodHodoTimeY, startXtime1, startYtime1; vector selectStartStripPairs = {4, 5, 14, 15, 23, 24, 32, 33, 44, 45}; for (Int_t i = 0; i < startRawCat->getEntries(); i++) { rawI = (HStart2Raw *)startRawCat->getObject(i); if (!rawI) continue; Int_t moduleI = rawI->getModule(); Int_t stripI = rawI->getStrip(); Int_t multiplcityI = rawI->getMultiplicity(); Float_t timeI = rawI->getTime(1); if (moduleI == 0 || moduleI == 1) { // Module 1 measures y, module 0 x if (moduleI == 1) { // startXtime1.push_back(timeI); if (pS->hStartRawX) pS->hStartRawX->getP()->Fill(stripI, multiplcityI); if (pS->hStartRawX_ToT) { for (Int_t j = 1; j <= multiplcityI; j++) pS->hStartRawX_ToT->getP()->Fill(stripI, rawI->getWidth(j)); } } if (moduleI == 0) { // startYtime1.push_back(timeI); // if(pS->hStartRawY) pS->hStartRawY ->getP()->Fill(stripI); // This was the old implementation // if(pS->hStartRawY_ToT) pS->hStartRawY_ToT->getP()->Fill(stripI,widthI); if (pS->hStartRawY) pS->hStartRawY->getP()->Fill(stripI, multiplcityI); if (pS->hStartRawY_ToT) { for (Int_t j = 1; j <= multiplcityI; j++) pS->hStartRawY_ToT->getP()->Fill(stripI, rawI->getWidth(j)); } } for (Int_t j = i + 1; j < startRawCat->getEntries(); j++) { rawII = (HStart2Raw *)startRawCat->getObject(j); if (!rawII) continue; Int_t moduleII = rawII->getModule(); if (!(moduleII == 0 || moduleII == 1)) continue; Int_t stripII = rawII->getStrip(); Int_t multiplcityII = rawII->getMultiplicity(); for (Int_t k = 1; k <= multiplcityI; k++) { for (Int_t l = 1; l <= multiplcityII; l++) { if ((moduleI != moduleII) && (abs(rawI->getTime(k) - rawII->getTime(l)) < 100)) { if (pS->hStartRawXY) { if (moduleI == 1) pS->hStartRawXY->getP()->Fill(stripI % 48, stripII % 48); else pS->hStartRawXY->getP()->Fill(stripII % 48, stripI % 48); } if (stripI == stripII) { auto it = find(selectStartStripPairs.begin(), selectStartStripPairs.end(), stripI); if (it != selectStartStripPairs.end()) { if (moduleI == 1) { if (pS->hStartTDiffVsToT) pS->hStartTDiffVsToT->getP(moduleI, it - selectStartStripPairs.begin())->Fill(rawI->getWidth(k), rawI->getTime(k) - rawII->getTime(l)); if (pS->hStartTDiffVsToT) pS->hStartTDiffVsToT->getP(moduleII, it - selectStartStripPairs.begin())->Fill(rawII->getWidth(l), rawI->getTime(k) - rawII->getTime(l)); } else { if (pS->hStartTDiffVsToT) pS->hStartTDiffVsToT->getP(moduleI, it - selectStartStripPairs.begin())->Fill(rawI->getWidth(k), rawII->getTime(l) - rawI->getTime(k)); if (pS->hStartTDiffVsToT) pS->hStartTDiffVsToT->getP(moduleII, it - selectStartStripPairs.begin())->Fill(rawII->getWidth(l), rawII->getTime(l) - rawI->getTime(k)); } } } } } } } } else if (moduleI >= 3 && moduleI <= 6) { Bool_t firstX = kTRUE; Bool_t firstY = kTRUE; if (moduleI == 5 || moduleI == 6) firstX = kTRUE; else if (moduleI == 3 || moduleI == 4) firstY = kTRUE; for (Int_t j = i + 1; j < startRawCat->getEntries(); j++) { rawII = (HStart2Raw *)startRawCat->getObject(j); if (!rawII) continue; Int_t moduleII = rawII->getModule(); Int_t stripII = rawII->getStrip(); Float_t timeII = rawII->getTime(1); // look for good Hodo hits if (firstX && (moduleII == 5 || moduleII == 6) && (moduleI != moduleII) // same station but different side L/R && (stripI == stripII) // same scintillator && abs(timeI - timeII) < HodoTimeCut_start) { goodHodoStripX.push_back(stripI); goodHodoTimeX.push_back(0.5 * (timeI + timeII)); } if (firstY && (moduleII == 3 || moduleII == 4) && (moduleI != moduleII) // same station but different side L/R && (stripI == stripII) // same scintillator && abs(timeI - timeII) < HodoTimeCut_start) { goodHodoStripY.push_back(stripI); goodHodoTimeY.push_back(0.5 * (timeI + timeII)); } } // end of inner loop } } // end of outer loop if (goodHodoStripX.size() > 0 && goodHodoStripY.size() > 0) { for (UInt_t ihx = 0; ihx < goodHodoStripX.size(); ihx++) { for (UInt_t ihy = 0; ihy < goodHodoStripY.size(); ihy++) { if (abs(goodHodoTimeX[ihx] - goodHodoTimeY[ihy]) < HodoTimeCut_start) { // TODO: to be replaced by check on the time difference!! of X and Y Hodo times if (pS->hStartHodoRawXY_LR) pS->hStartHodoRawXY_LR->getP()->Fill(goodHodoStripX[ihx], goodHodoStripY[ihy]); for (UInt_t isx = 0; isx < startXtime1.size(); isx++) { if (kTRUE) { // TODO: to be replaced by check on the time difference!! between StartX and Hodo if (pS->hHodoRawXY_StartX) pS->hHodoRawXY_StartX->getP()->Fill(goodHodoStripX[ihx], goodHodoStripY[ihy]); for (UInt_t isy = 0; isy < startYtime1.size(); isy++) { if (kTRUE) { // TODO: to be replaced by check on the time difference!! between StartY and Hodo if (pS->hHodoRawXY_StartXY) pS->hHodoRawXY_StartXY->getP()->Fill(goodHodoStripX[ihx], goodHodoStripY[ihy]); } } } } for (UInt_t isy = 0; isy < startYtime1.size(); isy++) { if (kTRUE) { // TODO: to be replaced by check on the time difference!! between StartY and Hodo if (pS->hHodoRawXY_StartY) pS->hHodoRawXY_StartY->getP()->Fill(goodHodoStripX[ihx], goodHodoStripY[ihy]); } } } // end of check on good hodo both stations hit } } } // end of check if there were good hodo stationX and stationY hits if (pS->hHodoRawXY_Ratio_XY_X && pS->hHodoRawXY_Ratio_XY_Y && evtCt % pS->hHodoRawXY_Ratio_XY_X->getRefreshRate() == 0 && evtCt > 0) { pS->hHodoRawXY_Ratio_XY_X->getP()->Reset(); pS->hHodoRawXY_Ratio_XY_Y->getP()->Reset(); if (pS->hHodoRawXY_StartXY) { for (Int_t ibx = 1; ibx <= pS->hHodoRawXY_StartXY->getP()->GetXaxis()->GetNbins(); ibx++) { for (Int_t iby = 1; iby <= pS->hHodoRawXY_StartXY->getP()->GetYaxis()->GetNbins(); iby++) { pS->hHodoRawXY_Ratio_XY_X->getP()->SetBinContent(ibx, iby, pS->hHodoRawXY_StartXY->getP()->GetBinContent(ibx, iby)); pS->hHodoRawXY_Ratio_XY_Y->getP()->SetBinContent(ibx, iby, pS->hHodoRawXY_StartXY->getP()->GetBinContent(ibx, iby)); } } } // if(pS->hHodoRawXY_StartXY) pS->hHodoRawXY_Ratio_XY_X->getP() = pS->hHodoRawXY_StartXY->getP()->Clone("hHodoRawXY_Ratio_XY_X"); if (pS->hHodoRawXY_StartX) pS->hHodoRawXY_Ratio_XY_X->getP()->Divide(pS->hHodoRawXY_StartX->getP()); // if(pS->hHodoRawXY_StartXY) pS->hHodoRawXY_Ratio_XY_Y->getP() = pS->hHodoRawXY_StartXY->getP()->Clone("hHodoRawXY_Ratio_XY_Y"); if (pS->hHodoRawXY_StartY) pS->hHodoRawXY_Ratio_XY_Y->getP()->Divide(pS->hHodoRawXY_StartY->getP()); } } // adding Vertex Analysis for Start QA , VK&WK 21.01.22 if (candCat) { Double_t xBeam = 1.788; // TODO this needs to be changed as soon as we have beam and alignment. Otherwise calculating z-Prime does not works Double_t yBeam = -1.135; Int_t weighting = 1; Int_t sizeCandCat = candCat->getEntries(); HParticleCand *cand = 0; for (Int_t i = 0; i < sizeCandCat; i++) { cand = HCategoryManager::getObject(cand, candCat, i); if (cand) { if (cand->getChi2() > 0 && cand->getChi2() < 1000) { Double_t weight = 1; if (weighting == 1) weight = (Double_t)1 / sizeCandCat; Float_t rPrime = cand->getRprime(xBeam, yBeam); Float_t zPrime = cand->getZprime(xBeam, yBeam, rPrime); if (pS->ZPrimeNoCuts) pS->ZPrimeNoCuts->getP()->Fill(zPrime, weight); if (zPrime < -150 && pS->ZPrimeShoulderCut) pS->ZPrimeShoulderCut->getP()->Fill(zPrime, weight); if (zPrime > -150 && zPrime < -50 && pS->ZPrimeTargetCut) pS->ZPrimeTargetCut->getP()->Fill(zPrime, weight); // hParticleCandZPrime[sector]->Fill(zPrime, weight); TODO fill the particleCandZPrime histogram } } } } for(Int_t m = 0; m < START_MODULES; m++){ if(pS->hStart_Raw_Mult_All) pS->hStart_Raw_Mult_All->fill(0,m,nrStrips[m]); } for(Int_t i=0; i ,std::array>> timeOfArrivals; timeOfArrivals.clear(); Int_t counterMultiplicityPerModule[4]={0,0,0,0}; Int_t channelDifferenceForMult2[4]={0,0,0,0}; Int_t firstChannelForMult2[4]={0,0,0,0}; Int_t secondChannelForMult2[4]={0,0,0,0}; Bool_t usedInAClusterCalculation [4][16][100] ; for (Int_t i=0;i<2;i++) for (Int_t j=0;j<16;j++) for (Int_t k=0;k<100;k++) usedInAClusterCalculation[i][j][k]=kFALSE; // CAL int clustSize[4]; int clustSizeTimeWindow[4] = {0,0,0,0}; if(startCalCat){ HStart2Cal* cal1; HStart2Cal* cal2; /// ______________________________________________________________________________________________________________________ /// Apr 25 new clustering with highest ToT selection and Tdiff +- 5 ns std::vector clusters[4]; // one for each module std::vector hitList[4]; /// Getting all hits for each module separately for (Int_t i = 0; i < startCalCat->getEntries(); i++) { HStart2Cal* cal = (HStart2Cal*)startCalCat->getObject(i); if (!cal) continue; Int_t mod = cal->getModule(); if (mod > 3) continue; for (Int_t m = 0; m < cal->getMultiplicity(); ++m) { hitList[mod].push_back({cal, m+1}); } } /// Filling clusters for each module separately /// Should be within +- 5ns (one particle leave several hits, and 2 particles T spread is <~100) for (int mod = 0; mod <= 3; mod++) { std::sort(hitList[mod].begin(), hitList[mod].end(), [](const StartHitInfo& a, const StartHitInfo& b) { return a.cal->getTime(a.multIndex) < b.cal->getTime(b.multIndex); }); auto& hits = hitList[mod]; std::vector used(hits.size(), false); for (size_t i = 0; i < hits.size(); ++i) { if (used[i]) continue; StartCluster cl; cl.hits.push_back(hits[i]); used[i] = true; Double_t baseTime = hits[i].cal->getTime(hits[i].multIndex); cl.maxToT = hits[i].cal->getWidth(hits[i].multIndex); cl.clusterTime = baseTime; cl.maxToThit = (int)(cl.hits.size())-1; for (size_t j = i + 1; j < hits.size(); ++j) { if (used[j]) continue; Double_t testTime = hits[j].cal->getTime(hits[j].multIndex); if (fabs(baseTime - testTime) <= 5.0) { cl.hits.push_back(hits[j]); used[j] = true; Float_t testToT = hits[j].cal->getWidth(hits[j].multIndex); if (testToT > cl.maxToT) { cl.maxToT = testToT; cl.clusterTime = testTime; cl.maxToThit = (int)(cl.hits.size())-1; } } } clusters[mod].push_back(cl); } std::sort(clusters[mod].begin(), clusters[mod].end(), [](const StartCluster& a, const StartCluster& b) { return a.maxToT > b.maxToT; // descending by maxToT //return a.hits.size() > b.hits.size(); // descending by clustSize, can multiply by ToT - minmaxing stuff }); } /// Fill just basic cal hitList sizes to check if modules are working at all for (size_t i = 0; i < 4; i++){ if (i == 2 ) continue; pS->hStart_CalHits_Mult->fill(0,i,(Int_t)(hitList[i].size())); for (size_t j = 0; j+1 < (hitList[i].size()); j++){ if (pS->hStart_CalHits_tDiff) pS->hStart_CalHits_tDiff->fill(0,i,(hitList[i][j+1].cal->getTime(hitList[i][j+1].multIndex) - hitList[i][j].cal->getTime(hitList[i][j].multIndex))); } } /// We have loops over modules 1 and 2 below, for the 3rd just fill profile with all clusters for (size_t i = 0; i < clusters[3].size(); i++ ) { const auto& cl3 = clusters[3][i]; Int_t strip3 = cl3.hits[cl3.maxToThit].cal->getStrip(); pS->hStart_beamProf->getP(0,3)->Fill(strip3,1); } /// Going through the cluster 0 and searching for matches +-5 ns in cluster 1 /// The closest dT cluster1 hit (without +-5 ns cut) is used to fill tDiff0 histogram for each cluster in module 0 /// Profiles, beamSpot and ToT are filled when match is found /// Multiplicity 1 is filled with size of cluster in module 1 within +-5 ns of each cluster in module 0 (if no such cluster -> 0) for (size_t i = 0; i < clusters[0].size(); i++ ) { const auto& cl0 = clusters[0][i]; bool foundMatchCluster1 = false; int closestInd1 = -1; double minTimeDiff1 = 1000; for (size_t j = 0; j < clusters[1].size(); j++ ) { const auto& cl1 = clusters[1][j]; if (fabs(cl0.clusterTime - cl1.clusterTime) < minTimeDiff1){ minTimeDiff1 = fabs(cl0.clusterTime - cl1.clusterTime); closestInd1 = j; } pS->hStart_Veto_tdiff0->getP()->Fill(1*20+clusters[1][j].hits[clusters[1][j].maxToThit].cal->getStrip(),cl0.clusterTime - clusters[1][j].clusterTime ); if (fabs(cl0.clusterTime - cl1.clusterTime) <= 5.0) { // 🎯 Valid match between clusters foundMatchCluster1 = true; double ToT0 = cl0.maxToT; double ToT1 = cl1.maxToT; if (ToT0 <= 0 || ToT1 <= 0) continue; Int_t strip0 = cl0.hits[cl0.maxToThit].cal->getStrip(); Int_t strip1 = cl1.hits[cl1.maxToThit].cal->getStrip(); pS->hStart_beamSpot->getP()->Fill(strip0, strip1); pS->hStart_Veto_tot->getP()->Fill(0*20+strip0,ToT0); pS->hStart_Veto_tot->getP()->Fill(1*20+strip1,ToT1); if (pS->hStartTimes){ pS->hStartTimes->getP()->Fill(0*20+strip0,cl0.clusterTime); pS->hStartTimes->getP()->Fill(1*20+strip1,cl1.clusterTime); } pS->hStart_beamProf->getP(0,0)->Fill(strip0,1); pS->hStart_beamProf->getP(0,1)->Fill(strip1,1); //pS->hStart_CalClus_Mult->fill(0,0,(Int_t)(clusters[0][i].hits.size())); pS->hStart_CalClus_Mult->fill(0,1,(Int_t)(clusters[1][j].hits.size())); } } if (!foundMatchCluster1){ pS->hStart_CalClus_Mult->fill(0,1,(Int_t)(0)); } if (closestInd1 != -1) pS->hStart_Veto_tdiff1->getP()->Fill(1*20+clusters[1][closestInd1].hits[clusters[1][closestInd1].maxToThit].cal->getStrip(),cl0.clusterTime - clusters[1][closestInd1].clusterTime ); int closestInd3 = -1; double minTimeDiff3 = 1000; for (size_t j = 0; j < clusters[3].size(); j++ ) { const auto& cl3 = clusters[3][j]; if (fabs(cl0.clusterTime - cl3.clusterTime) < minTimeDiff3){ minTimeDiff3 = fabs(cl0.clusterTime - cl3.clusterTime); closestInd3 = j; } pS->hStart_Veto_tdiff0->getP()->Fill(3*20+clusters[3][j].hits[clusters[3][j].maxToThit].cal->getStrip(),cl0.clusterTime - clusters[3][j].clusterTime ); } //if (closestInd3 != -1) // pS->hStart_Veto_tdiff0->getP()->Fill(3*20+clusters[3][closestInd3].hits[clusters[3][closestInd3].maxToThit].cal->getStrip(),cl0.clusterTime - clusters[3][closestInd3].clusterTime ); } /// The same for module 1 without repetitions /// Addutuionally, here are matching conditions 1-3 for Veto ToT and clustSize (+-15ns) for (size_t i = 0; i < clusters[1].size(); i++ ) { const auto& cl1 = clusters[1][i]; bool foundMatchCluster2 = false; int closestInd0 = -1; double minTimeDiff0 = 1000; for (size_t j = 0; j < clusters[0].size(); j++ ) { const auto& cl0 = clusters[0][j]; if (fabs(cl0.clusterTime - cl1.clusterTime) < minTimeDiff0){ minTimeDiff0 = fabs(cl0.clusterTime - cl1.clusterTime); closestInd0 = j; } pS->hStart_Veto_tdiff0->getP()->Fill(0*20+clusters[0][j].hits[clusters[0][j].maxToThit].cal->getStrip(),cl1.clusterTime - clusters[0][j].clusterTime ); if (fabs(cl0.clusterTime - cl1.clusterTime) <= 5.0) { // 🎯 Valid match between clusters foundMatchCluster2 = true; pS->hStart_CalClus_Mult->fill(0,0,(Int_t)(clusters[0][j].hits.size())); //pS->hStart_CalClus_Mult->fill(0,1,(Int_t)(clusters[1][j].hits.size())); } } if (!foundMatchCluster2){ pS->hStart_CalClus_Mult->fill(0,0,(Int_t)(0)); } if (closestInd0 != -1) pS->hStart_Veto_tdiff1->getP()->Fill(0*20+clusters[0][closestInd0].hits[clusters[0][closestInd0].maxToThit].cal->getStrip(),cl1.clusterTime - clusters[0][closestInd0].clusterTime ); bool foundMatchCluster3 = false; int closestInd3 = -1; double minTimeDiff3 = 1000; for (size_t j = 0; j < clusters[3].size(); j++ ) { const auto& cl3 = clusters[3][j]; if (fabs(cl1.clusterTime - cl3.clusterTime) < minTimeDiff3){ minTimeDiff3 = fabs(cl1.clusterTime - cl3.clusterTime); closestInd3 = j; } //pS->hStart_Veto_tdiff0->getP()->Fill(3*20+clusters[3][j].hits[clusters[3][j].maxToThit].cal->getStrip(),cl1.clusterTime - clusters[3][j].clusterTime ); if (fabs(cl3.clusterTime - cl1.clusterTime) <= 15.0) { // 🎯 Valid match between clusters foundMatchCluster3 = true; Int_t strip3 = cl3.hits[cl3.maxToThit].cal->getStrip(); pS->hStart_Veto_tot->getP()->Fill(3*20+strip3,cl3.maxToT); pS->hStart_CalClus_Mult->fill(0,3,(Int_t)(clusters[3][j].hits.size())); } } if (!foundMatchCluster3){ pS->hStart_CalClus_Mult->fill(0,3,(Int_t)(0)); } if (closestInd3 != -1) pS->hStart_Veto_tdiff1->getP()->Fill(3*20+clusters[3][closestInd3].hits[clusters[3][closestInd3].maxToThit].cal->getStrip(),cl1.clusterTime - clusters[3][closestInd3].clusterTime ); } for (size_t i = 0; i < clusters[3].size(); i++ ) { const auto& cl3 = clusters[3][i]; Int_t strip3 = cl3.hits[cl3.maxToThit].cal->getStrip()-1; if (strip3>=4) continue; for (size_t j = 0; j < clusters[0].size(); j++ ) { const auto& cl0 = clusters[0][j]; pS->hStart_Veto_tdiff->fill(0,strip3,0*20+clusters[0][j].hits[clusters[0][j].maxToThit].cal->getStrip(), - cl3.clusterTime + clusters[0][j].clusterTime ); } for (size_t j = 1; j < clusters[1].size(); j++ ) { const auto& cl1 = clusters[1][j]; pS->hStart_Veto_tdiff->fill(0,strip3,1*20+clusters[1][j].hits[clusters[1][j].maxToThit].cal->getStrip(), - cl3.clusterTime + clusters[1][j].clusterTime ); } } /// ______________________________________________________________________________________________________________________ for(Int_t i = 0; i < startCalCat->getEntries(); i ++){ cal1 = (HStart2Cal*)startCalCat->getObject(i); if(cal1){ mod1 = cal1->getModule(); strip1 = cal1->getStrip(); time1_0 = cal1->getTime(1); width1 = cal1->getWidth(1); if (mod1 < 4) clustSize[mod1]+=1;//cal1->getMultiplicity(); // avoid reference time if(width1 < 95 ) nrStrips[mod1]++; if(mod1 < 4 && width1 < 95 && cal1->getTime(1) != 0 && pS->hStart_Cal_Mod_Strip) { ((TH2F*)pS->hStart_Cal_Mod_Strip->getP())->Fill(mod1,strip1,1); } for(Int_t j = i + 1; j < startCalCat->getEntries(); j ++){ cal2 = (HStart2Cal*)startCalCat->getObject(j); if(cal2){ mod2 = cal2->getModule(); strip2 = cal2->getStrip(); time2_0 = cal2->getTime(1); width2 = cal2->getWidth(1); if(mod1 < 2 && mod2 < 2 && mod1 != mod2 && width1 < 95 && width2 < 95 && fabs(time2_0 - time1_0) < 0.5 && pS->hStart_Cal_XY ){ if(mod1==0) pS->hStart_Cal_XY->getP()->Fill(strip1,strip2); if(mod1==1) pS->hStart_Cal_XY->getP()->Fill(strip2,strip1); } //if(pS->hStart_Cal_TimeDiff) pS->hStart_Cal_TimeDiff->getP(mod1*START_STRIPS+strip1,mod2*START_STRIPS+strip2)->Fill(time1_0-time2_0); } } //// Feb24 //pS->hStart_beamProf->getP(0,mod1)->Fill(strip1,cal1->getMultiplicity()); for (Int_t ii = 0; ii < cal1->getMultiplicity(); ii++){ //pS->hStart_Veto_tot->getP()->Fill(mod1*20+strip1,cal1->getWidth(ii+1)); Int_t clusterSizeCounter =0; Bool_t firstHitWasAlreadyUsed=kFALSE; if (!usedInAClusterCalculation[mod1][strip1][ii]) { clusterSizeCounter++; usedInAClusterCalculation[mod1][strip1][ii]=kTRUE; } else firstHitWasAlreadyUsed=kTRUE; for (Int_t j = 0; j < startCalCat->getEntries(); ++j){ if (NULL == (cal2 = static_cast(startCalCat->getObject(j)))) { Error("findStartTime", "Pointer to pStartRaw object == NULL, returning"); break; } Int_t mod2 = cal2->getModule(); Int_t strip2 = cal2->getStrip(); for (Int_t jj = 0; jj < cal2->getMultiplicity(); jj++){ if (mod1==mod2 && strip1==strip2 && ii==jj) continue; //if (mod1==0 && strip1==8) pS->hStart_Veto_tdiff0->getP()->Fill(mod2*20+strip2,cal1->getTime(ii+1)-cal2->getTime(jj+1) ); //else if (mod1==1 && strip1==7) pS->hStart_Veto_tdiff1->getP()->Fill(mod2*20+strip2,cal1->getTime(ii+1)-cal2->getTime(jj+1) ); if ( abs( cal1->getTime(ii+1)-cal2->getTime(jj+1) )<35 ){ if (mod1==0 && mod2==1) //pS->hStart_beamSpot->getP()->Fill(strip1,strip2); if (mod1==mod2 && !usedInAClusterCalculation[mod2][strip2][jj] && !firstHitWasAlreadyUsed){ clusterSizeCounter++; usedInAClusterCalculation[mod2][strip2][jj]=kTRUE; } } } } //if (clusterSizeCounter!=0) //pS->hStart_clustSize->getP()->Fill(mod1,clusterSizeCounter); if (mod1 < 4) clustSizeTimeWindow[mod1]+=clusterSizeCounter; } /// End feb24 } } for(Int_t m = 0; m < START_MODULES; m++){ if(pS->hStart_Cal_Mult_All) pS->hStart_Cal_Mult_All->fill(0,m,nrStrips[m]); } } for (Int_t m = 0; m < 4; m++){ //pS->hStart_clustSizeMult->getP()->Fill(m,clustSize[m]); if (clustSizeTimeWindow[m]<1){ //pS->hStart_clustSize->getP()->Fill(m,0); } } //############################################################################### // do reset if needed mapHolder::resetHists(evtCt); return kTRUE; }