diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h index fd8d61b6a86ab..99661186ed19b 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h @@ -179,20 +179,20 @@ /// TEcnaParPaths* pCnaParPaths = new TEcnaParPaths(MyEcnaObjectManager); /// if( pCnaParPaths->GetPaths() == kTRUE ) /// { -/// cout << "*EcnaGuiEB> Starting ROOT session" << endl; +/// std::cout << "*EcnaGuiEB> Starting ROOT session" << std::endl; /// TRint theApp("App", &argc, argv); /// -/// cout << "*EcnaGuiEB> Starting ECNA session" << endl; +/// std::cout << "*EcnaGuiEB> Starting ECNA session" << std::endl; /// TEcnaGui* mainWin = new TEcnaGui(MyEcnaObjectManager, "EB", gClient->GetRoot(), 395, 710); /// mainWin->DialogBox(); /// Bool_t retVal = kTRUE; /// theApp.Run(retVal); -/// cout << "*EcnaGuiEB> End of ECNA session." << endl; +/// std::cout << "*EcnaGuiEB> End of ECNA session." << std::endl; /// delete mainWin; /// -/// cout << "*EcnaGuiEB> End of ROOT session." << endl; +/// std::cout << "*EcnaGuiEB> End of ROOT session." << std::endl; /// theApp.Terminate(0); -/// cout << "*EcnaGuiEB> Exiting main program." << endl; +/// std::cout << "*EcnaGuiEB> Exiting main program." << std::endl; /// exit(0); /// } /// } @@ -878,7 +878,7 @@ class TEcnaGui : public TGMainFrame { //==================================================== Miscellaneous parameters - //ofstream fFcout_f; + //std::ofstream fFcout_f; TString fKeyAnaType; // Type of analysis diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h index 1450c73248529..d1366fb42e8fb 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h @@ -36,11 +36,11 @@ class TEcnaParPaths : public TObject { Int_t fCnaCommand, fCnaError; - ifstream fFcin_rr; // stream for results root files - ifstream fFcin_ra; // stream for results ascii files - ifstream fFcin_lor; // stream for list of runs files - // ifstream fFcin_anapar; // stream for EcnaAnalyzer parameters files - ifstream fFcin_cmssw; // stream for cmssw version and subsystem + std::ifstream fFcin_rr; // stream for results root files + std::ifstream fFcin_ra; // stream for results ascii files + std::ifstream fFcin_lor; // stream for list of runs files + // std::ifstream fFcin_anapar; // stream for EcnaAnalyzer parameters files + std::ifstream fFcin_cmssw; // stream for cmssw version and subsystem TString fCfgResultsRootFilePath; // absolute path for the results .root files (/afs/etc...) TString fFileForResultsRootFilePath; // name of the file containing the results .root file path diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h index 94c6d9d3944c5..de8217883afd7 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h @@ -96,7 +96,7 @@ /// /// if( MyCnaRead->LookAtRootFile() == kFALSE ) /// { -/// cout << "*** ERROR: ROOT file not found" << endl; +/// std::cout << "*** ERROR: ROOT file not found" << std::endl; /// } /// else /// { @@ -122,7 +122,7 @@ /// } /// else /// { -/// cout << "problem while reading file. data not available. " << endl; +/// std::cout << "problem while reading file. data not available. " << std::endl; //// } /// /// } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h index 96ee19d768d27..5c83e3d299bdb 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h @@ -504,7 +504,7 @@ class TEcnaRun: public TObject { Int_t** fT2dCrysNumbersTable; Int_t* fT1dCrysNumbersTable; - ofstream fFcout_f; + std::ofstream fFcout_f; Int_t fFlagPrint; Int_t fCodePrintComments, fCodePrintWarnings, fCodePrintAllComments, fCodePrintNoComment; diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h index e6140998e2db4..97e875b2db513 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h @@ -58,7 +58,7 @@ class TEcnaWrite : public TObject { TEcnaParPaths *fCnaParPaths; TEcnaParCout *fCnaParCout; - ofstream fFcout_f; + std::ofstream fFcout_f; //...................................... Codes for file names Int_t fCodeHeaderAscii; diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaGui.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaGui.cc index 4812004eb693e..8777cd709bde5 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaGui.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaGui.cc @@ -21,8 +21,8 @@ ClassImp(TEcnaGui) #define DEST #ifdef DEST - // cout << "TEcnaGui> Entering destructor" << endl; - // cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "TEcnaGui> Entering destructor" << std::endl; + // std::cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << std::endl; //.... general variables //if ( fHistos != 0 ) {delete fHistos; fCdelete++;} @@ -578,13 +578,13 @@ ClassImp(TEcnaGui) if ( fCnew != fCdelete ) { - cout << "*TEcnaGui> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " - << fCnew << ", fCdelete = " << fCdelete << endl; + std::cout << "*TEcnaGui> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " + << fCnew << ", fCdelete = " << fCdelete << std::endl; } else { - //cout << "*TEcnaGui> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = " - // << fCnew << ", fCdelete = " << fCdelete << endl; + //std::cout << "*TEcnaGui> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = " + // << fCnew << ", fCdelete = " << fCdelete << std::endl; } #endif // DEST @@ -593,21 +593,21 @@ ClassImp(TEcnaGui) #ifndef MGRA if ( fCnewRoot != fCdeleteRoot ) { - cout << "*TEcnaGui> WRONG MANAGEMENT OF ROOT ALLOCATIONS: fCnewRoot = " - << fCnewRoot << ", fCdeleteRoot = " << fCdeleteRoot << endl; + std::cout << "*TEcnaGui> WRONG MANAGEMENT OF ROOT ALLOCATIONS: fCnewRoot = " + << fCnewRoot << ", fCdeleteRoot = " << fCdeleteRoot << std::endl; } else { - cout << "*TEcnaGui> BRAVO! GOOD MANAGEMENT OF ROOT ALLOCATIONS:" + std::cout << "*TEcnaGui> BRAVO! GOOD MANAGEMENT OF ROOT ALLOCATIONS:" << " fCnewRoot = " << fCnewRoot <<", fCdeleteRoot = " - << fCdeleteRoot << endl; + << fCdeleteRoot << std::endl; } #endif // MGRA - // cout << "TEcnaGui> Leaving destructor" << endl; - // cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "TEcnaGui> Leaving destructor" << std::endl; + // std::cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << std::endl; - // cout << "[Info Management] CLASS: TEcnaGui. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaGui. DESTROY OBJECT: this = " << this << std::endl; } // end of destructor @@ -626,10 +626,10 @@ TEcnaGui::TEcnaGui() TEcnaGui::TEcnaGui(TEcnaObject* pObjectManager, const TString& SubDet, const TGWindow *p, UInt_t w, UInt_t h): TGMainFrame(p, w, h) { - // cout << "[Info Management] CLASS: TEcnaGui. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaGui. CREATE OBJECT: this = " << this << std::endl; - // cout << "TEcnaGui> Entering constructor with arguments" << endl; - // cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "TEcnaGui> Entering constructor with arguments" << std::endl; + // std::cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << std::endl; Init(); @@ -3259,9 +3259,9 @@ void TEcnaGui::DialogBox() // fKeyPyf = listchain; // fCnaCommand++; -// cout << " *TEcnaGui [" << fCnaCommand +// std::cout << " *TEcnaGui [" << fCnaCommand // << "]> Registration of file name for python file source sector -> " -// << fKeyPyf.Data() << endl; +// << fKeyPyf.Data() << std::endl; //} //---------------------------------------------------------------------- void TEcnaGui::DoButtonAna() @@ -3273,9 +3273,9 @@ void TEcnaGui::DoButtonAna() fKeyAnaType = bufferchain; fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of analysis name -> " - << fKeyAnaType << endl; + << fKeyAnaType << std::endl; } //---------------------------------------------------------------------- @@ -3290,11 +3290,11 @@ void TEcnaGui::DoButtonNors() if ( !(fKeyNbOfSamples >= 1 && fKeyNbOfSamples <= fEcal->MaxSampADC()) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>" + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>" << " Number of required samples for reading ROOT file = " << fKeyNbOfSamples - << ": OUT OF RANGE, " << endl + << ": OUT OF RANGE, " << std::endl << " forced to the default value (=" - << fEcal->MaxSampADC() << ")." << fTTBELL << endl; + << fEcal->MaxSampADC() << ")." << fTTBELL << std::endl; fKeyNbOfSamples = fEcal->MaxSampADC(); DisplayInEntryField(fNorsText,fKeyNbOfSamples); } @@ -3316,9 +3316,9 @@ void TEcnaGui::DoButtonNors() fSampBut->SetText(xSampButText); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of number of samples in ROOT file -> " - << fKeyNbOfSamples << endl; + << fKeyNbOfSamples << std::endl; } //---------------------------------------------------------------------- void TEcnaGui::DoButtonNbSampForCalc() @@ -3332,18 +3332,18 @@ void TEcnaGui::DoButtonNbSampForCalc() if ( !(fKeyNbOfSampForCalc >= 1 && fKeyNbOfSampForCalc <= fKeyNbOfSamples) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>" + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>" << " Number of required samples for calculations = " << fKeyNbOfSampForCalc - << ": OUT OF RANGE, " << endl + << ": OUT OF RANGE, " << std::endl << " forced to the default value (=" - << fKeyNbOfSamples << ")." << fTTBELL << endl; + << fKeyNbOfSamples << ")." << fTTBELL << std::endl; fKeyNbOfSampForCalc = fKeyNbOfSamples; DisplayInEntryField(fNbSampForCalcText,fKeyNbOfSampForCalc); } fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of number of samples for calculations -> " - << fKeyNbOfSampForCalc << endl; + << fKeyNbOfSampForCalc << std::endl; } //---------------------------------------------------------------------- @@ -3356,9 +3356,9 @@ void TEcnaGui::DoButtonRun() fKeyRunNumberString = bufferchain; fKeyRunNumber = atoi(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of run number -> " - << fKeyRunNumber << endl; + << fKeyRunNumber << std::endl; } //------------------------------------------------------------------- @@ -3373,16 +3373,16 @@ void TEcnaGui::DoButtonFev() if ( fKeyFirstReqEvtNumber <= 0) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *ERROR* ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *ERROR* ===> " << " First event number = " << fKeyFirstReqEvtNumber - << ": negative. " << endl - << fTTBELL << endl; + << ": negative. " << std::endl + << fTTBELL << std::endl; } fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of first requested event number -> " - << fKeyFirstReqEvtNumber << endl; + << fKeyFirstReqEvtNumber << std::endl; } //------------------------------------------------------------------- void TEcnaGui::DoButtonLev() @@ -3396,16 +3396,16 @@ void TEcnaGui::DoButtonLev() if ( fKeyLastReqEvtNumber <= fKeyFirstReqEvtNumber ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *WARNING* ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *WARNING* ===> " << " Last requested event number = " << fKeyLastReqEvtNumber << ": less than first requested event number (= " << fKeyFirstReqEvtNumber << ")." - << endl; + << std::endl; } fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of last requested event number -> " - << fKeyLastReqEvtNumber << endl; + << fKeyLastReqEvtNumber << std::endl; } //------------------------------------------------------------------- void TEcnaGui::DoButtonRev() @@ -3421,26 +3421,26 @@ void TEcnaGui::DoButtonRev() if( fKeyLastReqEvtNumber < fKeyFirstReqEvtNumber) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *WARNING* ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *WARNING* ===> " << " Last requested event number = " << fKeyLastReqEvtNumber << " less than first requested event number = " << fKeyFirstReqEvtNumber - << endl; + << std::endl; } if ( fKeyLastReqEvtNumber >= fKeyFirstReqEvtNumber && fKeyReqNbOfEvts > nb_range_evts ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *WARNING* ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *WARNING* ===> " << " Nb of requested events = " << fKeyReqNbOfEvts << ": out of range (range = " << fKeyFirstReqEvtNumber << "," << fKeyLastReqEvtNumber << ") => " << nb_range_evts << " events." - << endl; + << std::endl; } fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of requested number of events -> " - << fKeyReqNbOfEvts << endl; + << fKeyReqNbOfEvts << std::endl; } //------------------------------------------------------------------- @@ -3455,9 +3455,9 @@ void TEcnaGui::DoButtonStex() if( fSubDet == "EB" ) { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of SuperModule number -> " - << fKeyStexNumber << endl; + << fKeyStexNumber << std::endl; //.......... Positive number for EB- [-1,-18] -> [19,36] if( fKeyStexNumber < 0 ){fKeyStexNumber = - fKeyStexNumber + fEcal->MaxSMInEB()/2;} @@ -3465,11 +3465,11 @@ void TEcnaGui::DoButtonStex() if( (fKeyStexNumber < 0) || (fKeyStexNumber > fEcal->MaxSMInEB() ) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << " EB / SM number = " << fKeyStexNumber << ": out of range. Range = 0 (EB) or [ 1 ," << fEcal->MaxSMInEB() << " ] (SM)" << " or [ -" << fEcal->MaxSMInEBMinus() << ", +" << fEcal->MaxSMInEBPlus() << "] (SM)" - << fTTBELL << endl; + << fTTBELL << std::endl; } } @@ -3503,17 +3503,17 @@ void TEcnaGui::DoButtonStex() } //............................................ Command message fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Dee number -> " - << fKeyStexNumber << endl; + << fKeyStexNumber << std::endl; if ( (fKeyStexNumber < 0) || (fKeyStexNumber > fEcal->MaxDeeInEE() ) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << " EE / Dee number = " << fKeyStexNumber << ": out of range. Range = 0 (EE) or [ 1 ," << fEcal->MaxDeeInEE() << " ] (Dee)" - << fTTBELL << endl; + << fTTBELL << std::endl; } } // -- end of if( fSubDet == "EE" ) ------- } @@ -3528,9 +3528,9 @@ void TEcnaGui::DoButtonVminD_NOE_ChNb() fKeyVminD_NOE_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'number of events' -> " - << fKeyVminD_NOE_ChNb << endl; + << fKeyVminD_NOE_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3543,9 +3543,9 @@ void TEcnaGui::DoButtonVmaxD_NOE_ChNb() fKeyVmaxD_NOE_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'number of events' -> " - << fKeyVmaxD_NOE_ChNb << endl; + << fKeyVmaxD_NOE_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3558,9 +3558,9 @@ void TEcnaGui::DoButtonVminD_Ped_ChNb() fKeyVminD_Ped_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'pedestal' -> " - << fKeyVminD_Ped_ChNb << endl; + << fKeyVminD_Ped_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3573,9 +3573,9 @@ void TEcnaGui::DoButtonVmaxD_Ped_ChNb() fKeyVmaxD_Ped_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'pedestal' -> " - << fKeyVmaxD_Ped_ChNb << endl; + << fKeyVmaxD_Ped_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3588,9 +3588,9 @@ void TEcnaGui::DoButtonVminD_TNo_ChNb() fKeyVminD_TNo_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'total noise' -> " - << fKeyVminD_TNo_ChNb << endl; + << fKeyVminD_TNo_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3603,9 +3603,9 @@ void TEcnaGui::DoButtonVmaxD_TNo_ChNb() fKeyVmaxD_TNo_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'total noise' -> " - << fKeyVmaxD_TNo_ChNb << endl; + << fKeyVmaxD_TNo_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3618,9 +3618,9 @@ void TEcnaGui::DoButtonVminD_MCs_ChNb() fKeyVminD_MCs_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'mean cor(s,s')' -> " - << fKeyVminD_MCs_ChNb << endl; + << fKeyVminD_MCs_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3633,9 +3633,9 @@ void TEcnaGui::DoButtonVmaxD_MCs_ChNb() fKeyVmaxD_MCs_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'mean cor(s,s')' -> " - << fKeyVmaxD_MCs_ChNb << endl; + << fKeyVmaxD_MCs_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3649,9 +3649,9 @@ void TEcnaGui::DoButtonVminD_LFN_ChNb() fKeyVminD_LFN_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'low frequency noise' -> " - << fKeyVminD_LFN_ChNb << endl; + << fKeyVminD_LFN_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3664,9 +3664,9 @@ void TEcnaGui::DoButtonVmaxD_LFN_ChNb() fKeyVmaxD_LFN_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'low frequency noise' -> " - << fKeyVmaxD_LFN_ChNb << endl; + << fKeyVmaxD_LFN_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3679,9 +3679,9 @@ void TEcnaGui::DoButtonVminD_HFN_ChNb() fKeyVminD_HFN_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'high frequency noise' -> " - << fKeyVminD_HFN_ChNb << endl; + << fKeyVminD_HFN_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3694,9 +3694,9 @@ void TEcnaGui::DoButtonVmaxD_HFN_ChNb() fKeyVmaxD_HFN_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'high frequency noise' -> " - << fKeyVmaxD_HFN_ChNb << endl; + << fKeyVmaxD_HFN_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3709,9 +3709,9 @@ void TEcnaGui::DoButtonVminD_SCs_ChNb() fKeyVminD_SCs_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'sigma of cor(s,s')' -> " - << fKeyVminD_SCs_ChNb << endl; + << fKeyVminD_SCs_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3724,9 +3724,9 @@ void TEcnaGui::DoButtonVmaxD_SCs_ChNb() fKeyVmaxD_SCs_ChNb = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'sigma of cor(s,s')' -> " - << fKeyVmaxD_SCs_ChNb << endl; + << fKeyVmaxD_SCs_ChNb << std::endl; } //------------------------------------------------------------------- @@ -3739,9 +3739,9 @@ void TEcnaGui::DoButtonVminLFccMos() fKeyVminLFccMos = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'mean LF |cor(c,c')|' -> " - << fKeyVminLFccMos << endl; + << fKeyVminLFccMos << std::endl; } //------------------------------------------------------------------- @@ -3754,9 +3754,9 @@ void TEcnaGui::DoButtonVmaxLFccMos() fKeyVmaxLFccMos = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'mean LF |cor(c,c')|' -> " - << fKeyVmaxLFccMos << endl; + << fKeyVmaxLFccMos << std::endl; } //------------------------------------------------------------------- @@ -3769,9 +3769,9 @@ void TEcnaGui::DoButtonVminHFccMos() fKeyVminHFccMos = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'mean HF |cor(c,c')|' -> " - << fKeyVminHFccMos << endl; + << fKeyVminHFccMos << std::endl; } //------------------------------------------------------------------- @@ -3784,9 +3784,9 @@ void TEcnaGui::DoButtonVmaxHFccMos() fKeyVmaxHFccMos = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'mean HF |cor(c,c')|' -> " - << fKeyVmaxHFccMos << endl; + << fKeyVmaxHFccMos << std::endl; } //------------------------------------------------------------------- @@ -3800,9 +3800,9 @@ void TEcnaGui::DoButtonVminLHFcc() fKeyVminLHFcc = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymin for plot 'cor(c,c') in " - << fStinName.Data() << "s' -> " << fKeyVminLHFcc << endl; + << fStinName.Data() << "s' -> " << fKeyVminLHFcc << std::endl; } //------------------------------------------------------------------- @@ -3815,9 +3815,9 @@ void TEcnaGui::DoButtonVmaxLHFcc() fKeyVmaxLHFcc = (Double_t)atof(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of Ymax for plot 'cor(c,c') in " - << fStinName.Data() << "s' -> " << fKeyVmaxLHFcc << endl; + << fStinName.Data() << "s' -> " << fKeyVmaxLHFcc << std::endl; } //------------------------------------------------------------------- @@ -3842,26 +3842,26 @@ void TEcnaGui::DoButtonStinA() if( fSubDet == "EB" ) { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of " << fStinName.Data() << " number -> " - << xReadStinANumberForCons << endl; + << xReadStinANumberForCons << std::endl; if ( (fKeyStinANumber < 1) || (fKeyStinANumber > fEcal->MaxStinEcnaInStex()) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << fStinName.Data() + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << fStinName.Data() << " number = " << fKeyStinANumber << ": out of range ( range = [ 1 ," << fEcal->MaxStinEcnaInStex() << " ] ) " - << fTTBELL << endl; + << fTTBELL << std::endl; } } if( fSubDet == "EE" ) { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of " << fStinName.Data() << " number for construction -> " - << xReadStinANumberForCons << endl; + << xReadStinANumberForCons << std::endl; if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxDeeInEE() ) { @@ -3872,18 +3872,18 @@ void TEcnaGui::DoButtonStinA() xReadStinANumberForCons > fEcal->MaxSCForConsInDee()+off_set_cons ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> SC nb for construction = " + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> SC nb for construction = " << xReadStinANumberForCons << ". Out of range ( range = [ " << off_set_cons+1 << "," << fEcal->MaxSCForConsInDee()+off_set_cons << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> DeeNumber = " << fKeyStexNumber + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> DeeNumber = " << fKeyStexNumber << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } } @@ -3902,19 +3902,19 @@ void TEcnaGui::DoButtonStinB() {fKeyStinBNumber = fEcalNumbering->Get1DeeSCEcnaFromDeeSCCons(fKeyStexNumber, xReadStinBNumberForCons);} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of " << fStinName.Data() << "' number -> " - << xReadStinBNumberForCons << endl; + << xReadStinBNumberForCons << std::endl; if( fSubDet == "EB" ) { if ( (fKeyStinBNumber < 1) || (fKeyStinBNumber > fEcal->MaxStinEcnaInStex()) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << fStinName.Data() + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << fStinName.Data() << "' number = " << fKeyStinBNumber << ": out of range ( range = [ 1 ," << fEcal->MaxStinEcnaInStex() << " ] ) " - << fTTBELL << endl; + << fTTBELL << std::endl; } } @@ -3929,18 +3929,18 @@ void TEcnaGui::DoButtonStinB() xReadStinBNumberForCons > fEcal->MaxSCForConsInDee()+off_set_cons ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> SC nb for construction = " + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> SC nb for construction = " << xReadStinBNumberForCons << ". Out of range ( range = [ " << off_set_cons+1 << "," << fEcal->MaxSCForConsInDee()+off_set_cons << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> DeeNumber = " << fKeyStexNumber + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> DeeNumber = " << fKeyStexNumber << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } } @@ -3967,18 +3967,18 @@ void TEcnaGui::DoButtonChan() fKeyChanNumber = xReadNumber-Choffset; // fKeyChanNumber : range = [0,25] fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of " << ChString.Data() << " number -> " - << xReadNumber << endl; + << xReadNumber << std::endl; if ( (fKeyChanNumber < 0) || (fKeyChanNumber > fEcal->MaxCrysInStin()-1 ) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << ChString.Data() << " number in " << fStinName.Data() << " = " << xReadNumber << ": out of range ( range = [" << Choffset << "," << fEcal->MaxCrysInStin()-1+Choffset << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } //------------------------------------------------------------------- @@ -3990,17 +3990,17 @@ void TEcnaGui::DoButtonSamp() Int_t xKeySampNumber = atoi(bufferchain); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of sample number -> " - << xKeySampNumber << endl; + << xKeySampNumber << std::endl; if ( (xKeySampNumber < 1) || (xKeySampNumber > fKeyNbOfSamples ) ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << " Sample number = " << xKeySampNumber << ": out of range ( range = [ 1 ," << fKeyNbOfSamples << " ] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } fKeySampNumber = xKeySampNumber-1; @@ -4016,9 +4016,9 @@ void TEcnaGui::DoButtonRul() if( listchain[0] == '\0' ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *ERROR* ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *ERROR* ===> " << " Empty file name in entry for TIME EVOLUTION plots." - << fTTBELL << endl; + << fTTBELL << std::endl; fKeyFileNameRunList = fKeyRunListInitCode; } else @@ -4033,18 +4033,18 @@ void TEcnaGui::DoButtonRul() listchain[0] == tchiffr [8] || listchain[0] == tchiffr [9] ) { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *ERROR* ===> " + std::cout << " !TEcnaGui (" << fCnaError << ") *ERROR* ===> " << " Please, enter a file name beginning with an alphabetic letter." - << fTTBELL << endl; + << fTTBELL << std::endl; } else { fKeyFileNameRunList = listchain; fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of run list file name for history plots -> " - << fKeyFileNameRunList.Data() << endl; + << fKeyFileNameRunList.Data() << std::endl; } } } @@ -4058,9 +4058,9 @@ void TEcnaGui::DoButtonGent() fKeyGeneralTitle = listchain; fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Registration of general title -> " - << fKeyGeneralTitle.Data() << endl; + << fKeyGeneralTitle.Data() << std::endl; } //------------------------------------------------------------------- // @@ -4076,8 +4076,8 @@ void TEcnaGui::DoButtonLogx() fMemoScaleX = fKeyScaleX; fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> X axis -> " << fKeyScaleX << " scale " << endl; + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> X axis -> " << fKeyScaleX << " scale " << std::endl; } void TEcnaGui::DoButtonLogy() { @@ -4086,8 +4086,8 @@ void TEcnaGui::DoButtonLogy() fMemoScaleY = fKeyScaleY; fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> Y axis -> " << fKeyScaleY << " scale " << endl; + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> Y axis -> " << fKeyScaleY << " scale " << std::endl; } void TEcnaGui::DoButtonProjy() @@ -4097,8 +4097,8 @@ void TEcnaGui::DoButtonProjy() fMemoProjY = fKeyProjY; fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> 1D Histo display -> " << fKeyProjY << " mode " << endl; + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> 1D Histo display -> " << fKeyProjY << " mode " << std::endl; } //------------------------------------------------------------------- Colors + Exit @@ -4116,16 +4116,16 @@ void TEcnaGui::DoButtonColPal() {sColPalComment = "Rainbow option: red-orange-yellow-green-blue-indigo-purple";} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> Color palette -> " << sColPalComment << endl; + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> Color palette -> " << sColPalComment << std::endl; } void TEcnaGui::DoButtonExit() { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Exit CNA session." - << endl; + << std::endl; //............................ Quit the ROOT session fButExit->SetCommand(".q"); } @@ -4135,8 +4135,8 @@ void TEcnaGui::DoButtonExit() void TEcnaGui::DoButtonClone() { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> Clone last canvas. " << endl; + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> Clone last canvas. " << std::endl; if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fHistos->PlotCloneOfCurrentCanvas(); @@ -4145,18 +4145,18 @@ void TEcnaGui::DoButtonClone() void TEcnaGui::DoButtonRoot() { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> This is ROOT version " << gROOT->GetVersion() - << endl; + << std::endl; } //------------------------------------------------------------------- void TEcnaGui::DoButtonHelp() { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> HELP: for documentation, see the ECNA web page: " << endl + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> HELP: for documentation, see the ECNA web page: " << std::endl << " http://cms-fabbro.web.cern.ch/cms-fabbro/cna_new/Correlated_Noise_Analysis/ECNA_main_page.htm" - << endl; + << std::endl; } //=================================================================== @@ -4411,8 +4411,8 @@ void TEcnaGui::HandleMenu(Int_t id) { if(fKeyFileNameRunList == fKeyRunListInitCode ) {fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " - << " EMPTY STRING for list of run file name (TIME EVOLUTION plots)." << fTTBELL << endl;} + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " + << " EMPTY STRING for list of run file name (TIME EVOLUTION plots)." << fTTBELL << std::endl;} else { //........................................ Pedestals (HandleMenu / ViewHistime) @@ -4611,8 +4611,8 @@ void TEcnaGui::SubmitOnBatchSystem(const TString& QueueCode) if( (fConfirmSubmit == 1) && (fConfirmRunNumber == fKeyRunNumber) ) { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand - << "]> Submitting job in batch mode for run " << fConfirmRunNumber << endl; + std::cout << " *TEcnaGui [" << fCnaCommand + << "]> Submitting job in batch mode for run " << fConfirmRunNumber << std::endl; //.......................... get the path "modules/data" // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/data/ @@ -4747,17 +4747,17 @@ void TEcnaGui::SubmitOnBatchSystem(const TString& QueueCode) if( i_exec_python != 0 ) { - cout << "*TEcnaGui> Script for python file building was executed with error code = " - << i_exec_python << "." << endl - << " python file: " << fPythonFileName.Data() << ".py" << endl - << " Command: " << CnaExecPythonCommand.Data() << endl - << fTTBELL << endl; + std::cout << "*TEcnaGui> Script for python file building was executed with error code = " + << i_exec_python << "." << std::endl + << " python file: " << fPythonFileName.Data() << ".py" << std::endl + << " Command: " << CnaExecPythonCommand.Data() << std::endl + << fTTBELL << std::endl; } else { - cout << "*TEcnaGui> Script for python file building was successfully executed." << endl - << " python file: " << fPythonFileName.Data() << ".py" << endl - << " (Command: " << CnaExecPythonCommand.Data() << ")" << endl; + std::cout << "*TEcnaGui> Script for python file building was successfully executed." << std::endl + << " python file: " << fPythonFileName.Data() << ".py" << std::endl + << " (Command: " << CnaExecPythonCommand.Data() << ")" << std::endl; //========================================================== Job submission script TString CnaSubmitCommand = ModulesdataPath; @@ -4793,16 +4793,16 @@ void TEcnaGui::SubmitOnBatchSystem(const TString& QueueCode) if( i_exec_submit != 0 ) { - cout << "*TEcnaGui> Script for job submission was executed with error code = " - << i_exec_submit << "." << endl - << " Command: " << CnaExecSubmitCommand.Data() << endl - << fTTBELL << endl; + std::cout << "*TEcnaGui> Script for job submission was executed with error code = " + << i_exec_submit << "." << std::endl + << " Command: " << CnaExecSubmitCommand.Data() << std::endl + << fTTBELL << std::endl; } else { - cout << "*TEcnaGui> Job with configuration file: " << fPythonFileName.Data() - << " was successfully submitted." << endl - << " (Command: " << CnaExecSubmitCommand.Data() << ")" << endl; + std::cout << "*TEcnaGui> Job with configuration file: " << fPythonFileName.Data() + << " was successfully submitted." << std::endl + << " (Command: " << CnaExecSubmitCommand.Data() << ")" << std::endl; } fConfirmSubmit = 0; @@ -4815,10 +4815,10 @@ void TEcnaGui::SubmitOnBatchSystem(const TString& QueueCode) if( fKeyAnaType.BeginsWith("Adc") ) { fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Request for submitting job in batch mode for run " << fKeyRunNumber << ". Syntax OK. Please, click again to confirm." - << fTTBELL << endl; + << fTTBELL << std::endl; fConfirmSubmit = 1; fConfirmRunNumber = fKeyRunNumber; @@ -4827,10 +4827,10 @@ void TEcnaGui::SubmitOnBatchSystem(const TString& QueueCode) else { fCnaError++; - cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>" + std::cout << " !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>" << " Analysis name = " << fKeyAnaType << ": should begin with 'Adc'." - << " Please, change the analysis name." << fTTBELL << endl; + << " Please, change the analysis name." << fTTBELL << std::endl; fConfirmSubmit = 0; fConfirmRunNumber = 0; @@ -4850,9 +4850,9 @@ void TEcnaGui::CleanBatchFiles(const TString& clean_code) //Clean python files, submission scripts,... fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Clean requested with code: " << clean_code - << endl; + << std::endl; //================================ CLEAN SUBMISSION SCRIPTS =================================== if( clean_code == "Sub" || clean_code == "All") @@ -4885,16 +4885,16 @@ void TEcnaGui::CleanBatchFiles(const TString& clean_code) if( i_exec_cleansubmission != 0 ) { - cout << "*TEcnaGui> Script for submission script clean was executed with error code = " - << i_exec_cleansubmission << "." << endl - << " Command: " << CnaExecCleanSubmissionCommand.Data() << endl - << fTTBELL << endl; + std::cout << "*TEcnaGui> Script for submission script clean was executed with error code = " + << i_exec_cleansubmission << "." << std::endl + << " Command: " << CnaExecCleanSubmissionCommand.Data() << std::endl + << fTTBELL << std::endl; } else { - cout << "*TEcnaGui> Script for submission script clean" - << " was successfully executed." << endl - << " (Command: " << CnaExecCleanSubmissionCommand.Data() << ")" << endl; + std::cout << "*TEcnaGui> Script for submission script clean" + << " was successfully executed." << std::endl + << " (Command: " << CnaExecCleanSubmissionCommand.Data() << ")" << std::endl; } } @@ -4930,16 +4930,16 @@ void TEcnaGui::CleanBatchFiles(const TString& clean_code) if( i_exec_cleanjobreport != 0 ) { - cout << "*TEcnaGui> Script for LSFJOB report clean was executed with error code = " - << i_exec_cleanjobreport << "." << endl - << " Command: " << CnaExecCleanJobreportCommand.Data() << endl - << fTTBELL << endl; + std::cout << "*TEcnaGui> Script for LSFJOB report clean was executed with error code = " + << i_exec_cleanjobreport << "." << std::endl + << " Command: " << CnaExecCleanJobreportCommand.Data() << std::endl + << fTTBELL << std::endl; } else { - cout << "*TEcnaGui> Script for LSFJOB report clean" - << " was successfully executed." << endl - << " (Command: " << CnaExecCleanJobreportCommand.Data() << ")" << endl; + std::cout << "*TEcnaGui> Script for LSFJOB report clean" + << " was successfully executed." << std::endl + << " (Command: " << CnaExecCleanJobreportCommand.Data() << ")" << std::endl; } } @@ -4971,16 +4971,16 @@ void TEcnaGui::CleanBatchFiles(const TString& clean_code) if( i_exec_cleanpython != 0 ) { - cout << "*TEcnaGui> Script for python file clean was executed with error code = " - << i_exec_cleanpython << "." << endl - << " Command: " << CnaExecCleanPythonCommand.Data() << endl - << fTTBELL << endl; + std::cout << "*TEcnaGui> Script for python file clean was executed with error code = " + << i_exec_cleanpython << "." << std::endl + << " Command: " << CnaExecCleanPythonCommand.Data() << std::endl + << fTTBELL << std::endl; } else { - cout << "*TEcnaGui> Script for python file clean" - << " was successfully executed." << endl - << " (Command: " << CnaExecCleanPythonCommand.Data() << ")" << endl; + std::cout << "*TEcnaGui> Script for python file clean" + << " was successfully executed." << std::endl + << " (Command: " << CnaExecCleanPythonCommand.Data() << ")" << std::endl; } } } @@ -4996,9 +4996,9 @@ void TEcnaGui::Calculations(const TString& calc_code) //Calculations of quantities (Pedestals, correlations, ... ) fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Calculations requested with code: " << calc_code - << endl; + << std::endl; //===== Check if Analysis name is right if( fKeyAnaType == "AdcPed1" || fKeyAnaType == "AdcSPed1" || @@ -5031,9 +5031,9 @@ void TEcnaGui::Calculations(const TString& calc_code) if( MyRun->ReadSampleAdcValues(fKeyNbOfSampForCalc) == kTRUE ) { - cout << "*TEcnaGui::Calculations> File " + std::cout << "*TEcnaGui::Calculations> File " << MyRun->GetRootFileNameShort() << " found. Starting calculations." - << endl; + << std::endl; MyRun->GetReadyToCompute(); @@ -5050,7 +5050,7 @@ void TEcnaGui::Calculations(const TString& calc_code) { //------ Additional calculations: // "correlations" between Xtals and Stins (long time, big file) - cout << "*TEcnaGui::Calculations> Please, wait." << endl; + std::cout << "*TEcnaGui::Calculations> Please, wait." << std::endl; MyRun->Expert1Calculations(); // (long time, big file) // <=> MyRun->LowFrequencyCorrelationsBetweenChannels(); // (big file) @@ -5065,7 +5065,7 @@ void TEcnaGui::Calculations(const TString& calc_code) { //---Additional calculations: // "correlations" between Stins (long time, "normal" size file) - cout << "*TEcnaGui::Calculations> Please, wait." << endl; + std::cout << "*TEcnaGui::Calculations> Please, wait." << std::endl; MyRun->Expert2Calculations(); // (long time but not big file) @@ -5139,20 +5139,20 @@ void TEcnaGui::Calculations(const TString& calc_code) if( MyRun->WriteNewRootFile(calc_file_name.Data()) == kTRUE ) { - cout << "*TEcnaGui::Calculations> Done. Write ROOT file: " - << MyRun->GetNewRootFileNameShort() << " OK" << endl << endl; + std::cout << "*TEcnaGui::Calculations> Done. Write ROOT file: " + << MyRun->GetNewRootFileNameShort() << " OK" << std::endl << std::endl; } else { - cout << "!TEcnaGui::Calculations> Writing ROOT file failure for file " + std::cout << "!TEcnaGui::Calculations> Writing ROOT file failure for file " << MyRun->GetNewRootFileNameShort() - << fTTBELL << endl << endl; + << fTTBELL << std::endl << std::endl; } } else { - cout << "!TEcnaGui::Calculations> " << MyRun->GetRootFileNameShort() << ": file not found." - << fTTBELL << endl << endl; + std::cout << "!TEcnaGui::Calculations> " << MyRun->GetRootFileNameShort() << ": file not found." + << fTTBELL << std::endl << std::endl; } //....................................................................... delete MyRun; MyRun = 0; fCdelete++; @@ -5161,28 +5161,28 @@ void TEcnaGui::Calculations(const TString& calc_code) } // end of if( fKeyNbOfSamples >= fKeyNbOfSampForCalc ) else { - cout << "!TEcnaGui::Calculations> *** ERROR *** Number of samples in file (=" << fKeyNbOfSamples - << ") less than number of samples for calculations (= " << fKeyNbOfSampForCalc << "). " << endl; + std::cout << "!TEcnaGui::Calculations> *** ERROR *** Number of samples in file (=" << fKeyNbOfSamples + << ") less than number of samples for calculations (= " << fKeyNbOfSampForCalc << "). " << std::endl; } } // end of if( calc_code == "Std" || ( ( calc_code == "Scc" || calc_code == "Stt" ) && fConfirmCalcScc == 1 ) ) else { - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Calculation requested with option " << calc_code << ". This can last more than 5 minutes. Please, click again to confirm." - << fTTBELL << endl; + << fTTBELL << std::endl; fConfirmCalcScc = 1; } } else { - cout << "!TEcnaGui::Calculations> fKeyAnaType = " << fKeyAnaType - << " : wrong code in analysis name." << endl - << " List of available standard analysis names for calculations: " << endl - << " AdcPed1, AdcPed6, AdcPed12, AdcPeg12, AdcLaser, AdcPes12," << endl - << " AdcSPed1, AdcSPed6, AdcSPed12, AdcSPeg12, AdcSLaser, AdcSPes12," << endl + std::cout << "!TEcnaGui::Calculations> fKeyAnaType = " << fKeyAnaType + << " : wrong code in analysis name." << std::endl + << " List of available standard analysis names for calculations: " << std::endl + << " AdcPed1, AdcPed6, AdcPed12, AdcPeg12, AdcLaser, AdcPes12," << std::endl + << " AdcSPed1, AdcSPed6, AdcSPed12, AdcSPeg12, AdcSLaser, AdcSPes12," << std::endl << " AdcPhys, AdcAny (all names must begin with 'Adc')." - << fTTBELL << endl; + << fTTBELL << std::endl; } } //========================================================================== @@ -5196,14 +5196,14 @@ void TEcnaGui::MessageCnaCommandReplyA(const TString& first_same_plot) { // reply message of the Cna command - cout << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber + std::cout << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber - << ", last req. evt#: " << fKeyLastReqEvtNumber << endl; + << ", last req. evt#: " << fKeyLastReqEvtNumber << std::endl; if( first_same_plot == "ASCII" ) { - cout << " " << fStexName.Data() << ": " << fKeyStexNumber - << ", option: " << first_same_plot << endl; + std::cout << " " << fStexName.Data() << ": " << fKeyStexNumber + << ", option: " << first_same_plot << std::endl; } } @@ -5219,15 +5219,15 @@ void TEcnaGui::MessageCnaCommandReplyB(const TString& first_same_plot) { TString xAsciiFileName = fHistos->AsciiFileName(); if( xAsciiFileName != "?" ) - {cout << " Histo written in ASCII file: " << xAsciiFileName.Data();} + {std::cout << " Histo written in ASCII file: " << xAsciiFileName.Data();} } } else { - cout << " No writing in ASCII file since " + std::cout << " No writing in ASCII file since " << fStexName.Data() << " number = " << fKeyStexNumber; } - cout << endl; + std::cout << std::endl; } } @@ -5246,7 +5246,7 @@ void TEcnaGui::ViewMatrixLowFrequencyMeanCorrelationsBetweenStins(const TString& fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low Frequency Mean Cor(c,c') for each pair of " << fStinName.Data() << "s. Option: " << option_plot; @@ -5268,7 +5268,7 @@ void TEcnaGui::ViewMatrixHighFrequencyMeanCorrelationsBetweenStins(const TString fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High Frequency Mean Cor(c,c') for each pair of " << fStinName.Data() << "s. Option: " << option_plot; @@ -5293,7 +5293,7 @@ void TEcnaGui::ViewMatrixLowFrequencyCorrelationsBetweenChannels(const Int_t& c fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low Frequency Correlation matrix between channels. " << fStinName.Data() << " A: " << cStexStin_A << ", " << fStinName.Data() << " B: " << cStexStin_B @@ -5317,7 +5317,7 @@ void TEcnaGui::ViewMatrixHighFrequencyCorrelationsBetweenChannels(const Int_t& fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High Frequency Correlation matrix between channels. " << fStinName.Data() << " A: " << cStexStin_A << ", " << fStinName.Data() << " B: " << cStexStin_B @@ -5341,7 +5341,7 @@ void TEcnaGui::ViewStexLowFrequencyCorcc() fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> LF Correlations between channels for each " << fStinName.Data() << " in " << fStexName.Data() << ". 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; @@ -5364,7 +5364,7 @@ void TEcnaGui::ViewStexHighFrequencyCorcc() fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> HF Correlations between channels for each " << fStinName.Data() << " in " << fStexName.Data() << ". 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; @@ -5392,7 +5392,7 @@ void TEcnaGui::ViewMatrixCorrelationSamples(const Int_t& cStexStin_A, const Int if(fSubDet == "EE"){ChOffset = 1;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Correlation matrix between samples. " << fStinName.Data() << ": " << cStexStin_A << ", channel " << i0StinEcha + ChOffset << ", option: " << option_plot; @@ -5420,7 +5420,7 @@ void TEcnaGui::ViewMatrixCovarianceSamples(const Int_t& cStexStin_A, const Int_ if(fSubDet == "EE"){ChOffset = 1;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Covariance matrix between samples. " << fStinName.Data() << ": " << cStexStin_A << ", channel " << i0StinEcha + ChOffset << ", option: " << option_plot; @@ -5450,7 +5450,7 @@ void TEcnaGui::ViewStinCorrelationSamples(const Int_t& cStexStin) fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Correlation matrices between samples for each channel of " << fStinName.Data() << " " << cStexStin; MessageCnaCommandReplyA("DUMMY"); @@ -5472,7 +5472,7 @@ void TEcnaGui::ViewStinCovarianceSamples(const Int_t& cStexStin) fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Covariance matrices between samples for each channel of " << fStinName.Data() << " " << cStexStin; MessageCnaCommandReplyA("DUMMY"); @@ -5499,7 +5499,7 @@ void TEcnaGui::ViewSorSNumberOfEvents() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Number of Events. 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5508,7 +5508,7 @@ void TEcnaGui::ViewSorSNumberOfEvents() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Average Number of Events. 2D histo for " << fSubDet.Data(); } @@ -5535,7 +5535,7 @@ void TEcnaGui::ViewSorSPedestals() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Pedestals. 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5544,7 +5544,7 @@ void TEcnaGui::ViewSorSPedestals() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Pedestals. 2D histo for " << fSubDet.Data(); } @@ -5571,7 +5571,7 @@ void TEcnaGui::ViewSorSTotalNoise() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Total noise. 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5580,7 +5580,7 @@ void TEcnaGui::ViewSorSTotalNoise() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Average total noise. 2D histo for " << fSubDet.Data(); } @@ -5607,7 +5607,7 @@ void TEcnaGui::ViewSorSLowFrequencyNoise() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low frequency noise. 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5616,7 +5616,7 @@ void TEcnaGui::ViewSorSLowFrequencyNoise() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Average low frequency noise. 2D histo for " << fSubDet.Data(); } @@ -5642,7 +5642,7 @@ void TEcnaGui::ViewSorSHighFrequencyNoise() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High frequency noise. 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5651,7 +5651,7 @@ void TEcnaGui::ViewSorSHighFrequencyNoise() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Average high frequency noise. 2D histo for " << fSubDet.Data(); } @@ -5681,7 +5681,7 @@ void TEcnaGui::ViewSorSMeanCorss() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Mean cor(s,s'). 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5690,7 +5690,7 @@ void TEcnaGui::ViewSorSMeanCorss() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Average mean cor(s,s'). 2D histo for " << fSubDet.Data(); } @@ -5720,7 +5720,7 @@ void TEcnaGui::ViewSorSSigmaOfCorss() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sigma of Cor(s,s'). 2D histo. " << fStexName.Data() << ": " << fKeyStexNumber; } @@ -5729,7 +5729,7 @@ void TEcnaGui::ViewSorSSigmaOfCorss() fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Average sigma of Cor(s,s'). 2D histo for " << fSubDet.Data(); } @@ -5765,9 +5765,9 @@ void TEcnaGui::ViewStinCrystalNumbering(const Int_t& StexStinEcna) {StinNumber = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber,StexStinEcna);} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Crystal numbering for " << " " << fStexName.Data() << " " - << fKeyStexNumber << ", " << fStinName.Data() << " " << StinNumber << endl; + << fKeyStexNumber << ", " << fStinName.Data() << " " << StinNumber << std::endl; if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fHistos->GeneralTitle(fKeyGeneralTitle); @@ -5787,9 +5787,9 @@ void TEcnaGui::ViewStexStinNumbering() // and is in the entry field of the Stex button (fKeyStexNumber) fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> " << fStinName.Data() << " numbering for " << fStexName.Data() - << " " << fKeyStexNumber << endl; + << " " << fKeyStexNumber << std::endl; if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fHistos->GeneralTitle(fKeyGeneralTitle); @@ -5813,7 +5813,7 @@ void TEcnaGui::ViewHistoSorSNumberOfEventsOfCrystals(const TString& first_same_p fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Number of events for crystals"; MessageCnaCommandReplyA(first_same_plot); @@ -5836,7 +5836,7 @@ void TEcnaGui::ViewHistoSorSNumberOfEventsDistribution(const TString& first_same fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Number of events distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -5860,7 +5860,7 @@ void TEcnaGui::ViewHistoSorSPedestalsOfCrystals(const TString& first_same_plot) fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Pedestals"; MessageCnaCommandReplyA(first_same_plot); @@ -5883,7 +5883,7 @@ void TEcnaGui::ViewHistoSorSPedestalsDistribution(const TString& first_same_plot fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Pedestals distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -5907,7 +5907,7 @@ void TEcnaGui::ViewHistoSorSTotalNoiseOfCrystals(const TString& first_same_plot) fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Total noise"; MessageCnaCommandReplyA(first_same_plot); @@ -5930,7 +5930,7 @@ void TEcnaGui::ViewHistoSorSTotalNoiseDistribution(const TString& first_same_plo fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Total noise distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -5955,7 +5955,7 @@ void TEcnaGui::ViewHistoSorSLowFrequencyNoiseOfCrystals(const TString& first_sam fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low frequency noise"; MessageCnaCommandReplyA(first_same_plot); @@ -5978,7 +5978,7 @@ void TEcnaGui::ViewHistoSorSLowFrequencyNoiseDistribution(const TString& first_s fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low frequency noise distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -6002,7 +6002,7 @@ void TEcnaGui::ViewHistoSorSHighFrequencyNoiseOfCrystals(const TString& first_sa fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High frequency noise"; MessageCnaCommandReplyA(first_same_plot); @@ -6025,7 +6025,7 @@ void TEcnaGui::ViewHistoSorSHighFrequencyNoiseDistribution(const TString& first_ fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High frequency noise distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -6049,7 +6049,7 @@ void TEcnaGui::ViewHistoSorSMeanCorssOfCrystals(const TString& first_same_plot) fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Mean cor(s,s')"; MessageCnaCommandReplyA(first_same_plot); @@ -6072,7 +6072,7 @@ void TEcnaGui::ViewHistoSorSMeanCorssDistribution(const TString& first_same_plot fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Mean cor(s,s') distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -6095,7 +6095,7 @@ void TEcnaGui::ViewHistoSorSSigmaOfCorssOfCrystals(const TString& first_same_plo fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sigma of cor(s,s')"; MessageCnaCommandReplyA(first_same_plot); @@ -6118,7 +6118,7 @@ void TEcnaGui::ViewHistoSorSSigmaOfCorssDistribution(const TString& first_same_p fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sigma of cor(s,s') distribution"; MessageCnaCommandReplyA(first_same_plot); @@ -6143,12 +6143,12 @@ void TEcnaGui::ViewHistoCrystalSampleMeans(const Int_t& cStexStin_A, const Int_ fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sample means" << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal" << crystal - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_Ped_ChNb); fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); @@ -6169,12 +6169,12 @@ void TEcnaGui::ViewHistoCrystalSampleMeansDistribution(const Int_t& cStexStin_A fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sample means" << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal" << crystal - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_Ped_ChNb); fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); @@ -6194,12 +6194,12 @@ void TEcnaGui::ViewHistoCrystalSampleSigmas(const Int_t& cStexStin_A, const Int fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sample sigmas" << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal:" << crystal - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_TNo_ChNb); fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); @@ -6219,12 +6219,12 @@ void TEcnaGui::ViewHistoCrystalSampleSigmasDistribution(const Int_t& cStexStin_ fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sample sigmas" << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal:" << crystal - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_TNo_ChNb); fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); @@ -6246,12 +6246,12 @@ void TEcnaGui::ViewHistoCrystalSampleValues(const Int_t& cStexStin_A, const Int_ fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> ADC sample values" << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal: " << crystal - << ", sample: " << n1Sample << ", option: " << first_same_plot << endl; + << ", sample: " << n1Sample << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_Ped_ChNb); fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); @@ -6272,12 +6272,12 @@ void TEcnaGui::ViewHistoSampleEventDistribution(const Int_t& cStexStin_A, const fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> ADC event distribution" << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal: " << crystal - << ", sample " << n1Sample << ", option: " << first_same_plot << endl; + << ", sample " << n1Sample << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_Ped_ChNb); fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); @@ -6297,11 +6297,11 @@ void TEcnaGui::ViewHistimeCrystalPedestals(const TString& run_par_file_name, if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Pedestal history" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_Ped_ChNb); fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); @@ -6322,11 +6322,11 @@ void TEcnaGui::ViewHistimeCrystalPedestalsRuns(const TString& run_par_file_name if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Pedestal history distribution" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_Ped_ChNb); fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); @@ -6348,11 +6348,11 @@ void TEcnaGui::ViewHistimeCrystalTotalNoise(const TString& run_par_file_name, if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Total noise history" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_TNo_ChNb); fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); @@ -6373,11 +6373,11 @@ void TEcnaGui::ViewHistimeCrystalTotalNoiseRuns(const TString& run_par_file_nam if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Total noise history distribution" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_TNo_ChNb); fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); @@ -6398,11 +6398,11 @@ void TEcnaGui::ViewHistimeCrystalLowFrequencyNoise(const TString& run_par_file_ if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low frequency noise history" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_LFN_ChNb); fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb); @@ -6423,11 +6423,11 @@ void TEcnaGui::ViewHistimeCrystalLowFrequencyNoiseRuns(const TString& run_par_f if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Low frequency noise history distribution" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_LFN_ChNb); fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb); @@ -6448,11 +6448,11 @@ void TEcnaGui::ViewHistimeCrystalHighFrequencyNoise(const TString& run_par_file if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High frequency noise history" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_HFN_ChNb); fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb); @@ -6473,11 +6473,11 @@ void TEcnaGui::ViewHistimeCrystalHighFrequencyNoiseRuns(const TString& run_par_ if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> High frequency noise history distribution" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_HFN_ChNb); fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb); @@ -6498,11 +6498,11 @@ void TEcnaGui::ViewHistimeCrystalMeanCorss(const TString& run_par_file_name, if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Mean corss history" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_MCs_ChNb); fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb); @@ -6523,11 +6523,11 @@ void TEcnaGui::ViewHistimeCrystalMeanCorssRuns(const TString& run_par_file_name if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/ ;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Mean corss history distribution" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_MCs_ChNb); fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb); @@ -6548,11 +6548,11 @@ void TEcnaGui::ViewHistimeCrystalSigmaOfCorss(const TString& run_par_file_name, if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sigma of corss history" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_SCs_ChNb); fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb); @@ -6573,11 +6573,11 @@ void TEcnaGui::ViewHistimeCrystalSigmaOfCorssRuns(const TString& run_par_file_na if( fHistos == 0 ){fHistos = new TEcnaHistos(fObjectManager, fSubDet.Data()); /*fCnew++*/;} fCnaCommand++; - cout << " *TEcnaGui [" << fCnaCommand + std::cout << " *TEcnaGui [" << fCnaCommand << "]> Sigma of corss history distribution" << ". Run parameters file name: " << run_par_file_name << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha - << ", option: " << first_same_plot << endl; + << ", option: " << first_same_plot << std::endl; fHistos->SetHistoMin(fKeyVminD_SCs_ChNb); fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb); diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHeader.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHeader.cc index e9515e28e7f00..0d4c8b83f79fe 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHeader.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHeader.cc @@ -22,7 +22,7 @@ TEcnaHeader::TEcnaHeader(TEcnaObject* pObjectManager, const Text_t* name, const // Please give a name and a title containing info about what // you are doing and saving in the ROOT file - // cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -32,7 +32,7 @@ TEcnaHeader::TEcnaHeader(TEcnaObject* pObjectManager, const Text_t* name, const TEcnaHeader::~TEcnaHeader() { //destructor - // cout << "[Info Management] CLASS: TEcnaHeader. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHeader. DESTROY OBJECT: this = " << this << std::endl; } void TEcnaHeader::Init() @@ -107,7 +107,7 @@ void TEcnaHeader::HeaderParameters(const TString& typ_ana, const // Please give a name and a title containing info about what // you are doing and saving in the ROOT file - // cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::endl; Init(); @@ -128,7 +128,7 @@ void TEcnaHeader::HeaderParameters(const TString& typ_ana, const const Int_t& aLastReqEvtNumber, const Int_t& aReqNbOfEvts, const Int_t& Stex) { - // cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHeader. CREATE OBJECT: this = " << this << std::endl; Init(); @@ -143,75 +143,75 @@ void TEcnaHeader::HeaderParameters(const TString& typ_ana, const void TEcnaHeader::Print() { // Print the header - cout << endl; - cout << " Header parameters " << endl; - cout << endl; - cout << "Run number : " << fRunNumber << endl; - cout << "First requested event number : " << fFirstReqEvtNumber << endl; - cout << "Last requested event number : " << fLastReqEvtNumber << endl; - cout << "Requested number of events : " << fReqNbOfEvts << endl; - cout << "SM or Dee number : " << fStex << endl; - cout << "Time first event : " << fStartTime << endl; - cout << "Time last event : " << fStopTime << endl; - cout << "Date first event : " << fStartDate.Data() << endl; - cout << "Date last event : " << fStopDate.Data() << endl; - cout << "Run type : " << fRunType << endl; - cout << endl; - cout << " Header counters " << endl; - cout << endl; - cout << "Stin Numbers : " - << fStinNumbersCalc << endl; - cout << "Numbers of found evts : " - << fNbOfEvtsCalc << endl; - cout << "Samples as a function of time histograms : " - << fAdcEvtCalc << endl; - cout << "Expectation values histogram : " - << fMSpCalc << endl; - cout << "Variances histogram : " - << fSSpCalc << endl; - cout << "Average total noise : " - << fAvTnoCalc << endl; - cout << "Average low frequency noise : " - << fAvLfnCalc << endl; - cout << "Average high frequency noise : " - << fAvHfnCalc << endl; - - cout << "Nb of (sample,sample) covariance matrices : " - << fCovCssCalc << endl; - cout << "Nb of (sample,sample) correlation matrices : " - << fCorCssCalc << endl; - cout << "Nb of (channel,channel) covariance matrices : " - << fHfCovCalc << endl; - cout << "Nb of (channel,channel) correlation matrices : " - << fHfCorCalc << endl; - cout << "Nb of (channel,channel) cov mat mean on samp : " - << fLfCovCalc << endl; - cout << "Nb of (channel,channel) cor mat mean on samp : " - << fLfCorCalc << endl; - cout << "Nb of mean cov(c,c) mean on samp, all Stins : " - << fLfCovCalc << endl; - cout << "Nb of mean cor(c,c) mean on samp, all Stins : " - << fLfCorCalc << endl; - - cout << "Exp. val. of the exp. val. of the samples : " - << fPedCalc << endl; - cout << "Expect. val. of the sigmas of the samples : " - << fTnoCalc << endl; - cout << "Expect. val. of the (samp,samp) correlations : " - << fMeanCorssCalc << endl; - - cout << "Sigmas of the exp. val. of the samples : " - << fLfnCalc << endl; - cout << "Sigmas of the sigmas of the samples : " - << fHfnCalc << endl; - cout << "Sigmas of the (samp,samp) correlations : " - << fSigCorssCalc << endl; - - cout << "Average pedestals : " - << fAvPedCalc << endl; - cout << "Average mean cor(s,s) : " - << fAvMeanCorssCalc << endl; - cout << "Average sigma of Cor(s,s) : " - << fAvSigCorssCalc << endl; - cout << endl; + std::cout << std::endl; + std::cout << " Header parameters " << std::endl; + std::cout << std::endl; + std::cout << "Run number : " << fRunNumber << std::endl; + std::cout << "First requested event number : " << fFirstReqEvtNumber << std::endl; + std::cout << "Last requested event number : " << fLastReqEvtNumber << std::endl; + std::cout << "Requested number of events : " << fReqNbOfEvts << std::endl; + std::cout << "SM or Dee number : " << fStex << std::endl; + std::cout << "Time first event : " << fStartTime << std::endl; + std::cout << "Time last event : " << fStopTime << std::endl; + std::cout << "Date first event : " << fStartDate.Data() << std::endl; + std::cout << "Date last event : " << fStopDate.Data() << std::endl; + std::cout << "Run type : " << fRunType << std::endl; + std::cout << std::endl; + std::cout << " Header counters " << std::endl; + std::cout << std::endl; + std::cout << "Stin Numbers : " + << fStinNumbersCalc << std::endl; + std::cout << "Numbers of found evts : " + << fNbOfEvtsCalc << std::endl; + std::cout << "Samples as a function of time histograms : " + << fAdcEvtCalc << std::endl; + std::cout << "Expectation values histogram : " + << fMSpCalc << std::endl; + std::cout << "Variances histogram : " + << fSSpCalc << std::endl; + std::cout << "Average total noise : " + << fAvTnoCalc << std::endl; + std::cout << "Average low frequency noise : " + << fAvLfnCalc << std::endl; + std::cout << "Average high frequency noise : " + << fAvHfnCalc << std::endl; + + std::cout << "Nb of (sample,sample) covariance matrices : " + << fCovCssCalc << std::endl; + std::cout << "Nb of (sample,sample) correlation matrices : " + << fCorCssCalc << std::endl; + std::cout << "Nb of (channel,channel) covariance matrices : " + << fHfCovCalc << std::endl; + std::cout << "Nb of (channel,channel) correlation matrices : " + << fHfCorCalc << std::endl; + std::cout << "Nb of (channel,channel) cov mat mean on samp : " + << fLfCovCalc << std::endl; + std::cout << "Nb of (channel,channel) cor mat mean on samp : " + << fLfCorCalc << std::endl; + std::cout << "Nb of mean cov(c,c) mean on samp, all Stins : " + << fLfCovCalc << std::endl; + std::cout << "Nb of mean cor(c,c) mean on samp, all Stins : " + << fLfCorCalc << std::endl; + + std::cout << "Exp. val. of the exp. val. of the samples : " + << fPedCalc << std::endl; + std::cout << "Expect. val. of the sigmas of the samples : " + << fTnoCalc << std::endl; + std::cout << "Expect. val. of the (samp,samp) correlations : " + << fMeanCorssCalc << std::endl; + + std::cout << "Sigmas of the exp. val. of the samples : " + << fLfnCalc << std::endl; + std::cout << "Sigmas of the sigmas of the samples : " + << fHfnCalc << std::endl; + std::cout << "Sigmas of the (samp,samp) correlations : " + << fSigCorssCalc << std::endl; + + std::cout << "Average pedestals : " + << fAvPedCalc << std::endl; + std::cout << "Average mean cor(s,s) : " + << fAvMeanCorssCalc << std::endl; + std::cout << "Average sigma of Cor(s,s) : " + << fAvSigCorssCalc << std::endl; + std::cout << std::endl; } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc index 080607a5aa248..38fd8c63e1833 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaHistos.cc @@ -64,34 +64,34 @@ TEcnaHistos::~TEcnaHistos() if ( fCnew != fCdelete ) { - cout << "*TEcnaHistos> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " - << fCnew << ", fCdelete = " << fCdelete << fTTBELL << endl; + std::cout << "*TEcnaHistos> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " + << fCnew << ", fCdelete = " << fCdelete << fTTBELL << std::endl; } else { - // cout << "*TEcnaHistos> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = " - // << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "*TEcnaHistos> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = " + // << fCnew << ", fCdelete = " << fCdelete << std::endl; } #define MGRA #ifndef MGRA if ( fCnewRoot != fCdeleteRoot ) { - cout << "*TEcnaHistos> WRONG MANAGEMENT OF ROOT ALLOCATIONS: fCnewRoot = " - << fCnewRoot << ", fCdeleteRoot = " << fCdeleteRoot << endl; + std::cout << "*TEcnaHistos> WRONG MANAGEMENT OF ROOT ALLOCATIONS: fCnewRoot = " + << fCnewRoot << ", fCdeleteRoot = " << fCdeleteRoot << std::endl; } else { - cout << "*TEcnaHistos> BRAVO! GOOD MANAGEMENT OF ROOT ALLOCATIONS:" + std::cout << "*TEcnaHistos> BRAVO! GOOD MANAGEMENT OF ROOT ALLOCATIONS:" << " fCnewRoot = " << fCnewRoot <<", fCdeleteRoot = " - << fCdeleteRoot << endl; + << fCdeleteRoot << std::endl; } #endif // MGRA - // cout << "TEcnaHistos> Leaving destructor" << endl; - // cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "TEcnaHistos> Leaving destructor" << std::endl; + // std::cout << " fCnew = " << fCnew << ", fCdelete = " << fCdelete << std::endl; - // cout << "[Info Management] CLASS: TEcnaHistos. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHistos. DESTROY OBJECT: this = " << this << std::endl; } @@ -103,14 +103,14 @@ TEcnaHistos::~TEcnaHistos() TEcnaHistos::TEcnaHistos(){ // Constructor without argument. Call to Init() - // cout << "[Info Management] CLASS: TEcnaHistos. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHistos. CREATE OBJECT: this = " << this << std::endl; Init(); } TEcnaHistos::TEcnaHistos(TEcnaObject* pObjectManager, const TString& SubDet) { - // cout << "[Info Management] CLASS: TEcnaHistos. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaHistos. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; @@ -916,7 +916,7 @@ void TEcnaHistos::PlotMatrix(const TMatrixD& read_matrix_corcc, } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::PlotMatrix(const TString& UserCorOrCov, const TString& UserBetweenWhat) @@ -944,7 +944,7 @@ void TEcnaHistos::PlotMatrix(const TString& UserCorOrCov, const TString& UserBet } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << std::endl;} } //....................................... Corcc for channels (cStexStin_A, cStexStin_B) @@ -989,7 +989,7 @@ void TEcnaHistos::PlotMatrix(const TMatrixD& read_matrix, } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::PlotMatrix(const TString& UserCorOrCov, const TString& UserBetweenWhat, @@ -1029,7 +1029,7 @@ void TEcnaHistos::PlotMatrix(const TString& UserCorOrCov, const TString& UserBet } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." << fTTBELL << std::endl;} } //--------------------------------------------------------------------------------------- @@ -1061,11 +1061,11 @@ void TEcnaHistos::PlotDetector(const TString& UserHistoCode, const TString& User } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << std::endl;} } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::PlotDetector(const TVectorD& read_histo, const TString& UserHistoCode, const TString& UserDetector) @@ -1093,11 +1093,11 @@ void TEcnaHistos::PlotDetector(const TVectorD& read_histo, const TString& UserHi } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << std::endl;} } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." << fTTBELL << std::endl;} } //--------------------------------------------------------------------------------------- @@ -1134,11 +1134,11 @@ void TEcnaHistos::Plot1DHisto(const TVectorD& InputHisto, } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::Plot1DHisto(const TString& User_X_Quantity, const TString& User_Y_Quantity, @@ -1166,11 +1166,11 @@ void TEcnaHistos::Plot1DHisto(const TString& User_X_Quantity, const TString& Use } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } @@ -1235,7 +1235,7 @@ void TEcnaHistos::Plot1DHisto(const TVectorD& InputHisto, } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::Plot1DHisto(const TString& User_X_Quantity, const TString& User_Y_Quantity, @@ -1274,7 +1274,7 @@ void TEcnaHistos::Plot1DHisto(const TString& User_X_Quantity, const TString& Use } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::Plot1DHisto(const TVectorD& InputHisto, @@ -1304,7 +1304,7 @@ void TEcnaHistos::Plot1DHisto(const TVectorD& InputHisto, } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } void TEcnaHistos::Plot1DHisto(const TString& User_X_Quantity, const TString& User_Y_Quantity, @@ -1331,7 +1331,7 @@ void TEcnaHistos::Plot1DHisto(const TString& User_X_Quantity, const TString& Use } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." << fTTBELL << std::endl;} } //--------------------------------------------------------------------------------------- @@ -1363,7 +1363,7 @@ void TEcnaHistos::PlotHistory(const TString& User_X_Quantity, const TString& Use } else {fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; - cout << "!TEcnaHistos::PlotHistory(...)> Histo cannot be reached." << fTTBELL << endl;} + std::cout << "!TEcnaHistos::PlotHistory(...)> Histo cannot be reached." << fTTBELL << std::endl;} } //============================================================================================= @@ -1435,8 +1435,8 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { fFapNbOfEvts = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, fFapStexNumber); TString fp_name_short = fMyRootFile->GetRootFileNameShort(); - // cout << "*TEcnaHistos::ViewMatrix(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + // std::cout << "*TEcnaHistos::ViewMatrix(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; //...................................................................... (ViewMatrix) for(Int_t i=0; iMaxStinEcnaInStex(); i++){vStin(i)=(Double_t)0.;} vStin = fMyRootFile->ReadStinNumbers(fEcal->MaxStinEcnaInStex()); @@ -1854,9 +1854,9 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w , canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistos::ViewMatrix(...)> Plot is displayed on canvas ----> " - // << fCurrentCanvasName << endl; - // cout << "*TEcnaHistos::ViewMatrix(...)> fCurrentCanvas = " << fCurrentCanvas << endl; + // std::cout << "*TEcnaHistos::ViewMatrix(...)> Plot is displayed on canvas ----> " + // << fCurrentCanvasName << std::endl; + // std::cout << "*TEcnaHistos::ViewMatrix(...)> fCurrentCanvas = " << fCurrentCanvas << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -1904,19 +1904,19 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { if(BetweenWhat == fBetweenSamples) { - cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* ==> Wrong channel number in " + std::cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* ==> Wrong channel number in " << fFapStinName.Data() << ". Value = " << i0StinEcha << " (required range: [0, " << fEcal->MaxCrysInStin()-1 << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } // if( BetweenWhat == fLFBetweenChannels || BetweenWhat == fHFBetweenChannels ) // { - // cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* ==> Wrong sample index. Value = " + // std::cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* ==> Wrong sample index. Value = " // << i0Sample << " (required range: [0, " // << fFapNbOfSamples-1 << "] )" - // << fTTBELL << endl; + // << fTTBELL << std::endl; //} } } @@ -1927,7 +1927,7 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { if( fFlagSubDet == "EB") { - cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " + std::cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " << fFapStinName.Data() << " " << StexStin_A << ", " << fFapStinName.Data() << " not found. Available numbers = "; @@ -1935,14 +1935,14 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { if( vStin(i) > 0 ) { - cout << vStin(i) << ", "; + std::cout << vStin(i) << ", "; } } } if( fFlagSubDet == "EE") { - cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " + std::cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " << fFapStinName.Data() << " " << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, StexStin_A) << ", " << fFapStinName.Data() << " not found. Available numbers = "; @@ -1950,18 +1950,18 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { if( vStin(i) > 0 ) { - cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", "; + std::cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", "; } } } - cout << fTTBELL << endl; + std::cout << fTTBELL << std::endl; } if ( Stin_Y_ok != 1 ) { if( fFlagSubDet == "EB") { - cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " + std::cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " << fFapStinName.Data() << " " << StexStin_B << ", " << fFapStinName.Data() << " not found. Available numbers = "; @@ -1969,14 +1969,14 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { if( vStin(i) > 0 ) { - cout << vStin(i) << ", "; + std::cout << vStin(i) << ", "; } } } if( fFlagSubDet == "EE") { - cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " + std::cout << "*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " << fFapStinName.Data() << " " << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, StexStin_B) << ", " << fFapStinName.Data() << " not found. Available numbers = "; @@ -1984,19 +1984,19 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ { if( vStin(i) > 0 ) { - cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", "; + std::cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", "; } } } - cout << fTTBELL << endl; + std::cout << fTTBELL << std::endl; } } } // end of if ( fMyRootFile->DataExist() == kTRUE ) else { fStatusDataExist = kFALSE; - cout << "!TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " - << " Histo not available." << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " + << " Histo not available." << fTTBELL << std::endl; fFlagUserHistoMin = "OFF"; fFlagUserHistoMax = "OFF"; } @@ -2004,15 +2004,15 @@ void TEcnaHistos::ViewMatrix(const TMatrixD& arg_read_matrix, const Int_t& arg_ else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } // ---- end of if( (fFapStexNumber > 0) && (fFapStexNumber <= fEcal->MaxStexInStas()) ) ----- else { - cout << "!TEcnaHistos::ViewMatrix(...)> " << fFapStexName.Data() + std::cout << "!TEcnaHistos::ViewMatrix(...)> " << fFapStexName.Data() << " = " << fFapStexNumber << ". Out of range (range = [1," - << fEcal->MaxStexInStas() << "]) " << fTTBELL << endl; + << fEcal->MaxStexInStas() << "]) " << fTTBELL << std::endl; } } // end of ViewMatrix(...) @@ -2068,8 +2068,8 @@ void TEcnaHistos::ViewStin(const Int_t& cStexStin, const TString& CorOrCov) fFapNbOfEvts = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, fFapStexNumber); TString fp_name_short = fMyRootFile->GetRootFileNameShort(); - // cout << "*TEcnaHistos::ViewStin(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + // std::cout << "*TEcnaHistos::ViewStin(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; TVectorD vStin(fEcal->MaxStinEcnaInStex()); for(Int_t i=0; iMaxStinEcnaInStex(); i++){vStin(i)=(Double_t)0.;} @@ -2235,7 +2235,7 @@ void TEcnaHistos::ViewStin(const Int_t& cStexStin, const TString& CorOrCov) TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w, canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistos::ViewStin(...)> Plot is displayed on canvas ----> " << f_in << endl; + // std::cout << "*TEcnaHistos::ViewStin(...)> Plot is displayed on canvas ----> " << f_in << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -2274,7 +2274,7 @@ void TEcnaHistos::ViewStin(const Int_t& cStexStin, const TString& CorOrCov) } else { - cout << "!TEcnaHistos::ViewStin(...)> *ERROR* =====> " + std::cout << "!TEcnaHistos::ViewStin(...)> *ERROR* =====> " << fFapStinName.Data() << " " << cStexStin << " not found." << " Available numbers = "; @@ -2282,12 +2282,12 @@ void TEcnaHistos::ViewStin(const Int_t& cStexStin, const TString& CorOrCov) { if( vStin(i) > 0 ) { - if( fFlagSubDet == "EB" ){cout << (Int_t)vStin(i) << ", ";} + if( fFlagSubDet == "EB" ){std::cout << (Int_t)vStin(i) << ", ";} if( fFlagSubDet == "EE" ) - {cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", ";} + {std::cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", ";} } } - cout << fTTBELL << endl; + std::cout << fTTBELL << std::endl; } } // end of if ( myRootFile->DataExist() == kTRUE ) else @@ -2299,15 +2299,15 @@ void TEcnaHistos::ViewStin(const Int_t& cStexStin, const TString& CorOrCov) { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewStin(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewStin(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } else { - cout << "!TEcnaHistos::ViewStin(...)> " << fFapStexName.Data() + std::cout << "!TEcnaHistos::ViewStin(...)> " << fFapStexName.Data() << " = " << fFapStexNumber << ". Out of range (range = [1," - << fEcal->MaxStexInStas() << "]) " << fTTBELL << endl; + << fEcal->MaxStexInStas() << "]) " << fTTBELL << std::endl; } } // end of ViewStin(...) @@ -2400,8 +2400,8 @@ void TEcnaHistos::TowerCrystalNumbering(const Int_t& SMNumber, const Int_t& n1SM TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w , canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistosEB::TowerCrystalNumbering(...)> Plot is displayed on canvas ----> " - // << f_in << endl; + // std::cout << "*TEcnaHistosEB::TowerCrystalNumbering(...)> Plot is displayed on canvas ----> " + // << f_in << std::endl; Double_t x_margin = fCnaParHistos->BoxLeftX("bottom_left_box") - 0.005; Double_t y_margin = fCnaParHistos->BoxTopY("bottom_right_box") + 0.005; @@ -2517,8 +2517,8 @@ void TEcnaHistos::TowerCrystalNumbering(const Int_t& SMNumber, const Int_t& n1SM } else { - cout << "!TEcnaHistos::TowerCrystalNumbering(...)> SM = " << SMNumber - << ". Out of range ( range = [1," << fEcal->MaxSMInEB() << "] )" << fTTBELL << endl; + std::cout << "!TEcnaHistos::TowerCrystalNumbering(...)> SM = " << SMNumber + << ". Out of range ( range = [1," << fEcal->MaxSMInEB() << "] )" << fTTBELL << std::endl; } } //----------------> end of TowerCrystalNumbering() @@ -2593,8 +2593,8 @@ void TEcnaHistos::SCCrystalNumbering(const Int_t& DeeNumber, const Int_t& n1DeeS TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w , canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistosEE::SCCrystalNumbering(...)> Plot is displayed on canvas ----> " - // << f_in << endl; + // std::cout << "*TEcnaHistosEE::SCCrystalNumbering(...)> Plot is displayed on canvas ----> " + // << f_in << std::endl; Double_t x_margin = fCnaParHistos->BoxLeftX("bottom_left_box") - 0.005; Double_t y_margin = fCnaParHistos->BoxTopY("bottom_right_box") + 0.005; @@ -2664,8 +2664,8 @@ void TEcnaHistos::SCCrystalNumbering(const Int_t& DeeNumber, const Int_t& n1DeeS } else { - cout << "!TEcnaHistos::SCCrystalNumbering(...)> Dee = " << DeeNumber - << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" << fTTBELL << endl; + std::cout << "!TEcnaHistos::SCCrystalNumbering(...)> Dee = " << DeeNumber + << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" << fTTBELL << std::endl; } } //----------------> end of SCCrystalNumbering() @@ -2831,7 +2831,7 @@ void TEcnaHistos::ViewTowerGrid(const Int_t& SMNumber, if ( x_direction == "-x" ) // NEVER IN THIS CASE: xmin->xmax <=> right->left ("-x") direction {sup_axis_x = new TGaxis( -(Float_t)MatSize, (Float_t)0, (Float_t)(size_eta*MatSize), (Float_t)0., "f1", size_eta, "BCS" , 0.); fCnewRoot++; - cout << "TEcnaHistosEB::ViewTowerGrid()> non foreseen case. eta with -x direction." << fTTBELL << endl;} + std::cout << "TEcnaHistosEB::ViewTowerGrid()> non foreseen case. eta with -x direction." << fTTBELL << std::endl;} if ( x_direction == "x" ) // ALWAYS IN THIS CASE: xmin->xmax <=> left->right ("x") direction {sup_axis_x = new TGaxis( (Float_t)0. , (Float_t)0., (Float_t)(size_eta*MatSize), (Float_t)0., @@ -3082,8 +3082,8 @@ void TEcnaHistos::ViewStex(const TVectorD& arg_read_histo, const Int_t& arg_Alre { fFapNbOfEvts = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, fFapStexNumber); TString fp_name_short = fMyRootFile->GetRootFileNameShort(); - // cout << "*TEcnaHistos::ViewStex(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + // std::cout << "*TEcnaHistos::ViewStex(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; fStartDate = fMyRootFile->GetStartDate(); fStopDate = fMyRootFile->GetStopDate(); @@ -3284,7 +3284,7 @@ void TEcnaHistos::ViewStex(const TVectorD& arg_read_histo, const Int_t& arg_Alre TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w, canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistos::ViewStex(...)> Plot is displayed on canvas ----> " << f_in << endl; + // std::cout << "*TEcnaHistos::ViewStex(...)> Plot is displayed on canvas ----> " << f_in << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -3333,8 +3333,8 @@ void TEcnaHistos::ViewStex(const TVectorD& arg_read_histo, const Int_t& arg_Alre { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewStex(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewStex(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } // end of ViewStex(...) @@ -3362,8 +3362,8 @@ void TEcnaHistos::StexHocoVecoLHFCorcc(const TString& Freq) fFapNbOfEvts = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, fFapStexNumber); TString fp_name_short = fMyRootFile->GetRootFileNameShort(); - //cout << "*TEcnaHistos::StexHocoVecoLHFCorcc(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + //std::cout << "*TEcnaHistos::StexHocoVecoLHFCorcc(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; fStartDate = fMyRootFile->GetStartDate(); fStopDate = fMyRootFile->GetStopDate(); @@ -3525,8 +3525,8 @@ void TEcnaHistos::StexHocoVecoLHFCorcc(const TString& Freq) TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w, canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistos::StexHocoVecoLHFCorcc(...)> Plot is displayed on canvas ----> " - // << f_in << endl; + // std::cout << "*TEcnaHistos::StexHocoVecoLHFCorcc(...)> Plot is displayed on canvas ----> " + // << f_in << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -3577,8 +3577,8 @@ void TEcnaHistos::StexHocoVecoLHFCorcc(const TString& Freq) { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::StexHocoVecoLHFCorcc(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::StexHocoVecoLHFCorcc(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } // end of StexHocoVecoLHFCorcc @@ -3746,7 +3746,7 @@ void TEcnaHistos::SMTowerNumbering(const Int_t& SMNumber) TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w, canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistosEB::ViewSM(...)> Plot is displayed on canvas ----> " << f_in << endl; + // std::cout << "*TEcnaHistosEB::ViewSM(...)> Plot is displayed on canvas ----> " << f_in << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -3775,8 +3775,8 @@ void TEcnaHistos::SMTowerNumbering(const Int_t& SMNumber) } else { - cout << "!TEcnaHistos::SMTowerNumbering(...)> SM = " << SMNumber - << ". Out of range ( range = [1," << fEcal->MaxSMInEB() << "] )" << fTTBELL << endl; + std::cout << "!TEcnaHistos::SMTowerNumbering(...)> SM = " << SMNumber + << ". Out of range ( range = [1," << fEcal->MaxSMInEB() << "] )" << fTTBELL << std::endl; } } // end of SMTowerNumbering @@ -4191,7 +4191,7 @@ void TEcnaHistos::DeeSCNumbering(const Int_t& DeeNumber) TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w, canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistosEE::ViewDee(...)> Plot is displayed on canvas ----> " << f_in << endl; + // std::cout << "*TEcnaHistosEE::ViewDee(...)> Plot is displayed on canvas ----> " << f_in << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -4230,8 +4230,8 @@ void TEcnaHistos::DeeSCNumbering(const Int_t& DeeNumber) } else { - cout << "!TEcnaHistos::DeeSCNumbering(...)> Dee = " << DeeNumber - << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" << fTTBELL << endl; + std::cout << "!TEcnaHistos::DeeSCNumbering(...)> Dee = " << DeeNumber + << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" << fTTBELL << std::endl; } } // end of DeeSCNumbering @@ -4732,9 +4732,9 @@ void TEcnaHistos::SqrtContourLevels(const Int_t& nb_niv, Double_t* cont_niv) Int_t ind_niv = num_niv + nb_niv2 - 1; if ( ind_niv < 0 || ind_niv > nb_niv ) { - cout << "!TEcnaHistos::ContourLevels(...)> *** ERROR *** " + std::cout << "!TEcnaHistos::ContourLevels(...)> *** ERROR *** " << "wrong contour levels for correlation matrix" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { @@ -4748,9 +4748,9 @@ void TEcnaHistos::SqrtContourLevels(const Int_t& nb_niv, Double_t* cont_niv) Int_t ind_niv = num_niv + nb_niv2 - 1; if ( ind_niv < 0 || ind_niv > nb_niv ) { - cout << "!TEcnaHistos::ContourLevels(...)> *** ERROR *** " + std::cout << "!TEcnaHistos::ContourLevels(...)> *** ERROR *** " << "wrong contour levels for correlation matrix" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { @@ -4904,8 +4904,8 @@ void TEcnaHistos::ViewStas(const TVectorD& arg_read_histo, const Int_t& arg_Alre { xFapNbOfEvts[iStasStex] = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, n1StasStex); TString fp_name_short = fMyRootFile->GetRootFileNameShort(); - // cout << "*TEcnaHistos::ViewStas(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + // std::cout << "*TEcnaHistos::ViewStas(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; //....................... search for first and last dates if( iStasStex == 0 ) @@ -4947,8 +4947,8 @@ void TEcnaHistos::ViewStas(const TVectorD& arg_read_histo, const Int_t& arg_Alre else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewStas(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewStas(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } @@ -5039,18 +5039,18 @@ void TEcnaHistos::ViewStas(const TVectorD& arg_read_histo, const Int_t& arg_Alre { fStatusDataExist = kFALSE; - cout << "!TEcnaHistos::ViewStas(...)> " + std::cout << "!TEcnaHistos::ViewStas(...)> " << " Data not available for " << fFapStexName << " " << iStasStex+1 - << " (Quantity not present in the ROOT file)" << fTTBELL << endl; + << " (Quantity not present in the ROOT file)" << fTTBELL << std::endl; } } // end of if( fMyRootFile->LookAtRootFile() == kTRUE ) (ViewStas) else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewStas(...)> " + std::cout << "!TEcnaHistos::ViewStas(...)> " << " Data not available for " << fFapStexName << " " << iStasStex+1 - << " (ROOT file not found)" << fTTBELL << endl; + << " (ROOT file not found)" << fTTBELL << std::endl; } if( fFapNbOfEvts <= xFapNbOfEvts[iStasStex] ){fFapNbOfEvts = xFapNbOfEvts[iStasStex];} @@ -5142,7 +5142,7 @@ void TEcnaHistos::ViewStas(const TVectorD& arg_read_histo, const Int_t& arg_Alre TCanvas *MainCanvas = new TCanvas(f_in, f_in, canv_w, canv_h); fCnewRoot++; fCurrentCanvas = MainCanvas; fCurrentCanvasName = f_in; - // cout << "*TEcnaHistos::ViewStas(...)> Plot is displayed on canvas ----> " << f_in << endl; + // std::cout << "*TEcnaHistos::ViewStas(...)> Plot is displayed on canvas ----> " << f_in << std::endl; delete [] f_in; f_in = 0; fCdelete++; @@ -6113,7 +6113,7 @@ void TEcnaHistos::XtalSamplesEv(const TVectorD& arg_read_histo, const Int_t& arg else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::XtalSamplesEv(...)> Data not available (ROOT file not found)." << endl; + std::cout << "!TEcnaHistos::XtalSamplesEv(...)> Data not available (ROOT file not found)." << std::endl; } if( fStatusFileFound == kTRUE && fStatusDataExist == kTRUE ){aOKData = kTRUE;} } @@ -6132,16 +6132,16 @@ void TEcnaHistos::XtalSamplesEv(const TVectorD& arg_read_histo, const Int_t& arg for( Int_t i0_stin_echa=0; i0_stin_echaMaxCrysInStin(); i0_stin_echa++) { if( fFapStexName == "SM" ) - {cout << "*TEcnaHistos::XtalSamplesEv(...)> channel " << setw(2) << i0_stin_echa << ": ";} + {std::cout << "*TEcnaHistos::XtalSamplesEv(...)> channel " << std::setw(2) << i0_stin_echa << ": ";} if( fFapStexName == "Dee" ) - {cout << "*TEcnaHistos::XtalSamplesEv(...)> Xtal " << setw(2) << i0_stin_echa+1 << ": ";} + {std::cout << "*TEcnaHistos::XtalSamplesEv(...)> Xtal " << std::setw(2) << i0_stin_echa+1 << ": ";} for( Int_t i0_samp=0; i0_samp Data not available." << endl; + std::cout << "!TEcnaHistos::XtalSamplesEv(...)> Data not available." << std::endl; } } @@ -6164,8 +6164,8 @@ void TEcnaHistos::XtalSamplesEv(const TVectorD& arg_read_histo, const Int_t& arg } else { - cout << "!TEcnaHistos::XtalSamplesEv(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber - << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << endl; + std::cout << "!TEcnaHistos::XtalSamplesEv(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber + << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << std::endl; } } @@ -6205,7 +6205,7 @@ void TEcnaHistos::EvSamplesXtals(const TVectorD& arg_read_histo, const Int_t& ar else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::EvSamplesXtals(...)> Data not available (ROOT file not found)." << endl; + std::cout << "!TEcnaHistos::EvSamplesXtals(...)> Data not available (ROOT file not found)." << std::endl; } if( fStatusFileFound == kTRUE && fStatusDataExist == kTRUE ){aOKData = kTRUE;} } @@ -6223,16 +6223,16 @@ void TEcnaHistos::EvSamplesXtals(const TVectorD& arg_read_histo, const Int_t& ar for( Int_t i0_stin_echa=0; i0_stin_echaMaxCrysInStin(); i0_stin_echa++) { if( fFapStexName == "SM" ) - {cout << "*TEcnaHistos::EvSamplesXtals(...)> channel " << setw(2) << i0_stin_echa << ": ";} + {std::cout << "*TEcnaHistos::EvSamplesXtals(...)> channel " << std::setw(2) << i0_stin_echa << ": ";} if( fFapStexName == "Dee" ) - {cout << "*TEcnaHistos::EvSamplesXtals(...)> Xtal " << setw(2) << i0_stin_echa+1 << ": ";} + {std::cout << "*TEcnaHistos::EvSamplesXtals(...)> Xtal " << std::setw(2) << i0_stin_echa+1 << ": ";} for( Int_t i0_samp=0; i0_samp Data not available." << endl; + std::cout << "!TEcnaHistos::EvSamplesXtals(...)> Data not available." << std::endl; } } @@ -6255,8 +6255,8 @@ void TEcnaHistos::EvSamplesXtals(const TVectorD& arg_read_histo, const Int_t& ar } else { - cout << "!TEcnaHistos::EvSamplesXtals(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber - << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << endl; + std::cout << "!TEcnaHistos::EvSamplesXtals(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber + << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << std::endl; } } // end of EvSamplesXtals(...) @@ -6296,7 +6296,7 @@ void TEcnaHistos::XtalSamplesSigma(const TVectorD& arg_read_histo, const Int_t& else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::XtalSamplesSigma(...)> Data not available (ROOT file not found)." << endl; + std::cout << "!TEcnaHistos::XtalSamplesSigma(...)> Data not available (ROOT file not found)." << std::endl; } if( fStatusFileFound == kTRUE && fStatusDataExist == kTRUE ){aOKData = kTRUE;} } @@ -6314,16 +6314,16 @@ void TEcnaHistos::XtalSamplesSigma(const TVectorD& arg_read_histo, const Int_t& for( Int_t i0_stin_echa=0; i0_stin_echaMaxCrysInStin(); i0_stin_echa++) { if( fFapStexName == "SM" ) - {cout << "*TEcnaHistos::XtalSamplesSigma(...)> channel " << setw(2) << i0_stin_echa << ": ";} + {std::cout << "*TEcnaHistos::XtalSamplesSigma(...)> channel " << std::setw(2) << i0_stin_echa << ": ";} if( fFapStexName == "Dee" ) - {cout << "*TEcnaHistos::XtalSamplesSigma(...)> Xtal " << setw(2) << i0_stin_echa+1 << ": ";} + {std::cout << "*TEcnaHistos::XtalSamplesSigma(...)> Xtal " << std::setw(2) << i0_stin_echa+1 << ": ";} for( Int_t i0_samp=0; i0_samp Data not available." << endl; + std::cout << "!TEcnaHistos::XtalSamplesSigma(...)> Data not available." << std::endl; } } @@ -6346,8 +6346,8 @@ void TEcnaHistos::XtalSamplesSigma(const TVectorD& arg_read_histo, const Int_t& } else { - cout << "!TEcnaHistos::XtalSamplesSigma(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber - << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << endl; + std::cout << "!TEcnaHistos::XtalSamplesSigma(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber + << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << std::endl; } } @@ -6387,7 +6387,7 @@ void TEcnaHistos::SigmaSamplesXtals(const TVectorD& arg_read_histo, const Int_t& else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::SigmaSamplesXtals(...)> Data not available (ROOT file not found)." << endl; + std::cout << "!TEcnaHistos::SigmaSamplesXtals(...)> Data not available (ROOT file not found)." << std::endl; } if( fStatusFileFound == kTRUE && fStatusDataExist == kTRUE ){aOKData = kTRUE;} } @@ -6406,16 +6406,16 @@ void TEcnaHistos::SigmaSamplesXtals(const TVectorD& arg_read_histo, const Int_t& for( Int_t i0_stin_echa=0; i0_stin_echaMaxCrysInStin(); i0_stin_echa++) { if( fFapStexName == "SM" ) - {cout << "*TEcnaHistos::SigmaSamplesXtals(...)> channel " << setw(2) << i0_stin_echa << ": ";} + {std::cout << "*TEcnaHistos::SigmaSamplesXtals(...)> channel " << std::setw(2) << i0_stin_echa << ": ";} if( fFapStexName == "Dee" ) - {cout << "*TEcnaHistos::SigmaSamplesXtals(...)> Xtal " << setw(2) << i0_stin_echa+1 << ": ";} + {std::cout << "*TEcnaHistos::SigmaSamplesXtals(...)> Xtal " << std::setw(2) << i0_stin_echa+1 << ": ";} for( Int_t i0_samp=0; i0_samp Data not available." << endl; + std::cout << "!TEcnaHistos::SigmaSamplesXtals(...)> Data not available." << std::endl; } } @@ -6438,8 +6438,8 @@ void TEcnaHistos::SigmaSamplesXtals(const TVectorD& arg_read_histo, const Int_t& } else { - cout << "!TEcnaHistos::SigmaSamplesXtals(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber - << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << endl; + std::cout << "!TEcnaHistos::SigmaSamplesXtals(...)> " << fFapStexName.Data() << " number = " << fFapStexNumber + << " out of range (range = [1," << fEcal->MaxStexInStas() << "])" << fTTBELL << std::endl; } } // end of SigmaSamplesXtals(...) @@ -6483,10 +6483,10 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al main_subpad = ActivePad(HistoCode.Data(), opt_plot.Data()); // => return 0 if canvas has been closed if( main_subpad == 0 ) { - cout << "*TEcnaHistos::ViewHisto(...)> WARNING ===> Canvas has been closed in option SAME or SAME n." - << endl + std::cout << "*TEcnaHistos::ViewHisto(...)> WARNING ===> Canvas has been closed in option SAME or SAME n." + << std::endl << " Please, restart with a new canvas." - << fTTBELL << endl; + << fTTBELL << std::endl; ReInitCanvas(HistoCode, opt_plot); xCanvasExists = 0; @@ -6512,12 +6512,12 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al if( XVarHisto != XVariableMemo ) { - cout << "!TEcnaHistos::ViewHisto(...)> *** ERROR *** ===> X coordinate changed in option SAME n." << endl - << " Present X = " << XVarHisto << endl - << " Present Y = " << YVarHisto << endl - << " Previous X = " << XVariableMemo << endl + std::cout << "!TEcnaHistos::ViewHisto(...)> *** ERROR *** ===> X coordinate changed in option SAME n." << std::endl + << " Present X = " << XVarHisto << std::endl + << " Present Y = " << YVarHisto << std::endl + << " Previous X = " << XVariableMemo << std::endl << " Previous Y = " << YVariableMemo - << fTTBELL << endl; + << fTTBELL << std::endl; SameXVarMemo = 0; } else @@ -6544,12 +6544,12 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al if( YVarHisto != YVariableMemo ) { - cout << "!TEcnaHistos::ViewHisto(...)> *** ERROR *** ===> Y coordinate changed in option SAME n." << endl - << " Present X = " << XVarHisto << endl - << " Present Y = " << YVarHisto << endl - << " Previous X = " << XVariableMemo << endl + std::cout << "!TEcnaHistos::ViewHisto(...)> *** ERROR *** ===> Y coordinate changed in option SAME n." << std::endl + << " Present X = " << XVarHisto << std::endl + << " Present Y = " << YVarHisto << std::endl + << " Previous X = " << XVariableMemo << std::endl << " Previous Y = " << YVariableMemo - << fTTBELL << endl; + << fTTBELL << std::endl; SameYVarMemo = 0; } else @@ -6574,8 +6574,8 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al Int_t NbBinsMemo = GetNbBinsFromMemo(HistoCode, opt_plot); if( xNbBins != NbBinsMemo ) { - cout << "!TEcnaHistos::ViewHisto(...)> *** ERROR *** ===> Number of bins changed in option SAME or SAME n." - << " Present number = " << xNbBins << ", requested number = " << NbBinsMemo << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> *** ERROR *** ===> Number of bins changed in option SAME or SAME n." + << " Present number = " << xNbBins << ", requested number = " << NbBinsMemo << fTTBELL << std::endl; OkBinsMemoSameOne = 0; } } @@ -6651,8 +6651,8 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al { xFapNbOfEvts[iStasStex] = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, n1StasStex); fp_name_short = fMyRootFile->GetRootFileNameShort(); - // cout << "*TEcnaHistos::ViewHisto(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + // std::cout << "*TEcnaHistos::ViewHisto(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; //....................... search for first and last dates if( iStasStex == 0 ) { @@ -6730,8 +6730,8 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al } else { - cout << "!TEcnaHistos::ViewHisto(...)> i_xgeo = " << i_xgeo - << ". OUT OF RANGE ( range = [0,"<< SizeForPlot << "] " << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> i_xgeo = " << i_xgeo + << ". OUT OF RANGE ( range = [0,"<< SizeForPlot << "] " << std::endl; } } //...................................... EE (ViewHisto) @@ -6831,21 +6831,21 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al }// end of if(StexDSStin >=1 && StexDSStin <= fEcalNumbering->GetMaxSCInDS(StexDataSector)) else { - cout << "!TEcnaHistos::ViewHisto(...)> StexDSStin = " << StexDSStin + std::cout << "!TEcnaHistos::ViewHisto(...)> StexDSStin = " << StexDSStin << ". OUT OF RANGE ( range = [1," << fEcalNumbering->GetMaxSCInDS(StexDataSector) << "]. DeeNumber = " << DeeNumber << ", n1DeeSCEcna = " << n1DeeSCEcna << ", StexDataSector = " << StexDataSector - << ", i_xgeo = " << i_xgeo << endl; + << ", i_xgeo = " << i_xgeo << std::endl; } }// end of if( StexDataSector >= 1 && StexDataSector <= 9 ) else { - //cout << "!TEcnaHistos::ViewHisto(...)> StexDataSector = " << StexDataSector + //std::cout << "!TEcnaHistos::ViewHisto(...)> StexDataSector = " << StexDataSector // << ". OUT OF RANGE ( range = [1,9]. DeeNumber = " << DeeNumber // << ", n1DeeSCEcna = " << n1DeeSCEcna - // << ", i_xgeo = " << i_xgeo << endl; + // << ", i_xgeo = " << i_xgeo << std::endl; } //......................................... transfert read_histo -> histo_for_plot if( i_xgeo >= -1 && i_xgeo < SizeForPlot ) @@ -6901,26 +6901,26 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al } // end of if( i_xgeo >= -1 && i_xgeo < SizeForPlot ) else { - //cout << "!TEcnaHistos::ViewHisto(...)> i_xgeo = " << i_xgeo - // << ". OUT OF RANGE ( range = [0,"<< SizeForPlot << "] " << endl; + //std::cout << "!TEcnaHistos::ViewHisto(...)> i_xgeo = " << i_xgeo + // << ". OUT OF RANGE ( range = [0,"<< SizeForPlot << "] " << std::endl; } }// end of if( fFlagSubDet == "EE" ) }// end of for(Int_t i0StexStinEcna=0; i0StexStinEcnaMaxStinEcnaInStex(); i0StexStinEcna++) } else { - cout << "!TEcnaHistos::ViewHisto(...)> " + std::cout << "!TEcnaHistos::ViewHisto(...)> " << " Data not available for " << fFapStexName << " " << iStasStex+1 - << " (Quantity not present in the ROOT file)" << endl; + << " (Quantity not present in the ROOT file)" << std::endl; } } // end of if ( fMyRootFile->LookAtRootFile() == kTRUE ) (ViewHisto/Stas) else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewHisto(...)> " + std::cout << "!TEcnaHistos::ViewHisto(...)> " << " Data not available for " << fFapStexName << " " << iStasStex+1 - << " (ROOT file not found)" << endl; + << " (ROOT file not found)" << std::endl; } if( fFapNbOfEvts <= xFapNbOfEvts[iStasStex] ){fFapNbOfEvts = xFapNbOfEvts[iStasStex];} @@ -6955,8 +6955,8 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al { fFapNbOfEvts = fMyRootFile->GetNumberOfEvents(fFapReqNbOfEvts, fFapStexNumber); fp_name_short = fMyRootFile->GetRootFileNameShort(); - // cout << "*TEcnaHistos::ViewHisto(...)> Data are analyzed from file ----> " - // << fp_name_short << endl; + // std::cout << "*TEcnaHistos::ViewHisto(...)> Data are analyzed from file ----> " + // << fp_name_short << std::endl; fStartDate = fMyRootFile->GetStartDate(); fStopDate = fMyRootFile->GetStopDate(); @@ -7078,7 +7078,7 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al histo_for_plot_memo[i_xgeo]++; if( histo_for_plot_memo[i_xgeo] >= 2 ) { - cout << "! histo_memo[" << i_xgeo + std::cout << "! histo_memo[" << i_xgeo << "] = " << histo_for_plot_memo[i_xgeo] << ", nSCCons = " << nSCCons << ", SC_in_DS = " << SC_in_DS @@ -7086,7 +7086,7 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al << ", SCOffset = " << SCOffset << ", n1DeeSCEcna = " << n1DeeSCEcna << ", n1SCEcha = " << n1SCEcha - << ", n1FinalSCEcha = " << n1FinalSCEcha << endl; + << ", n1FinalSCEcha = " << n1FinalSCEcha << std::endl; } //.............................. transfert read_histo -> histo_for_plot if( i_xgeo >= 0 && i_xgeo < SizeForPlot ) @@ -7096,51 +7096,51 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al } else { - cout << "!TEcnaHistos::ViewHisto(...)> i_xgeo = " << i_xgeo - << ". OUT OF RANGE ( range = [0,"<< SizeForPlot << "] " << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> i_xgeo = " << i_xgeo + << ". OUT OF RANGE ( range = [0,"<< SizeForPlot << "] " << std::endl; } } // end of if( read_histo[i0DeeEcha] > 0 ) } // end of if( SC_in_DS >= 1 && SC_in_DS <= fEcalNumbering->GetMaxSCInDS(DataSector) ) else { - cout << "!TEcnaHistos::ViewHisto(...)> SC_in_DS = " << SC_in_DS + std::cout << "!TEcnaHistos::ViewHisto(...)> SC_in_DS = " << SC_in_DS << ". OUT OF RANGE ( range = [1," << fEcalNumbering->GetMaxSCInDS(DataSector) << "] " << ", DataSector = " << DataSector << ", n1DeeSCEcna = " << n1DeeSCEcna << ", n1SCEcha = " << n1SCEcha << ", i0DeeEcha = " << i0DeeEcha - << endl; + << std::endl; } } // end of if( DataSector >= 1 && DataSector <= 9 ) else { if( DataSector != 0 ) { - cout << "!TEcnaHistos::ViewHisto(...)> DataSector = " << DataSector + std::cout << "!TEcnaHistos::ViewHisto(...)> DataSector = " << DataSector << ". OUT OF RANGE ( range = [1,9] " << ", n1DeeSCEcna = " << n1DeeSCEcna << ", n1SCEcha = " << n1SCEcha << ", i0DeeEcha = " << i0DeeEcha - << endl; + << std::endl; } } } // end of if( n1DeeSCEcna >= 1 && n1DeeSCEcna <= fEcal->MaxSCEcnaInDee() ) else { - cout << "!TEcnaHistos::ViewHisto(...)> n1DeeSCEcna = " << n1DeeSCEcna + std::cout << "!TEcnaHistos::ViewHisto(...)> n1DeeSCEcna = " << n1DeeSCEcna << ". OUT OF RANGE ( range = [1,"<< fEcal->MaxSCEcnaInDee() << "] " << ", n1SCEcha = " << n1SCEcha << ", i0DeeEcha = " << i0DeeEcha - << endl; + << std::endl; } } // end of if(n1SCEcha >= 1 && n1SCEcha <= fEcal->MaxCrysInSC() ) else { - cout << "!TEcnaHistos::ViewHisto(...)> n1SCEcha = " << n1SCEcha + std::cout << "!TEcnaHistos::ViewHisto(...)> n1SCEcha = " << n1SCEcha << ". OUT OF RANGE ( range = [1,"<< fEcal->MaxCrysInSC() << "] " << ", i0DeeEcha = " << i0DeeEcha - << endl; + << std::endl; } } } // end of if( OKPlot == 1 && opt_plot != "ASCII" ) @@ -7148,16 +7148,16 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al } // end of if(ok_view_histo == kTRUE) else { - cout << "!TEcnaHistos::ViewHisto(...)> *ERROR* =====> " - << " ok_view_histo != kTRUE " << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> *ERROR* =====> " + << " ok_view_histo != kTRUE " << fTTBELL << std::endl; } } // end of if(fMyRootFile->LookAtRootFile() == kTRUE) else { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewHisto(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } // end of if(fFapStexNumber > 0) } // end of if( HistoType == "Global" || HistoType == "Proj" || HistoType == "SampGlobal" || HistoType == "SampProj" ) @@ -7202,15 +7202,15 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al } else { - cout << "!TEcnaHistos::ViewHisto(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } else { - cout << "!TEcnaHistos::ViewHisto(...)> " << fFapStexName.Data() + std::cout << "!TEcnaHistos::ViewHisto(...)> " << fFapStexName.Data() << " = " << fFapStexNumber << ". Out of range (range = [1," - << fEcal->MaxStexInStas() << "]) " << fTTBELL << endl; + << fEcal->MaxStexInStas() << "]) " << fTTBELL << std::endl; } } @@ -7466,8 +7466,8 @@ void TEcnaHistos::ViewHisto(const TVectorD& arg_read_histo, const Int_t& arg_Al } // end of if( OKPlot > 0 ) else { - cout << "!TEcnaHistos::ViewHisto(...)> Histo not available." - << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHisto(...)> Histo not available." + << fTTBELL << std::endl; } } } @@ -7914,14 +7914,14 @@ Int_t TEcnaHistos::ModifiedSCEchaForNotConnectedSCs(const Int_t& n1DeeNumber, //======================= ERROR message if ModifiedSCEcha is not correct if( ModifiedSCEcha < 1 || ModifiedSCEcha > fEcal->MaxCrysInSC() ) { - cout << "! *** ERROR *** > ModifiedSCEcha = " << ModifiedSCEcha + std::cout << "! *** ERROR *** > ModifiedSCEcha = " << ModifiedSCEcha << ", SC_in_DS = " << SC_in_DS << ", nSCCons = " << nSCCons << ", n1DeeSCEcna = " << n1DeeSCEcna << ", n1SCEcha = " << n1SCEcha << ", ModifiedSCEcha = " << ModifiedSCEcha << ", TypQuad = " << TypQuad - << fTTBELL << endl; + << fTTBELL << std::endl; } @@ -7964,10 +7964,10 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, main_subpad = ActivePad(HistoCode.Data(), opt_plot.Data()); // => return 0 if canvas has been closed if( main_subpad == 0 ) { - cout << "*TEcnaHistos::ViewHistime(...)> WARNING ===> Canvas has been closed in option SAME or SAME n." - << endl + std::cout << "*TEcnaHistos::ViewHistime(...)> WARNING ===> Canvas has been closed in option SAME or SAME n." + << std::endl << " Please, restart with a new canvas." - << fTTBELL << endl; + << fTTBELL << std::endl; ReInitCanvas(HistoCode, opt_plot); xCanvasExists = 0; @@ -7993,12 +7993,12 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, if( XVarHisto != XVariableMemo ) { - cout << "!TEcnaHistos::ViewHistime(...)> *** ERROR *** ===> X coordinate changed in option SAME n." << endl - << " Present X = " << XVarHisto << endl - << " Present Y = " << YVarHisto << endl - << " Previous X = " << XVariableMemo << endl + std::cout << "!TEcnaHistos::ViewHistime(...)> *** ERROR *** ===> X coordinate changed in option SAME n." << std::endl + << " Present X = " << XVarHisto << std::endl + << " Present Y = " << YVarHisto << std::endl + << " Previous X = " << XVariableMemo << std::endl << " Previous Y = " << YVariableMemo - << fTTBELL << endl; + << fTTBELL << std::endl; SameXVarMemo = 0; } else @@ -8025,12 +8025,12 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, if( YVarHisto != YVariableMemo ) { - cout << "!TEcnaHistos::ViewHistime(...)> *** ERROR *** ===> Y coordinate changed in option SAME n." << endl - << " Present X = " << XVarHisto << endl - << " Present Y = " << YVarHisto << endl - << " Previous X = " << XVariableMemo << endl + std::cout << "!TEcnaHistos::ViewHistime(...)> *** ERROR *** ===> Y coordinate changed in option SAME n." << std::endl + << " Present X = " << XVarHisto << std::endl + << " Present Y = " << YVarHisto << std::endl + << " Previous X = " << XVariableMemo << std::endl << " Previous Y = " << YVariableMemo - << fTTBELL << endl; + << fTTBELL << std::endl; SameYVarMemo = 0; } else @@ -8133,9 +8133,9 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, { fStatusFileFound = kFALSE; - cout << "!TEcnaHistos::ViewHistime(...)> *ERROR* =====> " + std::cout << "!TEcnaHistos::ViewHistime(...)> *ERROR* =====> " << " ROOT file not found for run " << fT1DRunNumber[i_run] - << fTTBELL << endl << endl; + << fTTBELL << std::endl << std::endl; } } // end of for(Int_t i_run = 0; i_run < nb_of_runs_in_list; i_run++) @@ -8231,8 +8231,8 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, } else { - cout << "!TEcnaHistos::ViewHistime(...)> Histo not available. " - << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHistime(...)> Histo not available. " + << fTTBELL << std::endl; } } // end of if ( fMyRootFile->LookAtRootFile() == kTRUE ) else @@ -8530,19 +8530,19 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, } else { - cout << "!TEcnaHistos::ViewHistime(...)> The list of runs in file: " << list_of_run_file_name - << " has " << nb_of_runs_in_list << " run numbers" << endl + std::cout << "!TEcnaHistos::ViewHistime(...)> The list of runs in file: " << list_of_run_file_name + << " has " << nb_of_runs_in_list << " run numbers" << std::endl << " but none of them correspond to an existing ROOT file." - << fTTBELL << endl; + << fTTBELL << std::endl; } } // end of if( fFapStexNumber > 0 ) else { - cout << "!TEcnaHistos::ViewHistime(...)> *ERROR* =====> " + std::cout << "!TEcnaHistos::ViewHistime(...)> *ERROR* =====> " << fFapStexName << " number = " << fFapStexNumber << ". " << fFapStexName << " number must be in range [1," << fEcal->MaxStexInStas() << "] "; - if( fFlagSubDet == "EB" ){cout << " (or [-18,+18])";} - cout << fTTBELL << endl; + if( fFlagSubDet == "EB" ){std::cout << " (or [-18,+18])";} + std::cout << fTTBELL << std::endl; } delete [] exist_indic; exist_indic = 0; fCdelete++; } // end of if( nb_of_runs_in_list > 0 ) @@ -8550,13 +8550,13 @@ void TEcnaHistos::ViewHistime(const TString& list_of_run_file_name, { if( nb_of_runs_in_list == 0 ) { - cout << "!TEcnaHistos::ViewHistime(...)> The list of runs in file: " << list_of_run_file_name - << " is empty !" << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHistime(...)> The list of runs in file: " << list_of_run_file_name + << " is empty !" << fTTBELL << std::endl; } if( nb_of_runs_in_list < 0 ) { - cout << "!TEcnaHistos::ViewHistime(...)> " << list_of_run_file_name - << ": file not found in directory: " << fCfgHistoryRunListFilePath.Data() << fTTBELL << endl; + std::cout << "!TEcnaHistos::ViewHistime(...)> " << list_of_run_file_name + << ": file not found in directory: " << fCfgHistoryRunListFilePath.Data() << fTTBELL << std::endl; } } } // end of if( OKHisto == 1 ) @@ -8599,8 +8599,8 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n //========= immediate return if file name is an empty string if( list_of_run_file_name.Data() == '\0' ) { - cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> " - << " EMPTY STRING for list of run file name." << fTTBELL << endl; + std::cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> " + << " EMPTY STRING for list of run file name." << fTTBELL << std::endl; } else { @@ -8648,7 +8648,7 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n { //...................................... first reading to get the number of runs in the list fFcin_f.clear(); - string xHeadComment; + std::string xHeadComment; fFcin_f >> xHeadComment; Int_t cRunNumber; Int_t list_size_read = 0; @@ -8660,10 +8660,10 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n //====== Return to the beginning of the file ===== fFcin_f.clear(); - fFcin_f.seekg(0, ios::beg); + fFcin_f.seekg(0, std::ios::beg); //================================================ - string yHeadComment; + std::string yHeadComment; fFcin_f >> yHeadComment; //....................... Set fFapMaxNbOfRuns to -1 at first call (first read file) @@ -8695,12 +8695,12 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n //................. check maximum value for allocation if( fFapMaxNbOfRuns > fCnaParHistos->MaxNbOfRunsInLists() ) { - cout << "TEcnaHistos::GetHistoryRunListParameters(...)> Max number of runs in HistoryRunList = " + std::cout << "TEcnaHistos::GetHistoryRunListParameters(...)> Max number of runs in HistoryRunList = " << fFapMaxNbOfRuns << " too large, forced to parameter TEcnaParHistos->fMaxNbOfRunsInLists value (= " << fCnaParHistos->MaxNbOfRunsInLists() << "). Please, set this parameter to a larger value than " << fFapMaxNbOfRuns - << fTTBELL << endl; + << fTTBELL << std::endl; fFapMaxNbOfRuns = fCnaParHistos->MaxNbOfRunsInLists(); } //................................. Alloc of the array and init @@ -8712,8 +8712,8 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n } else { - cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> fFapMaxNbOfRuns = " - << fFapMaxNbOfRuns << ". Forced to 1." << fTTBELL << endl; + std::cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> fFapMaxNbOfRuns = " + << fFapMaxNbOfRuns << ". Forced to 1." << fTTBELL << std::endl; fFapMaxNbOfRuns = 1; fT1DRunNumber = new Int_t[fFapMaxNbOfRuns]; fCnew++; } @@ -8735,8 +8735,8 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n else { fFcin_f.clear(); - cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> " - << xFileNameRunList.Data() << " : file not found." << fTTBELL << endl; + std::cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> " + << xFileNameRunList.Data() << " : file not found." << fTTBELL << std::endl; nb_of_runs_in_list = -1; } } @@ -8781,8 +8781,8 @@ void TEcnaHistos::SetRunNumberFromList(const Int_t& xArgIndexRun, const Int_t& M } else { - cout << "!TEcnaHistos::SetRunNumberFromList(...)> **** ERROR **** Run index out of range in list of runs. xArgIndexRun = " - << xArgIndexRun << " (MaxNbOfRuns = "<< MaxNbOfRuns << ")" << endl; + std::cout << "!TEcnaHistos::SetRunNumberFromList(...)> **** ERROR **** Run index out of range in list of runs. xArgIndexRun = " + << xArgIndexRun << " (MaxNbOfRuns = "<< MaxNbOfRuns << ")" << std::endl; } } @@ -8849,7 +8849,7 @@ Bool_t TEcnaHistos::GetOkViewHisto(TEcnaRead* aMyRootFile, Int_t StinNumber = StexStin_A; if( fFlagSubDet == "EE" ) {StinNumber = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, StexStin_A);} - cout << "!TEcnaHistos::GetOkViewHisto(...)> *ERROR* =====> " << "File: " << root_file_name + std::cout << "!TEcnaHistos::GetOkViewHisto(...)> *ERROR* =====> " << "File: " << root_file_name << ", " << fFapStinName.Data() << " " << StinNumber << " not found. Available numbers = "; @@ -8857,12 +8857,12 @@ Bool_t TEcnaHistos::GetOkViewHisto(TEcnaRead* aMyRootFile, { if( vStin(i) > 0 ) { - if( fFlagSubDet == "EB" ){cout << vStin(i) << ", ";} + if( fFlagSubDet == "EB" ){std::cout << vStin(i) << ", ";} if( fFlagSubDet == "EE" ) - {cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", ";} + {std::cout << fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fFapStexNumber, (Int_t)vStin(i)) << ", ";} } } - cout << fTTBELL << endl; + std::cout << fTTBELL << std::endl; ok_view = -1; } else @@ -8885,16 +8885,16 @@ Bool_t TEcnaHistos::GetOkViewHisto(TEcnaRead* aMyRootFile, if( fFlagSubDet == "EE" ){Choffset = 1;} if( ( (HistoType == "H1Basic") || (HistoType == "Evol") || (HistoType == "EvolProj") ) && !( (i0StinEcha >= 0) && (i0StinEchaMaxCrysInStin()) ) ) - {cout << "!TEcnaHistos::GetOkViewHisto(...)> *ERROR* =====> " << "File: " << root_file_name + {std::cout << "!TEcnaHistos::GetOkViewHisto(...)> *ERROR* =====> " << "File: " << root_file_name << ". Wrong channel number. Value = " << i0StinEcha << " (required range: [" << Choffset << ", " << fEcal->MaxCrysInStin()-1+Choffset << "] )" - << fTTBELL << endl;} + << fTTBELL << std::endl;} if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_Adc_EvNb") && !((i0Sample >= 0) && (i0Sample *ERROR* =====> " << "File: " << root_file_name + {std::cout << "!TEcnaHistos::GetOkViewHisto(...)> *ERROR* =====> " << "File: " << root_file_name << ". Wrong sample index. Value = " << i0Sample << " (required range: [0, " << fFapNbOfSamples-1 << "] )" - << fTTBELL << endl;} + << fTTBELL << std::endl;} ok_max_elt = -1; } @@ -8904,16 +8904,16 @@ Bool_t TEcnaHistos::GetOkViewHisto(TEcnaRead* aMyRootFile, } else { - cout << "!TEcnaHistos::GetOkViewHisto(...)> At least one ERROR has been detected. ok_view = " << ok_view - << ", ok_max_elt = " << ok_max_elt << fTTBELL << endl; + std::cout << "!TEcnaHistos::GetOkViewHisto(...)> At least one ERROR has been detected. ok_view = " << ok_view + << ", ok_max_elt = " << ok_max_elt << fTTBELL << std::endl; } } else { fStatusDataExist = kFALSE; - cout << "!TEcnaHistos::GetOkViewHisto(...)> No data in ROOT file " - << ", aMyRootFile->DataExist() = " << aMyRootFile->DataExist() << fTTBELL << endl; + std::cout << "!TEcnaHistos::GetOkViewHisto(...)> No data in ROOT file " + << ", aMyRootFile->DataExist() = " << aMyRootFile->DataExist() << fTTBELL << std::endl; } return ok_view_histo; } @@ -9176,7 +9176,7 @@ void TEcnaHistos::HistoPlot(TH1D* h_his0, const Int_t& HisSize, {MainCanvas = CreateCanvas(HistoCode, opt_plot, canvas_name, canv_w, canv_h); fCurrentPad = gPad; fCurrentCanvas = MainCanvas; fCurrentCanvasName = canvas_name.Data();}} - // cout << "*TEcnaHistos::HistoPlot(...)> Plot is displayed on canvas ----> " << canvas_name.Data() << endl; + // std::cout << "*TEcnaHistos::HistoPlot(...)> Plot is displayed on canvas ----> " << canvas_name.Data() << std::endl; //--------------- EE => SC for construction, EB => Xtal in SM (default: Stin ECNA number, i0StinEcha) Int_t Stex_StinCons = StexStin_A; // Stex_StinCons = Tower for EB, SC for construction for EE @@ -9830,8 +9830,8 @@ void TEcnaHistos::HistoPlot(TH1D* h_his0, const Int_t& HisSize, } else // else du if(main_subpad !=0) { - cout << "*TEcnaHistos::HistoPlot(...)> Canvas not found. Previously closed in option SAME." - << fTTBELL << endl; + std::cout << "*TEcnaHistos::HistoPlot(...)> Canvas not found. Previously closed in option SAME." + << fTTBELL << std::endl; ReInitCanvas(HistoCode, opt_plot); xMemoPlotSame = 0; @@ -10092,7 +10092,7 @@ void TEcnaHistos::HistimePlot(TGraph* g_graph0, } } - // cout << "*TEcnaHistos::HistimePlot(...)> Plot is displayed on canvas ----> " << canvas_name.Data() << endl; + // std::cout << "*TEcnaHistos::HistimePlot(...)> Plot is displayed on canvas ----> " << canvas_name.Data() << std::endl; //--------------- EE => SC for construction, EB => Xtal in SM (default: Stin ECNA number, i0StinEcha) Int_t Stex_StinCons = StexStin_A; // Stex_StinCons = Tower for EB, SC for construction for EE @@ -10439,8 +10439,8 @@ void TEcnaHistos::HistimePlot(TGraph* g_graph0, } else // else du if(main_subpad !=0) { - cout << "*TEcnaHistos::HistimePlot(...)> Canvas not found. Previously closed in option SAME." - << fTTBELL << endl; + std::cout << "*TEcnaHistos::HistimePlot(...)> Canvas not found. Previously closed in option SAME." + << fTTBELL << std::endl; ReInitCanvas(HistoCode, opt_plot); xMemoPlotSame = 0; @@ -11118,14 +11118,14 @@ TVectorD TEcnaHistos::GetHistoValues(const TVectorD& arg_read_histo, const Int_t if( arg_AlreadyRead >= 1 ) { - //cout << "*TEcnaHistos::GetHistoValues(...)> arg_AlreadyRead = " << arg_AlreadyRead << endl; + //std::cout << "*TEcnaHistos::GetHistoValues(...)> arg_AlreadyRead = " << arg_AlreadyRead << std::endl; for(Int_t i=0; i arg_AlreadyRead = " << arg_AlreadyRead << endl; + //std::cout << "*TEcnaHistos::GetHistoValues(...)> arg_AlreadyRead = " << arg_AlreadyRead << std::endl; TVectorD read_histo(HisSizeRead); for(Int_t i=0; i *** ERROR *** > HisSizeRead greater than HisSizePlot" + std::cout << "!TEcnaHistos::GetHistoValues(...)> *** ERROR *** > HisSizeRead greater than HisSizePlot" << " for plot as a function of sample#. HisSizeRead = " << HisSizeRead - << ", HisSizePlot = " << HisSizePlot << fTTBELL << endl; + << ", HisSizePlot = " << HisSizePlot << fTTBELL << std::endl; } } // end of if( HistoCode == "D_MSp_SpNb" || HistoCode == "D_SSp_SpNb" " || // HistoCode == "D_SSp_SpNb" || HistoCode == "D_SSp_SpDs" ) @@ -11222,16 +11222,16 @@ TVectorD TEcnaHistos::GetHistoValues(const TVectorD& arg_read_histo, const Int_t } else { - cout << "!TEcnaHistos::GetHistoValues(...)> *** ERROR *** > HisSizeRead not equal to HisSizePlot." + std::cout << "!TEcnaHistos::GetHistoValues(...)> *** ERROR *** > HisSizeRead not equal to HisSizePlot." << " HisSizeRead = " << HisSizeRead - << ", HisSizePlot = " << HisSizePlot << fTTBELL << endl; + << ", HisSizePlot = " << HisSizePlot << fTTBELL << std::endl; } } // end of if( !(HistoCode == "D_MSp_SpNb" || HistoCode == "D_SSp_SpNb") ) } // end of if( arg_AlreadyRead == 0 ) if( i_data_exist == 0 ) { - cout << "!TEcnaHistos::GetHistoValues(...)> Histo not found." << fTTBELL << endl; + std::cout << "!TEcnaHistos::GetHistoValues(...)> Histo not found." << fTTBELL << std::endl; } return plot_histo; @@ -12813,15 +12813,15 @@ void TEcnaHistos::PlotCloneOfCurrentCanvas() } else { - cout << "TEcnaHistos::PlotCloneOfCurrentCanvas()> Last canvas has been removed. No clone can be done." - << endl << " Please, display the canvas again." - << fTTBELL << endl; + std::cout << "TEcnaHistos::PlotCloneOfCurrentCanvas()> Last canvas has been removed. No clone can be done." + << std::endl << " Please, display the canvas again." + << fTTBELL << std::endl; } } else { - cout << "TEcnaHistos::PlotCloneOfCurrentCanvas()> No canvas has been created. No clone can be done." - << fTTBELL << endl; + std::cout << "TEcnaHistos::PlotCloneOfCurrentCanvas()> No canvas has been created. No clone can be done." + << fTTBELL << std::endl; } } @@ -12974,8 +12974,8 @@ TVirtualPad* TEcnaHistos::ActivePad(const TString& HistoCode, const TString& opt } if( main_subpad == 0 ) - {cout << "*TEcnaHistos::ActivePad(...)> main_subpad = " - << main_subpad << ". This canvas has been closed." << endl;} + {std::cout << "*TEcnaHistos::ActivePad(...)> main_subpad = " + << main_subpad << ". This canvas has been closed." << std::endl;} return main_subpad; } @@ -13023,7 +13023,7 @@ void TEcnaHistos::DoCanvasClosed() fCurrentOptPlot = "NADA"; // to avoid fClosed... = kTRUE if other canvas than those above Closed (i.e. 2D plots) fCurrentHistoCode = "NADA"; - cout << "!TEcnaHistos::DoCanvasClosed(...)> WARNING: canvas has been closed." << endl; + std::cout << "!TEcnaHistos::DoCanvasClosed(...)> WARNING: canvas has been closed." << std::endl; } void TEcnaHistos::SetParametersPavTxt(const TString& HistoCode, const TString& opt_plot) @@ -13116,7 +13116,7 @@ TPaveText* TEcnaHistos::ActivePavTxt(const TString& HistoCode, const TString& op } if( main_pavtxt == 0 ) - {cout << "*TEcnaHistos::ActivePavTxt(...)> ERROR: main_pavtxt = " << main_pavtxt << endl;} + {std::cout << "*TEcnaHistos::ActivePavTxt(...)> ERROR: main_pavtxt = " << main_pavtxt << std::endl;} return main_pavtxt; } @@ -13653,9 +13653,9 @@ void TEcnaHistos::NewCanvas(const TString& opt_plot) } else { - cout << "TEcnaHistos::NewCanvas(...)> *** ERROR *** " << opt_plot.Data() << ": " + std::cout << "TEcnaHistos::NewCanvas(...)> *** ERROR *** " << opt_plot.Data() << ": " << "unknown option for NewCanvas. Only " << fSameOnePlot << " option is accepted." - << fTTBELL << endl; + << fTTBELL << std::endl; } } @@ -13982,7 +13982,7 @@ TString TEcnaHistos::AsciiFileName(){return fAsciiFileName.Data();} //======= A T T E N T I O N ========= A T T E N T I O N ========= A T T E N T I O N ==============!!!! // A EVITER ABSOLUMENT quand on est sous TEcnaGui CAR LE cin >> BLOQUE X11 // puisqu'on n'a pas la main dans la fenetre de compte-rendu de la CNA -// {Int_t cintoto; cout << "taper 0 pour continuer" << endl; cin >> cintoto;} +// {Int_t cintoto; std::cout << "taper 0 pour continuer" << std::endl; cin >> cintoto;} // *=================================================* // | | //++++++++++++++++++++++++| A T T E N T I O N: PAS DE TEST "cintoto" ici! |+++++++++++++++++++++!!!! diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc index bc3943d911b76..374aa07ce8736 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNArrayD.cc @@ -25,7 +25,7 @@ ClassImp(TEcnaNArrayD) TEcnaNArrayD::TEcnaNArrayD(){ //constructor without argument - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Init(); } @@ -33,7 +33,7 @@ TEcnaNArrayD::TEcnaNArrayD(){ TEcnaNArrayD::TEcnaNArrayD(const TEcnaNArrayD &orig) { //copy constructor - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; fNd = orig.fNd; fN1 = orig.fN1; @@ -49,7 +49,7 @@ TEcnaNArrayD::TEcnaNArrayD(const TEcnaNArrayD &orig) { TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1) { //constructor for a 1 dimensional array of size n1. Array is put to 0 - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaNArrayD", i_this); @@ -65,7 +65,7 @@ TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1) { TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2) { //constructor for a 2 dimensional array of sizes n1,n2. Array is put to 0 - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaNArrayD", i_this); @@ -82,7 +82,7 @@ TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2) { TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t n3) { //constructor 3 dimensional array of sizes n1,n2,n3. Array is put to 0 - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaNArrayD", i_this); @@ -100,7 +100,7 @@ TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t n3,Int_t n4) { //constructor for a 4 dimensional array of sizes n1,n2,n3,n4. Array is put to 0 - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaNArrayD", i_this); @@ -119,7 +119,7 @@ TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t n3,Int_t n4,Int_t n5) { //constructor for a 5 dimensional array of sizes n1,n2,n3,n4,n5. Array is put to 0 - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaNArrayD", i_this); @@ -139,7 +139,7 @@ TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t n3,Int_t n4,Int_t n5,Int_t n6) { //constructor for a 6 dimensional array of sizes n1,n2,n3,n4,n5,n6. Array is put to 0 - // cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaNArrayD", i_this); @@ -161,7 +161,7 @@ TEcnaNArrayD::TEcnaNArrayD(TEcnaObject* pObjectManager, Int_t n1,Int_t n2,Int_t TEcnaNArrayD::~TEcnaNArrayD() { //destructor - // cout << "[Info Management] CLASS: TEcnaNArrayD. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNArrayD. DESTROY OBJECT: this = " << this << std::endl; Clean(); } @@ -191,8 +191,8 @@ inline Int_t TEcnaNArrayD::OneDim(Int_t i1) const { if ((i1>=fNL - 1) || (i1<0)) { i1 = fNL - 1; Error("OneDim","Index outside bounds"); - cout << "i1 = " << i1 - << "; fNL = " << fNL << endl; + std::cout << "i1 = " << i1 + << "; fNL = " << fNL << std::endl; } return i1; } @@ -203,8 +203,8 @@ inline Int_t TEcnaNArrayD::OneDim(Int_t i1,Int_t i2) const { if ((i>=fNL - 1) || (i<0)) { i = fNL - 1; Error("OneDim","Index outside bounds"); - cout << "i1 = " << i1 << ", i2 = " << i2 - << "; fN1 = " << fN1 << ", fNL = " << fNL << endl; + std::cout << "i1 = " << i1 << ", i2 = " << i2 + << "; fN1 = " << fN1 << ", fNL = " << fNL << std::endl; } return i; } @@ -215,8 +215,8 @@ inline Int_t TEcnaNArrayD::OneDim(Int_t i1,Int_t i2,Int_t i3) const { if ((i>=fNL - 1) || (i<0)) { i = fNL - 1; Error("OneDim","Index outside bounds"); - cout << "i1 = " << i1 << ", i2 = " << i2 << ", i3 = " << i3 - << "; fN1 = " << fN1 << ", fN2 = " << fN2 << ", fNL = " << fNL << endl; + std::cout << "i1 = " << i1 << ", i2 = " << i2 << ", i3 = " << i3 + << "; fN1 = " << fN1 << ", fN2 = " << fN2 << ", fNL = " << fNL << std::endl; } return i; } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc index 5747a3953be4f..56046f9028b13 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaNumbering.cc @@ -34,7 +34,7 @@ ClassImp(TEcnaNumbering) TEcnaNumbering::TEcnaNumbering() { // Constructor without argument: call to method Init() -// cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << endl; +// std::cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << std::endl; Init(); } @@ -42,7 +42,7 @@ TEcnaNumbering::TEcnaNumbering() { TEcnaNumbering::TEcnaNumbering(TEcnaObject* pObjectManager, const TString& SubDet) { // Constructor with argument: call to methods Init() and SetEcalSubDetector(const TString&) - // cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -63,7 +63,7 @@ TEcnaNumbering::TEcnaNumbering(TEcnaObject* pObjectManager, const TString& SubDe TEcnaNumbering::TEcnaNumbering(const TString& SubDet, const TEcnaParEcal* pEcal) { // Constructor with argument: call to methods Init() and SetEcalSubDetector(const TString&) - // cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << std::endl; Init(); SetEcalSubDetector(SubDet.Data(), pEcal); @@ -102,7 +102,7 @@ TEcnaNumbering::~TEcnaNumbering() { if (fT2d_RecovDeeSC != 0){delete [] fT2d_RecovDeeSC; fCdelete++;} if (fT1d_RecovDeeSC != 0){delete [] fT1d_RecovDeeSC; fCdelete++;} - // cout << "[Info Management] CLASS: TEcnaNumbering. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaNumbering. DESTROY OBJECT: this = " << this << std::endl; } //------------------------------------------------------------- Init() @@ -321,7 +321,7 @@ void TEcnaNumbering::BuildBarrelCrysTable() fT1dTowEcha[n1SMCrys-1] = ic-1; // fT1dTowEcha[] : range = [0,24] } } - // cout << "#TEcnaNumbering::TBuildBarrelCrysTable()> Crys Table Building done" << endl; + // std::cout << "#TEcnaNumbering::TBuildBarrelCrysTable()> Crys Table Building done" << std::endl; delete [] jch_type; fCdelete++; delete [] jch_type_d1; fCdelete++; @@ -331,7 +331,7 @@ void TEcnaNumbering::BuildBarrelCrysTable() } else { - // cout << "#TEcnaNumbering::TBuildBarrelCrysTable()> No Building of Crys Table since it is already done." << endl; + // std::cout << "#TEcnaNumbering::TBuildBarrelCrysTable()> No Building of Crys Table since it is already done." << std::endl; } } @@ -360,15 +360,15 @@ Int_t TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(const Int_t& n1SMTow, else { n1SMCrys = -2; // Electronic Cnannel in Tower out of range - cout << "!TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(...)> Electronic Channel in Tower out of range." - << " i0TowEcha = " << i0TowEcha << "(n1SMTow = " << n1SMTow << ")" << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(...)> Electronic Channel in Tower out of range." + << " i0TowEcha = " << i0TowEcha << "(n1SMTow = " << n1SMTow << ")" << fTTBELL << std::endl; } } else { n1SMCrys = -3; // Tower number in SM out of range - cout << "!TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(...)> Tower number in SM out of range." - << " n1SMTow = " << n1SMTow << "(i0TowEcha = " << i0TowEcha << ")" << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(...)> Tower number in SM out of range." + << " n1SMTow = " << n1SMTow << "(i0TowEcha = " << i0TowEcha << ")" << fTTBELL << std::endl; } return n1SMCrys; // Range = [1,1700] @@ -393,8 +393,8 @@ Int_t TEcnaNumbering::Get0TowEchaFrom1SMCrys(const Int_t& n1SMCrys) else { i0TowEcha = -2; - cout << "!TEcnaNumbering::Get0TowEchaFrom1SMCrys(...)> Crystal number in SM out of range." - << " n1SMCrys = " << n1SMCrys << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get0TowEchaFrom1SMCrys(...)> Crystal number in SM out of range." + << " n1SMCrys = " << n1SMCrys << fTTBELL << std::endl; } return i0TowEcha; // range = [0,24] } @@ -412,8 +412,8 @@ Int_t TEcnaNumbering::Get1SMTowFrom1SMCrys(const Int_t& n1SMCrys) else { n1SMtox = -1; - cout << "!TEcnaNumbering::Get1SMTowFrom1SMCrys(...)> Crystal number in SM out of range." - << " n1SMCrys = " << n1SMCrys << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1SMTowFrom1SMCrys(...)> Crystal number in SM out of range." + << " n1SMCrys = " << n1SMCrys << fTTBELL << std::endl; } return n1SMtox; // range = [1,68] } @@ -545,9 +545,9 @@ Double_t TEcnaNumbering::GetEta(const Int_t& n1EBSM, const Int_t& n1SMTow, } else { - cout << "TEcnaNumbering::GetEta(...)> SM = " << n1EBSM + std::cout << "TEcnaNumbering::GetEta(...)> SM = " << n1EBSM << ". Out of range (range = [1," << fEcal->MaxSMInEB() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } return eta; } @@ -738,9 +738,9 @@ Double_t TEcnaNumbering::GetPhiInSM(const Int_t& n1EBSM, } else { - cout << "TEcnaNumbering::GetPhiInSM(...)> SM = " << n1EBSM + std::cout << "TEcnaNumbering::GetPhiInSM(...)> SM = " << n1EBSM << ". Out of range (range = [1," << fEcal->MaxSMInEB() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } phi_in_SM = 20 - phi_in_SM; return phi_in_SM; @@ -762,9 +762,9 @@ Double_t TEcnaNumbering::GetPhi(const Int_t& n1EBSM, } else { - cout << "TEcnaNumbering::GetPhi(...)> SM = " << n1EBSM + std::cout << "TEcnaNumbering::GetPhi(...)> SM = " << n1EBSM << ". Out of range (range = [1," << fEcal->MaxSMInEB() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } return phi; } @@ -1176,14 +1176,14 @@ void TEcnaNumbering::BuildEndcapCrysTable() } } } - // cout << "#TEcnaNumbering::TBuildEndcapCrysTable()> Crys Table Building done" << endl; + // std::cout << "#TEcnaNumbering::TBuildEndcapCrysTable()> Crys Table Building done" << std::endl; delete [] type; fCdelete++; delete [] type_d1; fCdelete++; } else { - // cout << "#TEcnaNumbering::TBuildEndcapCrysTable()> No Building of Crys Table since it is already done " << endl; + // std::cout << "#TEcnaNumbering::TBuildEndcapCrysTable()> No Building of Crys Table since it is already done " << std::endl; } } @@ -1809,15 +1809,15 @@ Int_t TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(const Int_t& n1DeeSCE else { n1DeeCrys = -2; // Electronic Cnannel in Super-Crystal out of range - cout << "!TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(...)> Electronic Channel in SuperCrystal = " - << i0SCEcha+1 << ". Out of range (range = [1," << fEcal->MaxCrysInSC() << "])" << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(...)> Electronic Channel in SuperCrystal = " + << i0SCEcha+1 << ". Out of range (range = [1," << fEcal->MaxCrysInSC() << "])" << fTTBELL << std::endl; } } else { n1DeeCrys = -3; // Super-Crystal number in Dee out of range - cout << "!TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(...)> Super-Crystal number in Dee out of range." - << " n1DeeSCEcna = " << n1DeeSCEcna << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(...)> Super-Crystal number in Dee out of range." + << " n1DeeSCEcna = " << n1DeeSCEcna << fTTBELL << std::endl; } return n1DeeCrys; // Range = [1,5000] @@ -1843,8 +1843,8 @@ Int_t TEcnaNumbering::Get1SCEchaFrom1DeeCrys(const Int_t& n1DeeCrys, const TStri else { n1SCEcha = -2; - cout << "!TEcnaNumbering::Get1SCEchaFrom1DeeCrys(...)> Crystal number in Dee out of range." - << " n1DeeCrys = " << n1DeeCrys << "(max = " << fEcal->MaxCrysEcnaInDee() << ")" << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1SCEchaFrom1DeeCrys(...)> Crystal number in Dee out of range." + << " n1DeeCrys = " << n1DeeCrys << "(max = " << fEcal->MaxCrysEcnaInDee() << ")" << fTTBELL << std::endl; } return n1SCEcha; // range = [1,25] } @@ -1863,8 +1863,8 @@ Int_t TEcnaNumbering::Get1DeeSCEcnaFrom1DeeCrys(const Int_t& n1DeeCrys, const TS else { n1DeeSCEcna = -1; - cout << "!TEcnaNumbering::Get1DeeSCEcnaFrom1DeeCrys(...)> Crystal number in Dee out of range." - << " n1DeeCrys = " << n1DeeCrys << "(max = " << fEcal->MaxCrysEcnaInDee() << ")" << fTTBELL << endl; + std::cout << "!TEcnaNumbering::Get1DeeSCEcnaFrom1DeeCrys(...)> Crystal number in Dee out of range." + << " n1DeeCrys = " << n1DeeCrys << "(max = " << fEcal->MaxCrysEcnaInDee() << ")" << fTTBELL << std::endl; } return n1DeeSCEcna; // range = [1,200] } @@ -1920,24 +1920,24 @@ Int_t TEcnaNumbering::GetDSFrom1DeeSCEcna(const Int_t& n1DeeNumber, const Int_t& } else { - cout << "!TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> n1DeeSCEcna = " << n1DeeSCEcna + std::cout << "!TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> n1DeeSCEcna = " << n1DeeSCEcna << ". Out of range ( range = [1," << fEcal->MaxSCEcnaInDee() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { if( n1DeeNumber != 0 ) { - cout << "!TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber + std::cout << "!TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { - cout << "TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber + std::cout << "TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } } return data_sector; @@ -1979,24 +1979,24 @@ Int_t TEcnaNumbering::GetDSSCFrom1DeeSCEcna(const Int_t& n1DeeNumber, const Int_ } else { - cout << "!TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> n1DeeSCEcna = " << n1DeeSCEcna + std::cout << "!TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> n1DeeSCEcna = " << n1DeeSCEcna << ". Out of range ( range = [1," << fEcal->MaxSCEcnaInDee() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { if( n1DeeNumber != 0 ) { - cout << "!TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber + std::cout << "!TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { - cout << "TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber + std::cout << "TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } } return ds_sc; @@ -2016,9 +2016,9 @@ Int_t TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(const Int_t& n1DeeNumber, const } else { - cout << "!TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> *** WARNING *** n1DeeSCEcna = " << n1DeeSCEcna + std::cout << "!TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> *** WARNING *** n1DeeSCEcna = " << n1DeeSCEcna << ". Out of range ( range = [1," << fEcal->MaxSCEcnaInDee() - << "] ). Nb for const. forced to " << fT2d_DeeSCCons[n1DeeNumber-1][19] << "." << endl; + << "] ). Nb for const. forced to " << fT2d_DeeSCCons[n1DeeNumber-1][19] << "." << std::endl; dee_sc_cons = fT2d_DeeSCCons[n1DeeNumber-1][19]; } } @@ -2026,15 +2026,15 @@ Int_t TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(const Int_t& n1DeeNumber, const { if( n1DeeNumber != 0 ) { - cout << "!TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber + std::cout << "!TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { - cout << "TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber + std::cout << "TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } } return dee_sc_cons; @@ -2080,25 +2080,25 @@ Int_t TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(const Int_t& n1DeeNumber, const } else { - cout << "!TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> DeeSCCons = " << DeeSCCons + std::cout << "!TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> DeeSCCons = " << DeeSCCons << ". Out of range ( range = [ " << off_set_cons+1 << "," << fEcal->MaxSCForConsInDee()+off_set_cons << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { if( n1DeeNumber != 0 ) { - cout << "!TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> n1DeeNumber = " << n1DeeNumber + std::cout << "!TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> n1DeeNumber = " << n1DeeNumber << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { - cout << "TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> Dee = " << n1DeeNumber + std::cout << "TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> Dee = " << n1DeeNumber << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])" - << fTTBELL << endl; + << fTTBELL << std::endl; } } return dee_sc_ecna; @@ -2473,10 +2473,10 @@ Int_t TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t& n1StexS {StexEcha = (n1StexStin-1)*fEcal->MaxCrysInStin() + i0StinEcha;} else { - cout << "!TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha *** ERROR ***> VALUE" + std::cout << "!TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha *** ERROR ***> VALUE" << " OUT OF RANGE. Forced to -1. Argument values: n1StexStin = " << n1StexStin << ", channel = " << i0StinEcha - << fTTBELL << endl; + << fTTBELL << std::endl; } return StexEcha; } @@ -2631,8 +2631,8 @@ Int_t TEcnaNumbering::MaxCrysInStinEcna(const Int_t& n1DeeNumber, const Int_t& n } else { - cout << "!TEcnaNumbering::MaxCrysInStinEcna(...)> " << s_option - << ": unknown option." << fTTBELL << endl; + std::cout << "!TEcnaNumbering::MaxCrysInStinEcna(...)> " << s_option + << ": unknown option." << fTTBELL << std::endl; } } return max_crys; diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaObject.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaObject.cc index a1418b5682684..1e7c4d0167807 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaObject.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaObject.cc @@ -17,7 +17,7 @@ ClassImp(TEcnaObject) { //destructor -// cout << "[Info Management] CLASS: TEcnaObject. DESTROY OBJECT: this = " << this << endl; +// std::cout << "[Info Management] CLASS: TEcnaObject. DESTROY OBJECT: this = " << this << std::endl; } //=================================================================== @@ -29,7 +29,7 @@ TEcnaObject::TEcnaObject() { // Constructor without argument -// cout << "[Info Management] CLASS: TEcnaObject. CREATE OBJECT: this = " << this << endl; +// std::cout << "[Info Management] CLASS: TEcnaObject. CREATE OBJECT: this = " << this << std::endl; Long_t PointerValue = (Long_t)this; Int_t un = 1; @@ -221,8 +221,8 @@ Bool_t TEcnaObject::RegisterPointer(const TString& ClassName, const Long_t& Poin //......................................................................................... if( ClassFound == kFALSE ) { - cout << "!TEcnaObject::RegisterPointer(...)> Class " << ClassName - << " not found." << fTTBELL << endl; + std::cout << "!TEcnaObject::RegisterPointer(...)> Class " << ClassName + << " not found." << fTTBELL << std::endl; } return ClassFound; @@ -338,12 +338,12 @@ void TEcnaObject::NumberCreateObjectMessage(const TString& ClassName, const Long { #define NOCM #ifndef NOCM - cout << "*TEcnaObject::NumberCreateObjectMessage(...)> New ECNA object (pointer = " + std::cout << "*TEcnaObject::NumberCreateObjectMessage(...)> New ECNA object (pointer = " << PointerValue << ") from TEcnaObject " << this - << ". Object# = " << setw(8) << NbOfObjects + << ". Object# = " << std::setw(8) << NbOfObjects << ", Class: " << ClassName; - if( NbOfObjects > 1 ){cout << " (INFO: more than 1 object)";} - cout << endl; + if( NbOfObjects > 1 ){std::cout << " (INFO: more than 1 object)";} + std::cout << std::endl; #endif // NOCM } @@ -353,10 +353,10 @@ void TEcnaObject::NumberReuseObjectMessage(const TString& ClassName, const Long_ #ifndef NOCR if( PointerValue != (Long_t)0 ) { - cout << "*TEcnaObject::NumberReuseObjectMessage(...)> INFO: pointer " << PointerValue + std::cout << "*TEcnaObject::NumberReuseObjectMessage(...)> INFO: pointer " << PointerValue << " used again from TEcnaObject " << this - << ". " << setw(8) << NbOfObjects << " times, class: " << ClassName; + << ". " << std::setw(8) << NbOfObjects << " times, class: " << ClassName; } - cout << endl; + std::cout << std::endl; #endif // NOCR } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParCout.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParCout.cc index b9d93721d3d64..190d3ceb9853a 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParCout.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParCout.cc @@ -17,7 +17,7 @@ ClassImp(TEcnaParCout) TEcnaParCout::~TEcnaParCout() { //destructor - // cout << "[Info Management] CLASS: TEcnaParCout. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParCout. DESTROY OBJECT: this = " << this << std::endl; } //=================================================================== // @@ -28,7 +28,7 @@ TEcnaParCout::TEcnaParCout() { // Constructor without argument - // cout << "[Info Management] CLASS: TEcnaParCout. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParCout. CREATE OBJECT: this = " << this << std::endl; Init(); } @@ -37,7 +37,7 @@ TEcnaParCout::TEcnaParCout(TEcnaObject* pObjectManager) { // Constructor with argument - // cout << "[Info Management] CLASS: TEcnaParCout. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParCout. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParEcal.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParEcal.cc index ac4409948288d..b9288f49eb79b 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParEcal.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParEcal.cc @@ -17,7 +17,7 @@ ClassImp(TEcnaParEcal) TEcnaParEcal::TEcnaParEcal(){ // Constructor without argument. Call to Init() - // cout << "[Info Management] CLASS: TEcnaParEcal. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParEcal. CREATE OBJECT: this = " << this << std::endl; Init(); } @@ -25,7 +25,7 @@ TEcnaParEcal::TEcnaParEcal(){ TEcnaParEcal::TEcnaParEcal(TEcnaObject* pObjectManager, const TString& SubDet){ // Constructor with argument. Call to Init() and set the subdetector flag - //cout << "[Info Management] CLASS: TEcnaParEcal. CREATE OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParEcal. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -37,7 +37,7 @@ TEcnaParEcal::TEcnaParEcal(TEcnaObject* pObjectManager, const TString& SubDet){ TEcnaParEcal::TEcnaParEcal(const TString& SubDet){ // Constructor with argument. Call to Init() and set the subdetector flag - //cout << "[Info Management] CLASS: TEcnaParEcal. CREATE OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParEcal. CREATE OBJECT: this = " << this << std::endl; Init(); SetEcalSubDetector(SubDet.Data()); @@ -47,7 +47,7 @@ TEcnaParEcal::TEcnaParEcal(const TString& SubDet){ TEcnaParEcal::~TEcnaParEcal() { //destructor - //cout << "[Info Management] CLASS: TEcnaParEcal. DESTROY OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParEcal. DESTROY OBJECT: this = " << this << std::endl; } void TEcnaParEcal::Init() @@ -201,8 +201,8 @@ void TEcnaParEcal::SetEcalSubDetector(const TString& SubDet){ if( SubDet != fCodeEB && SubDet != fCodeEE ) { - cout << "!TEcnaParEcal::SetEcalSubDetector(...)> " << SubDet - << " : unknown subdetector code (requested: EB or EE)" << fTTBELL << endl; + std::cout << "!TEcnaParEcal::SetEcalSubDetector(...)> " << SubDet + << " : unknown subdetector code (requested: EB or EE)" << fTTBELL << std::endl; } else { @@ -212,8 +212,8 @@ void TEcnaParEcal::SetEcalSubDetector(const TString& SubDet){ if( fFlagSubDet != fCodeEB && fFlagSubDet != fCodeEE ) { - cout << "!TEcnaParEcal::SetEcalSubDetector(...)> fFlagSubDet = " << fFlagSubDet - << " : CODE PROBLEM, subdetector flag not initialized." << fTTBELL << endl; + std::cout << "!TEcnaParEcal::SetEcalSubDetector(...)> fFlagSubDet = " << fFlagSubDet + << " : CODE PROBLEM, subdetector flag not initialized." << fTTBELL << std::endl; } if(fFlagSubDet == fCodeEB) diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc index b8a160712e6c4..ebb79b3907eb2 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc @@ -22,7 +22,7 @@ ClassImp(TEcnaParHistos) //if (fEcalNumbering != 0){delete fEcalNumbering; fCdelete++;} //if (fEcal != 0){delete fEcal; fCdelete++;} - //cout << "[Info Management] CLASS: TEcnaParHistos. DESTROY OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParHistos. DESTROY OBJECT: this = " << this << std::endl; } //=================================================================== @@ -34,7 +34,7 @@ TEcnaParHistos::TEcnaParHistos() { // Constructor without argument - //cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl; Init(); } @@ -43,7 +43,7 @@ TEcnaParHistos::TEcnaParHistos(TEcnaObject* pObjectManager, const TString& SubDe { // Constructor without argument - //cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -76,7 +76,7 @@ TEcnaParHistos::TEcnaParHistos(const TString& SubDet, { // Constructor with argument - //cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl; Init(); SetEcalSubDetector(SubDet.Data(), pEcal, pEcalNumbering); @@ -2237,10 +2237,10 @@ TString TEcnaParHistos::GetYVarHisto(const TString& HistoCode, const TString& Su if( HistoCode == "H_SCs_Date" ){YVarHisto = "Sigma Cor(s,s')";} } -// cout << endl << "*TEcnaParHistos::GetYVarHisto(...)> HistoType = " << HistoType +// std::cout << std::endl << "*TEcnaParHistos::GetYVarHisto(...)> HistoType = " << HistoType // << ", HistoCode = " << HistoCode // << ", StexNumber = " << StexNumber -// << ", YVarHisto = " << YVarHisto << endl; +// << ", YVarHisto = " << YVarHisto << std::endl; return YVarHisto; @@ -2467,9 +2467,9 @@ TString TEcnaParHistos::BuildStandardDetectorCode(const TString& UserDetector) if( StandardDetectorCode == "?" ) { - cout << "*TEcnaParHistos::BuildStandardDetectorCode(...)> UserDetector = " << UserDetector + std::cout << "*TEcnaParHistos::BuildStandardDetectorCode(...)> UserDetector = " << UserDetector << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("DetectorCode"); } @@ -2536,9 +2536,9 @@ TString TEcnaParHistos::BuildStandardPlotOption(const TString& CallingMethod, co //................................................... if( StandardPlotOption == "?" ) { - cout << "*TEcnaParHistos::BuildStandardPlotOption(...)> UserPlotOption = " << UserPlotOption + std::cout << "*TEcnaParHistos::BuildStandardPlotOption(...)> UserPlotOption = " << UserPlotOption << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("PlotOption"); } @@ -2602,9 +2602,9 @@ TString TEcnaParHistos::BuildStandard1DHistoCodeX(const TString& CallingMethod, //--------------------------------------------- if( StandardHistoCode == "?" ) { - cout << "*TEcnaParHistos::BuildStandard1DHistoCodeX(...)> UserHistoCode = " << UserHistoCode + std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeX(...)> UserHistoCode = " << UserHistoCode << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("1DHistoCodeX"); } @@ -2646,9 +2646,9 @@ TString TEcnaParHistos::BuildStandard1DHistoCodeY(const TString& CallingMethod, //--------------------------------------------- if( StandardHistoCode == "?" ) { - cout << "*TEcnaParHistos::BuildStandard1DHistoCodeY(...)> UserHistoCode = " << UserHistoCode + std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeY(...)> UserHistoCode = " << UserHistoCode << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("1DHistoCodeY"); } @@ -2736,9 +2736,9 @@ TString TEcnaParHistos::BuildStandard1DHistoCodeXY(const TString& UserHistoCode) //--------------------------------------------- if( StandardHistoCode == "?" ) { - cout << "*TEcnaParHistos::BuildStandard1DHistoCodeXY(...)> UserHistoCode = " << UserHistoCode + std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeXY(...)> UserHistoCode = " << UserHistoCode << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("1DHistoCodeXY"); } @@ -2769,9 +2769,9 @@ TString TEcnaParHistos::BuildStandardCovOrCorCode(const TString& CallingMethod, //--------------------------------------------- if( StandardHistoCode == "?" ) { - cout << "*TEcnaParHistos::BuildStandardCovOrCorCode(...)> UserHistoCode = " << UserHistoCode + std::cout << "*TEcnaParHistos::BuildStandardCovOrCorCode(...)> UserHistoCode = " << UserHistoCode << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("CovOrCorCode"); } @@ -2831,9 +2831,9 @@ TString TEcnaParHistos::BuildStandardBetweenWhatCode(const TString& CallingMetho //--------------------------------------------- if( StandardHistoCode == "?" ) { - cout << "*TEcnaParHistos::BuildStandardBetweenWhatCode(...)> UserHistoCode = " << UserHistoCode + std::cout << "*TEcnaParHistos::BuildStandardBetweenWhatCode(...)> UserHistoCode = " << UserHistoCode << " : code not found." - << fTTBELL << endl; + << fTTBELL << std::endl; ListOfStandardCodes("BetweenWhatCode"); } @@ -2848,92 +2848,92 @@ void TEcnaParHistos::ListOfStandardCodes(const TString& TypeOfCode) if(TypeOfCode == "DetectorCode") { - cout << "*--------------------------------------- Standard detector codes:" << endl; - cout << " EB (ECAL Barrel) " << endl; - cout << " EE (ECAL Endcap) " << endl; - cout << " SM (Barrel Super Module) " << endl; - cout << " Dee (Encap Dee) " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandardDetectorCode(...)." << endl; - cout << "*----------------------------------------------------------------" << endl; + std::cout << "*--------------------------------------- Standard detector codes:" << std::endl; + std::cout << " EB (ECAL Barrel) " << std::endl; + std::cout << " EE (ECAL Endcap) " << std::endl; + std::cout << " SM (Barrel Super Module) " << std::endl; + std::cout << " Dee (Encap Dee) " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandardDetectorCode(...)." << std::endl; + std::cout << "*----------------------------------------------------------------" << std::endl; } if(TypeOfCode == "PlotOption") { - cout << "*--------------------------------------- Standard plot options:" << endl; - cout << " All ROOT DRAW options and: " << endl; - cout << " (nothing) " << endl; - cout << " SAME n " << endl; - cout << " ASCII " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandardPlotOption(...)." << endl; - cout << "*--------------------------------------------------------------" << endl; + std::cout << "*--------------------------------------- Standard plot options:" << std::endl; + std::cout << " All ROOT DRAW options and: " << std::endl; + std::cout << " (nothing) " << std::endl; + std::cout << " SAME n " << std::endl; + std::cout << " ASCII " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandardPlotOption(...)." << std::endl; + std::cout << "*--------------------------------------------------------------" << std::endl; } if(TypeOfCode == "1DHistoCodeX") { - cout << "*---------------------- Standard 1D histo codes for X coordinate:" << endl; - cout << " Tow (SM tower) " << endl; - cout << " SC (Dee super crystal) " << endl; - cout << " Xtal (crystal) " << endl; - cout << " Smp (Adc sample) " << endl; - cout << " Evt (event) " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeX(...)." << endl; - cout << "*----------------------------------------------------------------" << endl; + std::cout << "*---------------------- Standard 1D histo codes for X coordinate:" << std::endl; + std::cout << " Tow (SM tower) " << std::endl; + std::cout << " SC (Dee super crystal) " << std::endl; + std::cout << " Xtal (crystal) " << std::endl; + std::cout << " Smp (Adc sample) " << std::endl; + std::cout << " Evt (event) " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeX(...)." << std::endl; + std::cout << "*----------------------------------------------------------------" << std::endl; } if(TypeOfCode == "1DHistoCodeY") { - cout << "*---------------------- Standard 1D histo codes for Y coordinate;" << endl; - cout << " NOX (number of crystals) " << endl; - cout << " NOS (number of samples) " << endl; - cout << " NOR (number of runs) " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeY(...)." << endl; - cout << "*----------------------------------------------------------------" << endl; + std::cout << "*---------------------- Standard 1D histo codes for Y coordinate;" << std::endl; + std::cout << " NOX (number of crystals) " << std::endl; + std::cout << " NOS (number of samples) " << std::endl; + std::cout << " NOR (number of runs) " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeY(...)." << std::endl; + std::cout << "*----------------------------------------------------------------" << std::endl; } if(TypeOfCode == "1DHistoCodeXY") { - cout << "*------------------ Standard 1D histo codes for X or Y coordinate;" << endl; - cout << " NOE (number of events) " << endl; - cout << " Ped (pedestal) " << endl; - cout << " TNo (total noise) " << endl; - cout << " LFN (low frequency noise) " << endl; - cout << " HFN (high frequency noise) " << endl; - cout << " MCs (mean correlation between samples) " << endl; - cout << " SCs (sigma of correlations between samples) " << endl; - cout << " MSp (sample mean) " << endl; - cout << " SSp (sample sigma) " << endl; - cout << " Time (time, date) " << endl; - cout << " Adc (ADC sample value) " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeXY(...)." << endl; - cout << "*-----------------------------------------------------------------" << endl; + std::cout << "*------------------ Standard 1D histo codes for X or Y coordinate;" << std::endl; + std::cout << " NOE (number of events) " << std::endl; + std::cout << " Ped (pedestal) " << std::endl; + std::cout << " TNo (total noise) " << std::endl; + std::cout << " LFN (low frequency noise) " << std::endl; + std::cout << " HFN (high frequency noise) " << std::endl; + std::cout << " MCs (mean correlation between samples) " << std::endl; + std::cout << " SCs (sigma of correlations between samples) " << std::endl; + std::cout << " MSp (sample mean) " << std::endl; + std::cout << " SSp (sample sigma) " << std::endl; + std::cout << " Time (time, date) " << std::endl; + std::cout << " Adc (ADC sample value) " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeXY(...)." << std::endl; + std::cout << "*-----------------------------------------------------------------" << std::endl; } if(TypeOfCode == "CovOrCorCode") { - cout << "*-------- Standard codes for matrix type (correlation or covariance);" << endl; - cout << " Cor (correlation) " << endl; - cout << " cov (covariance) " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandardCovOrCorCode(...)." << endl; - cout << "*--------------------------------------------------------------------" << endl; + std::cout << "*-------- Standard codes for matrix type (correlation or covariance);" << std::endl; + std::cout << " Cor (correlation) " << std::endl; + std::cout << " cov (covariance) " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandardCovOrCorCode(...)." << std::endl; + std::cout << "*--------------------------------------------------------------------" << std::endl; } if(TypeOfCode == "BetweenWhatCode") { - cout << "*-------- Standard codes for quantities in correlation or covariance;" << endl; - cout << " Mss (between samples) " << endl; - cout << " MccLF (low frequency between channels) " << endl; - cout << " MccHF (high frequency between channels) " << endl; - cout << " MttLF (low frequency between towers [if EB] or SC [if EE]) " << endl; - cout << " MttLF (high frequency between towers [if EB] or SC [if EE]) " << endl; - cout << " Other codes are available" << endl; - cout << " See source file: TEcnaParHistos::BuildStandardBetweenWhatCode(...)." << endl; - cout << "*--------------------------------------------------------------------" << endl; + std::cout << "*-------- Standard codes for quantities in correlation or covariance;" << std::endl; + std::cout << " Mss (between samples) " << std::endl; + std::cout << " MccLF (low frequency between channels) " << std::endl; + std::cout << " MccHF (high frequency between channels) " << std::endl; + std::cout << " MttLF (low frequency between towers [if EB] or SC [if EE]) " << std::endl; + std::cout << " MttLF (high frequency between towers [if EB] or SC [if EE]) " << std::endl; + std::cout << " Other codes are available" << std::endl; + std::cout << " See source file: TEcnaParHistos::BuildStandardBetweenWhatCode(...)." << std::endl; + std::cout << "*--------------------------------------------------------------------" << std::endl; } } @@ -2954,8 +2954,8 @@ TString TEcnaParHistos::GetTechHistoCode(const TString& StandardHistoCode) if( TechHistoCode == "?" ) { - cout << "*TEcnaParHistos::GetTechHistoCode(...)> StandardHistoCode = " << StandardHistoCode - << " : code not found " << fTTBELL << endl; + std::cout << "*TEcnaParHistos::GetTechHistoCode(...)> StandardHistoCode = " << StandardHistoCode + << " : code not found " << fTTBELL << std::endl; } return TechHistoCode; } @@ -3011,8 +3011,8 @@ TString TEcnaParHistos::GetTechHistoCode(const TString& X_Quantity, const TStrin if( TechHistoCode == "?" ) { - cout << "TEcnaParHistos::GetTechHistoCode(...)> HistoCode not found. X_Quantity = " << X_Quantity - << ", Y_Quantity = "<< Y_Quantity << endl; + std::cout << "TEcnaParHistos::GetTechHistoCode(...)> HistoCode not found. X_Quantity = " << X_Quantity + << ", Y_Quantity = "<< Y_Quantity << std::endl; } return TechHistoCode; } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc index 2d591d4a6f17c..398218dca83f8 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc @@ -19,7 +19,7 @@ ClassImp(TEcnaParPaths) { //destructor - // cout << "[Info Management] CLASS: TEcnaParPaths. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParPaths. DESTROY OBJECT: this = " << this << std::endl; } //=================================================================== @@ -30,14 +30,14 @@ ClassImp(TEcnaParPaths) TEcnaParPaths::TEcnaParPaths() { // Constructor without argument - // cout << "[Info Management] CLASS: TEcnaParPaths. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParPaths. CREATE OBJECT: this = " << this << std::endl; Init(); } TEcnaParPaths::TEcnaParPaths(TEcnaObject* pObjectManager) { // Constructor without argument - // cout << "[Info Management] CLASS: TEcnaParPaths. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaParPaths. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaParPaths", i_this); @@ -99,7 +99,7 @@ Bool_t TEcnaParPaths::GetPathForResultsRootFiles(const TString& argFileName) if ( argFileName == "" ) { - string cFileNameForCnaPaths = "ECNA/path_results_root"; // config file name + std::string cFileNameForCnaPaths = "ECNA/path_results_root"; // config file name TString s_file_name = cFileNameForCnaPaths.c_str(); const Text_t *t_file_name = (const Text_t *)s_file_name.Data(); @@ -121,7 +121,7 @@ Bool_t TEcnaParPaths::GetPathForResultsRootFiles(const TString& argFileName) if(fFcin_rr.fail() == kFALSE) { fFcin_rr.clear(); - string xResultsFileP; + std::string xResultsFileP; fFcin_rr >> xResultsFileP; fCfgResultsRootFilePath = xResultsFileP.c_str(); fFcin_rr.close(); @@ -131,20 +131,20 @@ Bool_t TEcnaParPaths::GetPathForResultsRootFiles(const TString& argFileName) { fFcin_rr.clear(); fCnaError++; - cout << fTTBELL << endl - << " ***************************************************************************************** " << endl; - cout << " !CNA(TEcnaParPaths) (" << fCnaError << ") *** ERROR *** " << endl << endl - << " " << fFileForResultsRootFilePath.Data() << ": file not found. " << endl << endl - << " Please create a subdirectory named ECNA in your HOME directory (if not already done)" << endl - << " and create a file named path_results_root in the subdirectory ECNA." << endl << endl - << " The file " << fFileForResultsRootFilePath.Data() << " is a configuration file" << endl - << " for ECNA and must contain one line with the following syntax:" << endl << endl - << " PATH_FOR_THE_RESULTS_ROOT_FILE (without slash at the end of line)" << endl + std::cout << fTTBELL << std::endl + << " ***************************************************************************************** " << std::endl; + std::cout << " !CNA(TEcnaParPaths) (" << fCnaError << ") *** ERROR *** " << std::endl << std::endl + << " " << fFileForResultsRootFilePath.Data() << ": file not found. " << std::endl << std::endl + << " Please create a subdirectory named ECNA in your HOME directory (if not already done)" << std::endl + << " and create a file named path_results_root in the subdirectory ECNA." << std::endl << std::endl + << " The file " << fFileForResultsRootFilePath.Data() << " is a configuration file" << std::endl + << " for ECNA and must contain one line with the following syntax:" << std::endl << std::endl + << " PATH_FOR_THE_RESULTS_ROOT_FILE (without slash at the end of line)" << std::endl << " ================================" - << endl << endl - << " Example: $HOME/scratch0/ecna/results_root" << endl << endl + << std::endl << std::endl + << " Example: $HOME/scratch0/ecna/results_root" << std::endl << std::endl << " ***************************************************************************************** " - << fTTBELL << endl; + << fTTBELL << std::endl; fFcin_rr.close(); FileHere = kFALSE; @@ -178,7 +178,7 @@ Bool_t TEcnaParPaths::GetPathForResultsAsciiFiles(const TString& argFileName) if ( argFileName == "" ) { - string cFileNameForCnaPaths = "ECNA/path_results_ascii"; // config file name + std::string cFileNameForCnaPaths = "ECNA/path_results_ascii"; // config file name TString s_file_name = cFileNameForCnaPaths.c_str(); const Text_t *t_file_name = (const Text_t *)s_file_name.Data(); @@ -199,7 +199,7 @@ Bool_t TEcnaParPaths::GetPathForResultsAsciiFiles(const TString& argFileName) if(fFcin_ra.fail() == kFALSE) { fFcin_ra.clear(); - string xResultsFileP; + std::string xResultsFileP; fFcin_ra >> xResultsFileP; fCfgResultsAsciiFilePath = xResultsFileP.c_str(); fFcin_ra.close(); @@ -209,20 +209,20 @@ Bool_t TEcnaParPaths::GetPathForResultsAsciiFiles(const TString& argFileName) { fFcin_ra.clear(); fCnaError++; - cout << fTTBELL << endl - << " ***************************************************************************************** " << endl; - cout << " !CNA(TEcnaParPaths) (" << fCnaError << ") *** ERROR *** " << endl << endl - << " " << fFileForResultsAsciiFilePath.Data() << ": file not found. " << endl << endl - << " Please create a subdirectory named ECNA in your HOME directory (if not already done)" << endl - << " and create a file named path_results_ascii in the subdirectory ECNA." << endl << endl - << " The file " << fFileForResultsAsciiFilePath.Data() << " is a configuration file" << endl - << " for ECNA and must contain one line with the following syntax:" << endl << endl - << " PATH_FOR_THE_RESULTS_ASCII_FILE (without slash at the end of line)" << endl + std::cout << fTTBELL << std::endl + << " ***************************************************************************************** " << std::endl; + std::cout << " !CNA(TEcnaParPaths) (" << fCnaError << ") *** ERROR *** " << std::endl << std::endl + << " " << fFileForResultsAsciiFilePath.Data() << ": file not found. " << std::endl << std::endl + << " Please create a subdirectory named ECNA in your HOME directory (if not already done)" << std::endl + << " and create a file named path_results_ascii in the subdirectory ECNA." << std::endl << std::endl + << " The file " << fFileForResultsAsciiFilePath.Data() << " is a configuration file" << std::endl + << " for ECNA and must contain one line with the following syntax:" << std::endl << std::endl + << " PATH_FOR_THE_RESULTS_ASCII_FILE (without slash at the end of line)" << std::endl << " ================================" - << endl << endl - << " Example: $HOME/scratch0/ecna/results_ascii" << endl << endl + << std::endl << std::endl + << " Example: $HOME/scratch0/ecna/results_ascii" << std::endl << std::endl << " ***************************************************************************************** " - << fTTBELL << endl; + << fTTBELL << std::endl; fFcin_ra.close(); FileHere = kFALSE; @@ -256,7 +256,7 @@ Bool_t TEcnaParPaths::GetPathForHistoryRunListFiles(const TString& argFileName) if ( argFileName == "" ) { - string cFileNameForCnaPaths = "ECNA/path_runlist_history_plots"; // config file name + std::string cFileNameForCnaPaths = "ECNA/path_runlist_history_plots"; // config file name TString s_file_name = cFileNameForCnaPaths.c_str(); const Text_t *t_file_name = (const Text_t *)s_file_name.Data(); @@ -277,7 +277,7 @@ Bool_t TEcnaParPaths::GetPathForHistoryRunListFiles(const TString& argFileName) if(fFcin_lor.fail() == kFALSE) { fFcin_lor.clear(); - string xHistoryRunListP; + std::string xHistoryRunListP; fFcin_lor >> xHistoryRunListP; fCfgHistoryRunListFilePath = xHistoryRunListP.c_str(); fFcin_lor.close(); @@ -287,20 +287,20 @@ Bool_t TEcnaParPaths::GetPathForHistoryRunListFiles(const TString& argFileName) { fFcin_lor.clear(); fCnaError++; - cout << fTTBELL << endl - << " ******************************************************************************************************** " << endl; - cout << " !CNA(TEcnaParPaths) (" << fCnaError << ") *** ERROR *** " << endl << endl - << " " << fFileForHistoryRunListFilePath.Data() << ": file not found. " << endl << endl - << " Please create a subdirectory named ECNA in your HOME directory (if not already done)" << endl - << " and create a file named path_runlist_history_plots in the subdirectory ECNA." << endl << endl - << " The file " << fFileForHistoryRunListFilePath.Data() << " is a configuration file" << endl - << " for ECNA and must contain one line with the following syntax:" << endl << endl - << " PATH_FOR_THE_LIST_OF_RUNS_FOR_HISTORY_PLOTS_FILE (without slash at the end of line)" << endl + std::cout << fTTBELL << std::endl + << " ******************************************************************************************************** " << std::endl; + std::cout << " !CNA(TEcnaParPaths) (" << fCnaError << ") *** ERROR *** " << std::endl << std::endl + << " " << fFileForHistoryRunListFilePath.Data() << ": file not found. " << std::endl << std::endl + << " Please create a subdirectory named ECNA in your HOME directory (if not already done)" << std::endl + << " and create a file named path_runlist_history_plots in the subdirectory ECNA." << std::endl << std::endl + << " The file " << fFileForHistoryRunListFilePath.Data() << " is a configuration file" << std::endl + << " for ECNA and must contain one line with the following syntax:" << std::endl << std::endl + << " PATH_FOR_THE_LIST_OF_RUNS_FOR_HISTORY_PLOTS_FILE (without slash at the end of line)" << std::endl << " ================================" - << endl << endl - << " Example: $HOME/scratch0/ecna/runlist_history_plots" << endl << endl + << std::endl << std::endl + << " Example: $HOME/scratch0/ecna/runlist_history_plots" << std::endl << std::endl << " ******************************************************************************************************** " - << fTTBELL << endl; + << fTTBELL << std::endl; fFcin_lor.close(); FileHere = kFALSE; @@ -330,9 +330,9 @@ void TEcnaParPaths::GetCMSSWParameters() char* ch_cmssw_base = getenv("CMSSW_BASE"); if( ch_cmssw_base == 0 ) { - cout << "*TEcnaParPaths::GetCMSSWParameters()> CMSSW_BASE not defined." + std::cout << "*TEcnaParPaths::GetCMSSWParameters()> CMSSW_BASE not defined." << " Please, set up the environment (command: eval `scramv1 runtime -csh`)" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { @@ -344,9 +344,9 @@ void TEcnaParPaths::GetCMSSWParameters() char* ch_scram_arch = getenv("SCRAM_ARCH"); if( ch_scram_arch == 0 ) { - cout << "*TEcnaParPaths::GetCMSSWParameters()> SCRAM_ARCH not defined." + std::cout << "*TEcnaParPaths::GetCMSSWParameters()> SCRAM_ARCH not defined." << " Please, set up the environment (command: eval `scramv1 runtime -csh`)" - << fTTBELL << endl; + << fTTBELL << std::endl; } else { diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc index 9875d4a246cb3..7db3b499c8f27 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc @@ -19,7 +19,7 @@ ClassImp(TEcnaRead) TEcnaRead::TEcnaRead() { Init(); - // cout << "[Info Management] CLASS: TEcnaRead. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRead. CREATE OBJECT: this = " << this << std::endl; } //Constructor without argument @@ -104,7 +104,7 @@ TEcnaRead::TEcnaRead(TEcnaObject* pObjectManager, const TString& SubDet) Init(); SetEcalSubDetector(SubDet.Data()); - // cout << "[Info Management] CLASS: TEcnaRead. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRead. CREATE OBJECT: this = " << this << std::endl; } void TEcnaRead::Init() @@ -186,8 +186,8 @@ void TEcnaRead::Anew(const TString& VarName) // allocation survey for new fCnew++; - // cout << "TEcnaRead::Anew---> new " << setw(4) << fCnew << " --------------> " << setw(25) - // << VarName.Data() << " / object(this): " << this << endl; + // std::cout << "TEcnaRead::Anew---> new " << std::setw(4) << fCnew << " --------------> " << std::setw(25) + // << VarName.Data() << " / object(this): " << this << std::endl; } void TEcnaRead::Adelete(const TString& VarName) @@ -195,8 +195,8 @@ void TEcnaRead::Adelete(const TString& VarName) // allocation survey for delete fCdelete++; - // cout << "TEcnaRead::Adelete> ========== delete" << setw(4) << fCdelete << " -> " << setw(25) - // << VarName.Data() << " / object(this): " << this << endl; + // std::cout << "TEcnaRead::Adelete> ========== delete" << std::setw(4) << fCdelete << " -> " << std::setw(25) + // << VarName.Data() << " / object(this): " << this << std::endl; } //=========================================== private copy ========== @@ -233,9 +233,9 @@ void TEcnaRead::fCopy(const TEcnaRead& rund) TEcnaRead::TEcnaRead(const TEcnaRead& dcop) { - cout << "*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> " + std::cout << "*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> " << " It is time to write a copy constructor" - << endl; + << std::endl; // { Int_t cintoto; cin >> cintoto; } @@ -265,10 +265,10 @@ TEcnaRead::~TEcnaRead() { //Destructor - // cout << "[Info Management] CLASS: TEcnaRead. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRead. DESTROY OBJECT: this = " << this << std::endl; if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){ - cout << "*TEcnaRead::~TEcnaRead()> Entering destructor" << endl;} + std::cout << "*TEcnaRead::~TEcnaRead()> Entering destructor" << std::endl;} //if (fFileHeader != 0){delete fFileHeader; Adelete("fFileHeader");} //if (fEcal != 0){delete fEcal; Adelete("fEcal");} @@ -286,17 +286,17 @@ TEcnaRead::~TEcnaRead() if ( fCnew != fCdelete ) { - cout << "!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " - << fCnew << ", fCdelete = " << fCdelete << fTTBELL << endl; + std::cout << "!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " + << fCnew << ", fCdelete = " << fCdelete << fTTBELL << std::endl; } else { - // cout << "*TEcnaRead/destructor> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = " - // << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "*TEcnaRead/destructor> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = " + // << fCnew << ", fCdelete = " << fCdelete << std::endl; } if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){ - cout << "*TEcnaRead::~TEcnaRead()> End of destructor " << endl;} + std::cout << "*TEcnaRead::~TEcnaRead()> End of destructor " << std::endl;} } //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -330,18 +330,18 @@ TVectorD TEcnaRead::Read1DHisto(const Int_t& VecDim, const TString& UserQuan else { for(Int_t i=0; i UserQuantity = " << UserQuantity + std::cout <<"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity << "(StandardQuantity = " << StandardQuantity - << "). Wrong code, no file reading." << fTTBELL << endl; + << "). Wrong code, no file reading." << fTTBELL << std::endl; } return vec; } else { TVectorD vec(VecDim); for(Int_t i=0; i UserQuantity = " << UserQuantity + std::cout <<"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity << ", VecDim = " << VecDim << "(VecDimTest = " << VecDimTest << ")" - << ". Wrong code or array dimension. No file reading." << fTTBELL << endl; + << ". Wrong code or array dimension. No file reading." << fTTBELL << std::endl; return vec; } } // end of Read1DHisto / ReadSampleAdcValues @@ -364,18 +364,18 @@ TVectorD TEcnaRead::Read1DHisto(const Int_t& VecDim, const TString& UserQuantity else { for(Int_t i=0; i UserQuantity = " << UserQuantity + std::cout <<"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity << ", StandardQuantity = " << StandardQuantity - << ". Wrong code, no file reading." << fTTBELL << endl; + << ". Wrong code, no file reading." << fTTBELL << std::endl; } return vec; } else { TVectorD vec(VecDim); for(Int_t i=0; i UserQuantity = " << UserQuantity + std::cout <<"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity << ", VecDim = " << VecDim << "(VecDimTest = " << VecDimTest << ")" - << ". Wrong code or array dimension. No file reading." << fTTBELL << endl; + << ". Wrong code or array dimension. No file reading." << fTTBELL << std::endl; return vec; } } // end of Read1DHisto / ReadSampleMeans , ReadSampleSigmas @@ -468,8 +468,8 @@ TVectorD TEcnaRead::Read1DHisto(const Int_t& VecDim, const TString& UserQuantity } else { - cout << "!TEcnaRead::Read1DHisto(const TString&, const TString&)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaRead::Read1DHisto(const TString&, const TString&)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } } @@ -477,18 +477,18 @@ TVectorD TEcnaRead::Read1DHisto(const Int_t& VecDim, const TString& UserQuantity else { for(Int_t i=0; i UserQuantity = " << UserQuantity + std::cout <<"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity << ", UserDetector = " << UserDetector - << ". Wrong code(s). No file reading." << fTTBELL << endl; + << ". Wrong code(s). No file reading." << fTTBELL << std::endl; } return vec; } else { TVectorD vec(VecDim); for(Int_t i=0; i UserQuantity = " << UserQuantity + std::cout <<"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity << ", UserDetector = " << UserDetector << ", VecDim = " << VecDim - << ". Wrong code(s) or array dimension. No file reading." << fTTBELL << endl; + << ". Wrong code(s) or array dimension. No file reading." << fTTBELL << std::endl; return vec; } } // end of Read1DHisto / Stex and Stas histos @@ -546,9 +546,9 @@ TMatrixD TEcnaRead::ReadMatrix(const Int_t& MatDim, const TString& UserCorOrCo for(Int_t i=0; i-MatDim<0; i++) {for(Int_t j=0; j-MatDim<0; j++) {mat(i,j) = (double_t)0.;}} - cout <<"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov + std::cout <<"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov << ", UserBetweenWhat = " << UserBetweenWhat - << ". Wrong code(s), no file reading." << fTTBELL << endl; + << ". Wrong code(s), no file reading." << fTTBELL << std::endl; } return mat; } @@ -591,9 +591,9 @@ TMatrixD TEcnaRead::ReadMatrix(const Int_t& MatDim, const TString& UserCorOrCov, for(Int_t i=0; i-MatDim<0; i++) {for(Int_t j=0; j-MatDim<0; j++) {mat(i,j) = (double_t)0.;}} - cout <<"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov + std::cout <<"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov << ", UserBetweenWhat = " << UserBetweenWhat - << ". Wrong code(s), no file reading." << fTTBELL << endl; + << ". Wrong code(s), no file reading." << fTTBELL << std::endl; } return mat; } @@ -609,9 +609,9 @@ TString TEcnaRead::GetTechReadCode(const TString& StandardQuantity, const TStrin if( dTechDetector == "?") { - cout << "!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = " + std::cout << "!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = " << dTechDetector << ", StandardDetector = " << StandardDetector - << fTTBELL << endl; + << fTTBELL << std::endl; } else { @@ -633,9 +633,9 @@ TString TEcnaRead::GetTechReadCode(const TString& StandardQuantity, const TStrin if( rTechReadCode == "?") { - cout << "!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " << rTechReadCode + std::cout << "!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " << rTechReadCode << ", StandardQuantity = " << StandardQuantity - << fTTBELL << endl; + << fTTBELL << std::endl; } return rTechReadCode; @@ -707,26 +707,26 @@ void TEcnaRead::FileParameters(const TString& typ_ana, const Int_t& nb_o if( fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments ) { - cout << endl; - cout << "*TEcnaRead::FileParameters(...)>" << endl - << " The method has been called with the following argument values:" << endl + std::cout << std::endl; + std::cout << "*TEcnaRead::FileParameters(...)>" << std::endl + << " The method has been called with the following argument values:" << std::endl << " Analysis name = " - << fFileHeader->fTypAna << endl + << fFileHeader->fTypAna << std::endl << " Nb of required samples = " - << fFileHeader->fNbOfSamples << endl + << fFileHeader->fNbOfSamples << std::endl << " Run number = " - << fFileHeader->fRunNumber << endl + << fFileHeader->fRunNumber << std::endl << " First requested event number = " - << fFileHeader->fFirstReqEvtNumber << endl + << fFileHeader->fFirstReqEvtNumber << std::endl << " Last requested event number = " - << fFileHeader->fLastReqEvtNumber << endl + << fFileHeader->fLastReqEvtNumber << std::endl << " Requested number of events = " - << fFileHeader->fReqNbOfEvts << endl + << fFileHeader->fReqNbOfEvts << std::endl << " Stex number = " - << fFileHeader->fStex << endl + << fFileHeader->fStex << std::endl << " Path for the ROOT file = " - << fPathRoot << endl - << endl; + << fPathRoot << std::endl + << std::endl; } fReadyToReadRootFile = 1; // set flag @@ -817,8 +817,8 @@ Bool_t TEcnaRead::OpenRootFile(const Text_t *name, const TString& status) { // if( gCnaRootFile != 0 ) // { // Int_t iPointer = (Int_t)gCnaRootFile; - // cout << "*TEcnaRead::OpenRootFile(...)> RootFile pointer not (re)initialized to 0. gCnaRootFile = " - // << gCnaRootFile << ", pointer = " << iPointer << fTTBELL << endl; + // std::cout << "*TEcnaRead::OpenRootFile(...)> RootFile pointer not (re)initialized to 0. gCnaRootFile = " + // << gCnaRootFile << ", pointer = " << iPointer << fTTBELL << std::endl; // // delete gCnaRootFile; gCnaRootFile = 0; Adelete("gCnaRootFile"); // } @@ -845,7 +845,7 @@ Bool_t TEcnaRead::OpenRootFile(const Text_t *name, const TString& status) { if ( ok_open == kFALSE ) { - cout << "!TEcnaRead::OpenRootFile> " << s_name.Data() << ": file not found." << endl; + std::cout << "!TEcnaRead::OpenRootFile> " << s_name.Data() << ": file not found." << std::endl; //if( gCnaRootFile != 0 ) // {delete gCnaRootFile; gCnaRootFile = 0; Adelete("gCnaRootFile");} } @@ -853,15 +853,15 @@ Bool_t TEcnaRead::OpenRootFile(const Text_t *name, const TString& status) { { if(fFlagPrint == fCodePrintAllComments) { - cout << "*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() << " OK " - << ", gCnaRootFile = " << gCnaRootFile << endl; + std::cout << "*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() << " OK " + << ", gCnaRootFile = " << gCnaRootFile << std::endl; } fOpenRootFile = kTRUE; fCurrentlyOpenFileName = s_name; if(fFlagPrint == fCodePrintAllComments) { - cout << "*TEcnaRead::OpenRootFile> Open ROOT file: " << fCurrentlyOpenFileName.Data() << " => OK " - << ", gCnaRootFile = " << gCnaRootFile << endl << endl; + std::cout << "*TEcnaRead::OpenRootFile> Open ROOT file: " << fCurrentlyOpenFileName.Data() << " => OK " + << ", gCnaRootFile = " << gCnaRootFile << std::endl << std::endl; } } return ok_open; @@ -885,11 +885,11 @@ Bool_t TEcnaRead::CloseRootFile(const Text_t *name) { if(fFlagPrint == fCodePrintAllComments){ TString e_path; e_path.Append(name); - cout << "*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() << " OK " << endl;} + std::cout << "*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() << " OK " << std::endl;} if(fFlagPrint == fCodePrintAllComments){ Long_t pointer_value = (Long_t)gCnaRootFile; - cout << "*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " << gCnaRootFile - << ", pointer = " << pointer_value << endl;} + std::cout << "*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " << gCnaRootFile + << ", pointer = " << pointer_value << std::endl;} //delete gCnaRootFile; gCnaRootFile = 0; Adelete("gCnaRootFile"); @@ -900,15 +900,15 @@ Bool_t TEcnaRead::CloseRootFile(const Text_t *name) { } else { - cout << "*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = " + std::cout << "*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = " << gCnaRootFile - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { - cout << "*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " << fOpenRootFile - << endl; + std::cout << "*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " << fOpenRootFile + << std::endl; } return ok_close; } @@ -953,15 +953,15 @@ Bool_t TEcnaRead::LookAtRootFile() } else { - cout << "!TEcnaRead::LookAtRootFile()> *** ERROR ***>" - << " ROOT file not found " << fTTBELL << endl; + std::cout << "!TEcnaRead::LookAtRootFile()> *** ERROR ***>" + << " ROOT file not found " << fTTBELL << std::endl; return kFALSE; } } else { - cout << "!TEcnaRead::LookAtRootFile()> *** ERROR ***>" - << " FileParameters not called " << fTTBELL << endl; + std::cout << "!TEcnaRead::LookAtRootFile()> *** ERROR ***>" + << " FileParameters not called " << fTTBELL << std::endl; return kFALSE; } return kFALSE; @@ -992,8 +992,8 @@ Bool_t TEcnaRead::ReadRootFileHeader(const Int_t& i_print) const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data(); const Text_t *current_file_name = (const Text_t *)fCurrentlyOpenFileName.Data(); - if( i_print == 1 ){cout << "*TEcnaRead::ReadRootFileHeader> file_name = " - << fCnaWrite->fRootFileNameShort.Data() << endl;} + if( i_print == 1 ){std::cout << "*TEcnaRead::ReadRootFileHeader> file_name = " + << fCnaWrite->fRootFileNameShort.Data() << std::endl;} Bool_t ok_open = kFALSE; @@ -1002,8 +1002,8 @@ Bool_t TEcnaRead::ReadRootFileHeader(const Int_t& i_print) // if( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadRootFileHeader(...)*** ERROR ***> " - // << "Reading header on file already open." << endl; + // std::cout << "!TEcnaRead::ReadRootFileHeader(...)*** ERROR ***> " + // << "Reading header on file already open." << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1020,8 +1020,8 @@ Bool_t TEcnaRead::ReadRootFileHeader(const Int_t& i_print) } else { - cout << "!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; } } @@ -1080,19 +1080,19 @@ void TEcnaRead::TestArrayDimH1(const TString& CallingMethod, const TString& Max if( MaxValue != VecDim) { - cout << "!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data() + std::cout << "!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data() << ", MaxName: " << MaxName.Data() << ", Maxvalue = " << MaxValue - << ", VecDim = " << VecDim << fTTBELL << endl; + << ", VecDim = " << VecDim << fTTBELL << std::endl; } #define NOPM #ifndef NOPM else { - cout << "!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data() + std::cout << "!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data() << ", MaxName: " << MaxName.Data() << ", Maxvalue = " << MaxValue - << ", VecDim = " << VecDim << endl; + << ", VecDim = " << VecDim << std::endl; } #endif // NOPM } @@ -1104,19 +1104,19 @@ void TEcnaRead::TestArrayDimH2(const TString& CallingMethod, const TString& Max if( MaxValue != MatDim) { - cout << "!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data() + std::cout << "!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data() << ", MaxName: " << MaxName.Data() << ", Maxvalue = " << MaxValue - << ", MatDim = " << MatDim << fTTBELL << endl; + << ", MatDim = " << MatDim << fTTBELL << std::endl; } #define NOPN #ifndef NOPN else { - cout << "!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data() + std::cout << "!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data() << ", MaxName: " << MaxName.Data() << ", Maxvalue = " << MaxValue - << ", MatDim = " << MatDim << endl; + << ", MatDim = " << MatDim << std::endl; } #endif // NOPN } @@ -1158,8 +1158,8 @@ TVectorD TEcnaRead::ReadStinNumbers(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Reading on file already open." -// << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Reading on file already open." +// << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1177,8 +1177,8 @@ TVectorD TEcnaRead::ReadStinNumbers(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1203,11 +1203,11 @@ TVectorD TEcnaRead::ReadStinNumbers(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1219,8 +1219,8 @@ TVectorD TEcnaRead::ReadStinNumbers(const Int_t& VecDim) { for(Int_t i=0; i < VecDim; i++) { - cout << "*TEcnaRead::ReadStinNumbers(...)> StinNumber[" << i << "] = " - << vec[i] << endl; + std::cout << "*TEcnaRead::ReadStinNumbers(...)> StinNumber[" << i << "] = " + << vec[i] << std::endl; } } } @@ -1273,8 +1273,8 @@ TVectorD TEcnaRead::ReadSampleAdcValues(const Int_t& n1StexStin, const Int_t& i0 // if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> " - // << "Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> " + // << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1292,8 +1292,8 @@ TVectorD TEcnaRead::ReadSampleAdcValues(const Int_t& n1StexStin, const Int_t& i0 } else { - cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1314,11 +1314,11 @@ TVectorD TEcnaRead::ReadSampleAdcValues(const Int_t& n1StexStin, const Int_t& i0 else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1361,8 +1361,8 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t & n1StexStin, const Int_t & i0St // if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " - // << " Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " + // << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1379,8 +1379,8 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t & n1StexStin, const Int_t & i0St } else { - cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1402,11 +1402,11 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t & n1StexStin, const Int_t & i0St else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1440,8 +1440,8 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t & n1StexStin, const Int_t & VecD //if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " - // << " Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " + // << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1459,8 +1459,8 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t & n1StexStin, const Int_t & VecD } else { - cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1488,11 +1488,11 @@ TVectorD TEcnaRead::ReadSampleMeans(const Int_t & n1StexStin, const Int_t & VecD else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1529,8 +1529,8 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t & n1StexStin, const Int_t & i0S //if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " - // << "Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " + // << "Reading on file already open." << fTTBELL << std::endl; // } if (FileNameLong != fCurrentlyOpenFileName) @@ -1540,8 +1540,8 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t & n1StexStin, const Int_t & i0S if(!(OpenRootFile(file_name, "READ"))) { - cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; return vec; } } @@ -1559,11 +1559,11 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t & n1StexStin, const Int_t & i0S else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); return vec; @@ -1595,8 +1595,8 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t & n1StexStin, const Int_t & Vec //if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " - // << "Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " + // << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1614,8 +1614,8 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t & n1StexStin, const Int_t & Vec } else { - cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1643,11 +1643,11 @@ TVectorD TEcnaRead::ReadSampleSigmas(const Int_t & n1StexStin, const Int_t & Vec else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1735,8 +1735,8 @@ TMatrixD TEcnaRead::ReadNumberOfEventsForSamples(const Int_t& n1StexStin, // if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " - // << " Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " + // << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1753,8 +1753,8 @@ TMatrixD TEcnaRead::ReadNumberOfEventsForSamples(const Int_t& n1StexStin, } else { - cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1780,20 +1780,20 @@ TMatrixD TEcnaRead::ReadNumberOfEventsForSamples(const Int_t& n1StexStin, else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } } CloseRootFile(file_name); } // end of if (fLookAtRootFile == 1) else { - cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " + std::cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " << "It is not possible to access the number of found events: the ROOT file has not been read." - << fTTBELL << endl; + << fTTBELL << std::endl; } } // end of if (Stin_index >= 0) return mat; @@ -1829,8 +1829,8 @@ TVectorD TEcnaRead::ReadPedestals(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1847,8 +1847,8 @@ TVectorD TEcnaRead::ReadPedestals(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1870,11 +1870,11 @@ TVectorD TEcnaRead::ReadPedestals(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1909,8 +1909,8 @@ TVectorD TEcnaRead::ReadTotalNoise(const Int_t& VecDim) // if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> " - // << "Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> " + // << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -1927,8 +1927,8 @@ TVectorD TEcnaRead::ReadTotalNoise(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -1950,11 +1950,11 @@ TVectorD TEcnaRead::ReadTotalNoise(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -1989,8 +1989,8 @@ TVectorD TEcnaRead::ReadMeanCorrelationsBetweenSamples(const Int_t& VecDim) //if ( fOpenRootFile ) // { - // cout << "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " - // << "Reading on file already open." << fTTBELL << endl; + // std::cout << "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " + // << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2007,8 +2007,8 @@ TVectorD TEcnaRead::ReadMeanCorrelationsBetweenSamples(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2030,11 +2030,11 @@ TVectorD TEcnaRead::ReadMeanCorrelationsBetweenSamples(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2069,8 +2069,8 @@ TVectorD TEcnaRead::ReadLowFrequencyNoise(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2088,8 +2088,8 @@ TVectorD TEcnaRead::ReadLowFrequencyNoise(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2111,11 +2111,11 @@ TVectorD TEcnaRead::ReadLowFrequencyNoise(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2150,8 +2150,8 @@ TVectorD TEcnaRead::ReadHighFrequencyNoise(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2169,8 +2169,8 @@ TVectorD TEcnaRead::ReadHighFrequencyNoise(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2192,11 +2192,11 @@ TVectorD TEcnaRead::ReadHighFrequencyNoise(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2232,8 +2232,8 @@ TVectorD TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2251,8 +2251,8 @@ TVectorD TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2274,11 +2274,11 @@ TVectorD TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2383,8 +2383,8 @@ TVectorD TEcnaRead::ReadAveragePedestals(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2402,8 +2402,8 @@ TVectorD TEcnaRead::ReadAveragePedestals(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2425,11 +2425,11 @@ TVectorD TEcnaRead::ReadAveragePedestals(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2466,8 +2466,8 @@ TVectorD TEcnaRead::ReadAverageTotalNoise(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2485,8 +2485,8 @@ TVectorD TEcnaRead::ReadAverageTotalNoise(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2508,11 +2508,11 @@ TVectorD TEcnaRead::ReadAverageTotalNoise(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2549,8 +2549,8 @@ TVectorD TEcnaRead::ReadAverageLowFrequencyNoise(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2568,8 +2568,8 @@ TVectorD TEcnaRead::ReadAverageLowFrequencyNoise(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2591,11 +2591,11 @@ TVectorD TEcnaRead::ReadAverageLowFrequencyNoise(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2632,8 +2632,8 @@ TVectorD TEcnaRead::ReadAverageHighFrequencyNoise(const Int_t& VecDim) // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2651,8 +2651,8 @@ TVectorD TEcnaRead::ReadAverageHighFrequencyNoise(const Int_t& VecDim) } else { - cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2674,11 +2674,11 @@ TVectorD TEcnaRead::ReadAverageHighFrequencyNoise(const Int_t& VecDim) else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2716,8 +2716,8 @@ TVectorD TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(const Int_t& VecDi // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2735,8 +2735,8 @@ TVectorD TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(const Int_t& VecDi } else { - cout << "!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2758,11 +2758,11 @@ TVectorD TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(const Int_t& VecDi else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2800,8 +2800,8 @@ TVectorD TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t& Ve // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2819,8 +2819,8 @@ TVectorD TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t& Ve } else { - cout << "!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2842,11 +2842,11 @@ TVectorD TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t& Ve else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2893,8 +2893,8 @@ TMatrixD TEcnaRead::ReadCovariancesBetweenSamples(const Int_t & n1StexStin, cons // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2912,8 +2912,8 @@ TMatrixD TEcnaRead::ReadCovariancesBetweenSamples(const Int_t & n1StexStin, cons } else { - cout << "!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -2937,11 +2937,11 @@ TMatrixD TEcnaRead::ReadCovariancesBetweenSamples(const Int_t & n1StexStin, cons else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -2980,8 +2980,8 @@ TMatrixD TEcnaRead::ReadCorrelationsBetweenSamples(const Int_t & n1StexStin, con // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -2999,8 +2999,8 @@ TMatrixD TEcnaRead::ReadCorrelationsBetweenSamples(const Int_t & n1StexStin, con } else { - cout << "!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3020,11 +3020,11 @@ TMatrixD TEcnaRead::ReadCorrelationsBetweenSamples(const Int_t & n1StexStin, con else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3063,8 +3063,8 @@ TVectorD TEcnaRead::ReadRelevantCorrelationsBetweenSamples(const Int_t & n1StexS // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> " -// << "Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> " +// << "Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3082,8 +3082,8 @@ TVectorD TEcnaRead::ReadRelevantCorrelationsBetweenSamples(const Int_t & n1StexS } else { - cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3105,11 +3105,11 @@ TVectorD TEcnaRead::ReadRelevantCorrelationsBetweenSamples(const Int_t & n1StexS else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3154,8 +3154,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t& n1St // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3173,8 +3173,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t& n1St } else { - cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3201,11 +3201,11 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t& n1St else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3249,8 +3249,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t & n1 // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3268,8 +3268,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t & n1 } else { - cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3297,11 +3297,11 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t & n1 else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3346,8 +3346,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t & n1 // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3365,8 +3365,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t & n1 } else { - cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3393,11 +3393,11 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t & n1 else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3442,8 +3442,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t & n // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3461,8 +3461,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t & n } else { - cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3490,11 +3490,11 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t & n else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3538,8 +3538,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t& MatD // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3557,8 +3557,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t& MatD } else { - cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3600,11 +3600,11 @@ TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(const Int_t& MatD else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3648,8 +3648,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t& Mat // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3667,8 +3667,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t& Mat } else { - cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3710,11 +3710,11 @@ TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(const Int_t& Mat else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3758,8 +3758,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t& Mat // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3777,8 +3777,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t& Mat } else { - cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3820,11 +3820,11 @@ TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(const Int_t& Mat else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3868,8 +3868,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t& Ma // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3887,8 +3887,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t& Ma } else { - cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -3930,11 +3930,11 @@ TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(const Int_t& Ma else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -3979,8 +3979,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t& Ma // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -3998,8 +3998,8 @@ TMatrixD TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t& Ma } else { - cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -4033,11 +4033,11 @@ TMatrixD TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t& Ma else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -4081,8 +4081,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t& M // if ( fOpenRootFile ) // { -// cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>" -// << " Reading on file already open." << fTTBELL << endl; +// std::cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>" +// << " Reading on file already open." << fTTBELL << std::endl; // } if( FileNameLong == fCurrentlyOpenFileName ) @@ -4100,8 +4100,8 @@ TMatrixD TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t& M } else { - cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: " - << file_name << fTTBELL << endl; + std::cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: " + << file_name << fTTBELL << std::endl; allowed_to_read = kFALSE; ok_read = kFALSE; } @@ -4135,11 +4135,11 @@ TMatrixD TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t& M else { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } CloseRootFile(file_name); } @@ -4236,11 +4236,11 @@ Double_t*** TEcnaRead::ReadSampleAdcValuesSameFile(const Int_t& DimX, const Int_ else // (ReadSampleAdcValuesSameFile) { fDataExist = kFALSE; - cout << "!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> " - << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << endl + std::cout << "!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> " + << fCnaWrite->fRootFileNameShort.Data() << ": .root file failed" << std::endl << " -> quantity: <" << GetTypeOfQuantity(typ) << "> not available in file." - << fTTBELL << endl; + << fTTBELL << std::endl; } } else @@ -4252,15 +4252,15 @@ Double_t*** TEcnaRead::ReadSampleAdcValuesSameFile(const Int_t& DimX, const Int_ } else { - cout << "*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } if(i_entry_fail > 0 ) { - cout << "*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " + std::cout << "*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " << " Entry reading failure(s). i_entry_fail = " - << i_entry_fail << fTTBELL << endl; + << i_entry_fail << fTTBELL << std::endl; } return fT3d_AdcValues; } @@ -4387,10 +4387,10 @@ Int_t TEcnaRead::GetStinIndex(const Int_t & n1StexStin) //Get the index of the Stin from its number in Stex if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = " - << fEcal->MaxStinEcnaInStex() << endl + std::cout << "*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = " + << fEcal->MaxStinEcnaInStex() << std::endl << " n1StexStin = " << n1StexStin - << endl << endl;} + << std::endl << std::endl;} Int_t Stin_index = n1StexStin-1; // suppose les 68 tours @@ -4406,23 +4406,23 @@ Int_t TEcnaRead::GetStinIndex(const Int_t & n1StexStin) for(Int_t i=0; i < fEcal->MaxStinEcnaInStex(); i++) { if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRead::GetStinIndex(...)> StinNumber[" << i << "] = " - << vec[i] << endl;} + std::cout << "*TEcnaRead::GetStinIndex(...)> StinNumber[" << i << "] = " + << vec[i] << std::endl;} if ( vec[i] == n1StexStin ){Stin_index = i;} } if(fFlagPrint == fCodePrintAllComments){ - cout << "~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl; - cout << "*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << endl - << " Stin index : " << Stin_index << endl; - cout << "~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;} + std::cout << "~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl; + std::cout << "*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << std::endl + << " Stin index : " << Stin_index << std::endl; + std::cout << "~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;} if ( Stin_index < 0 ) { if(fFlagPrint == fCodePrintAllComments){ - cout << "!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin << " : " + std::cout << "!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin << " : " << "index Stin not found" - << fTTBELL << endl;} + << fTTBELL << std::endl;} } #endif // NOGT @@ -4440,7 +4440,7 @@ void TEcnaRead::PrintComments() // Set flags to authorize printing of some comments concerning initialisations (default) fFlagPrint = fCodePrintComments; - cout << "*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << endl; + std::cout << "*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << std::endl; } void TEcnaRead::PrintWarnings() @@ -4448,7 +4448,7 @@ void TEcnaRead::PrintWarnings() // Set flags to authorize printing of warnings fFlagPrint = fCodePrintWarnings; - cout << "*TEcnaRead::PrintWarnings()> Warnings will be printed" << endl; + std::cout << "*TEcnaRead::PrintWarnings()> Warnings will be printed" << std::endl; } void TEcnaRead::PrintAllComments() @@ -4456,7 +4456,7 @@ void TEcnaRead::PrintAllComments() // Set flags to authorize printing of the comments of all the methods fFlagPrint = fCodePrintAllComments; - cout << "*TEcnaRead::PrintAllComments()> All the comments will be printed" << endl; + std::cout << "*TEcnaRead::PrintAllComments()> All the comments will be printed" << std::endl; } void TEcnaRead::PrintNoComment() diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaResultType.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaResultType.cc index 0a7900bbb16e8..7c6403645314c 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaResultType.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaResultType.cc @@ -22,7 +22,7 @@ ClassImp(TEcnaResultType) TEcnaResultType::TEcnaResultType() { - // cout << "[Info Management] CLASS: TEcnaResultType. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaResultType. CREATE OBJECT: this = " << this << std::endl; fMatMat.ReSet(1,1); fMatHis.ReSet(1,1); @@ -31,7 +31,7 @@ TEcnaResultType::TEcnaResultType() TEcnaResultType::TEcnaResultType(TEcnaObject* pObjectManager) { - // cout << "[Info Management] CLASS: TEcnaResultType. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaResultType. CREATE OBJECT: this = " << this << std::endl; Long_t i_this = (Long_t)this; pObjectManager->RegisterPointer("TEcnaResultType", i_this); @@ -49,7 +49,7 @@ TEcnaResultType::TEcnaResultType(CnaResultTyp typ, Int_t i, { //constructor - // cout << "[Info Management] CLASS: TEcnaResultType. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaResultType. CREATE OBJECT: this = " << this << std::endl; fTypOfCnaResult = typ; fIthElement = i; @@ -73,7 +73,7 @@ TEcnaResultType::TEcnaResultType(CnaResultTyp typ, Int_t i, TEcnaResultType::~TEcnaResultType() { //destructor - // cout << "[Info Management] CLASS: TEcnaResultType. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaResultType. DESTROY OBJECT: this = " << this << std::endl; } void TEcnaResultType::SetSizeMat(Int_t nrow, Int_t ncol) { diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRootFile.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRootFile.cc index 94431aff45ae2..194a758d2f58e 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRootFile.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRootFile.cc @@ -21,7 +21,7 @@ ClassImp(TEcnaRootFile) TEcnaRootFile::TEcnaRootFile() { //constructor without arguments - // cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << std::endl; Init(); } @@ -29,7 +29,7 @@ TEcnaRootFile::TEcnaRootFile() { TEcnaRootFile::TEcnaRootFile(TEcnaObject* pObjectManager, const Text_t *name, const TString& status) { //constructor - // cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -42,7 +42,7 @@ TEcnaRootFile::TEcnaRootFile(TEcnaObject* pObjectManager, const Text_t *name, co TEcnaRootFile::TEcnaRootFile(TEcnaObject* pObjectManager, const Text_t *name) { //constructor - // cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -55,7 +55,7 @@ TEcnaRootFile::TEcnaRootFile(TEcnaObject* pObjectManager, const Text_t *name) { TEcnaRootFile::TEcnaRootFile(const Text_t *name, const TString& status) { //constructor - // cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << std::endl; Init(); fRootFileName = name; @@ -65,7 +65,7 @@ TEcnaRootFile::TEcnaRootFile(const Text_t *name, const TString& status) { TEcnaRootFile::TEcnaRootFile(const Text_t *name) { //constructor - // cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRootFile. CREATE OBJECT: this = " << this << std::endl; Init(); fRootFileName = name; @@ -75,7 +75,7 @@ TEcnaRootFile::TEcnaRootFile(const Text_t *name) { TEcnaRootFile::~TEcnaRootFile() { //destructor - //cout << "[Info Management] CLASS: TEcnaRootFile. DESTROY OBJECT: this = " << this << endl; + //std::cout << "[Info Management] CLASS: TEcnaRootFile. DESTROY OBJECT: this = " << this << std::endl; if( fCnaIndivResult != 0 ){delete fCnaIndivResult;} } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc index f112be8d393e4..da3b6265e526f 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc @@ -20,14 +20,14 @@ TEcnaRun::TEcnaRun() { //Constructor without argument: nothing special done - // cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << std::endl; } TEcnaRun::TEcnaRun(TEcnaObject* pObjectManager, const TString& SubDet) { //Constructor with argument: call to Init() and declare fEcal according to SubDet value ("EB" or "EE") - // cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << std::endl; Init(); fObjectManager = (TEcnaObject*)pObjectManager; @@ -122,9 +122,9 @@ TEcnaRun::TEcnaRun(TEcnaObject* pObjectManager, const TString& SubDet, const Int } else { - cout << "TEcnaRun/CONSTRUCTOR> Number of required samples = " << NbOfSamples + std::cout << "TEcnaRun/CONSTRUCTOR> Number of required samples = " << NbOfSamples << ": OUT OF RANGE. Set to the default value (= " << fEcal->MaxSampADC() << ")." - << fTTBELL << endl; + << fTTBELL << std::endl; fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for file reading } @@ -299,9 +299,9 @@ void TEcnaRun::SetEcalSubDetector(const TString& SubDet) TEcnaRun::TEcnaRun(const TEcnaRun& dcop) { - cout << "*TEcnaRun::TEcnaRun(const TEcnaRun& dcop)> " + std::cout << "*TEcnaRun::TEcnaRun(const TEcnaRun& dcop)> " << " Now is the time to write a copy constructor" - << endl; + << std::endl; //{ Int_t cintoto; cin >> cintoto; } @@ -332,19 +332,19 @@ TEcnaRun::~TEcnaRun() if(fFlagPrint == fCodePrintAllComments) { - cout << "*TEcnaRun::~TEcnaRun()> Entering destructor." << endl; + std::cout << "*TEcnaRun::~TEcnaRun()> Entering destructor." << std::endl; } if(fFlagPrint != fCodePrintNoComment || fFlagPrint == fCodePrintWarnings ) { if( fBuildEvtNotSkipped > 0 ) { - cout << "************************************************************************************* " - << endl; - cout << "*TEcnaRun::~TEcnaRun()> Nb of calls to GetSampleAdcValues by cmsRun: " - << fBuildEvtNotSkipped << endl; - cout << "************************************************************************************* " - << endl; + std::cout << "************************************************************************************* " + << std::endl; + std::cout << "*TEcnaRun::~TEcnaRun()> Nb of calls to GetSampleAdcValues by cmsRun: " + << fBuildEvtNotSkipped << std::endl; + std::cout << "************************************************************************************* " + << std::endl; } } @@ -355,18 +355,18 @@ TEcnaRun::~TEcnaRun() { if( fMiscDiag[i] != 0 ) { - cout << " fMiscDiag Counter " - << setw(3) << i << " = " << setw(9) << fMiscDiag[i] - << " (INFO: alloc on non zero freed zone) " << endl; + std::cout << " fMiscDiag Counter " + << std::setw(3) << i << " = " << std::setw(9) << fMiscDiag[i] + << " (INFO: alloc on non zero freed zone) " << std::endl; } else { misc_czero++; } } - cout << " Nb of fMiscDiag counters at zero: " + std::cout << " Nb of fMiscDiag counters at zero: " << misc_czero << " (total nb of counters: " - << fNbOfMiscDiagCounters << ")" << endl; + << fNbOfMiscDiagCounters << ")" << std::endl; } if (fMiscDiag != 0){delete [] fMiscDiag; fCdelete++;} @@ -470,23 +470,23 @@ TEcnaRun::~TEcnaRun() if ( fCnew != fCdelete ) { - cout << "!TEcnaRun::~TEcnaRun()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = " - << fCnew << ", fCdelete = " << fCdelete << fTTBELL << endl; + std::cout << "!TEcnaRun::~TEcnaRun()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = " + << fCnew << ", fCdelete = " << fCdelete << fTTBELL << std::endl; } else { - // cout << "*TEcnaRun::~TEcnaRun()> Management of memory allocations: OK. fCnew = " - // << fCnew << ", fCdelete = " << fCdelete << endl; + // std::cout << "*TEcnaRun::~TEcnaRun()> Management of memory allocations: OK. fCnew = " + // << fCnew << ", fCdelete = " << fCdelete << std::endl; } if(fFlagPrint == fCodePrintAllComments) { - cout << "*TEcnaRun::~TEcnaRun()> Exiting destructor (this = " << this << ")." << endl + std::cout << "*TEcnaRun::~TEcnaRun()> Exiting destructor (this = " << this << ")." << std::endl << "~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#" - << endl; + << std::endl; } - // cout << "[Info Management] CLASS: TEcnaRun. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaRun. DESTROY OBJECT: this = " << this << std::endl; } //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -529,17 +529,17 @@ void TEcnaRun::GetReadyToReadData( const TString& typ_ana, const Int_t& ru { if( nlast >= nfirst ) { - cout << "*TEcnaRun::GetReadyToReadData(...)> --- WARNING ---> number of events = " << nbevts - << ", out of range (range = " << nfirst << "," << nlast << ")" << endl - << " The number of found events will be less " << endl - << " than the number of requested events." << endl; + std::cout << "*TEcnaRun::GetReadyToReadData(...)> --- WARNING ---> number of events = " << nbevts + << ", out of range (range = " << nfirst << "," << nlast << ")" << std::endl + << " The number of found events will be less " << std::endl + << " than the number of requested events." << std::endl; } if( nlast < nfirst ) { - cout << "*TEcnaRun::GetReadyToReadData(...)> --- INFO ---> last requested event number = " << nlast - << ", less than first requested event number (= " << nfirst << ")" << endl - << " File will be read until EOF if the number of found events" << endl - << " remains less than the number of requested events." << endl; + std::cout << "*TEcnaRun::GetReadyToReadData(...)> --- INFO ---> last requested event number = " << nlast + << ", less than first requested event number (= " << nfirst << ")" << std::endl + << " File will be read until EOF if the number of found events" << std::endl + << " remains less than the number of requested events." << std::endl; } } @@ -586,7 +586,7 @@ void TEcnaRun::GetReadyToReadData( const TString& typ_ana, const Int_t& ru // fFileHeader->Print(); - // {Int_t cintoto; cout << "taper 0 pour continuer" << endl; cin >> cintoto;} + // {Int_t cintoto; std::cout << "taper 0 pour continuer" << std::endl; cin >> cintoto;} // fFileHeader->SetName("CnaHeader"); *======> voir FXG // fFileHeader->SetTitle("CnaHeader"); @@ -660,10 +660,10 @@ void TEcnaRun::GetReadyToReadData( const TString& typ_ana, const Int_t& ru if(fT3d_AdcValues == 0) { //............ Allocation for the 3d array - cout << "*TEcnaRun::GetReadyToReadData(...)> Allocation of 3D array for ADC distributions." - << " Nb of requested evts = " << fFileHeader->fReqNbOfEvts << endl + std::cout << "*TEcnaRun::GetReadyToReadData(...)> Allocation of 3D array for ADC distributions." + << " Nb of requested evts = " << fFileHeader->fReqNbOfEvts << std::endl << " This number must not be too large" - << " (no failure after this message means alloc OK)." << endl; + << " (no failure after this message means alloc OK)." << std::endl; fT3d_AdcValues = new Double_t**[fEcal->MaxCrysEcnaInStex()]; fCnew++; @@ -728,86 +728,86 @@ void TEcnaRun::GetReadyToReadData( const TString& typ_ana, const Int_t& ru } else { - cerr << "!TEcnaRun::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_NbOfEvts!" - << " Pointer already not NULL " << fTTBELL << endl; - // {Int_t cintoto; cout << "Enter: 0 and RETURN to continue or: CTRL C to exit" - // << endl; cin >> cintoto;} + std::cerr << "!TEcnaRun::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_NbOfEvts!" + << " Pointer already not NULL " << fTTBELL << std::endl; + // {Int_t cintoto; std::cout << "Enter: 0 and RETURN to continue or: CTRL C to exit" + // << std::endl; std::cin >> cintoto;} } } else { - cerr << endl + std::cerr << std::endl << "!TEcnaRun::GetReadyToReadData(...)> " - << " *** ERROR *** " << endl + << " *** ERROR *** " << std::endl << " --------------------------------------------------" - << endl - << " NULL or NEGATIVE values for arguments" << endl - << " with expected positive values:" << endl - << " Number of Stins in Stex = " << fEcal->MaxStinEcnaInStex() << endl - << " Number of crystals in Stin = " << fEcal->MaxCrysInStin() << endl - << " Number of samples by channel = " << fNbSampForFic << endl - << endl - << endl - << " hence, no memory allocation for array member has been performed." << endl; + << std::endl + << " NULL or NEGATIVE values for arguments" << std::endl + << " with expected positive values:" << std::endl + << " Number of Stins in Stex = " << fEcal->MaxStinEcnaInStex() << std::endl + << " Number of crystals in Stin = " << fEcal->MaxCrysInStin() << std::endl + << " Number of samples by channel = " << fNbSampForFic << std::endl + << std::endl + << std::endl + << " hence, no memory allocation for array member has been performed." << std::endl; - cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"; + std::cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"; Int_t toto; - cin >> toto; + std::cin >> toto; } //----------------------------------------------------------- (GetReadyToReadData) if(fFlagPrint == fCodePrintAllComments ){ - cout << endl; - cout << "*TEcnaRun::GetReadyToReadData(...)>" << endl - << " The method has been called with the following argument values:" << endl + std::cout << std::endl; + std::cout << "*TEcnaRun::GetReadyToReadData(...)>" << std::endl + << " The method has been called with the following argument values:" << std::endl << " Analysis name = " - << fFileHeader->fTypAna << endl + << fFileHeader->fTypAna << std::endl << " Run number = " - << fFileHeader->fRunNumber << endl + << fFileHeader->fRunNumber << std::endl << " Run type = " - << fFileHeader->fRunType << endl + << fFileHeader->fRunType << std::endl << " First requested event number = " - << fFileHeader->fFirstReqEvtNumber << endl + << fFileHeader->fFirstReqEvtNumber << std::endl << " Last requested event number = " - << fFileHeader->fLastReqEvtNumber << endl + << fFileHeader->fLastReqEvtNumber << std::endl << " " << fStexName.Data() << " number = " - << fFileHeader->fStex << endl + << fFileHeader->fStex << std::endl << " Number of " << fStinName.Data() << " in " << fStexName.Data() << " = " - << fEcal->MaxStinEcnaInStex() << endl + << fEcal->MaxStinEcnaInStex() << std::endl << " Number of crystals in " << fStinName.Data() << " = " - << fEcal->MaxCrysInStin() << endl + << fEcal->MaxCrysInStin() << std::endl << " Number of samples by channel = " - << fNbSampForFic << endl - << endl;} + << fNbSampForFic << std::endl + << std::endl;} fReadyToReadData = 1; // set flag } else { if (fFlagPrint != fCodePrintNoComment){ - cout << "!TEcnaRun::GetReadyToReadData(...) > WARNING/CORRECTION:" << endl + std::cout << "!TEcnaRun::GetReadyToReadData(...) > WARNING/CORRECTION:" << std::endl << "! The fisrt requested event number is not positive (nfirst = " << nfirst << ") " - << fTTBELL << endl;} + << fTTBELL << std::endl;} } } else { if (fFlagPrint != fCodePrintNoComment){ - cout << endl << "!TEcnaRun::GetReadyToReadData(...)> WARNING/CORRECTION:" << endl - << "! The number of requested events (nbevts = " << nbevts << ") is too large." << endl + std::cout << std::endl << "!TEcnaRun::GetReadyToReadData(...)> WARNING/CORRECTION:" << std::endl + << "! The number of requested events (nbevts = " << nbevts << ") is too large." << std::endl << "! Last event number = " << nlast << " > number of entries = " << nentries << ". " - << fTTBELL << endl << endl;} + << fTTBELL << std::endl << std::endl;} } } else { - cout << "!TEcnaRun::GetReadyToReadData(...) *** ERROR ***> " + std::cout << "!TEcnaRun::GetReadyToReadData(...) *** ERROR ***> " << " The first requested event number is greater than the number of entries." - << fTTBELL << endl; + << fTTBELL << std::endl; } if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::GetReadyToReadData(...)> Leaving the method. fReadyToReadData = " - << fReadyToReadData << endl; } + std::cout << "*TEcnaRun::GetReadyToReadData(...)> Leaving the method. fReadyToReadData = " + << fReadyToReadData << std::endl; } } // end of GetReadyToReadData @@ -880,33 +880,33 @@ Bool_t TEcnaRun::GetSampleAdcValues(const Int_t& n1EventNumber, const Int_t& { if( fStinIndexBuilt == 1 ) { - cout << endl << "*TEcnaRun::GetSampleAdcValues(...)> event " << n1EventNumber + std::cout << std::endl << "*TEcnaRun::GetSampleAdcValues(...)> event " << n1EventNumber << " : first event for " << fStexName.Data() << " " << fFileHeader->fStex << "; " << fStinName.Data() << "s : "; } if( fFlagSubDet == "EB" ) - {cout << fT1d_StexStinFromIndex[i0StexStinEcna] << ", ";} + {std::cout << fT1d_StexStinFromIndex[i0StexStinEcna] << ", ";} if( fFlagSubDet == "EE" ) - {cout << fEcalNumbering-> + {std::cout << fEcalNumbering-> GetDeeSCConsFrom1DeeSCEcna(fFileHeader->fStex, fT1d_StexStinFromIndex[i0StexStinEcna]) << ", ";} } //.................................................... (GetSampleAdcValues) if(fFlagPrint == fCodePrintAllComments) { - cout << " (" << fStinIndexBuilt << " " << fStinName.Data() - << " found), channel " << i0StinEcha << ", i0Sample " << i0Sample << endl; + std::cout << " (" << fStinIndexBuilt << " " << fStinName.Data() + << " found), channel " << i0StinEcha << ", i0Sample " << i0Sample << std::endl; } ret_code = kTRUE; } // if ( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed ) else { - cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> NOT ALLOWED if RESULT. " + std::cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> NOT ALLOWED if RESULT. " << " n1StexStin = " << n1StexStin << ", fT1d_StexStinFromIndex[" << i0StexStinEcna << "] = " << fT1d_StexStinFromIndex[i0StexStinEcna] << ", fStinIndexBuilt = " << fStinIndexBuilt - << fTTBELL << endl; + << fTTBELL << std::endl; ret_code = kFALSE; } } // if (i_trouve != 1 ) @@ -914,9 +914,9 @@ Bool_t TEcnaRun::GetSampleAdcValues(const Int_t& n1EventNumber, const Int_t& } // if( fT1d_StexStinFromIndex != 0 ) else { - cout << "!TEcnaRun, GetSampleAdcValues *** ERROR ***> " + std::cout << "!TEcnaRun, GetSampleAdcValues *** ERROR ***> " << " fT1d_StexStinFromIndex = " << fT1d_StexStinFromIndex - << " fT1d_StexStinFromIndex[] ALLOCATION NOT DONE" << fTTBELL << endl; + << " fT1d_StexStinFromIndex[] ALLOCATION NOT DONE" << fTTBELL << std::endl; ret_code = kFALSE; } //.................................................................. (GetSampleAdcValues) } // end of if( i0Sample >= 0 && i0Sample < fNbSampForFic ) @@ -926,10 +926,10 @@ Bool_t TEcnaRun::GetSampleAdcValues(const Int_t& n1EventNumber, const Int_t& // (not fNbSampForFic, the later is used only for calculations) if( i0Sample >= fEcal->MaxSampADC() ) { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " << " sample number = " << i0Sample << ". OUT OF BOUNDS" << " (max = " << fNbSampForFic << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; ret_code = kFALSE; } else @@ -940,19 +940,19 @@ Bool_t TEcnaRun::GetSampleAdcValues(const Int_t& n1EventNumber, const Int_t& } // end of if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() ) else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " << " channel number in " << fStinName.Data() << " = " << i0StinEcha << ". OUT OF BOUNDS" << " (max = " << fEcal->MaxCrysInStin() << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; ret_code = kFALSE; } // else of if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() ) } else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " << fStinName.Data() << " number in " << fStexName.Data() << " = " << n1StexStin << ". OUT OF BOUNDS" << " (max = " << fEcal->MaxStinEcnaInStex() << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; ret_code = kFALSE; } @@ -995,56 +995,56 @@ Bool_t TEcnaRun::GetSampleAdcValues(const Int_t& n1EventNumber, const Int_t& } else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " << " sample index = " << i0Sample << ". OUT OF BOUNDS" << " (max = " << fNbSampForFic << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " << " event number = " << n1EventNumber << ". OUT OF BOUNDS" << " (max = " << fFileHeader->fReqNbOfEvts << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; ret_code = kFALSE; } } else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " - << " CHANNEL NUMBER OUT OF BOUNDS" << endl + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " + << " CHANNEL NUMBER OUT OF BOUNDS" << std::endl << " i0StexEcha number = " << i0StexEcha << " , n1StexStin = " << n1StexStin << " , i0StinEcha = " << i0StinEcha << " , fEcal->MaxCrysEcnaInStex() = " << fEcal->MaxCrysEcnaInStex() - << fTTBELL << endl; + << fTTBELL << std::endl; ret_code = kFALSE; - // {Int_t cintoto; cout << "TAPER 0 POUR CONTINUER" << endl; cin >> cintoto;} + // {Int_t cintoto; std::cout << "TAPER 0 POUR CONTINUER" << std::endl; cin >> cintoto;} } } // end of if( ret_code == kTRUE ) else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> ret_code = kFALSE " - << fTTBELL << endl; + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> ret_code = kFALSE " + << fTTBELL << std::endl; } } // end of if(fReadyToReadData == 1) else { - cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> GetReadyToReadData(...) not called." - << fTTBELL << endl; + std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> GetReadyToReadData(...) not called." + << fTTBELL << std::endl; ret_code = kFALSE; } //.................................................................. (GetSampleAdcValues) if (ret_code == kFALSE) { - cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> ret_code = " << ret_code + std::cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> ret_code = " << ret_code << " (FALSE). Event: " << n1EventNumber << ", " << fStexName.Data() << ": " << fFileHeader->fStex << ", " << fStinName.Data() << ": " << n1StexStin << ", channel: " << i0StinEcha << ", Sample: " << i0Sample - << ", ADC value: " << adcvalue << endl; + << ", ADC value: " << adcvalue << std::endl; } return ret_code; } @@ -1089,8 +1089,8 @@ Bool_t TEcnaRun::ReadSampleAdcValues(const Int_t& nb_samp_for_calc) { fRootFileName = MyRootFile->GetRootFileName(); fRootFileNameShort = MyRootFile->GetRootFileNameShort(); - cout << "*TEcnaRun::ReadSampleAdcValues> Reading sample ADC values from file: " << endl - << " " << fRootFileName << endl; + std::cout << "*TEcnaRun::ReadSampleAdcValues> Reading sample ADC values from file: " << std::endl + << " " << fRootFileName << std::endl; size_t i_no_data = 0; @@ -1164,14 +1164,14 @@ Bool_t TEcnaRun::ReadSampleAdcValues(const Int_t& nb_samp_for_calc) } if(i_no_data) { - cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> " - << " Read failure. i_no_data = " << i_no_data << fTTBELL << endl; + std::cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> " + << " Read failure. i_no_data = " << i_no_data << fTTBELL << std::endl; } } else { - cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } delete MyRootFile; // fCdelete++; return ok_read; @@ -1241,7 +1241,7 @@ void TEcnaRun::GetReadyToCompute() } else { - cout << "*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << endl; + std::cout << "*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << std::endl; } } // end of GetReadyToCompute() @@ -1331,10 +1331,10 @@ void TEcnaRun::SampleMeans() // Calculation of the expectation values over events // for the samples 0 to fNbSampForCalc and for all the StexEchas - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SampleMeans() " << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::SampleMeans() " << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation: sample expectation values over the events" - << " for each channel." << endl;} + std::cout << " Calculation: sample expectation values over the events" + << " for each channel." << std::endl;} //................... Allocation fT2d_ev if ( fT2d_ev == 0 ){ @@ -1382,10 +1382,10 @@ void TEcnaRun::SampleSigmas() { //Calculation of the sigmas of the samples for all the StexEchas - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SampleSigmas()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::SampleSigmas()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation: sample ADC sigmas over the events " - << " for each channel." << endl;} + std::cout << " Calculation: sample ADC sigmas over the events " + << " for each channel." << std::endl;} //... preliminary calculation of the expectation values if not done yet. // The tag is set to 1 after call to the method. It is reset to 0 @@ -1450,10 +1450,10 @@ void TEcnaRun::CovariancesBetweenSamples() { //Calculation of the covariances between samples for all the StexEchas - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::CovariancesBetweenSamples()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::CovariancesBetweenSamples()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation: covariances between samples" - << " for each channel." << endl;} + std::cout << " Calculation: covariances between samples" + << " for each channel." << std::endl;} //................... Allocations cov_ss if( fT3d_cov_ss == 0 ){ @@ -1518,10 +1518,10 @@ void TEcnaRun::CorrelationsBetweenSamples() for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++) {fTagCovCss[j0StexEcha] = 0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::CorrelationsBetweenSamples()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::CorrelationsBetweenSamples()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation: correlations between samples" - << " for each channel." << endl;} + std::cout << " Calculation: correlations between samples" + << " for each channel." << std::endl;} //................... Allocations cor_ss if( fT3d_cor_ss == 0){ @@ -1596,11 +1596,11 @@ void TEcnaRun::Pedestals() {fMiscDiag[11]++; fT1d_ev_ev[i0StexEcha] = (Double_t)0;}} //..................... Calculation - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::Pedestals()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::Pedestals()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to " - << fNbSampForCalc << ")" << endl - << " of the ADC expectation values (over the events)." << endl;} + std::cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to " + << fNbSampForCalc << ")" << std::endl + << " of the ADC expectation values (over the events)." << std::endl;} for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) { @@ -1641,11 +1641,11 @@ void TEcnaRun::TotalNoise() {fMiscDiag[12]++; fT1d_evsamp_of_sigevt[i0StexEcha] = (Double_t)0;}} //..................... Calculation - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::TotalNoise()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::TotalNoise()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to " - << fNbSampForCalc << ")" << endl - << " of the ADC expectation values (over the events)." << endl;} + std::cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to " + << fNbSampForCalc << ")" << std::endl + << " of the ADC expectation values (over the events)." << std::endl;} for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) { @@ -1653,8 +1653,8 @@ void TEcnaRun::TotalNoise() { if( fT2d_sig[i0StexEcha][i0Sample] < 0) { - cout << "!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!" - << fTTBELL << endl; + std::cout << "!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!" + << fTTBELL << std::endl; } else { @@ -1698,11 +1698,11 @@ void TEcnaRun::LowFrequencyNoise() for(Int_t i=0; iMaxCrysEcnaInStex(); i0StexEcha++) { @@ -1770,11 +1770,11 @@ void TEcnaRun::HighFrequencyNoise() for(Int_t i=0; iMaxCrysEcnaInStex(); i0StexEcha++) { @@ -1795,7 +1795,7 @@ void TEcnaRun::HighFrequencyNoise() var_over_samples /= (Double_t)fNbSampForCalc; if( var_over_samples < 0) - {cout << "!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << endl;} + {std::cout << "!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << std::endl;} else {sigma_over_samples(n_event) = sqrt(var_over_samples);} } @@ -1847,10 +1847,10 @@ void TEcnaRun::MeanCorrelationsBetweenSamples() TVectorD half_cor_ss(ndim); for(Int_t i=0; iMaxCrysEcnaInStex(); i0StexEcha++) { @@ -1906,10 +1906,10 @@ void TEcnaRun::SigmaOfCorrelationsBetweenSamples() {fMiscDiag[16]++; fT1d_sig_cor_ss[i0StexEcha] = (Double_t)0;} } - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the sigmas of the (sample,sample)" << endl - << " correlations for all the channels." << endl;} + std::cout << " Calculation of the sigmas of the (sample,sample)" << std::endl + << " correlations for all the channels." << std::endl;} //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations // (half of them minus the diagonal) @@ -1964,10 +1964,10 @@ void TEcnaRun::AveragePedestals() {if( fT1d_av_mped[i0StexStinEcna] != (Double_t)0 ) {fMiscDiag[41]++; fT1d_av_mped[i0StexStinEcna] = (Double_t)0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragePedestals()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AveragePedestals()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the " - << fStinName.Data() << "s, of the average Pedestals" << endl;} + std::cout << " Calculation, for all the " + << fStinName.Data() << "s, of the average Pedestals" << std::endl;} //................... Calculation for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) @@ -2025,10 +2025,10 @@ void TEcnaRun::AverageTotalNoise() {if( fT1d_av_totn[i0StexStinEcna] != (Double_t)0 ) {fMiscDiag[42]++; fT1d_av_totn[i0StexStinEcna] = (Double_t)0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageTotalNoise()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageTotalNoise()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the " - << fStinName.Data() << "s, of the average total Noise" << endl;} + std::cout << " Calculation, for all the " + << fStinName.Data() << "s, of the average total Noise" << std::endl;} //................... Calculation for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) @@ -2085,10 +2085,10 @@ void TEcnaRun::AverageLowFrequencyNoise() {if( fT1d_av_lofn[i0StexStinEcna] != (Double_t)0 ) {fMiscDiag[43]++; fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageLowFrequencyNoise()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageLowFrequencyNoise()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the " - << fStinName.Data() << "s, of the average Low Frequency Noise" << endl;} + std::cout << " Calculation, for all the " + << fStinName.Data() << "s, of the average Low Frequency Noise" << std::endl;} //................... Calculation for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) @@ -2145,10 +2145,10 @@ void TEcnaRun::AverageHighFrequencyNoise() {if( fT1d_av_hifn[i0StexStinEcna] != (Double_t)0 ) {fMiscDiag[44]++; fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageHighFrequencyNoise()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageHighFrequencyNoise()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the " - << fStinName.Data() << "s, of the average High Frequency Noise" << endl;} + std::cout << " Calculation, for all the " + << fStinName.Data() << "s, of the average High Frequency Noise" << std::endl;} //................... Calculation for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) @@ -2205,10 +2205,10 @@ void TEcnaRun::AverageMeanCorrelationsBetweenSamples() {if( fT1d_av_ev_corss[i0StexStinEcna] != (Double_t)0 ) {fMiscDiag[45]++; fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageMeanCorrelationsBetweenSamples()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageMeanCorrelationsBetweenSamples()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the " - << fStinName.Data() << "s, of the average mean cor(s,s)" << endl;} + std::cout << " Calculation, for all the " + << fStinName.Data() << "s, of the average mean cor(s,s)" << std::endl;} //................... Calculation for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) @@ -2265,10 +2265,10 @@ void TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples() {if( fT1d_av_sig_corss[i0StexStinEcna] != (Double_t)0 ) {fMiscDiag[46]++; fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;}} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation, for all the " - << fStinName.Data() << "s, of the average sigma of cor(s,s)" << endl;} + std::cout << " Calculation, for all the " + << fStinName.Data() << "s, of the average sigma of cor(s,s)" << std::endl;} //................... Calculation for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) @@ -2336,9 +2336,9 @@ void TEcnaRun::LowFrequencyCovariancesBetweenChannels() { //Calculation of the Low Frequency Covariances between channels - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyCovariancesBetweenChannels()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyCovariancesBetweenChannels()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the Low Frequency Covariances between channels" << endl;} + std::cout << " Calculation of the Low Frequency Covariances between channels" << std::endl;} //................. allocation fT2d_lf_cov + init to zero (mandatory) if( fT2d_lf_cov == 0 ){ @@ -2369,11 +2369,11 @@ void TEcnaRun::LowFrequencyCovariancesBetweenChannels() //................... Calculation if(fFlagPrint != fCodePrintNoComment){ - cout << " Calculation, for each pair of channels, of the covariance (over the events)" << endl + std::cout << " Calculation, for each pair of channels, of the covariance (over the events)" << std::endl << " between the ADC expectation values (over the samples 1 to " - << fNbSampForCalc << ")." << endl;} + << fNbSampForCalc << ")." << std::endl;} - cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << endl; + std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl; for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) { @@ -2422,10 +2422,10 @@ void TEcnaRun::LowFrequencyCovariancesBetweenChannels() fT2d_lf_cov[j0StexEcha][i0StexEcha] = fT2d_lf_cov[i0StexEcha][j0StexEcha]; } } - if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[LFN Cov], ";} + if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[LFN Cov], ";} } } - cout << endl; + std::cout << std::endl; fTagLfCov[0] = 1; fFileHeader->fLfCovCalc++; } //---------- (end of LowFrequencyCovariancesBetweenChannels ) -------------------- @@ -2445,11 +2445,11 @@ void TEcnaRun::LowFrequencyCorrelationsBetweenChannels() if ( fTagLfCov[0] != 1 ) {LowFrequencyCovariancesBetweenChannels(); fTagLfCov[0] = 0;} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the Low Frequency Correlations between channels" << endl + std::cout << " Calculation of the Low Frequency Correlations between channels" << std::endl << " Starting allocation. " - << endl;} + << std::endl;} //................. allocation fT2d_lf_cor + init to zero (mandatory) if( fT2d_lf_cor == 0 ){ @@ -2497,9 +2497,9 @@ void TEcnaRun::LowFrequencyCorrelationsBetweenChannels() } } } - if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[LFN Cor], ";} + if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[LFN Cor], ";} } - cout << endl; + std::cout << std::endl; fTagLfCor[0] = 1; fFileHeader->fLfCorCalc++; } @@ -2524,9 +2524,9 @@ void TEcnaRun::HighFrequencyCovariancesBetweenChannels() { //Calculation of the High Frequency Covariances between channels - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyCovariancesBetweenChannels()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyCovariancesBetweenChannels()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the High Frequency Covariances between channels" << endl;} + std::cout << " Calculation of the High Frequency Covariances between channels" << std::endl;} //................. allocation fT2d_hf_cov + init to zero (mandatory) if( fT2d_hf_cov == 0 ){ @@ -2559,11 +2559,11 @@ void TEcnaRun::HighFrequencyCovariancesBetweenChannels() //........................................... Calculation (HighFrequencyCovariancesBetweenChannels) if(fFlagPrint != fCodePrintNoComment){ - cout << " Calculation of the mean (over the events)" << endl + std::cout << " Calculation of the mean (over the events)" << std::endl << " of the covariances between the channels (over the samples 1 to " - << fNbSampForCalc << ")." << endl;} + << fNbSampForCalc << ")." << std::endl;} - cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << endl; + std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl; for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) { @@ -2579,11 +2579,11 @@ void TEcnaRun::HighFrequencyCovariancesBetweenChannels() mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc; } } - if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFNa Cov], ";} + if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[HFNa Cov], ";} } - cout << endl; + std::cout << std::endl; - cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << endl; + std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl; //... Calculation of half of the matrix, diagonal included (HighFrequencyCovariancesBetweenChannels) for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) @@ -2622,9 +2622,9 @@ void TEcnaRun::HighFrequencyCovariancesBetweenChannels() } } } - if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFNb Cov], ";} + if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[HFNb Cov], ";} } - cout << endl; + std::cout << std::endl; fTagHfCov[0] = 1; fFileHeader->fHfCovCalc++; } @@ -2645,11 +2645,11 @@ void TEcnaRun::HighFrequencyCorrelationsBetweenChannels() if ( fTagHfCov[0] != 1 ) {HighFrequencyCovariancesBetweenChannels(); fTagHfCov[0] = 0;} - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the High Frequency Correlations between channels" << endl + std::cout << " Calculation of the High Frequency Correlations between channels" << std::endl << " Starting allocation. " - << endl;} + << std::endl;} //................. allocation fT2d_hf_cor + init to zero (mandatory) if( fT2d_hf_cor == 0 ){ @@ -2699,9 +2699,9 @@ void TEcnaRun::HighFrequencyCorrelationsBetweenChannels() } } } - if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFN Cor], ";} + if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[HFN Cor], ";} } - cout << endl; + std::cout << std::endl; fTagHfCor[0] = 1; fFileHeader->fHfCorCalc++; } @@ -2733,11 +2733,11 @@ void TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins() if(fTagLfCor[0] != 1){LowFrequencyCorrelationsBetweenChannels(); fTagLfCor[0]=0;} //..... mean fT2d_lfcc_mostins for each pair (Stin_X,Stin_Y) - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the mean, for each " - << fStinName.Data() << ", of the" << endl - << " Low Frequency Correlations between channels." << endl;} + std::cout << " Calculation of the mean, for each " + << fStinName.Data() << ", of the" << std::endl + << " Low Frequency Correlations between channels." << std::endl;} //................. allocation fT2d_lfcc_mostins + init to zero (mandatory) if( fT2d_lfcc_mostins == 0 ){ @@ -2771,11 +2771,11 @@ void TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins() TVectorD half_LFccMos(ndim); for(Int_t i=0; iMaxStinEcnaInStex(); i0StexStinEcna++) { @@ -2793,8 +2793,8 @@ void TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins() (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) ) {half_LFccMos(i_count) = fT2d_lf_cor[i0StexEcha][j0StexEcha]; i_count++;} else - {cout << "!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range." - << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << endl; } + {std::cout << "!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range." + << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << std::endl; } } } //...... Calculation of the mean absolute values of the LF mean Correlations(c,c') @@ -2805,9 +2805,9 @@ void TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins() } fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim; } - if( i0StexStinEcna%10 == 0 ){cout << i0StexStinEcna << "[LFN MCtt], ";} + if( i0StexStinEcna%10 == 0 ){std::cout << i0StexStinEcna << "[LFN MCtt], ";} } - cout << endl; + std::cout << std::endl; fTagLFccMoStins[0] = 1; fFileHeader->fLFccMoStinsCalc++; } // ------- end of LowFrequencyMeanCorrelationsBetweenStins() ------- @@ -2831,11 +2831,11 @@ void TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins() if(fTagHfCor[0] != 1){HighFrequencyCorrelationsBetweenChannels();fTagHfCor[0]=0;} //..... mean fT2d_hfcc_mostins for each pair (Stin_X,Stin_Y) - if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << endl;} + if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << " Calculation of the mean, for each " - << fFlagSubDet.Data() << ", of the" << endl - << " High Frequency Correlations between channels." << endl;} + std::cout << " Calculation of the mean, for each " + << fFlagSubDet.Data() << ", of the" << std::endl + << " High Frequency Correlations between channels." << std::endl;} //................. allocation fT2d_hfcc_mostins + init to zero (mandatory) if( fT2d_hfcc_mostins == 0 ){ @@ -2868,11 +2868,11 @@ void TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins() TVectorD half_HFccMos(ndim); for(Int_t i=0; iMaxStinEcnaInStex(); i0StexStinEcna++) @@ -2891,8 +2891,8 @@ void TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins() (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) ) {half_HFccMos(i_count) = fT2d_hf_cor[i0StexEcha][j0StexEcha]; i_count++;} else - {cout << "!TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()> Channel number out of range." - << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << endl; } + {std::cout << "!TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()> Channel number out of range." + << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << std::endl; } } } //..... Calculation of the mean absolute values of the HF mean Correlations(c,c') @@ -2903,9 +2903,9 @@ void TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins() } fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim; } - if( i0StexStinEcna%10 == 0 ){cout << i0StexStinEcna << "[HFN MCtt], ";} + if( i0StexStinEcna%10 == 0 ){std::cout << i0StexStinEcna << "[HFN MCtt], ";} } - cout << endl; + std::cout << std::endl; fTagHFccMoStins[0] = 1; fFileHeader->fHFccMoStinsCalc++; } // ------- end of HighFrequencyMeanCorrelationsBetweenStins() ------- @@ -2954,12 +2954,12 @@ Bool_t TEcnaRun::OpenRootFile(const Text_t *name, const TString& status) { if (!ok_open) // unable to open file { - cout << "TEcnaRun::OpenRootFile> Cannot open file " << s_name.Data() << endl; + std::cout << "TEcnaRun::OpenRootFile> Cannot open file " << s_name.Data() << std::endl; } else { if(fFlagPrint == fCodePrintAllComments) - {cout << "*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_name.Data() << endl;} + {std::cout << "*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_name.Data() << std::endl;} fOpenRootFile = kTRUE; } return ok_open; @@ -2984,7 +2984,7 @@ Bool_t TEcnaRun::CloseRootFile(const Text_t *name) { gCnaRootFile->CloseFile(); if(fFlagPrint != fCodePrintAllComments){ - cout << "*TEcnaRun::CloseRootFile> ROOT file " << s_name.Data() << " closed." << endl;} + std::cout << "*TEcnaRun::CloseRootFile> ROOT file " << s_name.Data() << " closed." << std::endl;} // delete gCnaRootFile; gCnaRootFile = 0; fCdelete++; @@ -2993,8 +2993,8 @@ Bool_t TEcnaRun::CloseRootFile(const Text_t *name) { } else { - cout << "*TEcnaRun::CloseRootFile(...)> No close since no file is open." - << fTTBELL << endl; + std::cout << "*TEcnaRun::CloseRootFile(...)> No close since no file is open." + << fTTBELL << std::endl; } return ok_close; } @@ -3032,15 +3032,15 @@ Bool_t TEcnaRun::WriteRootFile(){ if ( nCountEvts <= 0 ) { //============== no write if no event found - cout << "!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->GetRootFileNameShort().Data() - << ". File will not be written." << endl; + std::cout << "!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->GetRootFileNameShort().Data() + << ". File will not be written." << std::endl; ok_write = kTRUE; } else { if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << endl - << " " << fCnaWrite->GetRootFileName().Data() << endl;} + std::cout << "*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << std::endl + << " " << fCnaWrite->GetRootFileName().Data() << std::endl;} const Text_t *FileShortName = (const Text_t *)fCnaWrite->GetRootFileNameShort().Data(); ok_write = WriteRootFile(FileShortName, fFileHeader->fNbOfSamples); @@ -3048,13 +3048,13 @@ Bool_t TEcnaRun::WriteRootFile(){ if( ok_write == kTRUE ) { if(fFlagPrint != fCodePrintNoComment) - {cout << "*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->GetRootFileName().Data() - << endl;} + {std::cout << "*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->GetRootFileName().Data() + << std::endl;} } else { - cout << "!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->GetRootFileName().Data() - << fTTBELL << endl; + std::cout << "!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->GetRootFileName().Data() + << fTTBELL << std::endl; } } return ok_write; @@ -3086,8 +3086,8 @@ Bool_t TEcnaRun::WriteNewRootFile(const TString& TypAna){ const Text_t *FileShortName = (const Text_t *)fNewRootFileNameShort.Data(); if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << endl - << " " << fNewRootFileNameShort.Data() << endl;} + std::cout << "*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << std::endl + << " " << fNewRootFileNameShort.Data() << std::endl;} ok_write = WriteRootFile(FileShortName, fNbSampForCalc); @@ -3118,8 +3118,8 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) if ( fOpenRootFile ) { - cout << "!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open." - << fTTBELL << endl; + std::cout << "!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open." + << fTTBELL << std::endl; } else { @@ -3199,9 +3199,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3213,10 +3213,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootStinNumbers(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Average Pedestals (1 value per Stin) // 1 fMatHis(1, StexStin) (12) cTypAvPed 1*(1, 68) = 68 @@ -3231,9 +3231,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3245,10 +3245,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootAvPed(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Average Total noise // StexEcha fMatHis(1, StexStin) ( 3) cTypAvTno 1*(1, 68) = 68 @@ -3263,9 +3263,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3277,10 +3277,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootAvTno(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Average Low frequency noise // 1 fMatHis(1, StexStin) ( 4) cTypAvLfn 1*(1, 68) = 68 @@ -3295,9 +3295,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3309,10 +3309,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootAvLfn(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Average High frequency noise // 1 fMatHis(1, StexStin) ( 5) cTypAvHfn 1*(1, 68) = 68 @@ -3327,9 +3327,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3341,10 +3341,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootAvHfn(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Average mean cor(s,s) // 1 fMatHis(1, StexStin) (13) cTypAvMeanCorss 1*(1, 68) = 68 @@ -3359,9 +3359,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3373,10 +3373,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootAvEvCorss(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Average sigma of cor(s,s) // 1 fMatHis(1, StexStin) (14) cTypAvSigCorss 1*(1, 68) = 68 @@ -3391,9 +3391,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3405,10 +3405,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootAvSigCorss(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Expectation values of the expectation values of the samples (pedestals) // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700 @@ -3423,9 +3423,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3437,10 +3437,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootPed(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Expectation values of the sigmas the samples // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700 @@ -3455,9 +3455,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3469,10 +3469,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootTno(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Expectation values of the correlations between the samples // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700 @@ -3487,9 +3487,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3501,10 +3501,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootMeanCorss(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Sigmas of the expectation values of the samples // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700 @@ -3519,9 +3519,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3533,10 +3533,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootLfn(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Sigmas of the sigmas of the samples // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700 @@ -3551,9 +3551,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3565,10 +3565,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootHfn(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Sigmas of the correlations between the samples // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700 @@ -3583,9 +3583,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3597,10 +3597,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootSigCorss(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //----- Mean Covariances between StexEchas (averaged over samples) for all (Stin_X,Stin_Y) // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624 @@ -3615,9 +3615,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3629,10 +3629,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1); TRootLFccMoStins(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //----- Mean Correlations between StexEchas (averaged over samples) for all (Stin_X,Stin_Y) // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624 @@ -3647,9 +3647,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3661,10 +3661,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1); TRootHFccMoStins(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Numbers of found events (NbOfEvts) // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000 @@ -3679,9 +3679,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3693,10 +3693,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootNbOfEvts(argNbSampWrite); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Expectation values of the samples // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000 @@ -3711,9 +3711,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3725,10 +3725,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootMSp(argNbSampWrite); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Sigmas of the samples // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000 @@ -3743,9 +3743,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3757,10 +3757,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1); TRootSSp(argNbSampWrite); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Covariances between samples @@ -3776,9 +3776,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++) { @@ -3791,10 +3791,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) TRootCovCss(i0StexEcha, argNbSampWrite); gCnaRootFile->fCnaResultsTree->Fill(); if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments) - {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + {std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Correlations between samples // StexEcha fMatMat(sample, sample) ( 9) cTypCorCss 1700*( 10, 10) = 170 000 @@ -3809,9 +3809,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++) { @@ -3824,10 +3824,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) TRootCorCss(i0StexEcha, argNbSampWrite); gCnaRootFile->fCnaResultsTree->Fill(); if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments) - {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + {std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Samples as a function of event = events distributions // StexEcha fMatHis(sample, bins) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000 @@ -3842,9 +3842,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++) { @@ -3857,10 +3857,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) TRootAdcEvt(i0StexEcha, argNbSampWrite); gCnaRootFile->fCnaResultsTree->Fill(); if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments ) - {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + {std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Low Frequency Covariances between StexEchas // sample fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000 @@ -3875,9 +3875,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { //=================================== Record type EB @@ -3889,10 +3889,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1); TRootLfCov(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- Low Frequency Correlations between StexEchas // sample fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000 @@ -3907,9 +3907,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3921,10 +3921,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1); TRootLfCor(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- High Frequency Covariances between StexEchas // sample fMatMat(StexEcha, StexEcha) (6) cTypHfCov 1*(1700,1700) = 2 890 000 @@ -3939,9 +3939,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3953,10 +3953,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1); TRootHfCov(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //-------------------------- High Frequency Correlations between StexEchas // sample fMatMat(StexEcha, StexEcha) (7) cTypHfCor 1*(1700,1700) = 2 890 000 @@ -3971,9 +3971,9 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) v_tot += v_size; if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times - << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = " - << setw(9) << v_size;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times + << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " + << std::setw(9) << v_size;} for (Int_t i = 0; i < v_nb_times; i++) { @@ -3985,10 +3985,10 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1); TRootHfCor(); gCnaRootFile->fCnaResultsTree->Fill(); - if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} + if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;} } } - if(fFlagPrint == fCodePrintAllComments){cout << endl;} + if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;} //---------------------------------------------- WRITING //...................................... file @@ -3998,14 +3998,14 @@ Bool_t TEcnaRun::WriteRootFile(const Text_t* name, Int_t& argNbSampWrite) //...................................... status message if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> " << setw(20) << "TOTAL: " - << setw(21) << "CALCULATED = " << setw(9) << v_tot - << " => WRITTEN ON FILE = " << setw(9) << v_tot_writ << endl;} + std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(20) << "TOTAL: " + << std::setw(21) << "CALCULATED = " << std::setw(9) << v_tot + << " => WRITTEN ON FILE = " << std::setw(9) << v_tot_writ << std::endl;} if(fFlagPrint == fCodePrintAllComments){ - cout << "*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name << " in directory:" << endl + std::cout << "*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name << " in directory:" << std::endl << " " << fCnaParPaths->ResultsRootFilePath().Data() - << endl;} + << std::endl;} ok_write = kTRUE; @@ -4530,7 +4530,7 @@ void TEcnaRun::PrintComments() // Set flags to authorize printing of some comments concerning initialisations (default) fFlagPrint = fCodePrintComments; - cout << "*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << endl; + std::cout << "*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << std::endl; } void TEcnaRun::PrintWarnings() @@ -4538,7 +4538,7 @@ void TEcnaRun::PrintWarnings() // Set flags to authorize printing of warnings fFlagPrint = fCodePrintWarnings; - cout << "*TEcnaRun::PrintWarnings()> Warnings will be printed" << endl; + std::cout << "*TEcnaRun::PrintWarnings()> Warnings will be printed" << std::endl; } void TEcnaRun::PrintAllComments() @@ -4546,7 +4546,7 @@ void TEcnaRun::PrintAllComments() // Set flags to authorize printing of the comments of all the methods fFlagPrint = fCodePrintAllComments; - cout << "*TEcnaRun::PrintAllComments()> All the comments will be printed" << endl; + std::cout << "*TEcnaRun::PrintAllComments()> All the comments will be printed" << std::endl; } void TEcnaRun::PrintNoComment() diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc index d081050041f8c..e6dccd7d43ec5 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc @@ -23,7 +23,7 @@ ClassImp(TEcnaWrite) //if (fCnaParPaths != 0){delete fCnaParPaths; fCdelete++;} //if (fCnaParCout != 0){delete fCnaParCout; fCdelete++;} - // cout << "[Info Management] CLASS: TEcnaWrite. DESTROY OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaWrite. DESTROY OBJECT: this = " << this << std::endl; } //=================================================================== @@ -34,14 +34,14 @@ ClassImp(TEcnaWrite) TEcnaWrite::TEcnaWrite() { - // cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << std::endl; Init(); } TEcnaWrite::TEcnaWrite(TEcnaObject* pObjectManager, const TString& SubDet) { - // cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << std::endl; Init(); Long_t i_this = (Long_t)this; @@ -95,7 +95,7 @@ TEcnaWrite::TEcnaWrite(const TString& SubDet, const TEcnaNumbering* pEcalNumbering) { - // cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << endl; + // std::cout << "[Info Management] CLASS: TEcnaWrite. CREATE OBJECT: this = " << this << std::endl; Init(); @@ -455,52 +455,52 @@ Int_t TEcnaWrite::NumberOfEventsAnalysis(Int_t* ArrayNbOfEvts, const Int_t { if( MaxArray == fEcal->MaxCrysInSM() ) // (EB) { - cout << "!TEcnaWrite::NumberOfEventsAnalysis()> *** WARNING *** " + std::cout << "!TEcnaWrite::NumberOfEventsAnalysis()> *** WARNING *** " << EmptyChannel << " empty channels detected in SM " << StexNumber - << " (EB " << fEcalNumbering->PlusMinusSMNumber(StexNumber) << ")" << endl; + << " (EB " << fEcalNumbering->PlusMinusSMNumber(StexNumber) << ")" << std::endl; } if( MaxArray == fEcal->MaxCrysEcnaInDee() ) // (EE) { EmptyChannel -= fEcal->EmptyChannelsInDeeMatrixIncompleteSCIncluded(); if( EmptyChannel > 0 ) { - cout << "!TEcnaWrite::NumberOfEventsAnalysis()> *** WARNING *** " - << EmptyChannel << " empty channels detected in Dee " << StexNumber << endl; + std::cout << "!TEcnaWrite::NumberOfEventsAnalysis()> *** WARNING *** " + << EmptyChannel << " empty channels detected in Dee " << StexNumber << std::endl; } } } if( DifferentMinusValue > 0 || DifferentPlusValue > 0 ) { - cout << "!TEcnaWrite::NumberOfEventsAnalysis()> " << endl; + std::cout << "!TEcnaWrite::NumberOfEventsAnalysis()> " << std::endl; if( MaxArray == fEcal->MaxCrysInSM() ) // (EB) { - cout << "************** W A R N I N G : NUMBER OF EVENTS NOT CONSTANT FOR SM " << StexNumber + std::cout << "************** W A R N I N G : NUMBER OF EVENTS NOT CONSTANT FOR SM " << StexNumber << " (EB " << fEcalNumbering->PlusMinusSMNumber(StexNumber) << ") *********************"; } if( MaxArray == fEcal->MaxCrysEcnaInDee() ) // (EE) { - cout << "****************** W A R N I N G : NUMBER OF EVENTS NOT CONSTANT FOR Dee " << StexNumber + std::cout << "****************** W A R N I N G : NUMBER OF EVENTS NOT CONSTANT FOR Dee " << StexNumber << " **************************"; } - cout << endl - << " Result ROOT file: " << fRootFileName << endl - << " The number of events is not the same for all the non-empty channels." << endl + std::cout << std::endl + << " Result ROOT file: " << fRootFileName << std::endl + << " The number of events is not the same for all the non-empty channels." << std::endl << " The maximum number (" << rNumberOfEvents << ") is considered as the number of events for calculations " - << endl - << " of pedestals, noises and correlations." << endl + << std::endl + << " of pedestals, noises and correlations." << std::endl << " Number of channels with 0 < nb of evts < " << rNumberOfEvents << " : " << DifferentMinusValue - << endl - // << " Number of channels with nb of evts > " << rNumberOfEvents << " = " << DifferentPlusValue << endl - << " Number of empty channels : " << EmptyChannel << endl - << " Some values of pedestals, noises and correlations may be wrong for channels" << endl - << " with number of events different from " << rNumberOfEvents << "." << endl - << " Please, check the histogram 'Numbers of events'." << endl + << std::endl + // << " Number of channels with nb of evts > " << rNumberOfEvents << " = " << DifferentPlusValue << std::endl + << " Number of empty channels : " << EmptyChannel << std::endl + << " Some values of pedestals, noises and correlations may be wrong for channels" << std::endl + << " with number of events different from " << rNumberOfEvents << "." << std::endl + << " Please, check the histogram 'Numbers of events'." << std::endl << "*******************************************************************************************************" - << endl; + << std::endl; } else { @@ -508,8 +508,8 @@ Int_t TEcnaWrite::NumberOfEventsAnalysis(Int_t* ArrayNbOfEvts, const Int_t { if( rNumberOfEvents < NbOfReqEvts ) { - cout << "*TEcnaWrite::NumberOfEventsAnalysis()> *** INFO *** Number of events found in data = " - << rNumberOfEvents << ": less than number of requested events ( = " << NbOfReqEvts << ")" << endl; + std::cout << "*TEcnaWrite::NumberOfEventsAnalysis()> *** INFO *** Number of events found in data = " + << rNumberOfEvents << ": less than number of requested events ( = " << NbOfReqEvts << ")" << std::endl; } } } @@ -562,21 +562,21 @@ Int_t TEcnaWrite::NumberOfEventsAnalysis(Int_t** T2d_NbOfEvts, const Int_ if( DifferentMinusValue > 0 || DifferentPlusValue > 0 ) { - cout << "!TEcnaWrite::NumberOfEventsAnalysis()> " << endl + std::cout << "!TEcnaWrite::NumberOfEventsAnalysis()> " << std::endl << "****************** W A R N I N G : NUMBER OF EVENTS NOT CONSTANT ! *********************************" - << endl - << " Result ROOT file: " << fRootFileName << endl - << " The number of events is not the same for all the non-empty channels" << endl - << " The maximum number (" << rNumberOfEvents << ") is considered as the number of events " << endl - << " for calculations of pedestals, noises and correlations." << endl - << " Number of channels with 0 < nb of evts < " << rNumberOfEvents << " : " << DifferentMinusValue << endl - // << " Number of channels with nb of evts > " << rNumberOfEvents << " : " << DifferentPlusValue << endl - // << " Number of empty channels : " << EmptyChannel << endl - << " Some values of pedestals, noises and correlations may be wrong for channels" << endl - << " with number of events different from " << rNumberOfEvents << "." << endl - << " Please, check the histogram 'Numbers of events'." << endl + << std::endl + << " Result ROOT file: " << fRootFileName << std::endl + << " The number of events is not the same for all the non-empty channels" << std::endl + << " The maximum number (" << rNumberOfEvents << ") is considered as the number of events " << std::endl + << " for calculations of pedestals, noises and correlations." << std::endl + << " Number of channels with 0 < nb of evts < " << rNumberOfEvents << " : " << DifferentMinusValue << std::endl + // << " Number of channels with nb of evts > " << rNumberOfEvents << " : " << DifferentPlusValue << std::endl + // << " Number of empty channels : " << EmptyChannel << std::endl + << " Some values of pedestals, noises and correlations may be wrong for channels" << std::endl + << " with number of events different from " << rNumberOfEvents << "." << std::endl + << " Please, check the histogram 'Numbers of events'." << std::endl << "*******************************************************************************************************" - << endl; + << std::endl; } else { @@ -584,8 +584,8 @@ Int_t TEcnaWrite::NumberOfEventsAnalysis(Int_t** T2d_NbOfEvts, const Int_ { if( rNumberOfEvents < NbOfReqEvts ) { - cout << "*TEcnaWrite::NumberOfEventsAnalysis()> *** INFO *** Number of events found in data = " - << rNumberOfEvents << ": less than number of requested events ( = " << NbOfReqEvts << ")" << endl; + std::cout << "*TEcnaWrite::NumberOfEventsAnalysis()> *** INFO *** Number of events found in data = " + << rNumberOfEvents << ": less than number of requested events ( = " << NbOfReqEvts << ")" << std::endl; } } } @@ -690,15 +690,15 @@ void TEcnaWrite::fMakeResultsFileName(const Int_t& i_code) { if( fCnaParPaths->ResultsRootFilePath().Data() == sPointInterrog.Data() ) { - cout << "!TEcnaWrite::fMakeResultsFileName> * * * W A R N I N G * * * " << endl << endl - << " Path for results .root file not defined. Default option will be used here:" << endl - << " your results files will be written in your HOME directory." << endl << endl - << " In order to write the .root results file in a specific directory," << endl - << " you have to create a file named path_results_root in a subdirectory named ECNA" << endl - << " previously created in your home directory." << endl - << " This file must have only one line containing the path of the directory" << endl - << " where must be the .root result files." << endl - << endl; + std::cout << "!TEcnaWrite::fMakeResultsFileName> * * * W A R N I N G * * * " << std::endl << std::endl + << " Path for results .root file not defined. Default option will be used here:" << std::endl + << " your results files will be written in your HOME directory." << std::endl << std::endl + << " In order to write the .root results file in a specific directory," << std::endl + << " you have to create a file named path_results_root in a subdirectory named ECNA" << std::endl + << " previously created in your home directory." << std::endl + << " This file must have only one line containing the path of the directory" << std::endl + << " where must be the .root result files." << std::endl + << std::endl; TString home_path = gSystem->Getenv("HOME"); fCnaParPaths->SetResultsRootFilePath(home_path.Data()); @@ -730,15 +730,15 @@ void TEcnaWrite::fMakeResultsFileName(const Int_t& i_code) { if( fCnaParPaths->ResultsAsciiFilePath().Data() == sPointInterrog.Data() ) { - cout << "!TEcnaWrite::fMakeResultsFileName> * * * W A R N I N G * * * " << endl << endl - << " Path for results .ascii file not defined. Default option will be used here:" << endl - << " your results files will be written in your HOME directory." << endl << endl - << " In order to write the .ascii results file in a specific directory," << endl - << " you have to create a file named path_results_ascii in a subdirectory named ECNA" << endl - << " previously created in your home directory." << endl - << " This file must have only one line containing the path of the directory" << endl - << " where must be the .ascii result files." << endl - << endl; + std::cout << "!TEcnaWrite::fMakeResultsFileName> * * * W A R N I N G * * * " << std::endl << std::endl + << " Path for results .ascii file not defined. Default option will be used here:" << std::endl + << " your results files will be written in your HOME directory." << std::endl << std::endl + << " In order to write the .ascii results file in a specific directory," << std::endl + << " you have to create a file named path_results_ascii in a subdirectory named ECNA" << std::endl + << " previously created in your home directory." << std::endl + << " This file must have only one line containing the path of the directory" << std::endl + << " where must be the .ascii result files." << std::endl + << std::endl; TString home_path = gSystem->Getenv("HOME"); fCnaParPaths->SetResultsAsciiFilePath(home_path.Data()); @@ -945,8 +945,8 @@ void TEcnaWrite::fMakeResultsFileName(const Int_t& i_code) //----------------------------------------------------------- (fMakeResultsFileName) // default: - // cout << "*TEcnaWrite::fMakeResultsFileName(const Int_t& i_code)> " - // << "wrong header code , i_code = " << i_code << endl; + // std::cout << "*TEcnaWrite::fMakeResultsFileName(const Int_t& i_code)> " + // << "wrong header code , i_code = " << i_code << std::endl; // } //======================================= f_name @@ -986,9 +986,9 @@ void TEcnaWrite::fMakeResultsFileName(const Int_t& i_code) } else { - cout << "*TEcnaWrite::fMakeResultsFileName(...)> Name too long (for f_name)." + std::cout << "*TEcnaWrite::fMakeResultsFileName(...)> Name too long (for f_name)." << " No room enough for the extension. (ii = " << ii << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; } @@ -1030,9 +1030,9 @@ void TEcnaWrite::fMakeResultsFileName(const Int_t& i_code) } else { - cout << "*TEcnaWrite::fMakeResultsFileName(...)> Name too long (for f_name_short)." + std::cout << "*TEcnaWrite::fMakeResultsFileName(...)> Name too long (for f_name_short)." << " No room enough for the extension. (ii = " << ii << ")" - << fTTBELL << endl; + << fTTBELL << std::endl; } delete [] f_name; f_name = 0; fCdelete++; delete [] f_name_short; f_name_short = 0; fCdelete++; @@ -1074,20 +1074,20 @@ void TEcnaWrite::fAsciiFileWriteHeader(const Int_t& i_code) fFcout_f.open(fAsciiFileName.Data()); fFcout_f << "*** File: " << fAsciiFileName - << " *** " << endl << endl; - fFcout_f << "*Analysis name : " << fAnaType << endl; - fFcout_f << "*First-Last samples : 1 - " << fNbOfSamples << endl; - fFcout_f << "*Run number : " << fRunNumber << endl; - fFcout_f << "*First requested event number : " << fFirstReqEvtNumber << endl; - fFcout_f << "*Last requested event number : " << fLastReqEvtNumber << endl; - fFcout_f << "*Requested number of events : " << fReqNbOfEvts << endl; + << " *** " << std::endl << std::endl; + fFcout_f << "*Analysis name : " << fAnaType << std::endl; + fFcout_f << "*First-Last samples : 1 - " << fNbOfSamples << std::endl; + fFcout_f << "*Run number : " << fRunNumber << std::endl; + fFcout_f << "*First requested event number : " << fFirstReqEvtNumber << std::endl; + fFcout_f << "*Last requested event number : " << fLastReqEvtNumber << std::endl; + fFcout_f << "*Requested number of events : " << fReqNbOfEvts << std::endl; if( fFlagSubDet == "EB" ) - {fFcout_f << "*SuperModule number : " << fStexNumber << endl;} + {fFcout_f << "*SuperModule number : " << fStexNumber << std::endl;} if( fFlagSubDet == "EE" ) - {fFcout_f << "*Dee number : " << fStexNumber << endl;} + {fFcout_f << "*Dee number : " << fStexNumber << std::endl;} fFcout_f << "*Date first requested event : " << fStartDate; - fFcout_f << "*Date last requested event : " << fStopDate << endl; - fFcout_f << endl; + fFcout_f << "*Date last requested event : " << fStopDate << std::endl; + fFcout_f << std::endl; //========================================================================= // closing of the results file if i_code = fCodeHeaderAscii only. @@ -1207,19 +1207,19 @@ void TEcnaWrite::WriteAsciiHisto(const TString& HistoCode, const Int_t& HisSize, fAsciiFileWriteHeader(i_code); // => Open of the file associated with stream fFcout_f //..................................... format numerical values - fFcout_f << setiosflags(ios::showpoint | ios::uppercase); - fFcout_f << setprecision(3) << setw(6); - fFcout_f.setf(ios::dec, ios::basefield); - fFcout_f.setf(ios::fixed, ios::floatfield); - fFcout_f.setf(ios::left, ios::adjustfield); - fFcout_f.setf(ios::right, ios::adjustfield); + fFcout_f << std::setiosflags(std::ios::showpoint | std::ios::uppercase); + fFcout_f << std::setprecision(3) << std::setw(6); + fFcout_f.setf(std::ios::dec, std::ios::basefield); + fFcout_f.setf(std::ios::fixed, std::ios::floatfield); + fFcout_f.setf(std::ios::left, std::ios::adjustfield); + fFcout_f.setf(std::ios::right, std::ios::adjustfield); - cout << setiosflags(ios::showpoint | ios::uppercase); - cout << setprecision(3) << setw(6); - cout.setf(ios::dec, ios::basefield); - cout.setf(ios::fixed, ios::floatfield); - cout.setf(ios::left, ios::adjustfield); - cout.setf(ios::right, ios::adjustfield); + std::cout << std::setiosflags(std::ios::showpoint | std::ios::uppercase); + std::cout << std::setprecision(3) << std::setw(6); + std::cout.setf(std::ios::dec, std::ios::basefield); + std::cout.setf(std::ios::fixed, std::ios::floatfield); + std::cout.setf(std::ios::left, std::ios::adjustfield); + std::cout.setf(std::ios::right, std::ios::adjustfield); //........................................................ WriteAsciiHisto TString aStexName; @@ -1324,7 +1324,7 @@ void TEcnaWrite::WriteAsciiHisto(const TString& HistoCode, const Int_t& HisSize, if( HistoCode == "D_HFN_ChNb" ){aSpecif1 = " High Fq"; aSpecif2 = " noise ";} if( HistoCode == "D_SCs_ChNb" ){aSpecif1 = " Sigma of"; aSpecif2 = " cor(s,s) ";} - fFcout_f << endl; + fFcout_f << std::endl; fFcout_f << aSpecifa.Data() << " " << aStinName.Data() << "# " @@ -1332,7 +1332,7 @@ void TEcnaWrite::WriteAsciiHisto(const TString& HistoCode, const Int_t& HisSize, << aSpecifd.Data() << aHoco.Data() << aVeco.Data() - << aSpecif1.Data() << endl; + << aSpecif1.Data() << std::endl; fFcout_f << " in " << aStexName.Data() << " in " << aStexName.Data() @@ -1340,43 +1340,43 @@ void TEcnaWrite::WriteAsciiHisto(const TString& HistoCode, const Int_t& HisSize, << " in " << aSpecife.Data() << " in " << aStexName.Data() << " in " << aStexName.Data() - << aSpecif2.Data() << endl << endl; + << aSpecif2.Data() << std::endl << std::endl; } Double_t value = read_histo(i0StexEcha); if( fFlagSubDet == "EB" ) { - fFcout_f << setw(7) << i0StexEcha - << setw(8) << n1StexStin - << setw(11) << i0StinEcha // (Electronic channel number in tower) - << setw(10) << n1StexCrys - << setw(10) << (Int_t)fEcalNumbering->GetEta(fStexNumber, StexStinEcna, i0StinEcha) - << setw(10) << (Int_t)fEcalNumbering->GetPhiInSM(fStexNumber, StexStinEcna, i0StinEcha); + fFcout_f << std::setw(7) << i0StexEcha + << std::setw(8) << n1StexStin + << std::setw(11) << i0StinEcha // (Electronic channel number in tower) + << std::setw(10) << n1StexCrys + << std::setw(10) << (Int_t)fEcalNumbering->GetEta(fStexNumber, StexStinEcna, i0StinEcha) + << std::setw(10) << (Int_t)fEcalNumbering->GetPhiInSM(fStexNumber, StexStinEcna, i0StinEcha); } if( fFlagSubDet == "EE" ) { Int_t n1StinEcha_m = n1StinEcha-1; - fFcout_f << setw(7) << n1DataSector - << setw(8) << n1StexStin - << setw(11) << n1StinEcha // (Xtal number for construction in SC) - << setw(10) << n1SCinDS - << setw(10) << fEcalNumbering->GetIXCrysInDee(fStexNumber, StexStinEcna, n1StinEcha_m) - << setw(10) << fEcalNumbering->GetJYCrysInDee(fStexNumber, StexStinEcna, n1StinEcha_m); + fFcout_f << std::setw(7) << n1DataSector + << std::setw(8) << n1StexStin + << std::setw(11) << n1StinEcha // (Xtal number for construction in SC) + << std::setw(10) << n1SCinDS + << std::setw(10) << fEcalNumbering->GetIXCrysInDee(fStexNumber, StexStinEcna, n1StinEcha_m) + << std::setw(10) << fEcalNumbering->GetJYCrysInDee(fStexNumber, StexStinEcna, n1StinEcha_m); } if( HistoCode == "D_NOE_ChNb") { Int_t ivalue = (Int_t)value; - fFcout_f << setw(13) << ivalue; - fFcout_f << setw(4) << "(" << setw(6) << fReqNbOfEvts << ")"; + fFcout_f << std::setw(13) << ivalue; + fFcout_f << std::setw(4) << "(" << std::setw(6) << fReqNbOfEvts << ")"; } else { - fFcout_f << setw(13) << value; + fFcout_f << std::setw(13) << value; } - fFcout_f << endl; + fFcout_f << std::endl; } } // end of loop: for (Int_t i0StexEcha=0; i0StexEcha INFO: " - << "histo has been written in file: " << endl - << " " << fAsciiFileName.Data() << endl; + std::cout << "*TEcnaWrite::WriteAsciiHisto(...)> INFO: " + << "histo has been written in file: " << std::endl + << " " << fAsciiFileName.Data() << std::endl; // } } // end of TEcnaWrite::WriteAsciiHisto @@ -1479,19 +1479,19 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code, //------------ formatage des nombres en faisant appel a la classe ios - fFcout_f << setiosflags(ios::showpoint | ios::uppercase); - fFcout_f.setf(ios::dec, ios::basefield); - fFcout_f.setf(ios::fixed, ios::floatfield); - fFcout_f.setf(ios::left, ios::adjustfield); - fFcout_f.setf(ios::right, ios::adjustfield); - fFcout_f << setprecision(3) << setw(6); + fFcout_f << std::setiosflags(std::ios::showpoint | std::ios::uppercase); + fFcout_f.setf(std::ios::dec, std::ios::basefield); + fFcout_f.setf(std::ios::fixed, std::ios::floatfield); + fFcout_f.setf(std::ios::left, std::ios::adjustfield); + fFcout_f.setf(std::ios::right, std::ios::adjustfield); + fFcout_f << std::setprecision(3) << std::setw(6); - cout << setiosflags(ios::showpoint | ios::uppercase); - cout.setf(ios::dec, ios::basefield); - cout.setf(ios::fixed, ios::floatfield); - cout.setf(ios::left, ios::adjustfield); - cout.setf(ios::right, ios::adjustfield); - cout << setprecision(3) << setw(6); + std::cout << std::setiosflags(std::ios::showpoint | std::ios::uppercase); + std::cout.setf(std::ios::dec, std::ios::basefield); + std::cout.setf(std::ios::fixed, std::ios::floatfield); + std::cout.setf(std::ios::left, std::ios::adjustfield); + std::cout.setf(std::ios::right, std::ios::adjustfield); + std::cout << std::setprecision(3) << std::setw(6); //--------------------- fin du formatage standard C++ ------------------- @@ -1726,7 +1726,7 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code, isy_max = justap_samp; } - fFcout_f << endl; + fFcout_f << std::endl; //............... Calcul des nombres de secteurs selon x // i_pasx = taille secteur en x @@ -1767,11 +1767,11 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code, { fFcout_f << "sector size = " << fSectChanSizeX << " , number of sectors = " << n_sctx << " x " << n_scty - << endl; + << std::endl; } #endif // NBSC - fFcout_f << endl; + fFcout_f << std::endl; //............... impression matrice par secteurs i_pas x i_pas //........................... boucles pour display des secteurs @@ -1808,7 +1808,7 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code, {fFcout_f.width(6);} fFcout_f << iy_c << " "; } - fFcout_f << endl << endl; + fFcout_f << std::endl << std::endl; for (Int_t ix_c = ix_inf ; ix_c < ix_sup ; ix_c++) { @@ -1843,9 +1843,9 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code, fFcout_f << fjustap_2d_ss[ix_c][iy_c] << " "; } } - fFcout_f << endl; + fFcout_f << std::endl; } - fFcout_f << endl; + fFcout_f << std::endl; } } @@ -1855,9 +1855,9 @@ void TEcnaWrite::fT2dWriteAscii(const Int_t& i_code, if(fFlagPrint != fCodePrintNoComment) { - cout << "*TEcnaWrite::fT2dWriteAscii(....)> INFO: " - << "matrix has been written in file: " << endl - << " " << fAsciiFileName.Data() << endl; + std::cout << "*TEcnaWrite::fT2dWriteAscii(....)> INFO: " + << "matrix has been written in file: " << std::endl + << " " << fAsciiFileName.Data() << std::endl; } }// end of TEcnaWrite::fT2dWriteAscii diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaCalculationsExample.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaCalculationsExample.cc index efb05b76428ab..cc2086c6287a5 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaCalculationsExample.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaCalculationsExample.cc @@ -32,11 +32,11 @@ int main ( int argc, char **argv ) TEcnaObject* myTEcnaManager = new TEcnaObject(); - cout << "!EcnaCalculationsExample> CONTROLE 1" << endl; + std::cout << "!EcnaCalculationsExample> CONTROLE 1" << std::endl; TEcnaRun* MyRunEB = new TEcnaRun(myTEcnaManager, "EB", fKeyNbOfSamples); xCnew++; - cout << "!EcnaCalculationsExample> CONTROLE 2" << endl; + std::cout << "!EcnaCalculationsExample> CONTROLE 2" << std::endl; //.............. Declarations and default values @@ -75,36 +75,36 @@ int main ( int argc, char **argv ) if( ok_root_file == kTRUE ) { - cout << "*EcnaCalculationsExample> Write ROOT file OK" << endl; + std::cout << "*EcnaCalculationsExample> Write ROOT file OK" << std::endl; } else { - cout << "!EcnaCalculationsExample> Writing ROOT file failure." - << fTTBELL << endl; + std::cout << "!EcnaCalculationsExample> Writing ROOT file failure." + << fTTBELL << std::endl; } } else { - cout << "!EcnaCalculationsExample> ROOT file not found." - << fTTBELL << endl; + std::cout << "!EcnaCalculationsExample> ROOT file not found." + << fTTBELL << std::endl; } //....................................................................... delete MyRunEB; xCdelete++; - cout << "*H4Cna(main)> End of the example." << endl; + std::cout << "*H4Cna(main)> End of the example." << std::endl; if ( xCnew != xCdelete ) { - cout << "!H4Cna(main)> WRONG MANAGEMENT OF ALLOCATIONS: xCnew = " - << xCnew << ", xCdelete = " << xCdelete << '\007' << endl; + std::cout << "!H4Cna(main)> WRONG MANAGEMENT OF ALLOCATIONS: xCnew = " + << xCnew << ", xCdelete = " << xCdelete << '\007' << std::endl; } else { - // cout << "*H4Cna(main)> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: xCnew = " - // << xCnew << ", xCdelete = " << xCdelete << endl; + // std::cout << "*H4Cna(main)> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: xCnew = " + // << xCnew << ", xCdelete = " << xCdelete << std::endl; } - cout << "*EcnaCalculationsExample> Exiting main program." << endl; + std::cout << "*EcnaCalculationsExample> Exiting main program." << std::endl; exit(0); } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEB.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEB.cc index ff06c35f931c4..5f030144c8123 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEB.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEB.cc @@ -34,20 +34,20 @@ int main(int argc, char **argv) TEcnaParPaths* pCnaParPaths = new TEcnaParPaths(MyEcnaObjectManager); if( pCnaParPaths->GetPaths() == kTRUE ) { - cout << "*EcnaGuiEB> Starting ROOT session" << endl; + std::cout << "*EcnaGuiEB> Starting ROOT session" << std::endl; TRint theApp("App", &argc, argv); - cout << "*EcnaGuiEB> Starting ECNA session" << endl; + std::cout << "*EcnaGuiEB> Starting ECNA session" << std::endl; TEcnaGui* mainWin = new TEcnaGui(MyEcnaObjectManager, "EB", gClient->GetRoot(), 395, 710); mainWin->DialogBox(); Bool_t retVal = kTRUE; theApp.Run(retVal); - cout << "*EcnaGuiEB> End of ECNA session." << endl; + std::cout << "*EcnaGuiEB> End of ECNA session." << std::endl; delete mainWin; - cout << "*EcnaGuiEB> End of ROOT session." << endl; + std::cout << "*EcnaGuiEB> End of ROOT session." << std::endl; theApp.Terminate(0); - cout << "*EcnaGuiEB> Exiting main program." << endl; + std::cout << "*EcnaGuiEB> Exiting main program." << std::endl; exit(0); } } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEE.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEE.cc index b3bd4bcfc927c..04a5c77b2ac70 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEE.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaGuiEE.cc @@ -34,20 +34,20 @@ int main(int argc, char **argv) TEcnaParPaths* pCnaParPaths = new TEcnaParPaths(MyEcnaObjectManager); if( pCnaParPaths->GetPaths() == kTRUE ) { - cout << "*EcnaGuiEE> Starting ROOT session" << endl; + std::cout << "*EcnaGuiEE> Starting ROOT session" << std::endl; TRint theApp("App", &argc, argv); - cout << "*EcnaGuiEE> Starting ECNA session" << endl; + std::cout << "*EcnaGuiEE> Starting ECNA session" << std::endl; TEcnaGui* mainWin = new TEcnaGui(MyEcnaObjectManager, "EE", gClient->GetRoot(), 395, 710); mainWin->DialogBox(); Bool_t retVal = kTRUE; theApp.Run(retVal); - cout << "*EcnaGuiEE> End of ECNA session." << endl; + std::cout << "*EcnaGuiEE> End of ECNA session." << std::endl; delete mainWin; - cout << "*EcnaGuiEE> End of ROOT session." << endl; + std::cout << "*EcnaGuiEE> End of ROOT session." << std::endl; theApp.Terminate(0); - cout << "*EcnaGuiEE> Exiting main program." << endl; + std::cout << "*EcnaGuiEE> Exiting main program." << std::endl; exit(0); } } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample1.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample1.cc index 404b976a659dc..07552762ea7d5 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample1.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample1.cc @@ -25,7 +25,7 @@ int main ( int argc, char **argv ) if( fEcnaParPathsEB->GetPaths() == kTRUE && fEcnaParPathsEE->GetPaths() == kTRUE ) { - cout << "*EcnaHistosExample> Starting ROOT session" << endl; + std::cout << "*EcnaHistosExample> Starting ROOT session" << std::endl; TRint theApp("App", &argc, argv); //-------------------------------------------------------------------- @@ -109,13 +109,13 @@ int main ( int argc, char **argv ) MyHistosEB->SetHistoMax(2.5); MyHistosEB->SetHistoScaleY("LOG"); //MyHistosEB->Plot1DHisto("LowFrequencyNoise", "NbOfXtals", "SM", "SAME"); - cout << "*EcnaHistosExample1> *** TEST OF WRONG CODE (BEGINNING)." - << " MESSAGE: < code not found > (and lists after) ARE THERE ON PURPOSE." << endl << endl; + std::cout << "*EcnaHistosExample1> *** TEST OF WRONG CODE (BEGINNING)." + << " MESSAGE: < code not found > (and lists after) ARE THERE ON PURPOSE." << std::endl << std::endl; MyHistosEB->Plot1DHisto("LowFrequencyNoise", "NbOfXtal", "SM", "SAME"); - cout << endl << + std::cout << std::endl << "*EcnaHistosExample1> *** TEST OF WRONG CODE (END)." - << " MESSAGE: < code not found > (and lists after) WERE THERE ON PURPOSE." << endl; + << " MESSAGE: < code not found > (and lists after) WERE THERE ON PURPOSE." << std::endl; //................................. fKeySuMoNumber = 4; @@ -273,14 +273,14 @@ int main ( int argc, char **argv ) #endif // SIGE //....................................................................... - cout << "*EcnaHistosExample1> End of the example. You can quit ROOT (.q)" << endl; + std::cout << "*EcnaHistosExample1> End of the example. You can quit ROOT (.q)" << std::endl; Bool_t retVal = kTRUE; theApp.Run(retVal); - cout << endl - << "*EcnaHistosExample> Terminating ROOT session." << endl; + std::cout << std::endl + << "*EcnaHistosExample> Terminating ROOT session." << std::endl; theApp.Terminate(0); - cout << "*EcnaHistosExample> Exiting main program." << endl; + std::cout << "*EcnaHistosExample> Exiting main program." << std::endl; exit(0); delete MyHistosEB; xCdelete++; @@ -288,13 +288,13 @@ int main ( int argc, char **argv ) if ( xCnew != xCdelete ) { - cout << "!EcnaHistosExample1> WRONG MANAGEMENT OF ALLOCATIONS: xCnew = " - << xCnew << ", xCdelete = " << xCdelete << '\007' << endl; + std::cout << "!EcnaHistosExample1> WRONG MANAGEMENT OF ALLOCATIONS: xCnew = " + << xCnew << ", xCdelete = " << xCdelete << '\007' << std::endl; } else { - // cout << "*EcnaHistosExample1> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: xCnew = " - // << xCnew << ", xCdelete = " << xCdelete << endl; + // std::cout << "*EcnaHistosExample1> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: xCnew = " + // << xCnew << ", xCdelete = " << xCdelete << std::endl; } } } diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample2.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample2.cc index d79514a824fe4..d38dcc38ba503 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample2.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/test/EcnaHistosExample2.cc @@ -32,7 +32,7 @@ int main ( int argc, char **argv ) // Init //-------------------------------------------------------------------- - cout << "*EcalCorrelatedNoiseExampleHistos> Starting ROOT session" << endl; + std::cout << "*EcalCorrelatedNoiseExampleHistos> Starting ROOT session" << std::endl; TRint theApp("App", &argc, argv); TString fTTBELL = "\007"; @@ -116,8 +116,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } #endif // HGLO @@ -143,8 +143,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } #endif // HBAE @@ -168,8 +168,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } #endif // PMCC @@ -192,25 +192,25 @@ int main ( int argc, char **argv ) MyHistosEB->FileParameters(fMyRootFileEB); - cout << "EcnahistosExample2> *************** Plot1DHisto 1 crystal ONLYONE ******************" << endl; + std::cout << "EcnahistosExample2> *************** Plot1DHisto 1 crystal ONLYONE ******************" << std::endl; TowEcha = 12; read_histo_2 = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInTow()*fEcalParEB->MaxSampADC(), "SigmaOfSamples", SMtower); - cout << "*EcnaHistosExample2> channel " << setw(2) << TowEcha << ": "; + std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": "; for( Int_t i0_samp=0; i0_sampMaxSampADC(); i0_samp++ ) { read_histo_samps(i0_samp) = read_histo_2(TowEcha*fEcalParEB->MaxSampADC()+i0_samp); - cout << setprecision(4) << setw(8) << read_histo_samps(i0_samp) << ", " ; + std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", " ; } - cout << endl; + std::cout << std::endl; MyHistosEB->Plot1DHisto(read_histo_samps, "Sample", "SSp", SMtower, TowEcha); - cout << "EcnahistosExample2> ***************** Plot1DHisto 1 crystal ONLYONE ****************" << endl; + std::cout << "EcnahistosExample2> ***************** Plot1DHisto 1 crystal ONLYONE ****************" << std::endl; MyHistosEB->Plot1DHisto("Sample", "SSp", SMtower, TowEcha); - cout << "EcnahistosExample2> ******************** All Xtals Plot1DHisto **********************" << endl; + std::cout << "EcnahistosExample2> ******************** All Xtals Plot1DHisto **********************" << std::endl; SMtower = 59; read_histo_2 = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInTow()*fEcalParEB->MaxSampADC(), "SampleMean", SMtower); @@ -219,48 +219,48 @@ int main ( int argc, char **argv ) MyHistosEB->SetHistoMin(180.); MyHistosEB->SetHistoMax(220.); MyHistosEB->Plot1DHisto(read_histo_2, "Sample#", "SampleMean", SMtower); - cout << "EcnahistosExample2> ****************** Plot1DHisto 1 crystal SAME *******************" << endl; + std::cout << "EcnahistosExample2> ****************** Plot1DHisto 1 crystal SAME *******************" << std::endl; TowEcha = 13; - cout << "*EcnaHistosExample2> channel " << setw(2) << TowEcha << ": "; + std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": "; for( Int_t i0_samp=0; i0_sampMaxSampADC(); i0_samp++ ) { read_histo_samps(i0_samp) = read_histo_2(TowEcha*fEcalParEB->MaxSampADC()+i0_samp); - cout << setprecision(4) << setw(8) << read_histo_samps(i0_samp) << ", " ; + std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", " ; } - cout << endl; + std::cout << std::endl; MyHistosEB->SetHistoMin(180.); MyHistosEB->SetHistoMax(220.); MyHistosEB->Plot1DHisto(read_histo_samps, "Sample", "SampleMean", SMtower, TowEcha, "SAME"); TowEcha = 14; - cout << "*EcnaHistosExample2> channel " << setw(2) << TowEcha << ": "; + std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": "; for( Int_t i0_samp=0; i0_sampMaxSampADC(); i0_samp++ ) { read_histo_samps(i0_samp) = read_histo_2(TowEcha*fEcalParEB->MaxSampADC()+i0_samp); - cout << setprecision(4) << setw(8) << read_histo_samps(i0_samp) << ", " ; + std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", " ; } - cout << endl; + std::cout << std::endl; MyHistosEB->Plot1DHisto(read_histo_samps, "SampleNumber", "SampleMean", SMtower, TowEcha, "SAME"); TowEcha = 15; - cout << "*EcnaHistosExample2> channel " << setw(2) << TowEcha << ": "; + std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": "; for( Int_t i0_samp=0; i0_sampMaxSampADC(); i0_samp++ ) { read_histo_samps(i0_samp) = read_histo_2(TowEcha*fEcalParEB->MaxSampADC()+i0_samp); - cout << setprecision(4) << setw(8) << read_histo_samps(i0_samp) << ", " ; + std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", " ; } - cout << endl; + std::cout << std::endl; MyHistosEB->Plot1DHisto(read_histo_samps, "Sample#", "SampleMean", SMtower, TowEcha, "SAME"); - cout << "EcnahistosExample2> ******************** Plot1DHisto 1 crystal ONLYONE **************" << endl; + std::cout << "EcnahistosExample2> ******************** Plot1DHisto 1 crystal ONLYONE **************" << std::endl; MyHistosEB->SetHistoMin(180.); MyHistosEB->SetHistoMax(220.); MyHistosEB->Plot1DHisto(read_histo_samps, "Sample", "SampMean", SMtower, TowEcha); } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } #endif // NODR @@ -294,8 +294,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } @@ -335,8 +335,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } @@ -382,8 +382,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } @@ -444,8 +444,8 @@ int main ( int argc, char **argv ) } else { - cout << "!EcnaHistosExample2> *ERROR* =====> " - << " ROOT file not found" << fTTBELL << endl; + std::cout << "!EcnaHistosExample2> *ERROR* =====> " + << " ROOT file not found" << fTTBELL << std::endl; } } @@ -477,14 +477,14 @@ int main ( int argc, char **argv ) // //===================================================================== - cout << "*H4Cna(main)> End of the example. You can quit ROOT (.q)" << endl; + std::cout << "*H4Cna(main)> End of the example. You can quit ROOT (.q)" << std::endl; Bool_t retVal = kTRUE; theApp.Run(retVal); - cout << endl - << "*EcalCorrelatedNoiseExampleHistos> Terminating ROOT session." << endl; + std::cout << std::endl + << "*EcalCorrelatedNoiseExampleHistos> Terminating ROOT session." << std::endl; theApp.Terminate(0); - cout << "*EcalCorrelatedNoiseExampleHistos> Exiting main program." << endl; + std::cout << "*EcalCorrelatedNoiseExampleHistos> Exiting main program." << std::endl; exit(0); delete MyHistosEB; // always after exit(0) (because of TEcnaHistos::DoCanvasClosed()) diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h index 5f6739662f3a0..dd76e37985941 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h @@ -154,11 +154,11 @@ class EcnaAnalyzer : public edm::EDAnalyzer { unsigned int verbosity_; Int_t nChannels_; Int_t iEvent_; // should be removed when we can access class EventID - string eventHeaderProducer_; - string digiProducer_; - string eventHeaderCollection_; - string EBdigiCollection_; - string EEdigiCollection_; + std::string eventHeaderProducer_; + std::string digiProducer_; + std::string eventHeaderCollection_; + std::string EBdigiCollection_; + std::string EEdigiCollection_; TString sAnalysisName_; TString sNbOfSamples_; @@ -181,7 +181,7 @@ class EcnaAnalyzer : public edm::EDAnalyzer { TString fCfgAnalyzerParametersFilePath; // absolute path for the analyzer parameters files (/afs/etc...) TString fCfgAnalyzerParametersFileName; // name of the analyzer parameters file - ifstream fFcin_f; + std::ifstream fFcin_f; TString fAnalysisName; Int_t fChozenGainNumber; // determined from fAnalysisName diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/src/EcnaAnalyzer.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/src/EcnaAnalyzer.cc index 0b95d9ddf6d40..4087f5e9c6961 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/src/EcnaAnalyzer.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/src/EcnaAnalyzer.cc @@ -56,30 +56,30 @@ EcnaAnalyzer::EcnaAnalyzer(const edm::ParameterSet& pSet) : TEcnaParPaths* myPathEB = new TEcnaParPaths(fMyEcnaEBObjectManager); TEcnaParPaths* myPathEE = new TEcnaParPaths(fMyEcnaEEObjectManager); - std::cout << "*EcnaAnalyzer-constructor> Check path for resultsq Root files." << endl; + std::cout << "*EcnaAnalyzer-constructor> Check path for resultsq Root files." << std::endl; if( myPathEB->GetPathForResultsRootFiles() == kFALSE ) { - std::cout << "*EcnaAnalyzer-constructor> *** ERROR *** Path for result files not found." << endl; + std::cout << "*EcnaAnalyzer-constructor> *** ERROR *** Path for result files not found." << std::endl; kill(getpid(),SIGUSR2); } else { - std::cout << "*EcnaAnalyzer-constructor> Path for result files found = " << myPathEB->ResultsRootFilePath() << endl; + std::cout << "*EcnaAnalyzer-constructor> Path for result files found = " << myPathEB->ResultsRootFilePath() << std::endl; } if( myPathEE->GetPathForResultsRootFiles() == kFALSE ) { - std::cout << "*EcnaAnalyzer-constructor> *** ERROR *** Path for result files not found." << endl; + std::cout << "*EcnaAnalyzer-constructor> *** ERROR *** Path for result files not found." << std::endl; kill(getpid(),SIGUSR2); } else { - std::cout << "*EcnaAnalyzer-constructor> Path for result files found = " << myPathEE->ResultsRootFilePath() << endl; + std::cout << "*EcnaAnalyzer-constructor> Path for result files found = " << myPathEE->ResultsRootFilePath() << std::endl; } - std::cout << "*EcnaAnalyzer-constructor> Parameter initialization." << endl; + std::cout << "*EcnaAnalyzer-constructor> Parameter initialization." << std::endl; fgMaxCar = (Int_t)512; fTTBELL = '\007'; @@ -400,17 +400,17 @@ EcnaAnalyzer::EcnaAnalyzer(const edm::ParameterSet& pSet) : fFedId = -1; fFedTcc = -1; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fAnalysisName = " << fAnalysisName << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fNbOfSamples = " << fNbOfSamples << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fFirstReqEvent = " << fFirstReqEvent << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fLastReqEvent = " << fLastReqEvent << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fReqNbOfEvts = " << fReqNbOfEvts << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fStexName = " << fStexName << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fStexNumber = " << fStexNumber << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fChozenRunTypeNumber = " << fChozenRunTypeNumber << endl; - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fChozenGainNumber = " << fChozenGainNumber << endl << endl; - - std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> Init done. " << endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fAnalysisName = " << fAnalysisName << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fNbOfSamples = " << fNbOfSamples << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fFirstReqEvent = " << fFirstReqEvent << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fLastReqEvent = " << fLastReqEvent << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fReqNbOfEvts = " << fReqNbOfEvts << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fStexName = " << fStexName << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fStexNumber = " << fStexNumber << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fChozenRunTypeNumber = " << fChozenRunTypeNumber << std::endl; + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> fChozenGainNumber = " << fChozenGainNumber << std::endl << std::endl; + + std::cout << "*EcnaAnalyzer::EcnaAnalyzer-constructor> Init done. " << std::endl; } // end of constructor @@ -421,14 +421,14 @@ EcnaAnalyzer::~EcnaAnalyzer() using namespace std; //..................................... format numerical values - cout << setiosflags(ios::showpoint | ios::uppercase); - cout << setprecision(3) << setw(6); - cout.setf(ios::dec, ios::basefield); - cout.setf(ios::fixed, ios::floatfield); - cout.setf(ios::left, ios::adjustfield); - cout.setf(ios::right, ios::adjustfield); + std::cout << std::setiosflags(std::ios::showpoint | std::ios::uppercase); + std::cout << std::setprecision(3) << std::setw(6); + cout.setf(std::ios::dec, std::ios::basefield); + cout.setf(std::ios::fixed, std::ios::floatfield); + cout.setf(std::ios::left, std::ios::adjustfield); + cout.setf(std::ios::right, std::ios::adjustfield); - std::cout << "EcnaAnalyzer::~EcnaAnalyzer()> destructor is going to be executed." << endl; + std::cout << "EcnaAnalyzer::~EcnaAnalyzer()> destructor is going to be executed." << std::endl; if( fOutcomeError == kTRUE )return; @@ -437,13 +437,13 @@ EcnaAnalyzer::~EcnaAnalyzer() //....................................................... EB (SM) if( fMyCnaEBSM == 0 && fStexName == "SM" ) { - std::cout << endl << "!EcnaAnalyzer-destructor> **** ERROR **** fMyCnaEBSM = " << fMyCnaEBSM - << ". !===> ECNA HAS NOT BEEN INITIALIZED." << endl + std::cout << std::endl << "!EcnaAnalyzer-destructor> **** ERROR **** fMyCnaEBSM = " << fMyCnaEBSM + << ". !===> ECNA HAS NOT BEEN INITIALIZED." << std::endl << " Last event run type = " << runtype(fRunTypeNumber) << ", fRunTypeNumber = " << fRunTypeNumber << ", last event Mgpa gain = " << gainvalue(fMgpaGainNumber) << ", fMgpaGainNumber = " << fMgpaGainNumber - << ", last event fFedId(+601) = " << fFedId+601 << endl << endl; + << ", last event fFedId(+601) = " << fFedId+601 << std::endl << std::endl; } else { @@ -463,13 +463,13 @@ EcnaAnalyzer::~EcnaAnalyzer() if( fMyCnaEBSM[iSM]->WriteRootFile() == kFALSE ) { std::cout << "!EcnaAnalyzer-destructor> PROBLEM with write ROOT file for SM" << iSM+1 - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { std::cout << "*EcnaAnalyzer-destructor> Calculations and writing on file already done for SM " - << iSM+1 << endl; + << iSM+1 << std::endl; } } delete fMyCnaEBSM; @@ -478,13 +478,13 @@ EcnaAnalyzer::~EcnaAnalyzer() if( fMyCnaEEDee == 0 && fStexName == "Dee" ) { - std::cout << endl << "!EcnaAnalyzer-destructor> **** ERROR **** fMyCnaEEDee = " << fMyCnaEEDee - << ". !===> ECNA HAS NOT BEEN INITIALIZED." << endl + std::cout << std::endl << "!EcnaAnalyzer-destructor> **** ERROR **** fMyCnaEEDee = " << fMyCnaEEDee + << ". !===> ECNA HAS NOT BEEN INITIALIZED." << std::endl << " Last event run type = " << runtype(fRunTypeNumber) << ", fRunTypeNumber = " << fRunTypeNumber << ", last event Mgpa gain = " << gainvalue(fMgpaGainNumber) << ", fMgpaGainNumber = " << fMgpaGainNumber - << ", last event fFedId(+601) = " << fFedId+601 << endl << endl; + << ", last event fFedId(+601) = " << fFedId+601 << std::endl << std::endl; } else { @@ -504,13 +504,13 @@ EcnaAnalyzer::~EcnaAnalyzer() if(fMyCnaEEDee[iDee]->WriteRootFile() == kFALSE ) { std::cout << "!EcnaAnalyzer-destructor> PROBLEM with write ROOT file for Dee" << iDee+1 - << fTTBELL << endl; + << fTTBELL << std::endl; } } else { std::cout << "*EcnaAnalyzer-destructor> Calculations and writing on file already done for Dee " - << iDee+1 << endl; + << iDee+1 << std::endl; } } delete fMyCnaEEDee; @@ -520,7 +520,7 @@ EcnaAnalyzer::~EcnaAnalyzer() //----------------------------------------------------------------------------------- std::cout << "*EcnaAnalyzer-destructor> Status of events returned by GetSampleAdcValues(): " - << endl; + << std::endl; for(Int_t i0Stex=fStexIndexBegin; i0Stex 0 ) {std::cout << " <=== SHOULD BE EQUAL TO ZERO ! " << fTTBELL;} - std::cout << endl; + std::cout << std::endl; } - std::cout << endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << endl; + std::cout << std::endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl; - std::cout << "*EcnaAnalyzer-destructor> Run types seen in event headers before selection:" << endl; + std::cout << "*EcnaAnalyzer-destructor> Run types seen in event headers before selection:" << std::endl; for(Int_t i=0; i " << setw(10) << fRunTypeCounter[i] - << " event header(s) with run type " << runtype(i) << endl; + std::cout << " => " << std::setw(10) << fRunTypeCounter[i] + << " event header(s) with run type " << runtype(i) << std::endl; } - std::cout << endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << endl; + std::cout << std::endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl; - std::cout << "*EcnaAnalyzer-destructor> Mgpa gains seen in event headers before selection:" << endl; + std::cout << "*EcnaAnalyzer-destructor> Mgpa gains seen in event headers before selection:" << std::endl; for(Int_t i=0; i " << setw(10) << fMgpaGainCounter[i] - << " event header(s) with gain " << gainvalue(i) << endl; + std::cout << " => " << std::setw(10) << fMgpaGainCounter[i] + << " event header(s) with gain " << gainvalue(i) << std::endl; } - std::cout << endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << endl; + std::cout << std::endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl; - std::cout << "*EcnaAnalyzer-destructor> Numbers of selected events for each FED:" << endl; + std::cout << "*EcnaAnalyzer-destructor> Numbers of selected events for each FED:" << std::endl; for(Int_t i=0; i FedId " << i+601 << ": " - << setw(10) << fFedIdCounter[i] << " events" << endl; + << std::setw(10) << fFedIdCounter[i] << " events" << std::endl; } - std::cout << endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << endl; + std::cout << std::endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl; if( fStexNumber == 0 ) { - // std::cout << "*EcnaAnalyzer-destructor> fDateFirst = " << fDateFirst[0] << endl - // << " fDateLast = " << fDateLast[fMaxTreatedStexCounter-1] << endl << endl; + // std::cout << "*EcnaAnalyzer-destructor> fDateFirst = " << fDateFirst[0] << std::endl + // << " fDateLast = " << fDateLast[fMaxTreatedStexCounter-1] << std::endl << std::endl; } if( fStexNumber > 0 ) { - std::cout << "*EcnaAnalyzer-destructor> fDateFirst = " << fDateFirst[fStexNumber-1] << endl - << " fDateLast = " << fDateLast[fStexNumber-1] << endl << endl; + std::cout << "*EcnaAnalyzer-destructor> fDateFirst = " << fDateFirst[fStexNumber-1] << std::endl + << " fDateLast = " << fDateLast[fStexNumber-1] << std::endl << std::endl; } - std::cout << endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << endl; + std::cout << std::endl<< "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl; Int_t n0 =0; CheckMsg(n0); @@ -584,7 +584,7 @@ EcnaAnalyzer::~EcnaAnalyzer() delete fMyEBEcal; delete fMyEEEcal; - std::cout << "*EcnaAnalyzer-destructor> End of execution." << endl; + std::cout << "*EcnaAnalyzer-destructor> End of execution." << std::endl; } // end of destructor @@ -598,12 +598,12 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet { using namespace std; //..................................... format numerical values - cout << setiosflags(ios::showpoint | ios::uppercase); - cout << setprecision(3) << setw(6); - cout.setf(ios::dec, ios::basefield); - cout.setf(ios::fixed, ios::floatfield); - cout.setf(ios::left, ios::adjustfield); - cout.setf(ios::right, ios::adjustfield); + std::cout << std::setiosflags(std::ios::showpoint | std::ios::uppercase); + std::cout << std::setprecision(3) << std::setw(6); + cout.setf(std::ios::dec, std::ios::basefield); + cout.setf(std::ios::fixed, std::ios::floatfield); + cout.setf(std::ios::left, std::ios::adjustfield); + cout.setf(std::ios::right, std::ios::adjustfield); using namespace edm; @@ -781,15 +781,15 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet fFirstReqEvent, fLastReqEvent, fReqNbOfEvts, i0SM+1, fRunTypeNumber); - std::cout << "*EcnaAnalyzer::analyze(...)> ********* INIT ECNA EB ********* " << endl - << " fAnalysisName = " << fAnalysisName << endl - << " fRunNumber = " << fRunNumber << endl - << " fFirstReqEvent = " << fFirstReqEvent << endl - << " fLastReqEvent = " << fLastReqEvent << endl - << " fReqNbOfEvts = " << fReqNbOfEvts << endl - << " SM = " << i0SM+1 << endl + std::cout << "*EcnaAnalyzer::analyze(...)> ********* INIT ECNA EB ********* " << std::endl + << " fAnalysisName = " << fAnalysisName << std::endl + << " fRunNumber = " << fRunNumber << std::endl + << " fFirstReqEvent = " << fFirstReqEvent << std::endl + << " fLastReqEvent = " << fLastReqEvent << std::endl + << " fReqNbOfEvts = " << fReqNbOfEvts << std::endl + << " SM = " << i0SM+1 << std::endl << " run type = " << runtype(fRunTypeNumber) - << endl; + << std::endl; //============================================================================ } @@ -816,10 +816,10 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet fTimeLast[i0SM] = i_current_ev_time; fDateLast[i0SM] = astime; std::cout << "*----> beginning of analysis for " << fStexName << i0SM+1 - << ". First analyzed event date : " << astime << endl; - // << " t_current_ev_time = " << t_current_ev_time << endl - // << " i_current_ev_time = " << i_current_ev_time << endl - // << " p_current_ev_time = " << p_current_ev_time << endl + << ". First analyzed event date : " << astime << std::endl; + // << " t_current_ev_time = " << t_current_ev_time << std::endl + // << " i_current_ev_time = " << i_current_ev_time << std::endl + // << " p_current_ev_time = " << p_current_ev_time << std::endl } if( i_current_ev_time < fTimeFirst[i0SM] ) @@ -871,7 +871,7 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet else { std::cout << "EcnaAnalyzer::analyze(...)> NbOfSamplesFromDigis out of bounds = " - << NbOfSamplesFromDigis << endl; + << NbOfSamplesFromDigis << std::endl; } } // end of if( (fStexNumber > 0 && i0SM == fStexNumber-1) || (fStexNumber == 0) ) } // end of if( fStexNbOfTreatedEvents[i0SM] >= 1 && fStexNbOfTreatedEvents[i0SM] <= fReqNbOfEvts ) @@ -956,15 +956,15 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet fFirstReqEvent, fLastReqEvent, fReqNbOfEvts, i0Dee+1, fRunTypeNumber); - std::cout << "*EcnaAnalyzer::analyze(...)> ********* INIT ECNA EE ********* " << endl - << " fAnalysisName = " << fAnalysisName << endl - << " fRunNumber = " << fRunNumber << endl - << " fFirstReqEvent = " << fFirstReqEvent << endl - << " fLastReqEvent = " << fLastReqEvent << endl - << " fReqNbOfEvts = " << fReqNbOfEvts << endl - << " Dee = " << i0Dee+1 << endl + std::cout << "*EcnaAnalyzer::analyze(...)> ********* INIT ECNA EE ********* " << std::endl + << " fAnalysisName = " << fAnalysisName << std::endl + << " fRunNumber = " << fRunNumber << std::endl + << " fFirstReqEvent = " << fFirstReqEvent << std::endl + << " fLastReqEvent = " << fLastReqEvent << std::endl + << " fReqNbOfEvts = " << fReqNbOfEvts << std::endl + << " Dee = " << i0Dee+1 << std::endl << " run type = " << runtype(fRunTypeNumber) - << endl; + << std::endl; //============================================================================ } @@ -1053,13 +1053,13 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet fDateFirst[i0Dee] = astime; fTimeLast[i0Dee] = i_current_ev_time; fDateLast[i0Dee] = astime; - std::cout << "----- beginning of analysis for " << fStexName << i0Dee+1 << "-------" << endl - //<< " t_current_ev_time = " << t_current_ev_time << endl - //<< " i_current_ev_time = " << i_current_ev_time << endl - //<< " p_current_ev_time = " << p_current_ev_time << endl - << " First event date = " << astime << endl - << " Nb of selected evts = " << fNbOfSelectedEvents << endl - << "---------------------------------------------------------------" << endl; + std::cout << "----- beginning of analysis for " << fStexName << i0Dee+1 << "-------" << std::endl + //<< " t_current_ev_time = " << t_current_ev_time << std::endl + //<< " i_current_ev_time = " << i_current_ev_time << std::endl + //<< " p_current_ev_time = " << p_current_ev_time << std::endl + << " First event date = " << astime << std::endl + << " Nb of selected evts = " << fNbOfSelectedEvents << std::endl + << "---------------------------------------------------------------" << std::endl; fMemoDateFirstEvent[i0Dee]++; } @@ -1108,7 +1108,7 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet else { std::cout << "EcnaAnalyzer::analyze(...)> NbOfSamplesFromDigis out of bounds = " - << NbOfSamplesFromDigis << endl; + << NbOfSamplesFromDigis << std::endl; } } // end of if( (fStexNumber > 0 && i0Dee == fStexNumber-1) || (fStexNumber == 0) ) } // end of if( fFedNbOfTreatedEvents[fESFromFedTcc[fFedTcc-1]-1] >= 1 && @@ -1240,16 +1240,16 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet //if( i_current_ev_time > fTimeLast[i0Stex] ) // {fTimeLast[i0Stex] = i_current_ev_time; fDateLast[i0Stex] = astime;} - std::cout << "---------- End of analysis for " << fStexName << i0Stex+1 << " -----------" << endl; + std::cout << "---------- End of analysis for " << fStexName << i0Stex+1 << " -----------" << std::endl; Int_t n3 = 3; CheckMsg(n3, i0Stex); - // std::cout << " t_current_ev_time = " << t_current_ev_time << endl - //<< " i_current_ev_time = " << i_current_ev_time << endl - //<< " p_current_ev_time = " << p_current_ev_time << endl - // std::cout << " Last analyzed event date = " << astime << endl; - std::cout << " Number of selected events = " << fNbOfSelectedEvents << endl; - std::cout << endl << fNbOfTreatedStexs << " " << fStexName - << "'s with " << fReqNbOfEvts << " events analyzed." << endl - << "---------------------------------------------------------" << endl; + // std::cout << " t_current_ev_time = " << t_current_ev_time << std::endl + //<< " i_current_ev_time = " << i_current_ev_time << std::endl + //<< " p_current_ev_time = " << p_current_ev_time << std::endl + // std::cout << " Last analyzed event date = " << astime << std::endl; + std::cout << " Number of selected events = " << fNbOfSelectedEvents << std::endl; + std::cout << std::endl << fNbOfTreatedStexs << " " << fStexName + << "'s with " << fReqNbOfEvts << " events analyzed." << std::endl + << "---------------------------------------------------------" << std::endl; //================================= WRITE RESULTS FILE if( fStexName == "SM" ) @@ -1268,12 +1268,12 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet if( fMyCnaEBSM[i0Stex]->WriteRootFile() == kFALSE ) { std::cout << "!EcnaAnalyzer::analyze> PROBLEM with write ROOT file for SM" << i0Stex+1 - << fTTBELL << endl; + << fTTBELL << std::endl; } } // set pointer to zero in order to avoid recalculation and rewriting at the destructor level delete fMyCnaEBSM[i0Stex]; fMyCnaEBSM[i0Stex] = 0; - std::cout << "!EcnaAnalyzer::analyze> Set memory free: delete done for SM " << i0Stex+1 << endl; + std::cout << "!EcnaAnalyzer::analyze> Set memory free: delete done for SM " << i0Stex+1 << std::endl; } if( fStexName == "Dee" ) @@ -1292,16 +1292,16 @@ void EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet if(fMyCnaEEDee[i0Stex]->WriteRootFile() == kFALSE ) { std::cout << "!EcnaAnalyzer::analyze> PROBLEM with write ROOT file for Dee" << i0Stex+1 - << fTTBELL << endl; + << fTTBELL << std::endl; } } // set pointer to zero in order to avoid recalculation and rewriting at the destructor level delete fMyCnaEEDee[i0Stex]; fMyCnaEEDee[i0Stex] = 0; - std::cout << "!EcnaAnalyzer::analyze> Set memory free: delete done for Dee " << i0Stex+1 << endl; + std::cout << "!EcnaAnalyzer::analyze> Set memory free: delete done for Dee " << i0Stex+1 << std::endl; } fStexStatus[i0Stex] = 2; // set fStexStatus[i0Stex] to 2 definitively - std::cout << "*---------------------------------------------------------------------------- " << endl; + std::cout << "*---------------------------------------------------------------------------- " << std::endl; } // end of if( fStexStatus[i0Stex] == 1 ) } // end of for(Int_t i0Stex=fStexIndexBegin; i0Stex= fFirstReqEvent && fCurrentEventNumber <= fLastReqEvent) ) ) { - std::cout << endl - << "**************************** ANALYSIS REPORT > OK **************************************" << endl - << "*EcnaAnalyzer::AnalysisOutcome(...)> The maximum requested number of events and the maximum" << endl + std::cout << std::endl + << "**************************** ANALYSIS REPORT > OK **************************************" << std::endl + << "*EcnaAnalyzer::AnalysisOutcome(...)> The maximum requested number of events and the maximum" << std::endl << " number of treated " << fStexName - << "'s have been reached." << endl - << " Analysis successfully ended from EcnaAnalyzer " << endl - << " by SIGNAL: kill(getpid(),SIGUSR2)." << endl - << " Number of selected events = " << fNbOfSelectedEvents << endl - << " Last requested event number = " << fLastReqEvent << endl - << " Current event number = " << fCurrentEventNumber << endl; + << "'s have been reached." << std::endl + << " Analysis successfully ended from EcnaAnalyzer " << std::endl + << " by SIGNAL: kill(getpid(),SIGUSR2)." << std::endl + << " Number of selected events = " << fNbOfSelectedEvents << std::endl + << " Last requested event number = " << fLastReqEvent << std::endl + << " Current event number = " << fCurrentEventNumber << std::endl; Int_t n0 = 0; CheckMsg(n0); - std::cout << "****************************************************************************************" << endl - << endl; + std::cout << "****************************************************************************************" << std::endl + << std::endl; result = kTRUE; kill(getpid(),SIGUSR2); @@ -1350,19 +1350,19 @@ Bool_t EcnaAnalyzer::AnalysisOutcome(const TString& s_opt) ! ( (fStexNumber > 0 && fNbOfTreatedStexs == 1) || (fStexNumber == 0 && fNbOfTreatedStexs == MaxNbOfStex) ) ) { - std::cout << endl - << "**************************** ANALYSIS REPORT >>> *** WARNING *** WARNING *** WARNING ***" << endl - << "*EcnaAnalyzer::AnalysisOutcome(...)> Last event reached before completion of analysis." << endl - << " Analysis ended from EcnaAnalyzer " << endl - << " by SIGNAL: kill(getpid(),SIGUSR2)." << endl - << " Number of selected events = " << fNbOfSelectedEvents << endl - << " Last requested event number = " << fLastReqEvent << endl - << " Current event number = " << fCurrentEventNumber << endl; + std::cout << std::endl + << "**************************** ANALYSIS REPORT >>> *** WARNING *** WARNING *** WARNING ***" << std::endl + << "*EcnaAnalyzer::AnalysisOutcome(...)> Last event reached before completion of analysis." << std::endl + << " Analysis ended from EcnaAnalyzer " << std::endl + << " by SIGNAL: kill(getpid(),SIGUSR2)." << std::endl + << " Number of selected events = " << fNbOfSelectedEvents << std::endl + << " Last requested event number = " << fLastReqEvent << std::endl + << " Current event number = " << fCurrentEventNumber << std::endl; Int_t n0 = 0; CheckMsg(n0); - std::cout << "****************************************************************************************" << endl - << endl; + std::cout << "****************************************************************************************" << std::endl + << std::endl; result = kTRUE; kill(getpid(),SIGUSR2); @@ -1372,31 +1372,31 @@ Bool_t EcnaAnalyzer::AnalysisOutcome(const TString& s_opt) { if( s_opt == "ERR_FNEG" ) { - std::cout << endl - << "**************************** ANALYSIS REPORT >>> **** ERROR **** ERROR **** ERROR ******" << endl + std::cout << std::endl + << "**************************** ANALYSIS REPORT >>> **** ERROR **** ERROR **** ERROR ******" << std::endl << "*EcnaAnalyzer::AnalysisOutcome(...)> First event number = " << fFirstReqEvent - << ". Should be strictly potitive." << endl - << " Analysis ended from EcnaAnalyzer " << endl - << " by SIGNAL: kill(getpid(),SIGUSR2)." << endl; + << ". Should be strictly potitive." << std::endl + << " Analysis ended from EcnaAnalyzer " << std::endl + << " by SIGNAL: kill(getpid(),SIGUSR2)." << std::endl; - std::cout << "****************************************************************************************" << endl - << endl; + std::cout << "****************************************************************************************" << std::endl + << std::endl; result = kTRUE; kill(getpid(),SIGUSR2); } if( s_opt == "ERR_LREQ" ) { - std::cout << endl - << "**************************** ANALYSIS REPORT >>> **** ERROR **** ERROR **** ERROR ******" << endl - << "*EcnaAnalyzer::analyze(...)> Requested number of events = " << fReqNbOfEvts << "." << endl + std::cout << std::endl + << "**************************** ANALYSIS REPORT >>> **** ERROR **** ERROR **** ERROR ******" << std::endl + << "*EcnaAnalyzer::analyze(...)> Requested number of events = " << fReqNbOfEvts << "." << std::endl << " Too large compared to the event range: " - << fFirstReqEvent << " - " << fLastReqEvent << endl - << " Analysis ended from EcnaAnalyzer " << endl - << " by SIGNAL: kill(getpid(),SIGUSR2)." << endl; + << fFirstReqEvent << " - " << fLastReqEvent << std::endl + << " Analysis ended from EcnaAnalyzer " << std::endl + << " by SIGNAL: kill(getpid(),SIGUSR2)." << std::endl; - std::cout << "****************************************************************************************" << endl - << endl; + std::cout << "****************************************************************************************" << std::endl + << std::endl; result = kTRUE; kill(getpid(),SIGUSR2); @@ -1413,28 +1413,28 @@ void EcnaAnalyzer::CheckMsg(const Int_t& MsgNum, const Int_t& i0Stex) //------ Cross-check messages if( MsgNum == 1 ) - {std::cout << "---------------- CROSS-CHECK A ------------------ " << endl - << "**************** CURRENT EVENT ****************** " << endl;} + {std::cout << "---------------- CROSS-CHECK A ------------------ " << std::endl + << "**************** CURRENT EVENT ****************** " << std::endl;} if( MsgNum == 2 ) - {std::cout << "---------------- CROSS-CHECK B ------------------ " << endl - << "**** FIRST EVENT PASSING USER'S ANALYSIS CUT **** " << endl;} + {std::cout << "---------------- CROSS-CHECK B ------------------ " << std::endl + << "**** FIRST EVENT PASSING USER'S ANALYSIS CUT **** " << std::endl;} if( MsgNum == 3 ) - {std::cout << "---------------- CROSS-CHECK C ------------------ " << endl - << "*** CURRENT VALUES BEFORE RESULT FILE WRITING *** " << endl;} + {std::cout << "---------------- CROSS-CHECK C ------------------ " << std::endl + << "*** CURRENT VALUES BEFORE RESULT FILE WRITING *** " << std::endl;} if( MsgNum == 3 || MsgNum == 4 ) - {std::cout << " fRecNumber = " << fRecNumber << endl - << " fEvtNumber = " << fEvtNumber << endl;} + {std::cout << " fRecNumber = " << fRecNumber << std::endl + << " fEvtNumber = " << fEvtNumber << std::endl;} - std::cout << " fCurrentEventNumber = " << fCurrentEventNumber << endl - << " fNbOfSelectedEvents = " << fNbOfSelectedEvents << endl - << " fRunNumber = " << fRunNumber << endl - << " Chozen run type = " << runtype(fChozenRunTypeNumber) << endl - << " Run type = " << runtype(fRunTypeNumber) << endl - << " fFedTcc = " << fFedTcc << endl - << " fFedId(+601) = " << fFedId+601 << endl - << " fStexName = " << fStexName << endl - << " Chozen gain = " << gainvalue(fChozenGainNumber) << endl - << " Mgpa Gain = " << gainvalue(fMgpaGainNumber) << endl << endl; + std::cout << " fCurrentEventNumber = " << fCurrentEventNumber << std::endl + << " fNbOfSelectedEvents = " << fNbOfSelectedEvents << std::endl + << " fRunNumber = " << fRunNumber << std::endl + << " Chozen run type = " << runtype(fChozenRunTypeNumber) << std::endl + << " Run type = " << runtype(fRunTypeNumber) << std::endl + << " fFedTcc = " << fFedTcc << std::endl + << " fFedId(+601) = " << fFedId+601 << std::endl + << " fStexName = " << fStexName << std::endl + << " Chozen gain = " << gainvalue(fChozenGainNumber) << std::endl + << " Mgpa Gain = " << gainvalue(fMgpaGainNumber) << std::endl << std::endl; if( fAnalysisName == "AdcPeg12" || fAnalysisName == "AdcSPeg12" || fAnalysisName == "AdcPhys" || fAnalysisName == "AdcAny" ) @@ -1447,11 +1447,11 @@ void EcnaAnalyzer::CheckMsg(const Int_t& MsgNum, const Int_t& i0Stex) if( fStexStatus[j0Stex] == 1 ){nStexNbOfTreatedEvents = fStexNbOfTreatedEvents[j0Stex];} if( fStexStatus[j0Stex] == 2 ){nStexNbOfTreatedEvents = fStexNbOfTreatedEvents[j0Stex];} - std::cout << fStexName << setw(3) << j0Stex+1 << ": " - << setw(5) << nStexNbOfTreatedEvents << " events. " + std::cout << fStexName << std::setw(3) << j0Stex+1 << ": " + << std::setw(5) << nStexNbOfTreatedEvents << " events. " << fStexName << " status: " << fStexStatus[j0Stex]; if( j0Stex == i0Stex ){std::cout << " (going to write file for this " << fStexName << ").";} - std::cout << endl; + std::cout << std::endl; } } @@ -1463,31 +1463,31 @@ void EcnaAnalyzer::CheckMsg(const Int_t& MsgNum, const Int_t& i0Stex) if( fFedStatus[i0FedES] == 1 ){nFedNbOfTreatedEvents = fFedNbOfTreatedEvents[i0FedES];} if( fFedStatus[i0FedES] == 2 ){nFedNbOfTreatedEvents = fFedNbOfTreatedEvents[i0FedES];} - std::cout << "Fed (ES) " << setw(3) << i0FedES+1 << ": " - << setw(5) << nFedNbOfTreatedEvents << " events." + std::cout << "Fed (ES) " << std::setw(3) << i0FedES+1 << ": " + << std::setw(5) << nFedNbOfTreatedEvents << " events." << " Fed status: " << fFedStatus[i0FedES] - << ", order: " << setw(3) << fFedStatusOrder[i0FedES] - << " (" << fDeeNumberString[i0FedES] << ")" << endl; + << ", order: " << std::setw(3) << fFedStatusOrder[i0FedES] + << " (" << fDeeNumberString[i0FedES] << ")" << std::endl; } for(Int_t j0Stex=fStexIndexBegin; j0Stex( i->second.first, i->second.second ); + m_objects[n] = deserialize( i->second.first, i->second.second, m_isOra ); m_data.erase( n ); } else { throwException( "Payload for index "+boost::lexical_cast(n)+" has not been found.", @@ -60,6 +60,7 @@ namespace cond { // the key selection mutable std::map > m_data; mutable std::vector > m_objects; + bool m_isOra = false; }; diff --git a/CondCore/CondDB/interface/Session.h b/CondCore/CondDB/interface/Session.h index af0f845c85d35..4da43ef916083 100644 --- a/CondCore/CondDB/interface/Session.h +++ b/CondCore/CondDB/interface/Session.h @@ -140,10 +140,10 @@ namespace cond { // TO BE REMOVED in the long term. The new code will use coralSession(). coral::ISchema& nominalSchema(); - private: - cond::Hash storePayloadData( const std::string& payloadObjectType, const cond::Binary& payloadData, const boost::posix_time::ptime& creationTime ); bool isOraSession(); + private: + cond::Hash storePayloadData( const std::string& payloadObjectType, const cond::Binary& payloadData, const boost::posix_time::ptime& creationTime ); private: std::shared_ptr m_session; diff --git a/CondCore/CondDB/src/KeyList.cc b/CondCore/CondDB/src/KeyList.cc index 32f86dc8fe3c9..38bca1779fd3e 100644 --- a/CondCore/CondDB/src/KeyList.cc +++ b/CondCore/CondDB/src/KeyList.cc @@ -16,6 +16,7 @@ namespace cond { if( !simpl.get() ) cond::throwException("The KeyList has not been initialized.","KeyList::load"); Session s( simpl ); s.transaction().start( true ); + m_isOra = s.isOraSession(); m_data.clear(); m_objects.resize(keys.size()); for (size_t i=0; i + diff --git a/DPGAnalysis/SiStripTools/bin/BuildFile.xml b/DPGAnalysis/SiStripTools/bin/BuildFile.xml index 4f0250790037f..df8bf01af746f 100644 --- a/DPGAnalysis/SiStripTools/bin/BuildFile.xml +++ b/DPGAnalysis/SiStripTools/bin/BuildFile.xml @@ -1,8 +1,6 @@ + + - - - - diff --git a/DPGAnalysis/SiStripTools/bin/ClusMultPlots.cc b/DPGAnalysis/SiStripTools/bin/ClusMultPlots.cc new file mode 100644 index 0000000000000..096f3f8aa7b4b --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/ClusMultPlots.cc @@ -0,0 +1,441 @@ +#include "ClusMultPlots.h" +#include +#include +#include +#include +#include +#include "TPad.h" +#include "TFile.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TProfile.h" +#include "TGraph.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TCanvas.h" +#include "TStyle.h" + + +void ClusMultPlots(const char* fullname, const char* pxmod, const char* strpmod, const char* corrmod, + const char* pxlabel, const char* strplabel, const char* corrlabel, const char* postfix, const char* shortname, const char* outtrunk) { + + + char pxmodfull[300]; + sprintf(pxmodfull,"%s%s",pxmod,postfix); + char pxlabfull[300]; + sprintf(pxlabfull,"%s%s",pxlabel,postfix); + + char strpmodfull[300]; + sprintf(strpmodfull,"%s%s",strpmod,postfix); + char strplabfull[300]; + sprintf(strplabfull,"%s%s",strplabel,postfix); + + char corrmodfull[300]; + sprintf(corrmodfull,"%s%s",corrmod,postfix); + char corrlabfull[300]; + sprintf(corrlabfull,"%s%s",corrlabel,postfix); + + + // char fullname[300]; + // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename); + + + TFile ff(fullname); + + gStyle->SetOptStat(111111); + + + CommonAnalyzer capixel(&ff,"",pxmodfull,"EventProcs/Pixel"); + + TH1F* pixel = (TH1F*)capixel.getObject("nPixeldigi"); + if(pixel) { + pixel->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/pixel"; + plotfilename += pxlabfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete pixel; + gPad->SetLogy(0); + } + + capixel.setPath("VtxCorr/Pixel"); + + TH2F* pixelvtx = (TH2F*)capixel.getObject("nPixeldigivsnvtx"); + if(pixelvtx) { + pixelvtx->Draw("colz"); + // TProfile* pixelvtxprof = pixelvtx->ProfileY("prof",1,-1,""); + TProfile* pixelvtxprof = pixelvtx->ProfileX("prof",1,-1,""); + pixelvtxprof->SetMarkerStyle(20); + pixelvtxprof->SetMarkerSize(.4); + /* + TGraph tmp; + for(unsigned bin=1;binGetNbinsX()+1;++bin) { + // tmp.SetPoint(tmp.GetN(),pixelvtxprof->GetBinContent(bin),pixelvtxprof->GetBinCenter(bin)); + tmp.SetPoint(tmp.GetN(),pixelvtxprof->GetBinCenter(bin),pixelvtxprof->GetBinContent(bin)); + } + tmp.SetMarkerStyle(20); + tmp.Draw("p"); + */ + pixelvtxprof->Draw("esame"); + gPad->SetLogz(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/pixelvtx"; + plotfilename += pxlabfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete pixelvtx; + gPad->SetLogz(0); + } + + CommonAnalyzer castrip(&ff,"",strpmodfull,"EventProcs/TK"); + + TH1F* tk = (TH1F*)castrip.getObject("nTKdigi"); + if(tk) { + tk->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/tk"; + plotfilename += strplabfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete tk; + gPad->SetLogy(0); + } + + castrip.setPath("VtxCorr/TK"); + + TH2F* tkvtx = (TH2F*)castrip.getObject("nTKdigivsnvtx"); + if(tkvtx) { + tkvtx->Draw("colz"); + // TProfile* tkvtxprof = tkvtx->ProfileY("prof2",1,-1,""); + TProfile* tkvtxprof = tkvtx->ProfileX("prof2",1,-1,""); + tkvtxprof->SetMarkerStyle(20); + tkvtxprof->SetMarkerSize(.4); + /* + cout << tkvtxprof->GetNbinsX() << " " << tkvtxprof->GetSize() << " " << tkvtxprof->GetXaxis()->GetXbins()->GetSize() << endl; + TGraph tmp; + for(unsigned bin=1;binGetNbinsX()+1;++bin) { + tmp.SetPoint(tmp.GetN(),tkvtxprof->GetBinContent(bin),tkvtxprof->GetBinCenter(bin)); + } + tmp.SetMarkerStyle(20); + tmp.Draw("p"); + */ + tkvtxprof->Draw("esame"); + gPad->SetLogz(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/tkvtx"; + plotfilename += strplabfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete tkvtx; + gPad->SetLogz(0); + } + + + CommonAnalyzer cacorr(&ff,"",corrmodfull,""); + + + TH1F* rat = (TH1F*)cacorr.getObject("PixelOverTK"); + if(rat) { + rat->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/pixelovertk"; + plotfilename += corrlabfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete rat; + gPad->SetLogy(0); + } + + + TH2F* mult2d = (TH2F*)cacorr.getObject("PixelVsTK"); + if(mult2d) { + mult2d->Draw("colz"); + gPad->SetLogz(1); + // mult2d->GetXaxis()->SetRangeUser(0.,30000); + // mult2d->GetYaxis()->SetRangeUser(0.,15000); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/pixelvstk"; + plotfilename += corrlabfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete mult2d; + gPad->SetLogz(0); + } + + gStyle->SetOptStat(1111); + + ff.Close(); +} + +void ClusMultInvestPlots(const char* fullname, const char* mod, const char* label, const char* postfix, const char* subdet, const char* shortname, const char* outtrunk) { + + + char modfull[300]; + sprintf(modfull,"%s%s",mod,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + // char fullname[300]; + // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename); + + + TFile ff(fullname); + + gStyle->SetOptStat(111111); + + char subdirname[300]; + sprintf(subdirname,"EventProcs/%s",subdet); + char histname[300]; + sprintf(histname,"n%sdigi",subdet); + + CommonAnalyzer ca(&ff,"",modfull,subdirname); + + TH1F* hist = (TH1F*)ca.getObject(histname); + if(hist) { + hist->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/"; + plotfilename += subdet; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete hist; + gPad->SetLogy(0); + } + gStyle->SetOptStat(1111); + + ff.Close(); +} + +void ClusMultCorrPlots(const char* fullname, const char* mod, const char* label, const char* postfix, const char* shortname, const char* outtrunk) { + + + char modfull[300]; + sprintf(modfull,"%s%s",mod,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + + // char fullname[300]; + // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename); + + + TFile ff(fullname); + + gStyle->SetOptStat(111111); + + CommonAnalyzer ca(&ff,"",modfull,""); + + + TH1F* rat = (TH1F*)ca.getObject("PixelOverTK"); + if(rat) { + rat->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/pixelovertk"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete rat; + gPad->SetLogy(0); + } + + + TH2F* mult2d = (TH2F*)ca.getObject("PixelVsTK"); + if(mult2d) { + mult2d->Draw("colz"); + gPad->SetLogz(1); + // mult2d->GetXaxis()->SetRangeUser(0.,30000); + // mult2d->GetYaxis()->SetRangeUser(0.,15000); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/pixelvstk"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete mult2d; + gPad->SetLogz(0); + } + + gStyle->SetOptStat(1111); + + ff.Close(); +} + +void ClusMultVtxCorrPlots(const char* fullname, const char* mod, const char* label, const char* postfix, const char* subdet, const char* shortname, const char* outtrunk) { + + + char modfull[300]; + sprintf(modfull,"%s%s",mod,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + // char fullname[300]; + // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename); + + + TFile ff(fullname); + + gStyle->SetOptStat(111111); + + char subdirname[300]; + sprintf(subdirname,"VtxCorr/%s",subdet); + char histname[300]; + sprintf(histname,"n%sdigivsnvtx",subdet); + char profname[300]; + sprintf(profname,"n%sdigivsnvtxprof",subdet); + + CommonAnalyzer ca(&ff,"",modfull,subdirname); + + + TH2F* histvtx = (TH2F*)ca.getObject(histname); + if(histvtx) { + histvtx->Draw("colz"); + // TProfile* histvtxprof = histvtx->ProfileY("prof",1,-1,""); + TProfile* histvtxprof = 0; + histvtxprof = (TProfile*)ca.getObject(profname); + if(histvtxprof==0) { + std::cout << "TProfile " << profname << " missing!" << std::endl; + histvtxprof = histvtx->ProfileX("prof",1,-1,""); + } + histvtxprof->SetMarkerStyle(20); + histvtxprof->SetMarkerSize(.4); + /* + TGraph tmp; + for(unsigned bin=1;binGetNbinsX()+1;++bin) { + // tmp.SetPoint(tmp.GetN(),histvtxprof->GetBinContent(bin),histvtxprof->GetBinCenter(bin)); + tmp.SetPoint(tmp.GetN(),histvtxprof->GetBinCenter(bin),histvtxprof->GetBinContent(bin)); + } + tmp.SetMarkerStyle(20); + tmp.Draw("p"); + */ + histvtxprof->Draw("esame"); + gPad->SetLogz(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/"; + plotfilename += subdet; + plotfilename += "vtx"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete histvtx; + gPad->SetLogz(0); + } + + gStyle->SetOptStat(1111); + + ff.Close(); +} + +void ClusMultLumiCorrPlots(const char* fullname, const char* mod, const char* label,const char* postfix, const char* subdet, const char* shortname, const char* outtrunk) { + + + char modfull[300]; + sprintf(modfull,"%s%s",mod,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + // char fullname[300]; + // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename); + + + TFile ff(fullname); + + gStyle->SetOptStat(111111); + + char subdirname[300]; + sprintf(subdirname,"LumiCorr/%s",subdet); + char histname[300]; + sprintf(histname,"n%sdigivslumi",subdet); + char profname[300]; + sprintf(profname,"n%sdigivslumiprof",subdet); + + CommonAnalyzer ca(&ff,"",modfull,subdirname); + + + TH2F* histlumi = (TH2F*)ca.getObject(histname); + if(histlumi) { + histlumi->Draw("colz"); + // TProfile* histlumiprof = histlumi->ProfileY("prof",1,-1,""); + TProfile* histlumiprof = 0; + histlumiprof = (TProfile*)ca.getObject(profname); + if(histlumiprof==0) { + std::cout << "TProfile " << profname << " missing!" << std::endl; + histlumiprof = histlumi->ProfileX("prof",1,-1,""); + } + histlumiprof->SetMarkerStyle(20); + histlumiprof->SetMarkerSize(.4); + /* + TGraph tmp; + for(unsigned bin=1;binGetNbinsX()+1;++bin) { + // tmp.SetPoint(tmp.GetN(),histlumiprof->GetBinContent(bin),histlumiprof->GetBinCenter(bin)); + tmp.SetPoint(tmp.GetN(),histlumiprof->GetBinCenter(bin),histlumiprof->GetBinContent(bin)); + } + tmp.SetMarkerStyle(20); + tmp.Draw("p"); + */ + histlumiprof->Draw("esame"); + gPad->SetLogz(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += shortname; + plotfilename += "/"; + plotfilename += subdet; + plotfilename += "lumi"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += shortname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete histlumi; + gPad->SetLogz(0); + } + + gStyle->SetOptStat(1111); + + ff.Close(); +} + diff --git a/DPGAnalysis/SiStripTools/bin/ClusMultPlots.h b/DPGAnalysis/SiStripTools/bin/ClusMultPlots.h new file mode 100644 index 0000000000000..61df76673ec72 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/ClusMultPlots.h @@ -0,0 +1,14 @@ +#ifndef DPGAnalysis_SiStripTools_ClusMultPlots_h +#define DPGAnalysis_SiStripTools_ClusMultPlots_h + +class TH1D; +class TFile; + +void ClusMultPlots(const char* fullname, const char* pxmod, const char* strpmod, const char* corrmod, + const char* pxlabel, const char* strplabel, const char* corrlabel, const char* postfix, const char* shortname, const char* outtrunk); +void ClusMultInvestPlots(const char* fullname, const char* mod, const char* label, const char* postfix, const char* subdet, const char* shortname, const char* outtrunk); +void ClusMultCorrPlots(const char* fullname, const char* mod, const char* label, const char* postfix, const char* shortname, const char* outtrunk); +void ClusMultVtxCorrPlots(const char* fullname, const char* mod, const char* label, const char* postfix, const char* subdet, const char* shortname, const char* outtrunk); +void ClusMultLumiCorrPlots(const char* fullname, const char* mod, const char* label,const char* postfix, const char* subdet, const char* shortname, const char* outtrunk); + +#endif // DPGAnalysis_SiStripTools_ClusMultPlots_h diff --git a/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h b/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h index 93423289969b5..de84d33293810 100644 --- a/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h +++ b/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h @@ -1,5 +1,27 @@ #include "OccupancyPlotMacros.h" +#include "MultiplicityPlotMacros.h" +#include "StatisticsPlots.h" +#include "ClusMultPlots.h" +#include "SOF_profiles.h" +#include "SiStripQualityHistoryPlots.h" #ifdef __CINT__ #pragma link off all functions; #pragma link C++ function PlotOccupancyMap; +#pragma link C++ function AverageRunMultiplicity; +#pragma link C++ function PlotPixelMultVtxPos; +#pragma link C++ function DeadTimeAPVCycle; +#pragma link C++ function CombinedHisto; +#pragma link C++ function TimeRatio; +#pragma link C++ function SummaryHisto; +#pragma link C++ function SummaryHistoRatio; +#pragma link C++ function Combined2DHisto; +#pragma link C++ function StatisticsPlots; +#pragma link C++ function ClusMultPlots; +#pragma link C++ function ClusMultInvestPlots; +#pragma link C++ function ClusMultCorrPlots; +#pragma link C++ function ClusMultVtxCorrPlots; +#pragma link C++ function ClusMultLumiCorrPlots; +#pragma link C++ function printSOF; +#pragma link C++ function AverageRunBadChannels; +#pragma link C++ function StripCompletePlot; #endif diff --git a/DPGAnalysis/SiStripTools/bin/MultiplicityPlotMacros.cc b/DPGAnalysis/SiStripTools/bin/MultiplicityPlotMacros.cc new file mode 100644 index 0000000000000..34b2dbc20de46 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/MultiplicityPlotMacros.cc @@ -0,0 +1,146 @@ +#include +#include +#include +#include +#include "MultiplicityPlotMacros.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TFile.h" +#include "TH1D.h" +#include "TProfile.h" +#include "TDirectory.h" +#include "TCanvas.h" +#include "TStyle.h" +#include "TLegend.h" + +void PlotPixelMultVtxPos(TFile* ff, const char* module) { + + CommonAnalyzer camult(ff,"",module); + // camult.setPath("VtxPosCorr"); + + std::vector labels; + labels.push_back("FPIX_m"); + labels.push_back("BPIX_L1_mod_1"); + labels.push_back("BPIX_L1_mod_2"); + labels.push_back("BPIX_L1_mod_3"); + labels.push_back("BPIX_L1_mod_4"); + labels.push_back("BPIX_L1_mod_5"); + labels.push_back("BPIX_L1_mod_6"); + labels.push_back("BPIX_L1_mod_7"); + labels.push_back("BPIX_L1_mod_8"); + labels.push_back("FPIX_p"); + labels.push_back("BPIX_L1"); + labels.push_back("BPIX_L2"); + labels.push_back("BPIX_L3"); + labels.push_back("Lumi"); + + std::vector profs; + + for(unsigned int i=0;iDivide(2,2); + + for(unsigned int i = 1;i<5;++i) { + cc->cd(i); + if(profs[i] && profs[9-i]) { + profs[i]->Draw(); + profs[9-i]->SetLineColor(kRed); + profs[9-i]->SetMarkerColor(kRed); + profs[9-i]->Draw("same"); + TLegend* leg = new TLegend(0.4,0.8,0.6,0.9,"Occupancy"); + leg->SetFillStyle(0); + leg->AddEntry(profs[i],labels[i].c_str(),"l"); + leg->AddEntry(profs[9-i],labels[9-i].c_str(),"l"); + leg->Draw(); + } + } + new TCanvas("FPIX","FPIX"); + if(profs[0] && profs[9]) { + profs[0]->Draw(); + profs[9]->SetLineColor(kRed); + profs[9]->SetMarkerColor(kRed); + profs[9]->Draw("same"); + TLegend* leg = new TLegend(0.4,0.8,0.6,0.9,"Occupancy"); + leg->SetFillStyle(0); + leg->AddEntry(profs[0],labels[0].c_str(),"l"); + leg->AddEntry(profs[9],labels[9].c_str(),"l"); + leg->Draw(); + } + + gStyle->SetOptStat(11); + gStyle->SetOptFit(11); + new TCanvas("BPIXL1","BPIX L1"); + profs[10]->Fit("pol2"); + new TCanvas("BPIXL2","BPIX L2"); + profs[11]->Fit("pol2"); + new TCanvas("BPIXL3","BPIX L3"); + profs[12]->Fit("pol2"); + + new TCanvas("LumiAdd","LumiAdd"); + TH1D* hlumi = profs[11]->ProjectionX("lumi"); + TH1D* hbpixl3 = profs[12]->ProjectionX("bpixl3"); + TH1D* hfpixm = profs[0]->ProjectionX("fpixm"); + TH1D* hfpixp = profs[9]->ProjectionX("fpixp"); + hlumi->SetTitle("BPIX L2+L3 + FPIX multiplicity vs vtx z position"); + hlumi->Add(hbpixl3); + hlumi->Add(hfpixm); + hlumi->Add(hfpixp); + hlumi->Fit("pol2"); + new TCanvas("Lumi","Lumi"); + profs[13]->Fit("pol2"); +} + +TH1D* AverageRunMultiplicity(TFile& ff, const char* module, const bool excludeLastBins=false, const char* histo="nTKdigivsorbrun") { + + CommonAnalyzer camult(&ff,"",module); + + TH1D* clusmult = new TH1D("clusmult","Average Multiplicity vs run",10,0.,10.); + clusmult->SetBit(TH1::kCanRebin); + + std::vector runs = camult.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + for(unsigned int i=0;iGetNbinsX()+1; + int firstbin= 1; + for(int ibin=multvstime->GetNbinsX()+1;ibin>0;--ibin) { + if(multvstime->GetBinEntries(ibin)!=0) { + lastbin=ibin; + break; + } + } + + std::cout << "Restricted range: " << firstbin << " " << lastbin << std::endl; + multvstime->GetXaxis()->SetRangeUser(multvstime->GetBinLowEdge(firstbin),multvstime->GetBinLowEdge(lastbin-2)); + } + // fill the summary + clusmult->Fill(runlabel,multvstime->GetMean(2)); + + } + } + } + return clusmult; +} diff --git a/DPGAnalysis/SiStripTools/bin/MultiplicityPlotMacros.h b/DPGAnalysis/SiStripTools/bin/MultiplicityPlotMacros.h new file mode 100644 index 0000000000000..dfa348be78f95 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/MultiplicityPlotMacros.h @@ -0,0 +1,10 @@ +#ifndef DPGAnalysis_SiStripTools_MultiplicityPlotMacros_h +#define DPGAnalysis_SiStripTools_MultiplicityPlotMacros_h + +class TFile; +class TH1D; + +void PlotPixelMultVtxPos(TFile* ff, const char* module); +TH1D* AverageRunMultiplicity(TFile& ff, const char* module, const bool excludeLastBins, const char* histo); + +#endif // DPGAnalysis_SiStripTools_MultiplicityPlotMacros_h diff --git a/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.cc b/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.cc index 14f11c45f84c5..d2bd0d2a542bf 100644 --- a/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.cc +++ b/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.cc @@ -1,4 +1,5 @@ #include "TText.h" +#include "TLatex.h" #include "TLine.h" #include "TGaxis.h" #include "TFile.h" @@ -231,20 +232,20 @@ void PlotOccupancyMap(TFile* ff, const char* module, const float min, const floa double dr = 1.; // determine module size - if(i > 100 && i < 200) { dz=3.33;dr=0.4;} + if(i > 100 && i < 200) { dz=3.33;dr=0.4;} // BPIX - if(i > 200 && i < 1000 && ( i%10 == 1 || i%10 == 7)) { dz=0.8;dr=0.4;} + if(i > 200 && i < 1000 && ( i%10 == 1 || i%10 == 7)) { dz=0.8;dr=0.4;} // FPIX if(i > 200 && i < 1000 && !( i%10 == 1 || i%10 == 7)) { dz=0.8;dr=0.8;} - if(i > 1000 && i < 2000) { dz=5.948;dr=0.4;} + if(i > 1000 && i < 2000) { dz=5.948;dr=0.4;} // TIB - if(i > 3000 && i < 4000) { dz=9.440;dr=0.4;} + if(i > 3000 && i < 4000) { dz=9.440;dr=0.4;} // TOB - if(i > 2000 && i < 3000 && (i%1000)/100 == 1) { dz=0.8;dr=5.647;} + if(i > 2000 && i < 3000 && (i%1000)/100 == 1) { dz=0.8;dr=5.647;} // TID if(i > 2000 && i < 3000 && (i%1000)/100 == 2) { dz=0.8;dr=4.512;} if(i > 2000 && i < 3000 && (i%1000)/100 == 3) { dz=0.8;dr=5.637;} - if(i > 4000 && i < 6000 && (i%1000)/100 == 1) { dz=0.8;dr=4.362;} + if(i > 4000 && i < 6000 && (i%1000)/100 == 1) { dz=0.8;dr=4.362;} // TEC if(i > 4000 && i < 6000 && (i%1000)/100 == 2) { dz=0.8;dr=4.512;} if(i > 4000 && i < 6000 && (i%1000)/100 == 3) { dz=0.8;dr=5.637;} if(i > 4000 && i < 6000 && (i%1000)/100 == 4) { dz=0.8;dr=5.862;} @@ -312,12 +313,15 @@ void PlotOccupancyMap(TFile* ff, const char* module, const float min, const floa label->SetTextAlign(22); etalabels.Add(label); } - + TLatex* etalab = new TLatex(0,115,"#eta"); + etalab->SetTextSize(.03); + etalab->SetTextAlign(22); + etalabels.Add(etalab); TGaxis *raxis = new TGaxis(-310,0,-310,140,0,140,10,"S"); TGaxis *zaxis = new TGaxis(-310,0,310,0,-310,310,10,"S"); raxis->SetTickSize(.01); zaxis->SetTickSize(.01); - raxis->SetTitle("R (cm)"); zaxis->SetTitle("Z (cm)"); + raxis->SetTitle("r (cm)"); zaxis->SetTitle("z (cm)"); TList palette; TList mpalette; @@ -334,6 +338,7 @@ void PlotOccupancyMap(TFile* ff, const char* module, const float min, const floa TGaxis *paxis = new TGaxis(330,0,330,140,min,max,510,"SLG+"); paxis->SetTickSize(.02); paxis->SetLabelOffset(paxis->GetLabelOffset()*0.5); + paxis->SetTitle("channel occupancy"); palette.Add(paxis); TGaxis *mpaxis = new TGaxis(330,0,330,140,mmin,mmax,510,"SLG+"); diff --git a/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.h b/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.h index e3175d5fdaf98..61e116fc5bcdf 100644 --- a/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.h +++ b/DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.h @@ -1,4 +1,9 @@ +#ifndef DPGAnalysis_SiStripTools_OccupancyPlotMacros_h +#define DPGAnalysis_SiStripTools_OccupancyPlotMacros_h + class TFile; void PlotOccupancyMap(TFile* ff, const char* module, const float min, const float max, const float mmin, const float mmax, const int color); +#endif // DPGAnalysis_SiStripTools_OccupancyPlotMacros_h + diff --git a/DPGAnalysis/SiStripTools/bin/SOF_profiles.cc b/DPGAnalysis/SiStripTools/bin/SOF_profiles.cc new file mode 100644 index 0000000000000..21a3521eac443 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/SOF_profiles.cc @@ -0,0 +1,90 @@ +#include "SOF_profiles.h" +#include "TCanvas.h" +#include "TFile.h" +#include "TProfile.h" +#include "TH1F.h" +#include "TDirectory.h" +#include "TLine.h" +#include "TGaxis.h" +#include "TLegend.h" +#include + +TCanvas* printSOF(TFile* file, const int run, const int firstLS,const int zoom) { + + TCanvas* canout = 0; + + char rname[400]; + sprintf(rname,"run_%d",run); + + if(file==0) return canout; + + TProfile* badmod = 0; + TH1F* evtanydcs = 0; + TH1F* evtdcson = 0; + TH1F* evtnostrip = 0; + + char dname[400]; + + sprintf(dname,"ssqhistory/%s",rname); + if(file->cd(dname)) { badmod = (TProfile*)gDirectory->Get("badmodrun_HVDCS"); } + + sprintf(dname,"eventtimedistranydcs/%s",rname); + if(file->cd(dname)) { evtanydcs = (TH1F*)gDirectory->Get("orbit"); } + + sprintf(dname,"eventtimedistribution/%s",rname); + if(file->cd(dname)) { evtdcson = (TH1F*)gDirectory->Get("orbit"); } + + sprintf(dname,"eventtimedistrnostrip/%s",rname); + if(file->cd(dname)) { evtnostrip = (TH1F*)gDirectory->Get("orbit"); } + + if(badmod && evtanydcs && evtdcson && evtnostrip) { + + badmod->SetStats(kFALSE); + badmod->SetLineColor(kGreen); badmod->SetMarkerColor(kGreen); + evtanydcs->SetStats(kFALSE); + evtanydcs->SetLineColor(kBlue); + evtdcson->SetStats(kFALSE); + evtdcson->SetLineColor(kRed); + evtnostrip->SetStats(kFALSE); + evtnostrip->SetLineColor(kRed); + evtnostrip->SetFillColor(kRed); evtnostrip->SetFillStyle(1000); + + canout = new TCanvas; + + badmod->Draw(); + badmod->GetYaxis()->SetRangeUser(1,100000); badmod->GetYaxis()->SetTitle(""); badmod->SetTitle(rname); + badmod->GetXaxis()->SetRangeUser((firstLS-zoom)*262144,(firstLS+zoom)*262144); + evtanydcs->Draw("same"); + evtdcson->Draw("same"); + evtnostrip->Rebin(int(badmod->GetBinWidth(1)/evtnostrip->GetBinWidth(1))); + std::cout << "rebin " << int(badmod->GetBinWidth(1)/evtnostrip->GetBinWidth(1)) << std::endl; + evtnostrip->Draw("same"); + + TGaxis* lsaxis = new TGaxis((firstLS-zoom)*262144,100000,(firstLS+zoom)*262144,100000, + firstLS-zoom+1,firstLS+zoom+1,2*zoom,"-SM"); + // TGaxis* lsaxis = new TGaxis(badmod->GetXaxis()->GetXmin(),100000, + // badmod->GetXaxis()->GetXmax(),100000, + // badmod->GetXaxis()->GetXmin()/262144+1,badmod->GetXaxis()->GetXmax()/262144+1,50,"-SM"); + lsaxis->Draw(); + + TLine* line = new TLine((firstLS-1)*262144,1,(firstLS-1)*262144,100000); + line->SetLineWidth(2); line->SetLineStyle(2); + line->Draw(); + + TLegend* leg = new TLegend(.5,.65,.9,.85,""); + leg->AddEntry(badmod,"Modules with HV off","l"); + leg->AddEntry(evtanydcs,"Events with any DCS bit","l"); + leg->AddEntry(evtdcson,"Events with DCS bit ON","l"); + leg->AddEntry(evtnostrip,"DCS bit ON No strip clus (masked FED)","f"); + leg->AddEntry(line,"first good LS (DCSonly JSON)","l"); + + leg->SetFillStyle(0); + leg->Draw(); + + canout->SetLogy(1); + + + } + + return canout; +} diff --git a/DPGAnalysis/SiStripTools/bin/SOF_profiles.h b/DPGAnalysis/SiStripTools/bin/SOF_profiles.h new file mode 100644 index 0000000000000..00924adc235b9 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/SOF_profiles.h @@ -0,0 +1,10 @@ +#ifndef DPGAnalysis_SiStripTools_SOF_profiles_h +#define DPGAnalysis_SiStripTools_SOF_profiles_h + +class TCanvas; +class TFile; + +TCanvas* printSOF(TFile* file, const int run, const int firstLS,const int zoom); + +#endif // DPGAnalysis_SiStripTools_SOF_profiles_h + diff --git a/DPGAnalysis/SiStripTools/bin/SiStripQualityHistoryPlots.cc b/DPGAnalysis/SiStripTools/bin/SiStripQualityHistoryPlots.cc new file mode 100644 index 0000000000000..6f1fb9a1965ce --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/SiStripQualityHistoryPlots.cc @@ -0,0 +1,91 @@ +#include "SiStripQualityHistoryPlots.h" +#include +#include +#include +#include +#include +#include "TPad.h" +#include "TFile.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TProfile.h" +#include "TGraph.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TCanvas.h" +#include "TStyle.h" + + +TH1D* AverageRunBadChannels(TFile& ff, const char* module, const char* histo, const bool excludeLastBins) { + + CommonAnalyzer camult(&ff,"",module); + + TH1D* badchannels = new TH1D("badchannels","Average Number of Bad Channels vs run",10,0.,10.); + badchannels->SetBit(TH1::kCanRebin); + + std::vector runs = camult.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + for(unsigned int i=0;iGetNbinsX()+1; + int firstbin= 1; + for(int ibin=multvstime->GetNbinsX()+1;ibin>0;--ibin) { + if(multvstime->GetBinEntries(ibin)!=0) { + lastbin=ibin; + break; + } + } + + std::cout << "Restricted range: " << firstbin << " " << lastbin << std::endl; + multvstime->GetXaxis()->SetRangeUser(multvstime->GetBinLowEdge(firstbin),multvstime->GetBinLowEdge(lastbin-2)); + } + // fill the summary + badchannels->Fill(runlabel,multvstime->GetMean(2)); + + } + } + } + return badchannels; + + + +} + +TCanvas* StripCompletePlot(TFile& ff, const char* module, const bool excludeLastBins) { + + TCanvas* cc = new TCanvas(); + + TH1D* cabling = AverageRunBadChannels(ff,module,"badmodrun_Cabling",excludeLastBins); + TH1D* runinfo = AverageRunBadChannels(ff,module,"badmodrun_RunInfo",excludeLastBins); + TH1D* badchannel = AverageRunBadChannels(ff,module,"badmodrun_BadChannel",excludeLastBins); + TH1D* dcs = AverageRunBadChannels(ff,module,"badmodrun_DCS",excludeLastBins); + TH1D* badfiber = AverageRunBadChannels(ff,module,"badmodrun_BadFiber",excludeLastBins); + + cabling->SetLineColor(kRed); + runinfo->SetLineColor(kMagenta); + badchannel->SetLineColor(kCyan); + dcs->SetLineColor(kGreen); + badfiber->SetLineColor(kBlue); + + badfiber->Draw(); + dcs->Draw("same"); + badchannel->Draw("same"); + runinfo->Draw("same"); + cabling->Draw("same"); + + return cc; +} diff --git a/DPGAnalysis/SiStripTools/bin/SiStripQualityHistoryPlots.h b/DPGAnalysis/SiStripTools/bin/SiStripQualityHistoryPlots.h new file mode 100644 index 0000000000000..3214476c69369 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/SiStripQualityHistoryPlots.h @@ -0,0 +1,11 @@ +#ifndef DPGAnalysis_SiStripTools_SiStripQualityHistoryPlots_h +#define DPGAnalysis_SiStripTools_SiStripQualityHistoryPlots_h + +class TH1D; +class TCanvas; +class TFile; + +TH1D* AverageRunBadChannels(TFile& ff, const char* module, const char* histo, const bool excludeLastBins=false); +TCanvas* StripCompletePlot(TFile& ff, const char* module, const bool excludeLastBins=false); + +#endif // DPGAnalysis_SiStripTools_SiStripQualityHistoryPlots_h diff --git a/DPGAnalysis/SiStripTools/bin/StatisticsPlots.cc b/DPGAnalysis/SiStripTools/bin/StatisticsPlots.cc new file mode 100644 index 0000000000000..d59b1cac35ff9 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/StatisticsPlots.cc @@ -0,0 +1,410 @@ +#include "StatisticsPlots.h" +#include +#include +#include +#include +#include +#include "TPad.h" +#include "TH1D.h" +#include "TFile.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TText.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TCanvas.h" +#include "TGraphAsymmErrors.h" + +void DeadTimeAPVCycle(TH1F* hist, const std::vector& bins) { + + float ntotodd = 0; + float ntoteven = 0; + float nspecialodd = 0; + float nspecialeven = 0; + unsigned int nbintotodd = 0; + unsigned int nbintoteven = 0; + unsigned int nbinspecialodd = 0; + unsigned int nbinspecialeven = 0; + + for(int i = 1; i < hist->GetNbinsX()+1; ++i) { + + bool isSpecial = false; + for(unsigned int special = 0; special < bins.size() ; ++special) { + if(i==bins[special]) { + isSpecial=true; + break; + } + } + + if(i%2==0) { + if(isSpecial) { + ++nbinspecialeven; + nspecialeven += hist->GetBinContent(i); + } + else { + ++nbintoteven; + ntoteven += hist->GetBinContent(i); + } + } + else { + if(isSpecial) { + ++nbinspecialodd; + nspecialodd += hist->GetBinContent(i); + } + else { + ++nbintotodd; + ntotodd += hist->GetBinContent(i); + } + } + } + std::cout << "Summary" << std::endl; + std::cout << "Odd events " << ntotodd << " special " << nspecialodd << std::endl; + std::cout << "Odd bins " << nbintotodd << " special " << nbinspecialodd << std::endl; + std::cout << "Odd bins populations" << float(ntotodd)/nbintotodd << " special " << float(nspecialodd)/nbinspecialodd << std::endl; + std::cout << "Even events " << ntoteven << " special " << nspecialeven << std::endl; + std::cout << "Even bins " << nbintoteven << " special " << nbinspecialeven << std::endl; + std::cout << "Even bins populations" << float(ntoteven)/nbintoteven << " special " << float(nspecialeven)/nbinspecialeven << std::endl; + + float oddloss = nspecialodd -nbinspecialodd*ntotodd/nbintotodd; + float evenloss = nspecialeven -nbinspecialeven*ntoteven/nbintoteven; + + float fracloss = (oddloss+evenloss)/(ntotodd + ntoteven + nspecialodd + nspecialeven); + + std::cout << "Loss " << oddloss << " " << evenloss << " " << fracloss << std::endl; + +} + +TH1F* CombinedHisto(TFile& ff, const char* module, const char* histname) { + + CommonAnalyzer castat(&ff,"",module); + + TH1F* result = 0; + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + for(unsigned int i=0;iReset(); + } + result->Add(hist); + std::cout << hist->GetTitle() << " added: " << hist->GetEntries() << " " << result->GetEntries() << std::endl; + } + + } + } + + return result; + +} + +TH1F* TimeRatio(TFile& ff, const char* modulen, const char* moduled, const int irun, const int rebin) { + + CommonAnalyzer castatn(&ff,"",modulen); + CommonAnalyzer castatd(&ff,"",moduled); + + + char runlabel[100]; + sprintf(runlabel,"%d",irun); + char runpath[100]; + sprintf(runpath,"run_%d",irun); + castatn.setPath(runpath); + castatd.setPath(runpath); + + TH1F* ratio = 0; + + TH1F* orbitn=0; + if(orbitn==0) orbitn = (TH1F*)castatn.getObject("orbit"); + TH1F* orbitd=0; + if(orbitd==0) orbitd = (TH1F*)castatd.getObject("orbit"); + if(orbitn != 0 && orbitd != 0) { + orbitn->Rebin(rebin); + orbitd->Rebin(rebin); + ratio = new TH1F(*orbitd); + ratio->Reset(); + ratio->Divide(orbitn,orbitd); + } + return ratio; + +} + +TH1D* SummaryHisto(TFile& ff, const char* module) { + + CommonAnalyzer castat(&ff,"",module); + + TH1D* nevents = new TH1D("nevents","Number of events vs run",10,0.,10.); + nevents->SetBit(TH1::kCanRebin); + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + for(unsigned int i=0;iFill(runlabel,orbit->GetEntries()); + } + } + } + return nevents; + +} + +TH1D* SummaryHistoRatio(TFile& f1, const char* mod1, TFile& f2, const char* mod2, const char* hname) { + + TH1D* denom = SummaryHisto(f1,mod1); + TH1D* numer = SummaryHisto(f2,mod2); + + TH1D* ratio = (TH1D*)denom->Clone(hname); + ratio->SetTitle("Fraction of events vs run"); + ratio->Sumw2(); + ratio->Reset(); + ratio->SetDirectory(0); + ratio->Divide(numer,denom,1,1,"b"); + + return ratio; + +} + +TGraphAsymmErrors* SummaryHistoRatioGraph(TFile& f1, const char* mod1, TFile& f2, const char* mod2, const char* /* hname */) { + + TH1D* denom = SummaryHisto(f1,mod1); + TH1D* numer = SummaryHisto(f2,mod2); + + TGraphAsymmErrors* ratio = new TGraphAsymmErrors;; + + ratio->BayesDivide(numer,denom); + + return ratio; + +} + +TH2F* Combined2DHisto(TFile& ff, const char* module, const char* histname) { + + CommonAnalyzer castat(&ff,"",module); + + TH2F* result = 0; + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + for(unsigned int i=0;iReset(); + } + result->Add(hist); + std::cout << hist->GetTitle() << " added: " << hist->GetEntries() << " " << result->GetEntries() << std::endl; + } + + } + } + + return result; + +} + + + +void StatisticsPlots(const char* fullname, const char* module, const char* label, const char* postfix, const char* shortname, + const char* outtrunk) { + + char modfull[300]; + sprintf(modfull,"%s%s",module,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + char dirname[400]; + sprintf(dirname,"%s",shortname); + + // char fullname[300]; + // if(strlen(family)==0) { sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);} + // else { sprintf(fullname,"rootfiles/%s.root",dirname); } + + TFile ff(fullname); + + // Colliding events + + /* + char modname[300]; + sprintf(modname,"trackcount%s",postfix); + + CommonAnalyzer castatall(&ff,"",modname); + + TH1F* ntrk = (TH1F*)castatall.getObject("ntrk"); + if (ntrk) { + std::cout << " All runs " << ntrk->GetEntries() << std::endl; + delete ntrk; + } + */ + + // sprintf(modname,"eventtimedistribution%s",postfix); + + CommonAnalyzer castat(&ff,"",modfull); + + // Summary histograms + + TH1D* nevents = new TH1D("nevents","Number of events vs run",10,0.,10.); + nevents->SetBit(TH1::kCanRebin); + + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + + std::cout << "Collision Events" << std::endl; + + for(unsigned int i=0;iGetEntries() << std::endl; + // prepare plot + new TCanvas; + if(orbitvsbx->GetEntries()>0) { + orbit = orbitvsbx->ProjectionY(); + } + delete orbitvsbx; + } + if(orbit==0) orbit = (TH1F*)castat.getObject("orbit"); + if(orbit) { + orbit->GetXaxis()->SetTitle("orbit"); + orbit->SetTitle(runpath); + //normalize to get the rate + orbit->Scale(11223,"width"); + orbit->GetYaxis()->SetTitle("Rate (Hz)"); + // fill the summary + nevents->Fill(runlabel,orbit->GetEntries()); + + // + orbit->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/orbit_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete orbit; + } + + TH1F* dbx = (TH1F*)castat.getObject("dbx"); + if (dbx) { + // prepare plot + if(dbx->GetEntries()>0) { + dbx->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/dbx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete dbx; + } + gPad->SetLogy(0); + } + TH1F* bx = (TH1F*)castat.getObject("bx"); + if (bx) { + // prepare plot + if(bx->GetEntries()>0) { + bx->SetLineColor(kRed); + bx->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/bx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete bx; + } + gPad->SetLogy(0); + } + } + } + + if(runs.size()) { + std::string plotfilename; + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/nevents_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwide = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + nevents->Draw(); + + char nentries[100]; + sprintf(nentries,"%.0f",nevents->GetSumOfWeights()); + TText ttlabel; + ttlabel.DrawTextNDC(.8,.7,nentries); + + std::cout << nentries << std::endl; + + gPad->Print(plotfilename.c_str()); + delete cwide; + } + delete nevents; + + ff.Close(); + +} + diff --git a/DPGAnalysis/SiStripTools/bin/StatisticsPlots.h b/DPGAnalysis/SiStripTools/bin/StatisticsPlots.h new file mode 100644 index 0000000000000..f7df0d0fb25e6 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/StatisticsPlots.h @@ -0,0 +1,22 @@ +#ifndef DPGAnalysis_SiStripTools_StatisticsPlots_h +#define DPGAnalysis_SiStripTools_StatisticsPlots_h + +#include + +class TH1F; +class TFile; +class TH1D; +class TGraphAsymmErrors; +class TH2F; + +void DeadTimeAPVCycle(TH1F* hist, const std::vector& bins); +TH1F* CombinedHisto(TFile& ff, const char* module, const char* histname); +TH1F* TimeRatio(TFile& ff, const char* modulen, const char* moduled, const int irun, const int rebin=1); +TH1D* SummaryHisto(TFile& ff, const char* module); +TH1D* SummaryHistoRatio(TFile& f1, const char* mod1, TFile& f2, const char* mod2, const char* hname); +TGraphAsymmErrors* SummaryHistoRatioGraph(TFile& f1, const char* mod1, TFile& f2, const char* mod2, const char* hname); +TH2F* Combined2DHisto(TFile& ff, const char* module, const char* histname); +void StatisticsPlots(const char* fullname, const char* module, const char* label, const char* postfix, const char* shortname, + const char* outtrunk); + +#endif // DPGAnalysis_SiStripTools_StatisticsPlots_h diff --git a/DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h b/DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h new file mode 100644 index 0000000000000..ef25401a83474 --- /dev/null +++ b/DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h @@ -0,0 +1,51 @@ +#ifndef CommonAnalyzer_h +#define CommonAnalyzer_h + +#include +#include + +class TFile; +class TObject; +class TNamed; +class TH1F; + +class CommonAnalyzer { + + public: + CommonAnalyzer(TFile* file, const char* run, const char* mod, const char* path ="", const char* prefix=""); + CommonAnalyzer(const CommonAnalyzer& dtca); + + CommonAnalyzer& operator=(const CommonAnalyzer& dtca); + + void setRunNumber(const char* run); + void setFile(TFile* file); + void setModule(const char* mod); + void setPath(const char* path); + void setPrefix(const char* prefix); + + const std::string& getRunNumber() const; + const std::string& getModule() const; + const std::string& getPath() const; + const std::string& getPrefix() const; + + const std::vector getRunList() const; + + TObject* getObject(const char* name) const; + TNamed* getObjectWithSuffix(const char* name, const char* suffix="") const; + + TH1F* getBinomialRatio(const CommonAnalyzer& denom, const char* name, const int rebin=-1) const; + + private: + + + TFile* _file; + std::string _runnumber; + std::string _module; + std::string _path; + std::string _prefix; + +}; + + + +#endif // CommonAnalyzer_h diff --git a/DPGAnalysis/SiStripTools/interface/DigiVtxPosCorrHistogramMaker.h b/DPGAnalysis/SiStripTools/interface/DigiVtxPosCorrHistogramMaker.h new file mode 100644 index 0000000000000..e596b9f977688 --- /dev/null +++ b/DPGAnalysis/SiStripTools/interface/DigiVtxPosCorrHistogramMaker.h @@ -0,0 +1,46 @@ +#ifndef DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_H +#define DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_H + +#include +#include +#include "FWCore/Utilities/interface/InputTag.h" + + +namespace edm { + class ParameterSet; + class Event; +} +class TH2F; +class TProfile; +class TFileDirectory; + +class DigiVtxPosCorrHistogramMaker { + + public: + DigiVtxPosCorrHistogramMaker(); + DigiVtxPosCorrHistogramMaker(const edm::ParameterSet& iConfig); + + ~DigiVtxPosCorrHistogramMaker(); + + void book(const std::string dirname, const std::map& labels); + void book(const std::string dirname); + void beginRun(const unsigned int nrun); + void fill(const edm::Event& iEvent, const std::map& ndigi); + + private: + + const edm::InputTag m_mcvtxcollection; + std::string m_hitname; + const int m_nbins; + const int m_scalefact; + std::map m_binmax; + std::map m_labels; + + std::map m_nmultvsvtxpos; + std::map m_nmultvsvtxposprof; + std::map m_subdirs; + +}; + + +#endif // DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_H diff --git a/DPGAnalysis/SiStripTools/plugins/MultiplicityInvestigator.cc b/DPGAnalysis/SiStripTools/plugins/MultiplicityInvestigator.cc index b2b6d9dca62e7..55c7c4c4bda54 100644 --- a/DPGAnalysis/SiStripTools/plugins/MultiplicityInvestigator.cc +++ b/DPGAnalysis/SiStripTools/plugins/MultiplicityInvestigator.cc @@ -43,6 +43,7 @@ #include "DPGAnalysis/SiStripTools/interface/DigiVertexCorrHistogramMaker.h" #include "DPGAnalysis/SiStripTools/interface/DigiLumiCorrHistogramMaker.h" #include "DPGAnalysis/SiStripTools/interface/DigiPileupCorrHistogramMaker.h" +#include "DPGAnalysis/SiStripTools/interface/DigiVtxPosCorrHistogramMaker.h" // // class decleration @@ -66,10 +67,12 @@ class MultiplicityInvestigator : public edm::EDAnalyzer { const bool m_wantVtxCorrHist; const bool m_wantLumiCorrHist; const bool m_wantPileupCorrHist; + const bool m_wantVtxPosCorrHist; DigiInvestigatorHistogramMaker m_digiinvesthmevent; DigiVertexCorrHistogramMaker m_digivtxcorrhmevent; DigiLumiCorrHistogramMaker m_digilumicorrhmevent; DigiPileupCorrHistogramMaker m_digipileupcorrhmevent; + DigiVtxPosCorrHistogramMaker m_digivtxposcorrhmevent; edm::InputTag m_multiplicityMap; edm::InputTag m_vertexCollection; @@ -93,21 +96,23 @@ MultiplicityInvestigator::MultiplicityInvestigator(const edm::ParameterSet& iCon m_wantVtxCorrHist(iConfig.getParameter("wantVtxCorrHist")), m_wantLumiCorrHist(iConfig.getParameter("wantLumiCorrHist")), m_wantPileupCorrHist(iConfig.getParameter("wantPileupCorrHist")), - m_digiinvesthmevent(iConfig), - m_digivtxcorrhmevent(iConfig.getParameter("digiVtxCorrConfig")), - m_digilumicorrhmevent(iConfig.getParameter("digiLumiCorrConfig")), - m_digipileupcorrhmevent(iConfig.getParameter("digiPileupCorrConfig")), + m_wantVtxPosCorrHist(iConfig.getParameter("wantVtxPosCorrHist")), + m_digiinvesthmevent(m_wantInvestHist ? iConfig : DigiInvestigatorHistogramMaker()), + m_digivtxcorrhmevent(m_wantVtxCorrHist ? iConfig.getParameter("digiVtxCorrConfig") : DigiVertexCorrHistogramMaker()), + m_digilumicorrhmevent(m_wantLumiCorrHist ? iConfig.getParameter("digiLumiCorrConfig") : DigiLumiCorrHistogramMaker()), + m_digipileupcorrhmevent(m_wantPileupCorrHist ? iConfig.getParameter("digiPileupCorrConfig") : DigiPileupCorrHistogramMaker()), + m_digivtxposcorrhmevent(m_wantVtxPosCorrHist ? iConfig.getParameter("digiVtxPosCorrConfig") : DigiVtxPosCorrHistogramMaker()), m_multiplicityMap(iConfig.getParameter("multiplicityMap")), m_vertexCollection(iConfig.getParameter("vertexCollection")) { //now do what ever initialization is needed - if(m_wantInvestHist) m_digiinvesthmevent.book("EventProcs"); - if(m_wantVtxCorrHist) m_digivtxcorrhmevent.book("VtxCorr"); - if(m_wantLumiCorrHist) m_digilumicorrhmevent.book("LumiCorr"); - if(m_wantPileupCorrHist) m_digipileupcorrhmevent.book("PileupCorr"); - + if(m_wantInvestHist) { m_digiinvesthmevent.book("EventProcs");} + if(m_wantVtxCorrHist) { m_digivtxcorrhmevent.book("VtxCorr");} + if(m_wantLumiCorrHist) { m_digilumicorrhmevent.book("LumiCorr");} + if(m_wantPileupCorrHist) { m_digipileupcorrhmevent.book("PileupCorr");} + if(m_wantVtxPosCorrHist) { m_digivtxposcorrhmevent.book("VtxPosCorr");} } @@ -144,6 +149,7 @@ MultiplicityInvestigator::analyze(const edm::Event& iEvent, const edm::EventSetu if(m_wantLumiCorrHist) m_digilumicorrhmevent.fill(iEvent,*mults); if(m_wantPileupCorrHist) m_digipileupcorrhmevent.fill(iEvent,*mults); + if(m_wantVtxPosCorrHist) m_digivtxposcorrhmevent.fill(iEvent,*mults); } diff --git a/DPGAnalysis/SiStripTools/python/sistripqualityhistory_noDCS_cff.py b/DPGAnalysis/SiStripTools/python/sistripqualityhistory_noDCS_cff.py new file mode 100644 index 0000000000000..5c9a516591cff --- /dev/null +++ b/DPGAnalysis/SiStripTools/python/sistripqualityhistory_noDCS_cff.py @@ -0,0 +1,44 @@ +import FWCore.ParameterSet.Config as cms + +import CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi + +ssqcabling = CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi.siStripQualityESProducer.clone() +ssqcabling.appendToDataLabel = cms.string("onlyCabling") +ssqcabling.ListOfRecordToMerge=cms.VPSet( + cms.PSet(record=cms.string('SiStripDetCablingRcd'),tag=cms.string('')) +) + +ssqruninfo = CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi.siStripQualityESProducer.clone() +ssqruninfo.appendToDataLabel = cms.string("CablingRunInfo") +ssqruninfo.ListOfRecordToMerge=cms.VPSet( + cms.PSet(record=cms.string('SiStripDetCablingRcd'),tag=cms.string('')), + cms.PSet(record=cms.string('RunInfoRcd'),tag=cms.string('')) +) + +ssqbadch = CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi.siStripQualityESProducer.clone() +ssqbadch.appendToDataLabel = cms.string("BadChannel") +ssqbadch.ListOfRecordToMerge=cms.VPSet( + cms.PSet(record=cms.string('SiStripDetCablingRcd'),tag=cms.string('')), + cms.PSet(record=cms.string('RunInfoRcd'),tag=cms.string('')), + cms.PSet(record=cms.string('SiStripBadChannelRcd'),tag=cms.string('')) +) + +ssqbadfiber = CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi.siStripQualityESProducer.clone() +ssqbadfiber.appendToDataLabel = cms.string("BadFiber") +ssqbadfiber.ListOfRecordToMerge=cms.VPSet( + cms.PSet(record=cms.string('SiStripDetCablingRcd'),tag=cms.string('')), + cms.PSet(record=cms.string('RunInfoRcd'),tag=cms.string('')), + cms.PSet(record=cms.string('SiStripBadChannelRcd'),tag=cms.string('')), + cms.PSet(record=cms.string('SiStripBadFiberRcd'),tag=cms.string('')) +) + + + +from DPGAnalysis.SiStripTools.sistripqualityhistory_cfi import * + +ssqhistory.monitoredSiStripQuality = cms.VPSet( + cms.PSet( name = cms.string("Cabling"), ssqLabel = cms.string("onlyCabling")), + cms.PSet( name = cms.string("RunInfo"), ssqLabel = cms.string("CablingRunInfo")), + cms.PSet( name = cms.string("BadChannel"), ssqLabel = cms.string("BadChannel")), + cms.PSet( name = cms.string("BadFiber"), ssqLabel = cms.string("BadFiber")) + ) diff --git a/DPGAnalysis/SiStripTools/python/spclusmultinvestigator_cfi.py b/DPGAnalysis/SiStripTools/python/spclusmultinvestigator_cfi.py index bde6688f75a8a..9fd978a40dcfc 100644 --- a/DPGAnalysis/SiStripTools/python/spclusmultinvestigator_cfi.py +++ b/DPGAnalysis/SiStripTools/python/spclusmultinvestigator_cfi.py @@ -6,12 +6,7 @@ wantVtxCorrHist = cms.bool(False), wantLumiCorrHist = cms.bool(False), wantPileupCorrHist = cms.bool(False), - digiVtxCorrConfig = cms.PSet(), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), wantedSubDets = cms.untracked.VPSet( cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel"), binMax = cms.int32(200000)), cms.PSet(detSelection = cms.uint32(1),detLabel = cms.string("BPIX"), binMax = cms.int32(100000)), diff --git a/DPGAnalysis/SiStripTools/python/spclusmultinvestigatorwithvtx_cfi.py b/DPGAnalysis/SiStripTools/python/spclusmultinvestigatorwithvtx_cfi.py index 626a024de91a7..d3cf77292dad2 100644 --- a/DPGAnalysis/SiStripTools/python/spclusmultinvestigatorwithvtx_cfi.py +++ b/DPGAnalysis/SiStripTools/python/spclusmultinvestigatorwithvtx_cfi.py @@ -6,11 +6,7 @@ wantVtxCorrHist = cms.bool(True), wantLumiCorrHist = cms.bool(False), wantPileupCorrHist = cms.bool(False), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), digiVtxCorrConfig = cms.PSet( wantedSubDets = cms.untracked.VPSet( cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel"), binMax = cms.int32(200000)) diff --git a/DPGAnalysis/SiStripTools/python/spclusmultlumicorr_cfi.py b/DPGAnalysis/SiStripTools/python/spclusmultlumicorr_cfi.py index a89ecc1ffb6c2..daa47756d712c 100644 --- a/DPGAnalysis/SiStripTools/python/spclusmultlumicorr_cfi.py +++ b/DPGAnalysis/SiStripTools/python/spclusmultlumicorr_cfi.py @@ -6,11 +6,7 @@ wantVtxCorrHist = cms.bool(False), wantLumiCorrHist = cms.bool(True), wantPileupCorrHist = cms.bool(False), - digiVtxCorrConfig = cms.PSet(), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), digiLumiCorrConfig = cms.PSet( lumiProducer = cms.InputTag("lumiProducer"), wantedSubDets = cms.untracked.VPSet( diff --git a/DPGAnalysis/SiStripTools/python/spclusmultpileupcorr_cfi.py b/DPGAnalysis/SiStripTools/python/spclusmultpileupcorr_cfi.py index c363006598d22..3e2bf24175122 100644 --- a/DPGAnalysis/SiStripTools/python/spclusmultpileupcorr_cfi.py +++ b/DPGAnalysis/SiStripTools/python/spclusmultpileupcorr_cfi.py @@ -1,14 +1,13 @@ import FWCore.ParameterSet.Config as cms spclusmultpileupcorr = cms.EDAnalyzer('MultiplicityInvestigator', - vertexCollection = cms.InputTag(""), - wantInvestHist = cms.bool(False), - wantVtxCorrHist = cms.bool(False), - wantLumiCorrHist = cms.bool(False), - wantPileupCorrHist = cms.bool(True), - digiVtxCorrConfig = cms.PSet(), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( + vertexCollection = cms.InputTag(""), + wantInvestHist = cms.bool(False), + wantVtxCorrHist = cms.bool(False), + wantLumiCorrHist = cms.bool(False), + wantPileupCorrHist = cms.bool(True), + wantVtxPosCorrHist = cms.bool(False), + digiPileupCorrConfig = cms.PSet( pileupSummaryCollection = cms.InputTag("addPileupInfo"), useVisibleVertices = cms.bool(False), wantedSubDets = cms.untracked.VPSet( diff --git a/DPGAnalysis/SiStripTools/python/spclusmultvtxposcorr_cfi.py b/DPGAnalysis/SiStripTools/python/spclusmultvtxposcorr_cfi.py new file mode 100644 index 0000000000000..58727fd327513 --- /dev/null +++ b/DPGAnalysis/SiStripTools/python/spclusmultvtxposcorr_cfi.py @@ -0,0 +1,21 @@ +import FWCore.ParameterSet.Config as cms + +spclusmultvtxposcorr = cms.EDAnalyzer('MultiplicityInvestigator', + vertexCollection = cms.InputTag(""), + wantInvestHist = cms.bool(False), + wantVtxCorrHist = cms.bool(False), + wantLumiCorrHist = cms.bool(False), + wantPileupCorrHist = cms.bool(False), + wantVtxPosCorrHist = cms.bool(True), + digiVtxPosCorrConfig = cms.PSet( + mcVtxCollection=cms.InputTag("generator"), + wantedSubDets = cms.untracked.VPSet( + cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel"), binMax = cms.int32(200000)) + ), + hitName = cms.untracked.string("cluster"), + numberOfBins = cms.untracked.int32(100), + scaleFactor = cms.untracked.int32(100) + ), + multiplicityMap = cms.InputTag("spclustermultprod"), + ) + diff --git a/DPGAnalysis/SiStripTools/python/ssclusmultinvestigator_cfi.py b/DPGAnalysis/SiStripTools/python/ssclusmultinvestigator_cfi.py index 3369bbdbf6203..10fa2557c00a2 100644 --- a/DPGAnalysis/SiStripTools/python/ssclusmultinvestigator_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssclusmultinvestigator_cfi.py @@ -6,12 +6,7 @@ wantVtxCorrHist = cms.bool(False), wantLumiCorrHist = cms.bool(False), wantPileupCorrHist = cms.bool(False), - digiVtxCorrConfig = cms.PSet(), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), wantedSubDets = cms.untracked.VPSet( cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK"), binMax = cms.int32(9523712/64)), cms.PSet(detSelection = cms.uint32(3),detLabel = cms.string("TIB"), binMax = cms.int32(1787904/64)), diff --git a/DPGAnalysis/SiStripTools/python/ssclusmultinvestigatorwithvtx_cfi.py b/DPGAnalysis/SiStripTools/python/ssclusmultinvestigatorwithvtx_cfi.py index 5d7df04fd1877..e1e31cfb019b6 100644 --- a/DPGAnalysis/SiStripTools/python/ssclusmultinvestigatorwithvtx_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssclusmultinvestigatorwithvtx_cfi.py @@ -6,11 +6,7 @@ wantVtxCorrHist = cms.bool(True), wantLumiCorrHist = cms.bool(False), wantPileupCorrHist = cms.bool(False), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), digiVtxCorrConfig = cms.PSet( wantedSubDets = cms.untracked.VPSet( cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK"), binMax = cms.int32(9523712/64)) diff --git a/DPGAnalysis/SiStripTools/python/ssclusmultlumicorr_cfi.py b/DPGAnalysis/SiStripTools/python/ssclusmultlumicorr_cfi.py index aceb8b8dd2876..bd234096b74fa 100644 --- a/DPGAnalysis/SiStripTools/python/ssclusmultlumicorr_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssclusmultlumicorr_cfi.py @@ -6,11 +6,7 @@ wantVtxCorrHist = cms.bool(False), wantLumiCorrHist = cms.bool(True), wantPileupCorrHist = cms.bool(False), - digiVtxCorrConfig = cms.PSet(), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), digiLumiCorrConfig = cms.PSet( lumiProducer = cms.InputTag("lumiProducer"), wantedSubDets = cms.untracked.VPSet( diff --git a/DPGAnalysis/SiStripTools/python/ssclusmultpileupcorr_cfi.py b/DPGAnalysis/SiStripTools/python/ssclusmultpileupcorr_cfi.py index dce52a53ba2ba..d89055c398f7f 100644 --- a/DPGAnalysis/SiStripTools/python/ssclusmultpileupcorr_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssclusmultpileupcorr_cfi.py @@ -1,14 +1,13 @@ import FWCore.ParameterSet.Config as cms ssclusmultpileupcorr = cms.EDAnalyzer('MultiplicityInvestigator', - vertexCollection = cms.InputTag(""), - wantInvestHist = cms.bool(False), - wantVtxCorrHist = cms.bool(False), - wantLumiCorrHist = cms.bool(False), - wantPileupCorrHist = cms.bool(True), - digiVtxCorrConfig = cms.PSet(), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( + vertexCollection = cms.InputTag(""), + wantInvestHist = cms.bool(False), + wantVtxCorrHist = cms.bool(False), + wantLumiCorrHist = cms.bool(False), + wantPileupCorrHist = cms.bool(True), + wantVtxPosCorrHist = cms.bool(False), + digiPileupCorrConfig = cms.PSet( pileupSummaryCollection = cms.InputTag("addPileupInfo"), useVisibleVertices = cms.bool(False), wantedSubDets = cms.untracked.VPSet( diff --git a/DPGAnalysis/SiStripTools/python/ssclusmultvtxposcorr_cfi.py b/DPGAnalysis/SiStripTools/python/ssclusmultvtxposcorr_cfi.py new file mode 100644 index 0000000000000..acae32389e0f4 --- /dev/null +++ b/DPGAnalysis/SiStripTools/python/ssclusmultvtxposcorr_cfi.py @@ -0,0 +1,21 @@ +import FWCore.ParameterSet.Config as cms + +ssclusmultvtxposcorr = cms.EDAnalyzer('MultiplicityInvestigator', + vertexCollection = cms.InputTag(""), + wantInvestHist = cms.bool(False), + wantVtxCorrHist = cms.bool(False), + wantLumiCorrHist = cms.bool(False), + wantPileupCorrHist = cms.bool(False), + wantVtxPosCorrHist = cms.bool(True), + digiVtxPosCorrConfig = cms.PSet( + mcVtxCollection=cms.InputTag("generator"), + wantedSubDets = cms.untracked.VPSet( + cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK"), binMax = cms.int32(9523712/64)) + ), + hitName = cms.untracked.string("cluster"), + numberOfBins = cms.untracked.int32(100), + scaleFactor = cms.untracked.int32(10) + ), + multiplicityMap = cms.InputTag("ssclustermultprod"), + ) + diff --git a/DPGAnalysis/SiStripTools/python/ssdigimultinvestigator_cfi.py b/DPGAnalysis/SiStripTools/python/ssdigimultinvestigator_cfi.py index f7ad61c4c0b65..6c357e47bf0a3 100644 --- a/DPGAnalysis/SiStripTools/python/ssdigimultinvestigator_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssdigimultinvestigator_cfi.py @@ -6,12 +6,7 @@ wantVtxCorrHist = cms.bool(False), wantLumiCorrHist = cms.bool(False), wantPileupCorrHist = cms.bool(False), - digiVtxCorrConfig = cms.PSet(), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), wantedSubDets = cms.untracked.VPSet( cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK"), binMax = cms.int32(9523712)), cms.PSet(detSelection = cms.uint32(3),detLabel = cms.string("TIB"), binMax = cms.int32(1787904)), diff --git a/DPGAnalysis/SiStripTools/python/ssdigimultinvestigatorwithvtx_cfi.py b/DPGAnalysis/SiStripTools/python/ssdigimultinvestigatorwithvtx_cfi.py index 5ef4b05541444..2ed71a7bb684d 100644 --- a/DPGAnalysis/SiStripTools/python/ssdigimultinvestigatorwithvtx_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssdigimultinvestigatorwithvtx_cfi.py @@ -6,11 +6,7 @@ wantVtxCorrHist = cms.bool(True), wantLumiCorrHist = cms.bool(False), wantPileupCorrHist = cms.bool(False), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), digiVtxCorrConfig = cms.PSet( wantedSubDets = cms.untracked.VPSet( cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK"), binMax = cms.int32(9523712)) diff --git a/DPGAnalysis/SiStripTools/python/ssdigimultlumicorr_cfi.py b/DPGAnalysis/SiStripTools/python/ssdigimultlumicorr_cfi.py index 88eda79e9e225..6c1980c8fa4e9 100644 --- a/DPGAnalysis/SiStripTools/python/ssdigimultlumicorr_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssdigimultlumicorr_cfi.py @@ -6,11 +6,7 @@ wantVtxCorrHist = cms.bool(False), wantLumiCorrHist = cms.bool(True), wantPileupCorrHist = cms.bool(False), - digiVtxCorrConfig = cms.PSet(), - digiPileupCorrConfig = cms.PSet( - pileupSummaryCollection=cms.InputTag(""), - useVisibleVertices = cms.bool(False) - ), + wantVtxPosCorrHist = cms.bool(False), digiLumiCorrConfig = cms.PSet( lumiProducer = cms.InputTag("lumiProducer"), wantedSubDets = cms.untracked.VPSet( diff --git a/DPGAnalysis/SiStripTools/python/ssdigimultpileupcorr_cfi.py b/DPGAnalysis/SiStripTools/python/ssdigimultpileupcorr_cfi.py index d475144171d8a..488a12101c55d 100644 --- a/DPGAnalysis/SiStripTools/python/ssdigimultpileupcorr_cfi.py +++ b/DPGAnalysis/SiStripTools/python/ssdigimultpileupcorr_cfi.py @@ -1,14 +1,13 @@ import FWCore.ParameterSet.Config as cms ssdigimultpileupcorr = cms.EDAnalyzer('MultiplicityInvestigator', - vertexCollection = cms.InputTag(""), - wantInvestHist = cms.bool(False), - wantVtxCorrHist = cms.bool(False), - wantLumiCorrHist = cms.bool(False), - wantPileupCorrHist = cms.bool(True), - digiVtxCorrConfig = cms.PSet(), - digiLumiCorrConfig = cms.PSet(lumiProducer=cms.InputTag("")), - digiPileupCorrConfig = cms.PSet( + vertexCollection = cms.InputTag(""), + wantInvestHist = cms.bool(False), + wantVtxCorrHist = cms.bool(False), + wantLumiCorrHist = cms.bool(False), + wantPileupCorrHist = cms.bool(True), + wantVtxPosCorrHist = cms.bool(False), + digiPileupCorrConfig = cms.PSet( pileupSummaryCollection = cms.InputTag("addPileupInfo"), useVisibleVertices = cms.bool(False), wantedSubDets = cms.untracked.VPSet( diff --git a/DPGAnalysis/SiStripTools/python/ssdigimultvtxposcorr_cfi.py b/DPGAnalysis/SiStripTools/python/ssdigimultvtxposcorr_cfi.py new file mode 100644 index 0000000000000..fe7fa22dc2a4a --- /dev/null +++ b/DPGAnalysis/SiStripTools/python/ssdigimultvtxposcorr_cfi.py @@ -0,0 +1,21 @@ +import FWCore.ParameterSet.Config as cms + +ssdigimultvtxposcorr = cms.EDAnalyzer('MultiplicityInvestigator', + vertexCollection = cms.InputTag(""), + wantInvestHist = cms.bool(False), + wantVtxCorrHist = cms.bool(False), + wantLumiCorrHist = cms.bool(False), + wantPileupCorrHist = cms.bool(False), + wantVtxPosCorrHist = cms.bool(True), + digiVtxPosCorrConfig = cms.PSet( + mcVtxCollection=cms.InputTag("generator"), + wantedSubDets = cms.untracked.VPSet( + cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK"), binMax = cms.int32(9523712/64)) + ), + hitName = cms.untracked.string("digi"), + numberOfBins = cms.untracked.int32(100), + scaleFactor = cms.untracked.int32(100) + ), + multiplicityMap = cms.InputTag("ssdigimultprod"), + ) + diff --git a/DPGAnalysis/SiStripTools/src/CommonAnalyzer.cc b/DPGAnalysis/SiStripTools/src/CommonAnalyzer.cc new file mode 100644 index 0000000000000..1598ba96ce5b4 --- /dev/null +++ b/DPGAnalysis/SiStripTools/src/CommonAnalyzer.cc @@ -0,0 +1,127 @@ +#include +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TFile.h" +#include "TDirectory.h" +#include "TObject.h" +#include "TH1F.h" +#include "TNamed.h" +#include "TList.h" +#include "TKey.h" +#include "TClass.h" +#include +#include + +CommonAnalyzer::CommonAnalyzer(TFile* file, const char* run, const char* mod, const char* path, const char* prefix): + _file(file), _runnumber(run), _module(mod), _path(path), _prefix(prefix) { } + +CommonAnalyzer::CommonAnalyzer(const CommonAnalyzer& dtca): + _file(dtca._file), _runnumber(dtca._runnumber), _module(dtca._module), _path(dtca._path), + _prefix(dtca._prefix){ } + +CommonAnalyzer& CommonAnalyzer::operator=(const CommonAnalyzer& dtca) { + + if(this != &dtca) { + _file = dtca._file; + _runnumber = dtca._runnumber; + _module = dtca._module; + _path = dtca._path; + _prefix = dtca._prefix; + } + return *this; +} + +void CommonAnalyzer::setRunNumber(const char* run) { _runnumber = run; } +void CommonAnalyzer::setFile(TFile* file) { _file = file; } +void CommonAnalyzer::setModule(const char* mod) { _module = mod; } +void CommonAnalyzer::setPath(const char* path) { _path = path; } +void CommonAnalyzer::setPrefix(const char* prefix) { _prefix = prefix; } + +const std::string& CommonAnalyzer::getRunNumber() const {return _runnumber;} +const std::string& CommonAnalyzer::getModule() const {return _module;} +const std::string& CommonAnalyzer::getPath() const {return _path;} +const std::string& CommonAnalyzer::getPrefix() const {return _prefix;} + +TObject* CommonAnalyzer::getObject(const char* name) const { + + TObject* obj = 0; + + std::string fullpath = _module + "/" + _path; + if(_file) { + bool ok = _file->cd(fullpath.c_str()); + if(ok && gDirectory) { + obj = gDirectory->Get(name); + } + } + return obj; + +} + +TNamed* CommonAnalyzer::getObjectWithSuffix(const char* name, const char* suffix) const { + + TNamed* obj = (TNamed*)getObject(name); + + if(obj) { + if(!strstr(obj->GetTitle(),"run")) { + char htitle[300]; + sprintf(htitle,"%s %s run %s",obj->GetTitle(),suffix,_runnumber.c_str()); + obj->SetTitle(htitle); + } + } + return obj; + +} + +const std::vector CommonAnalyzer::getRunList() const { + + std::vector runlist; + + std::string fullpath = _module + "/" + _path; + if(_file) { + bool ok = _file->cd(fullpath.c_str()); + if(ok && gDirectory) { + TList* keys = gDirectory->GetListOfKeys(); + TListIter it(keys); + TKey* key=0; + while((key=(TKey*)it.Next())) { + std::cout << key->GetName() << std::endl; + TClass cl(key->GetClassName()); + if (cl.InheritsFrom("TDirectory") && strstr(key->GetName(),"run_") != 0 ) { + unsigned int run; + sscanf(key->GetName(),"run_%u",&run); + runlist.push_back(run); + } + } + + } + } + // sort(runlist); + return runlist; + +} + +TH1F* CommonAnalyzer::getBinomialRatio(const CommonAnalyzer& denom, const char* name, const int rebin) const { + + TH1F* den = (TH1F*)denom.getObject(name); + TH1F* num = (TH1F*)getObject(name); + TH1F* ratio =0; + + if(den!=0 && num!=0) { + + TH1F* denreb=den; + TH1F* numreb=num; + if(rebin>0) { + denreb = (TH1F*)den->Rebin(rebin,"denrebinned"); + numreb = (TH1F*)num->Rebin(rebin,"numrebinned"); + } + + ratio = new TH1F(*numreb); + ratio->SetDirectory(0); + ratio->Reset(); + ratio->Sumw2(); + ratio->Divide(numreb,denreb,1,1,"B"); + delete denreb; + delete numreb; + } + + return ratio; +} diff --git a/DPGAnalysis/SiStripTools/src/DigiVtxPosCorrHistogramMaker.cc b/DPGAnalysis/SiStripTools/src/DigiVtxPosCorrHistogramMaker.cc new file mode 100644 index 0000000000000..7ee2c381b4e4a --- /dev/null +++ b/DPGAnalysis/SiStripTools/src/DigiVtxPosCorrHistogramMaker.cc @@ -0,0 +1,144 @@ +#include "DPGAnalysis/SiStripTools/interface/DigiVtxPosCorrHistogramMaker.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/Handle.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "TH2F.h" +#include "TProfile.h" + +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" +#include "DPGAnalysis/SiStripTools/interface/SiStripTKNumbers.h" + + +DigiVtxPosCorrHistogramMaker::DigiVtxPosCorrHistogramMaker(): + m_mcvtxcollection("generator"), m_hitname(), m_nbins(500), m_scalefact(), m_binmax(), m_labels(), + m_nmultvsvtxpos(), m_nmultvsvtxposprof(), m_subdirs() { } + +DigiVtxPosCorrHistogramMaker::DigiVtxPosCorrHistogramMaker(const edm::ParameterSet& iConfig): + m_mcvtxcollection(iConfig.getParameter("mcVtxCollection")), + m_hitname(iConfig.getUntrackedParameter("hitName","digi")), + m_nbins(iConfig.getUntrackedParameter("numberOfBins",500)), + m_scalefact(iConfig.getUntrackedParameter("scaleFactor",5)), + m_labels(), m_nmultvsvtxpos(), m_nmultvsvtxposprof(), m_subdirs() +{ + + std::vector + wantedsubds(iConfig.getUntrackedParameter >("wantedSubDets",std::vector())); + + for(std::vector::iterator ps=wantedsubds.begin();ps!=wantedsubds.end();++ps) { + m_labels[ps->getParameter("detSelection")] = ps->getParameter("detLabel"); + m_binmax[ps->getParameter("detSelection")] = ps->getParameter("binMax"); + } + + +} + + +DigiVtxPosCorrHistogramMaker::~DigiVtxPosCorrHistogramMaker() { + + for(std::map::const_iterator lab=m_labels.begin();lab!=m_labels.end();lab++) { + + const unsigned int i = lab->first; const std::string slab = lab->second; + + delete m_subdirs[i]; + } + +} + + + +void DigiVtxPosCorrHistogramMaker::book(const std::string dirname, const std::map& labels) { + + m_labels = labels; + book(dirname); + +} + +void DigiVtxPosCorrHistogramMaker::book(const std::string dirname) { + + edm::Service tfserv; + TFileDirectory subev = tfserv->mkdir(dirname); + + SiStripTKNumbers trnumb; + + edm::LogInfo("NumberOfBins") << "Number of Bins: " << m_nbins; + edm::LogInfo("ScaleFactors") << "y-axis range scale factor: " << m_scalefact; + edm::LogInfo("BinMaxValue") << "Setting bin max values"; + + for(std::map::const_iterator lab=m_labels.begin();lab!=m_labels.end();lab++) { + + const unsigned int i = lab->first; const std::string slab = lab->second; + + if(m_binmax.find(i)==m_binmax.end()) { + edm::LogVerbatim("NotConfiguredBinMax") << "Bin max for " << lab->second + << " not configured: " << trnumb.nstrips(i) << " used"; + m_binmax[i] = trnumb.nstrips(i); + } + + edm::LogVerbatim("BinMaxValue") << "Bin max for " << lab->second << " is " << m_binmax[i]; + + } + + for(std::map::const_iterator lab=m_labels.begin();lab!=m_labels.end();++lab) { + + const int i = lab->first; const std::string slab = lab->second; + + char name[200]; + char title[500]; + + m_subdirs[i] = new TFileDirectory(subev.mkdir(slab.c_str())); + + if(m_subdirs[i]) { + sprintf(name,"n%sdigivsvtxpos",slab.c_str()); + sprintf(title,"%s %s multiplicity vx MC vertex z position",slab.c_str(),m_hitname.c_str()); + m_nmultvsvtxpos[i] = m_subdirs[i]->make(name,title,200,-20.,20.,m_nbins,0.,m_binmax[i]/(m_scalefact*m_nbins)*m_nbins); + m_nmultvsvtxpos[i]->GetXaxis()->SetTitle("MC vertex z position (cm)"); m_nmultvsvtxpos[i]->GetYaxis()->SetTitle("Number of Hits"); + sprintf(name,"n%sdigivsvtxposprof",slab.c_str()); + m_nmultvsvtxposprof[i] = m_subdirs[i]->make(name,title,200,-20.,20.); + m_nmultvsvtxposprof[i]->GetXaxis()->SetTitle("MC vertex z position (cm)"); m_nmultvsvtxposprof[i]->GetYaxis()->SetTitle("Number of Hits"); + + } + + } + + +} + +void DigiVtxPosCorrHistogramMaker::beginRun(const unsigned int nrun) { + + +} + +void DigiVtxPosCorrHistogramMaker::fill(const edm::Event& iEvent, const std::map& ndigi) { + + // main interaction part + + edm::Handle< edm::HepMCProduct > EvtHandle ; + iEvent.getByLabel(m_mcvtxcollection, EvtHandle ) ; + + if(EvtHandle.isValid()) { + + const HepMC::GenEvent* Evt = EvtHandle->GetEvent(); + + // get the first vertex + + if(Evt->vertices_begin() != Evt->vertices_end()) { + + double vtxz = (*Evt->vertices_begin())->point3d().z()/10.; + + for(std::map::const_iterator digi=ndigi.begin();digi!=ndigi.end();digi++) { + if(m_labels.find(digi->first) != m_labels.end()) { + const unsigned int i=digi->first; + m_nmultvsvtxpos[i]->Fill(vtxz,digi->second); + m_nmultvsvtxposprof[i]->Fill(vtxz,digi->second); + } + } + } + } +} + + diff --git a/DPGAnalysis/SiStripTools/src/RunHistogramManager.cc b/DPGAnalysis/SiStripTools/src/RunHistogramManager.cc index 9b209cedeffcc..277b1bff1537c 100644 --- a/DPGAnalysis/SiStripTools/src/RunHistogramManager.cc +++ b/DPGAnalysis/SiStripTools/src/RunHistogramManager.cc @@ -100,10 +100,14 @@ void RunHistogramManager::beginRun(const edm::Run& iRun, TFileDirectory& subdir beginRun(iRun.run(),subdir); } else { + unsigned int fillnum = 0; + edm::Handle cirb; iRun.getByLabel("conditionsInEdm",cirb); - beginRun(cirb->lhcFillNumber,subdir); + if(!cirb.failedToGet() && cirb.isValid()) fillnum=cirb->lhcFillNumber; + + beginRun(fillnum,subdir); } } diff --git a/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_cfg.py b/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_cfg.py index a91b94dd83a05..5dc4216c647a9 100644 --- a/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_cfg.py +++ b/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_cfg.py @@ -54,7 +54,7 @@ #------------------------------------------------------------------ -process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) ) +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(options.inputFiles), diff --git a/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_vtxpos_cfg.py b/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_vtxpos_cfg.py new file mode 100644 index 0000000000000..d6355eef12dd4 --- /dev/null +++ b/DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_vtxpos_cfg.py @@ -0,0 +1,217 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + +process = cms.Process("OccupancyPlotsTest") + +#prepare options + +options = VarParsing.VarParsing("analysis") + +options.register ('globalTag', + "DONOTEXIST::All", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +options.register ('HLTprocess', + "HLT", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "HLTProcess") +options.register ('triggerPath', + "HLT_*", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "list of HLT paths") + +options.parseArguments() + +# + +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#------------------------------------------------------------------ + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(options.inputFiles), +# skipBadFiles = cms.untracked.bool(True), + inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") + ) + +# HLT Selection ------------------------------------------------------------ +process.load("HLTrigger.HLTfilters.triggerResultsFilter_cfi") +process.triggerResultsFilter.triggerConditions = cms.vstring(options.triggerPath) +process.triggerResultsFilter.hltResults = cms.InputTag( "TriggerResults", "", options.HLTprocess ) +process.triggerResultsFilter.l1tResults = cms.InputTag( "" ) +process.triggerResultsFilter.throw = cms.bool(False) + +process.seqHLTSelection = cms.Sequence(process.triggerResultsFilter) + + +#-------------------------------------- +#from DPGAnalysis.SiStripTools.occupancyplotsselections_cff import * +from DPGAnalysis.SiStripTools.occupancyplotsselections_simplified_cff import * + +process.ssclusmultprod = cms.EDProducer("SiStripClusterMultiplicityProducer", + clusterdigiCollection = cms.InputTag("siStripClusters"), + wantedSubDets = cms.VPSet() + ) +process.ssclusmultprod.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets) + +process.ssclusoccuprod = cms.EDProducer("SiStripClusterMultiplicityProducer", + clusterdigiCollection = cms.InputTag("siStripClusters"), + withClusterSize = cms.untracked.bool(True), + wantedSubDets = cms.VPSet() + ) +process.ssclusoccuprod.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets) + +process.spclusmultprod = cms.EDProducer("SiPixelClusterMultiplicityProducer", + clusterdigiCollection = cms.InputTag("siPixelClusters"), + wantedSubDets = cms.VPSet() + ) +process.spclusmultprod.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets) +process.spclusmultprod.wantedSubDets.extend(cms.VPSet( + cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel")), + cms.PSet(detSelection = cms.uint32(1),detLabel = cms.string("BPIX")), + cms.PSet(detSelection = cms.uint32(2),detLabel = cms.string("FPIX")), + cms.PSet(detSelection=cms.uint32(11),detLabel=cms.string("BPIX_L1"),selection=cms.untracked.vstring("0x1e0f0000-0x12010000")), + cms.PSet(detSelection=cms.uint32(12),detLabel=cms.string("BPIX_L2"),selection=cms.untracked.vstring("0x1e0f0000-0x12020000")), + cms.PSet(detSelection=cms.uint32(13),detLabel=cms.string("BPIX_L3"),selection=cms.untracked.vstring("0x1e0f0000-0x12030000")), + cms.PSet(detSelection=cms.uint32(21),detLabel=cms.string("FPIX_m"),selection=cms.untracked.vstring("0x1f800000-0x14800000")), + cms.PSet(detSelection=cms.uint32(22),detLabel=cms.string("FPIX_p"),selection=cms.untracked.vstring("0x1f800000-0x15000000")), + cms.PSet(detSelection=cms.uint32(99),detLabel=cms.string("Lumi"),selection=cms.untracked.vstring("0x1e0f0000-0x12020000", + "0x1e0f0000-0x12030000", + "0x1f800000-0x14800000", + "0x1f800000-0x15000000")) +)) + +process.spclusoccuprod = cms.EDProducer("SiPixelClusterMultiplicityProducer", + clusterdigiCollection = cms.InputTag("siPixelClusters"), + withClusterSize = cms.untracked.bool(True), + wantedSubDets = cms.VPSet() + ) +process.spclusoccuprod.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets) + +process.seqMultProd = cms.Sequence(process.ssclusmultprod + process.ssclusoccuprod + + process.spclusmultprod + process.spclusoccuprod) + +process.load("DPGAnalysis.SiStripTools.occupancyplots_cfi") +process.occupancyplots.wantedSubDets = OccupancyPlotsStripWantedSubDets + +process.pixeloccupancyplots = process.occupancyplots.clone() +process.pixeloccupancyplots.wantedSubDets = cms.VPSet() +process.pixeloccupancyplots.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets) +process.pixeloccupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod")) +process.pixeloccupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod")) + +process.alloccupancyplots = process.occupancyplots.clone() +process.alloccupancyplots.wantedSubDets = cms.VPSet() +process.alloccupancyplots.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets) +process.alloccupancyplots.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets) +process.alloccupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod"),cms.InputTag("ssclusmultprod")) +process.alloccupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod"),cms.InputTag("ssclusoccuprod")) + +process.load("DPGAnalysis.SiStripTools.spclusmultvtxposcorr_cfi") +process.spclusmultvtxposcorr.multiplicityMap = cms.InputTag("spclusmultprod") +process.spclusmultvtxposcorr.digiVtxPosCorrConfig.wantedSubDets = cms.untracked.VPSet( + cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(1),detLabel = cms.string("BPIX"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(11),detLabel = cms.string("BPIX_L1"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(12),detLabel = cms.string("BPIX_L2"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(13),detLabel = cms.string("BPIX_L3"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(2),detLabel = cms.string("FPIX"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(21),detLabel = cms.string("FPIX_m"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(22),detLabel = cms.string("FPIX_p"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(99),detLabel = cms.string("Lumi"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(111),detLabel = cms.string("BPIX_L1_mod_1"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(112),detLabel = cms.string("BPIX_L1_mod_2"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(113),detLabel = cms.string("BPIX_L1_mod_3"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(114),detLabel = cms.string("BPIX_L1_mod_4"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(115),detLabel = cms.string("BPIX_L1_mod_5"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(116),detLabel = cms.string("BPIX_L1_mod_6"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(117),detLabel = cms.string("BPIX_L1_mod_7"), binMax = cms.int32(200000)), + cms.PSet(detSelection = cms.uint32(118),detLabel = cms.string("BPIX_L1_mod_8"), binMax = cms.int32(200000)) + ) + + +process.load("TrackingPFG.Utilities.bxlumianalyzer_cfi") +process.load("Validation.RecoVertex.mcverticesanalyzer_cfi") + +process.goodVertices = cms.EDFilter("VertexSelector", + src = cms.InputTag("offlinePrimaryVertices"), + cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"), + filter = cms.bool(False), # otherwise it won't filter the events, just produce an empty vertex collection. +) + +process.load("Validation.RecoVertex.anotherprimaryvertexanalyzer_cfi") +process.primaryvertexanalyzer.pvCollection=cms.InputTag("goodVertices") +process.primaryvertexanalyzer.vHistogramMakerPSet.runHisto=cms.untracked.bool(False) +process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoProfile=cms.untracked.bool(False) +process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoBXProfile=cms.untracked.bool(False) + +process.seqAnalyzers = cms.Sequence(process.bxlumianalyzer + process.goodVertices + process.primaryvertexanalyzer + + process.occupancyplots + process.pixeloccupancyplots + process.alloccupancyplots + + process.spclusmultvtxposcorr + process.mcverticesanalyzer ) + +#------------------------------------------------------------------------------------------- + +process.seqProducers = cms.Sequence(process.seqMultProd) + +process.p0 = cms.Path( + process.seqHLTSelection + + process.seqProducers + + process.seqAnalyzers + ) + +#----GlobalTag ------------------------ + +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("Configuration.StandardSequences.Reconstruction_cff") + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.GlobalTag.globaltag = options.globalTag + + + +process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet( +# cms.PSet( record = cms.string("SiStripDetVOffRcd"), tag = cms.string("") ), + cms.PSet( record = cms.string("SiStripDetCablingRcd"), tag = cms.string("") ), + cms.PSet( record = cms.string("RunInfoRcd"), tag = cms.string("") ), + cms.PSet( record = cms.string("SiStripBadChannelRcd"), tag = cms.string("") ), + cms.PSet( record = cms.string("SiStripBadFiberRcd"), tag = cms.string("") ), + cms.PSet( record = cms.string("SiStripBadModuleRcd"), tag = cms.string("") ) +) + +process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader") + +process.TFileService = cms.Service('TFileService', +# fileName = cms.string('OccupancyPlotsTest_newschema.root') + fileName = cms.string('OccupancyPlotsTest_vtxpos.root') + ) + + +#print process.dumpPython() diff --git a/DPGAnalysis/SiStripTools/test/crab_OccupancyPlotsTest_vtxpos.cfg b/DPGAnalysis/SiStripTools/test/crab_OccupancyPlotsTest_vtxpos.cfg new file mode 100644 index 0000000000000..16b89a89630fd --- /dev/null +++ b/DPGAnalysis/SiStripTools/test/crab_OccupancyPlotsTest_vtxpos.cfg @@ -0,0 +1,131 @@ +[CRAB] + +jobtype = cmssw +#scheduler = glite +scheduler = caf +### NOTE: just setting the name of the server (pi, lnl etc etc ) +### crab will submit the jobs to the server... +#server_name = bari +# +[CMSSW] + +### The data you want to access (to be found on DBS) + +#dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet + + +#datasetpath=/Neutrino_Pt_2to20_gun/Summer12-EflowHpu_Pileup_START53_V16-v1/RECODEBUG +#datasetpath=/Neutrino_Pt_2to20_gun/Summer12-EflowHpu_Pileup_START53_V7C-v1/RECODEBUG +datasetpath=/MinBias_TuneZ2star_8TeV-pythia6/Summer12-EflowHpu_NoPileUp_START53_V7C-v1/RECODEBUG +#datasetpath=/Neutrino_Pt_2to20_gun/Summer12_DR53X-PU45_START53_V7C-v1/GEN-SIM-RECO +#datasetpath=/Neutrino_Pt_2to20_gun/Summer12_DR53X-PU45_noOOT_START53_V7C-v1/GEN-SIM-RECO + +pycfg_params= globalTag=START53_V7C::All + +pset=DPGAnalysis/SiStripTools/test/OccupancyPlotsTest_vtxpos_cfg.py + +#lumi_mask=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions11/7TeV/Prompt/Cert_160404-176309_7TeV_PromptReco_Collisions11_JSON.txt +#runselection = 176304 + +#total_number_of_lumis =-1 +#lumis_per_job = 20 + +total_number_of_events=10000000 +events_per_job = 10000 +#total_number_of_events=1000 +#events_per_job = 200 + +### The output files (comma separated list) +#output_file = + +[USER] + +### OUTPUT files Management +## output back into UI +return_data = 1 + +### To use a specific name of UI directory where CRAB will create job to submit (with full path). +### the default directory will be "crab_0_data_time" +#ui_working_dir = /afs/cern.ch/cms/tracking/output/OccupancyPlotsTest_vtxpos_neutrino_summer12_eflowhpu_start53_v7c_v2 +ui_working_dir = /afs/cern.ch/cms/tracking/output/OccupancyPlotsTest_vtxpos_minbias_z2star_summer12_eflowhpu_start53_v7c_v2 + +### To specify the UI directory where to store the CMS executable output +### FULL path is mandatory. Default is /res will be used. +#outputdir= /full/path/yourOutDir + +### To specify the UI directory where to store the stderr, stdout and .BrokerInfo of submitted jobs +### FULL path is mandatory. Default is /res will be used. +#logdir= /full/path/yourLogDir + +### OUTPUT files INTO A SE +copy_data = 0 + +### if you want to copy data in a "official CMS site" +### you have to specify the name as written in +#storage_element = T2_IT_Bari +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = name_directory_you_want + +### if you want to copy your data at CAF +#storage_element = T2_CH_CAF +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = express_2010_132421 + +### if you want to copy your data to your area in castor at cern +### or in a "not official CMS site" you have to specify the complete name of SE +storage_element=srm-cms.cern.ch +### this directory is the mountpoin of SE +#storage_path=/srm/managerv2?SFN=/castor/cern.ch +storage_path=/castor/cern.ch +### directory or tree of directory under the mounpoint +#user_remote_dir = /user/v/venturia/skims/express_2010_132421_132422_3 + + +### To publish produced output in a local istance of DBS set publish_data = 1 +publish_data=0 +### Specify the dataset name. The full path will be //USER +publish_data_name = name_you_prefer +### Specify the URL of DBS istance where CRAB has to publish the output files +#dbs_url_for_publication = https://cmsdbsprod.cern.ch:8443/cms_dbs_caf_analysis_01_writer/servlet/DBSServlet + +### To specify additional files to be put in InputSandBox +### write the full path if the files are not in the current directory +### (wildcard * are allowed): comma separated list +#additional_input_files = file1, file2, /full/path/file3 + +#if server +#thresholdLevel = 100 +#eMail = your@Email.address + +[CAF] + +queue = cmscaf1nd + +[GRID] +# +## RB/WMS management: +rb = CERN + +## Black and White Lists management: +## By Storage +se_black_list = T0,T1 +#se_black_list = T0 +#se_white_list = + +## By ComputingElement +#ce_black_list = +#ce_white_list = + +[CONDORG] + +# Set this to condor to override the batchsystem defined in gridcat. +#batchsystem = condor + +# Specify addition condor_g requirments +# use this requirment to run on a cms dedicated hardare +# globus_rsl = (condor_submit=(requirements 'ClusterName == \"CMS\" && (Arch == \"INTEL\" || Arch == \"X86_64\")')) +# use this requirement to run on the new hardware +#globus_rsl = (condor_submit=(requirements 'regexp(\"cms-*\",Machine)')) + diff --git a/DPGAnalysis/SiStripTools/test/ssqhistorytest_fakesource_cfg.py b/DPGAnalysis/SiStripTools/test/ssqhistorytest_fakesource_cfg.py new file mode 100644 index 0000000000000..2aecc12dce6bf --- /dev/null +++ b/DPGAnalysis/SiStripTools/test/ssqhistorytest_fakesource_cfg.py @@ -0,0 +1,123 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + + +from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet + +process = cms.Process("sistripqualityhistoryfakesource") + +#prepare options + +options = VarParsing.VarParsing("analysis") + +options.register ('globalTag', + "DONOTEXIST::All", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +options.register ('firstRun', + "1", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.int, # string, int, or float + "First Run Number") + +options.parseArguments() + +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +#---------------------------------------------------------------- + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("INFO") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#----Remove too verbose PrimaryVertexProducer + +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptive") +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptiveNoBS") + +#----Remove too verbose BeamSpotOnlineProducer + +process.MessageLogger.suppressInfo.append("testBeamSpot") +process.MessageLogger.suppressInfo.append("onlineBeamSpot") +process.MessageLogger.suppressWarning.append("testBeamSpot") +process.MessageLogger.suppressWarning.append("onlineBeamSpot") + +#----Remove too verbose TrackRefitter + +process.MessageLogger.suppressInfo.append("newTracksFromV0") +process.MessageLogger.suppressInfo.append("newTracksFromOtobV0") + +process.MessageLogger.suppressWarning.append("consecutiveHEs") + + +#------------------------------------------------------------------ + +#process.MessageLogger.cout.threshold = cms.untracked.string("DEBUG") +#process.MessageLogger.debugModules = cms.untracked.vstring("eventtimedistribution") + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) ) + +process.source = cms.Source("EmptySource", + firstRun = cms.untracked.uint32(options.firstRun), + numberEventsInRun = cms.untracked.uint32(1)#, +# processingMode = cms.untracked.string("Runs") + ) + +#process.source = cms.Source("PoolSource", +# fileNames = cms.untracked.vstring(options.inputFiles), +## skipBadFiles = cms.untracked.bool(True), +# inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") +# ) + + +process.load("DPGAnalysis.SiStripTools.sistripqualityhistory_noDCS_cff") + +process.ssqhistory.runProcess = cms.bool(True) +process.ssqhistory.maxLSBeforeRebin = cms.untracked.uint32(100) +process.ssqhistory.startingLSFraction = cms.untracked.uint32(1) +process.ssqhistorystrips = process.ssqhistory.clone(granularityMode = cms.untracked.uint32(3)) + +#process.load("DPGAnalysis.SiStripTools.fedbadmodulefilter_cfi") +#process.fedbadmodulefilter.badModThr = cms.uint32(0) +#process.fedbadmodulefilter.wantedHisto = cms.untracked.bool(True) + +process.load("DPGAnalysis.SiStripTools.sipixelqualityhistory_cfi") + +process.spqhistory.runProcess = cms.bool(True) +process.spqhistory.maxLSBeforeRebin = cms.untracked.uint32(100) +process.spqhistory.startingLSFraction = cms.untracked.uint32(1) +process.spqhistorymod = process.spqhistory.clone(granularityMode = cms.untracked.uint32(1)) + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('ssqhistorytest.root') + ) + +#----GlobalTag ------------------------ + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.GlobalTag.globaltag = options.globalTag + +# + + +process.p0 = cms.Path(process.ssqhistory+process.ssqhistory+process.ssqhistorystrips + process.spqhistory+process.spqhistorymod) # + process.fedbadmodulefilter) diff --git a/DQM/TrackingMonitor/interface/TrackingMonitor.h b/DQM/TrackingMonitor/interface/TrackingMonitor.h index 206d8ec816c87..7648c7132670c 100644 --- a/DQM/TrackingMonitor/interface/TrackingMonitor.h +++ b/DQM/TrackingMonitor/interface/TrackingMonitor.h @@ -33,6 +33,7 @@ Monitoring source for general quantities related to tracks. #include "DataFormats/SiStripCluster/interface/SiStripCluster.h" #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h" +#include "CommonTools/Utils/interface/StringCutObjectSelector.h" class DQMStore; class TrackAnalyzer; @@ -78,7 +79,6 @@ class TrackingMonitor : public edm::EDAnalyzer edm::EDGetTokenT pvSrcToken_; edm::EDGetTokenT allTrackToken_; - edm::EDGetTokenT trackToken_; edm::EDGetTokenT trackCandidateToken_; edm::EDGetTokenT > seedToken_; @@ -156,6 +156,10 @@ class TrackingMonitor : public edm::EDAnalyzer bool doFractionPlot_; GenericTriggerEventFlag* genTriggerEventFlag_; + + StringCutObjectSelector numSelection_; + StringCutObjectSelector denSelection_; + }; #endif //define TrackingMonitor_H diff --git a/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py b/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py index 7728f84f707ad..df3dfbdd8474f 100644 --- a/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py +++ b/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py @@ -5,6 +5,8 @@ TrackMon = cms.EDAnalyzer("TrackingMonitor", # input tags + numCut = cms.string(" pt >= 1 & quality('highPurity') "), + denCut = cms.string(" pt >= 1 "), allTrackProducer = cms.InputTag("generalTracks"), TrackProducer = cms.InputTag("generalTracks"), SeedProducer = cms.InputTag("initialStepSeeds"), diff --git a/DQM/TrackingMonitor/src/TrackingMonitor.cc b/DQM/TrackingMonitor/src/TrackingMonitor.cc index f13854979ac32..ef0fd7767b022 100644 --- a/DQM/TrackingMonitor/src/TrackingMonitor.cc +++ b/DQM/TrackingMonitor/src/TrackingMonitor.cc @@ -71,6 +71,8 @@ TrackingMonitor::TrackingMonitor(const edm::ParameterSet& iConfig) , doHitPropertiesPlots_ ( conf_.getParameter("doHitPropertiesPlots")) , doPUmonitoring_ ( conf_.getParameter("doPUmonitoring") ) , genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig,consumesCollector())) + , numSelection_ (conf_.getParameter("numCut")) + , denSelection_ (conf_.getParameter("denCut")) { edm::ConsumesCollector c{ consumesCollector() }; @@ -482,15 +484,22 @@ void TrackingMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& i iEvent.getByToken(trackToken_, trackHandle); int numberOfAllTracks = 0; + int numberOfTracks_den = 0; edm::Handle allTrackHandle; iEvent.getByToken(allTrackToken_,allTrackHandle); if (allTrackHandle.isValid()) { numberOfAllTracks = allTrackHandle->size(); + for (reco::TrackCollection::const_iterator track = allTrackHandle->begin(); + track!=allTrackHandle->end(); ++track) { + if ( denSelection_(*track) ) + numberOfTracks_den++; + } } if (trackHandle.isValid()) { int numberOfTracks = trackHandle->size(); + int numberOfTracks_num = 0; reco::TrackCollection trackCollection = *trackHandle; // calculate the mean # rechits and layers @@ -499,6 +508,9 @@ void TrackingMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& i for (reco::TrackCollection::const_iterator track = trackCollection.begin(); track!=trackCollection.end(); ++track) { + if ( numSelection_(*track) ) + numberOfTracks_num++; + if ( doProfilesVsLS_ || doAllPlots) NumberOfRecHitsPerTrackVsLS->Fill(static_cast(iEvent.id().luminosityBlock()),track->recHitsSize()); @@ -511,6 +523,9 @@ void TrackingMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& i double frac = -1.; if (numberOfAllTracks > 0) frac = static_cast(numberOfTracks)/static_cast(numberOfAllTracks); + std::cout << "old frac: " << frac << std::endl; + if (numberOfTracks_den > 0) frac = static_cast(numberOfTracks_num)/static_cast(numberOfTracks_den); + std::cout << "new frac: " << frac << std::endl; if (doGeneralPropertiesPlots_ || doAllPlots){ NumberOfTracks -> Fill(numberOfTracks); diff --git a/DQM/TrackingMonitorSource/python/TrackCollections2monitor_cff.py b/DQM/TrackingMonitorSource/python/TrackCollections2monitor_cff.py index 4fd9e4fa0bcbe..fa60366c1f0d1 100644 --- a/DQM/TrackingMonitorSource/python/TrackCollections2monitor_cff.py +++ b/DQM/TrackingMonitorSource/python/TrackCollections2monitor_cff.py @@ -6,6 +6,8 @@ trackPtMin = {} trackPtMax = {} doPlotsPCA = {} +numCutString = {} +denCutString = {} selectedTracks = [] @@ -14,6 +16,8 @@ trackPtMin ['generalTracks'] = cms.double(0.) trackPtMax ['generalTracks'] = cms.double(100.) doPlotsPCA ['generalTracks'] = cms.bool(False) +numCutString ['generalTracks'] = cms.string("") +denCutString ['generalTracks'] = cms.string("") trackSelector = cms.EDFilter('TrackSelector', src = cms.InputTag('generalTracks'), @@ -29,6 +33,8 @@ vertexfolderName['highPurityPtRange0to1'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_0to1' trackPtMin ['highPurityPtRange0to1'] = cms.double(0.) trackPtMax ['highPurityPtRange0to1'] = cms.double(1.) +numCutString ['highPurityPtRange0to1'] = cms.string("") # default: " pt >= 1 & quality('highPurity') " +denCutString ['highPurityPtRange0to1'] = cms.string(" pt >= 0 & pt < 1 ") # it is as in the default config (just be sure) highPurityPtRange1to10 = trackSelector.clone() highPurityPtRange1to10.cut = cms.string("quality('highPurity') & pt >= 1 & pt < 10 ") @@ -38,6 +44,8 @@ vertexfolderName['highPurityPtRange1to10'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_1to10' trackPtMin ['highPurityPtRange1to10'] = cms.double(1.) trackPtMax ['highPurityPtRange1to10'] = cms.double(10.) +numCutString ['highPurityPtRange1to10'] = cms.string("") # default: " pt >= 1 & quality('highPurity') " +denCutString ['highPurityPtRange1to10'] = cms.string(" pt >= 1 & pt < 10 ") # it is as in the default config (just be sure) highPurityPt10 = trackSelector.clone() @@ -48,6 +56,8 @@ vertexfolderName['highPurityPt10'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_10' trackPtMin ['highPurityPt10'] = cms.double(10.) trackPtMax ['highPurityPt10'] = cms.double(110.) +numCutString ['highPurityPt10'] = cms.string("") # default: " pt >= 1 & quality('highPurity') " +denCutString ['highPurityPt10'] = cms.string(" pt >= 10 ") # it is as in the default config (just be sure) ###### old monitored track collections @@ -60,6 +70,8 @@ trackPtMin ['highPurityPt1'] = cms.double(0.) trackPtMax ['highPurityPt1'] = cms.double(100.) doPlotsPCA ['highPurityPt1'] = cms.bool(True) +numCutString ['highPurityPt1'] = cms.string("") # default: " pt >= 1 & quality('highPurity') " +denCutString ['highPurityPt1'] = cms.string(" pt >= 1 ") # it is as in the default config (just be sure) selectedTracks.extend( ['generalTracks'] ) #selectedTracks.extend( ['highPurityPtRange0to1'] ) diff --git a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py index db799896c82f1..141e597f87802 100644 --- a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py +++ b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py @@ -23,6 +23,8 @@ locals()[label].doDCAPlots = doPlotsPCA[tracks] locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks] locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks] + locals()[label].numCut = numCutString[tracks] + locals()[label].denCut = denCutString[tracks] locals()[label].setLabel(label) @@ -38,6 +40,8 @@ locals()[label].doDCAPlots = doPlotsPCA[tracks] locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks] locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks] + locals()[label].numCut = numCutString[tracks] + locals()[label].denCut = denCutString[tracks] locals()[label].setLabel(label) diff --git a/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc b/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc index 4c68fc58ebf0c..d2f37be5b48b0 100644 --- a/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc +++ b/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc @@ -303,21 +303,23 @@ void MatchCandidateBenchmark::fillOne(const reco::Candidate& cand, std::vector ptBinsPS = parameterSet.getParameter< std::vector >( "VariablePtBins" ); edm::ParameterSet ptPS = parameterSet.getParameter("PtHistoParameter"); - float* ptBins; + std::vector ptBins; if (ptBinsPS.size() > 1) { - ptBins = new float[ptBinsPS.size()]; - for (size_t i = 0; i < ptBinsPS.size(); i++) - ptBins[i] = ptBinsPS[i]; + ptBins.reserve(ptBinsPS.size()); + for (size_t i = 0; i < ptBinsPS.size(); i++) { + ptBins.push_back(ptBinsPS[i]); + } } else { Int_t nFixedBins = ptPS.getParameter("nBin"); - ptBins = new float[nFixedBins+1]; - for (Int_t i = 0; i <= nFixedBins; i++) - ptBins[i] = ptPS.getParameter("xMin") + i*((ptPS.getParameter("xMax") - ptPS.getParameter("xMin")) / nFixedBins) ; + ptBins.reserve(nFixedBins + 1); + for (Int_t i = 0; i <= nFixedBins; i++) { + ptBins.push_back( ptPS.getParameter("xMin") + i*((ptPS.getParameter("xMax") - ptPS.getParameter("xMin")) / nFixedBins) ); + } ptBinsPS.resize(nFixedBins); } edm::ParameterSet dptOvptPS = parameterSet.getParameter("DeltaPtOvPtHistoParameter"); - if (matchedCand.pt() > ptBins[0]) { // underflow problem + if (matchedCand.pt() > ptBins.at(0)) { // underflow problem if (delta_et_Over_et_VS_et_) delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt()) / matchedCand.pt() ); if ( fabs(cand.eta()) >= dptOvptPS.getParameter("BREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter("BREtaMax")) if (BRdelta_et_Over_et_VS_et_) BRdelta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() ); @@ -343,16 +345,15 @@ void MatchCandidateBenchmark::fillOne(const reco::Candidate& cand, profileRMS_delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() ); } */ - for (size_t i = 0; i < pTRes_.size(); i++) - if (matchedCand.pt() >= ptBins[i] && matchedCand.pt() < ptBins[i+1]) { + for (size_t i = 0; i < pTRes_.size(); i++) { + if (matchedCand.pt() >= ptBins.at(i) && matchedCand.pt() < ptBins.at(i+1)) { if (pTRes_[i]) pTRes_[i]->Fill( (cand.pt() - matchedCand.pt()) / matchedCand.pt() ) ; if ( fabs(cand.eta()) >= dptOvptPS.getParameter("BREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter("BREtaMax")) if (BRpTRes_[i]) BRpTRes_[i]->Fill( (cand.pt() - matchedCand.pt()) / matchedCand.pt() ) ; // Fill Barrel if ( fabs(cand.eta()) >= dptOvptPS.getParameter("EREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter("EREtaMax")) if (ERpTRes_[i]) ERpTRes_[i]->Fill( (cand.pt() - matchedCand.pt()) / matchedCand.pt() ) ; // Fill Endcap } - - delete ptBins; + } } } diff --git a/DQMOffline/Trigger/interface/TopDiLeptonHLTOfflineDQM.h b/DQMOffline/Trigger/interface/TopDiLeptonHLTOfflineDQM.h new file mode 100644 index 0000000000000..cd5a2c416aa40 --- /dev/null +++ b/DQMOffline/Trigger/interface/TopDiLeptonHLTOfflineDQM.h @@ -0,0 +1,299 @@ +#ifndef TOPDILEPTONHLTOFFLINEDQM +#define TOPDILEPTONHLTOFFLINEDQM + +#include +#include + +#include "FWCore/Framework/interface/Event.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +#include "DataFormats/Math/interface/deltaR.h" +#include "DataFormats/JetReco/interface/Jet.h" +#include "DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/METReco/interface/CaloMET.h" +#include "JetMETCorrections/Objects/interface/JetCorrector.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" + +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" + +#include "FWCore/Framework/interface/ConsumesCollector.h" + +//*Originally from DQM/Physics by R. Wolf and J. Andrea*/ + +/** + \class MonitorDiLepton TopDiLeptonHLTOfflineDQM.h + + \brief Helper class to define histograms for monitoring of muon/electron/jet/met quantities. + + Helper class to contain histograms for the monitoring of muon/electron/jet/met quantities. + This class can be instantiated several times after several event selection steps. It can + be used to fill histograms in three different granularity levels according to STANDARD + (<10 histograms), VERBOSE(<20 histograms), DEBUG(<30 histgorams). Note that for the sake + of simplicity and to force the analyst to keep the number of histograms to be monitored + small the MonitorDiLepton class contains the histograms for all objects at once. It should + not contain much more than 10 histograms though in the STANDARD configuration, as these + histograms will be monitored at each SelectionStep. Monitoring of histograms after selec- + tion steps within the same object collection needs to be implemented within the Monitor- + Ensemble. It will not be covered by the SelectionStep class. + */ + +namespace HLTOfflineDQMTopDiLepton { + + class MonitorDiLepton { + public: + /// make clear which LorentzVector to use + /// for jet, electrons and muon buffering + typedef reco::LeafCandidate::LorentzVector LorentzVector; + /// different decay channels + enum DecayChannel{ NONE, DIMUON, DIELEC, ELECMU }; + + public: + /// default contructor + MonitorDiLepton(const char* label, const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC); + /// default destructor + ~MonitorDiLepton(){}; + + /// book histograms in subdirectory _directory_ + void book(DQMStore::IBooker& store_); + /// fill monitor histograms with electronId and jetCorrections + void fill(const edm::Event& event, const edm::EventSetup& setup, const HLTConfigProvider& hltConfig, const std::vector triggerPaths); + + private: + /// deduce monitorPath from label, the label is expected + /// to be of type 'selectionPath:monitorPath' + std::string monitorPath(const std::string& label) const { return label.substr(label.find(':')+1); }; + /// deduce selectionPath from label, the label is + /// expected to be of type 'selectionPath:monitorPath' + std::string selectionPath(const std::string& label) const { return label.substr(0, label.find(':')); }; + + /// set labels for event logging histograms + void loggerBinLabels(std::string hist); + /// set configurable labels for trigger monitoring histograms + void triggerBinLabels(std::string channel, const std::vector& labels); + /// fill trigger monitoring histograms + void fill(const edm::Event& event, const edm::TriggerResults& triggerTable, std::string channel, const std::vector& labels) const; + + /// check if histogram was booked + bool booked(const std::string histName) const { return hists_.find(histName.c_str())!=hists_.end(); }; + /// fill histogram if it had been booked before + void fill(const std::string histName, double value) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue); }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue, double zValue) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue); }; + + private: + std::string folder_; + /// instance label + std::string label_; + /// input sources for monitoring + edm::EDGetTokenT< edm::View > elecs_; + edm::EDGetTokenT< edm::View > muons_; + edm::EDGetTokenT< edm::View > jets_; + /// considers a vector of METs + std::vector< edm::EDGetTokenT< edm::View > > mets_; + + /// trigger table + edm::EDGetTokenT< edm::TriggerResults > triggerTable_; + edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventWithRefsTag_; + /// trigger paths for monitoring, expected + /// to be of form signalPath:MonitorPath + std::vector elecMuPaths_; + /// trigger paths for di muon channel + std::vector diMuonPaths_; + /// trigger paths for di electron channel + std::vector diElecPaths_; + + /// electronId label + edm::EDGetTokenT< edm::ValueMap > electronId_; + /// electronId pattern we expect the following pattern: + /// 0: fails + /// 1: passes electron ID only + /// 2: passes electron Isolation only + /// 3: passes electron ID and Isolation only + /// 4: passes conversion rejection + /// 5: passes conversion rejection and ID + /// 6: passes conversion rejection and Isolation + /// 7: passes the whole selection + /// As described on https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID + int eidPattern_; + /// extra isolation criterion on electron + StringCutObjectSelector* elecIso_; + /// extra selection on electrons + StringCutObjectSelector* elecSelect_; + + /// extra isolation criterion on muon + StringCutObjectSelector* muonIso_; + /// extra selection on muons + StringCutObjectSelector* muonSelect_; + + /// jetCorrector + std::string jetCorrector_; + /// jetID as an extra selection type + edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_; + /// extra jetID selection on calo jets + StringCutObjectSelector* jetIDSelect_; + /// extra selection on jets (here given as std::string as it depends + /// on the the jet type, which selections are valid and which not) + std::string jetSelect_; + /// mass window upper and lower edge + double lowerEdge_, upperEdge_; + + /// number of logged interesting events + int elecMuLogged_, diMuonLogged_, diElecLogged_; + /// histogram container + std::map hists_; + + /// hlt objects + trigger::Vids electronIds_; + trigger::VRelectron electronRefs_; + trigger::Vids muonIds_; + trigger::VRmuon muonRefs_; + }; + + inline void + MonitorDiLepton::loggerBinLabels(std::string hist) + { + // set axes titles for selected events + hists_[hist.c_str()]->getTH1()->SetOption("TEXT"); + hists_[hist.c_str()]->setBinLabel( 1 , "Run" , 1); + hists_[hist.c_str()]->setBinLabel( 2 , "Block" , 1); + hists_[hist.c_str()]->setBinLabel( 3 , "Event" , 1); + hists_[hist.c_str()]->setBinLabel( 6 , "pt_{L2L3}(jet1)" , 1); + hists_[hist.c_str()]->setBinLabel( 7 , "pt_{L2L3}(jet2)" , 1); + hists_[hist.c_str()]->setBinLabel( 8 , "MET_{Calo}" , 1); + hists_[hist.c_str()]->setAxisTitle("logged evts" , 2); + + if(hist=="diMuonLogger_"){ + hists_[hist.c_str()]->setBinLabel( 4 , "pt(muon)" , 1); + hists_[hist.c_str()]->setBinLabel( 5 , "pt(muon)" , 1); + } + if(hist=="diElecLogger_"){ + hists_[hist.c_str()]->setBinLabel( 4 , "pt(elec)" , 1); + hists_[hist.c_str()]->setBinLabel( 5 , "pt(elec)" , 1); + } + if(hist=="elecMuLogger_"){ + hists_[hist.c_str()]->setBinLabel( 4 , "pt(elec)" , 1); + hists_[hist.c_str()]->setBinLabel( 5 , "pt(muon)" , 1); + } + } + + inline void + MonitorDiLepton::triggerBinLabels(std::string channel, const std::vector& labels) + { + for(unsigned int idx=0; idxsetBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1); + } + } + + inline void + MonitorDiLepton::fill(const edm::Event& event, const edm::TriggerResults& triggerTable, std::string channel, const std::vector& labels) const + { + for(unsigned int idx=0; idx + +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/Common/interface/TriggerResults.h" +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" + + +/** + \class TopDiLeptonHLTOfflineDQM TopDiLeptonHLTOfflineDQM.h + + \brief Module to apply a monitored selection of top like events in the di-leptonic channel + + Plugin to apply a monitored selection of top like events with some minimal flexibility + in the number and definition of the selection steps. To achieve this flexibility it + employes the SelectionStep class. The MonitorDiLepton class is used to provide a well + defined set of histograms to be monitored after each selection step. The SelectionStep + class provides a flexible and intuitive selection via the StringCutParser. SelectionStep + and MonitorDiLepton classes are interleaved. The monitoring starts after a preselection + step (which is not monitored in the context of this module) with an instance of the + MonitorDiLepton class. The following objects are supported for selection: + + - jets : of type reco::Jet + - elecs : of type reco::GsfElectron + - muons : of type reco::Muon + - met : of type reco::MET + + These types have to be present as prefix of the selection step paramter _label_ separated + from the rest of the label by a ':' (e.g. in the form "jets:step0"). The class expects + selection labels of this type. They will be disentangled by the private helper functions + _objectType_ and _seletionStep_ as declared below. + */ + +/// define MonitorDiLepton to be used +//using TopDiLeptonOffline::MonitorDiLepton; + +class TopDiLeptonHLTOfflineDQM : public DQMEDAnalyzer { + public: + /// default constructor + TopDiLeptonHLTOfflineDQM(const edm::ParameterSet& cfg); + /// default destructor + ~TopDiLeptonHLTOfflineDQM(){ + if( beamspotSelect_ ) delete beamspotSelect_; + if( vertexSelect_ ) delete vertexSelect_; + } + + /// do this during the event loop + virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c); + virtual void analyze(const edm::Event& event, const edm::EventSetup& setup); + void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; + + private: + /// deduce object type from ParameterSet label, the label + /// is expected to be of type 'objectType:selectionStep' + std::string objectType(const std::string& label) { return label.substr(0, label.find(':')); }; + /// deduce selection step from ParameterSet label, the + /// label is expected to be of type 'objectType:selectionStep' + std::string selectionStep(const std::string& label) { return label.substr(label.find(':')+1); }; + + private: + /// trigger table + edm::EDGetTokenT< edm::TriggerResults > triggerTable_; + /// trigger paths + std::vector triggerPaths_; + /// primary vertex + edm::EDGetTokenT< std::vector > vertex_; + /// string cut selector + StringCutObjectSelector* vertexSelect_; + /// beamspot + edm::EDGetTokenT< reco::BeamSpot > beamspot_; + /// string cut selector + StringCutObjectSelector* beamspotSelect_; + + HLTConfigProvider hltConfig_; + + /// needed to guarantee the selection order as defined by the order of + /// ParameterSets in the _selection_ vector as defined in the config + std::vector selectionOrder_; + /// this is the heart component of the plugin; std::string keeps a label + /// the selection step for later identification, edm::ParameterSet keeps + /// the configuration of the selection for the SelectionStep class, + /// MonitoringEnsemble keeps an instance of the MonitorDiLepton class to + /// be filled _after_ each selection step + std::map > selection_; + + std::map selectmap_; +}; + +#endif diff --git a/DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h b/DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h new file mode 100644 index 0000000000000..0021738140ce0 --- /dev/null +++ b/DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h @@ -0,0 +1,330 @@ +#ifndef TOPHLTOFFLINEDQMHELPER +#define TOPHLTOFFLINEDQMHELPER + +#include +#include +//#include +#include "TString.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/Common/interface/TriggerResults.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/RecoCandidate/interface/RecoCandidate.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" + +/*Originally from DQM/Physics package, written by Roger Wolf and Jeremy Andrea*/ +/** + \fn TopHLTOfflineDQMHelper.h + + \brief Helper function to determine trigger accepts. + + Helper function to determine trigger accept for given TriggerResults and + a given TriggerPath(s). +*/ + +inline bool +acceptHLT(const edm::Event& event, const edm::TriggerResults& triggerTable, const std::string& triggerPath) +{ + bool passed=false; + const edm::TriggerNames& triggerNames = event.triggerNames(triggerTable); + for(unsigned int i=0; i& triggerPaths) +{ + bool passed=false; + for(unsigned int j=0; j& jets); + /// calculate top quark mass estimate + double massTopQuark(const std::vector& jets); + /// calculate W boson transverse mass estimate +/* double tmassWBoson(const T& mu, const reco::CaloMET& met, const reco::Jet& b); + /// calculate top quark transverse mass estimate + double tmassTopQuark(const T& mu, const reco::CaloMET& met, const reco::Jet& b); + /// calculate mlb estimate + double masslb(const T& mu, const reco::CaloMET& met, const reco::Jet& b);*/ + + /// calculate W boson transverse mass estimate + double tmassWBoson(reco::RecoCandidate* mu, const reco::MET& met, const reco::Jet& b); + /// calculate top quark transverse mass estimate + double tmassTopQuark(reco::RecoCandidate* mu, const reco::MET& met, const reco::Jet& b); + /// calculate mlb estimate + double masslb(reco::RecoCandidate* mu, const reco::MET& met, const reco::Jet& b); + + private: + /// do the calculation; this is called only once per event by the first + /// function call to return a mass estimate. The once calculated values + /// are cached afterwards + void operator()(const std::vector& jets); + void operator()(const reco::Jet& bJet, reco::RecoCandidate* lepton, const reco::MET& met); + private: + /// indicate failed associations + bool failed_; + /// max. number of jets to be considered + int maxNJets_; + /// paramater of the w boson mass + double wMass_; + /// cache of w boson mass estimate + double massWBoson_; + /// cache of top quark mass estimate + double massTopQuark_; + /// cache of W boson transverse mass estimate + double tmassWBoson_; + /// cache of top quark transverse mass estimate + double tmassTopQuark_; + /// cache of mlb estimate + double mlb_; + + +}; + + +#include "DataFormats/JetReco/interface/JetID.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DataFormats/JetReco/interface/CaloJet.h" +#include "DataFormats/BTauReco/interface/JetTag.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "JetMETCorrections/Objects/interface/JetCorrector.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" +#include "CommonTools/Utils/interface/StringCutObjectSelector.h" +#include "JetMETCorrections/Objects/interface/JetCorrectionsRecord.h" +#include "DataFormats/RecoCandidate/interface/RecoCandidate.h" + +/** + \class SelectionStep TopHLTOfflineDQMHelper.h + + \brief Templated helper class to allow a selection on a certain object collection. + + Templated helper class to allow a selection on a certain object collection, which may + be monitored by a separate class afterwards. The class wraps and slightly extends the + features of the StringCutParser to allow also to apply event based selections, according + to a minimal or maximal number of elements in the collection after the object selection + has been applied. It takes an edm::ParameterSet in the constructor, which should contain + the following elements: + + - src : the input collection (mandatory). + - select : the selection string (mandatory). + - min : whether there is a min value on which to reject the whole event after + the selection (optional). + - max : whether there is a max value on which to reject the whole event after + the selection (optional). + - electronId : input tag of an electronId association map and selection pattern + (optional). + - jetCorrector : label of jet corrector (optional). + - jetBTagger : parameters defining the btag algorithm and working point of choice + (optional). + - jetID : parameters defining the jetID value map and selection (optional). + + + The parameters _src_ and _select_ are mandatory. The parameters _min_ and _max_ are + optional. The parameters _electronId_ and _jetCorrector_ are optional. They are added + to keep the possibility to apply selections on id'ed electrons or on corrected jets. + They may be omitted in the PSet for simplification reasons if not needed at any time. + They are not effiective for other object collections but electrons or jets. If none + of the two parameters _min_ or _max_ is found in the event the select function returns + true if at least one object fullfilled the requirements. + + The class has one template value, which is the object collection to apply the selection + on. This has to be parsed to the StringCutParser class. The function select is overrided + for jets to circumvent problems with the template specialisation. Note that for MET not + type1 or muon corrections are supported on reco candidates. +*/ +class SelectionStepHLTBase { + public: + virtual bool select(const edm::Event& event) { + return false; + }; + + virtual bool select(const edm::Event& event, const edm::EventSetup& setup) { + assert(false); + return false; + }; +}; + +template +class SelectionStepHLT: public SelectionStepHLTBase { +public: + /// default constructor + SelectionStepHLT(const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC); + /// default destructor + virtual ~SelectionStepHLT(){}; + + /// apply selection + virtual bool select(const edm::Event& event); + /// apply selection override for jets + virtual bool select(const edm::Event& event, const edm::EventSetup& setup); + bool selectVertex(const edm::Event& event); +private: + /// input collection + edm::EDGetTokenT< edm::View > src_; + /// min/max for object multiplicity + int min_, max_; + /// electronId label as extra selection type + edm::EDGetTokenT< edm::ValueMap > electronId_; + /// electronId pattern we expect the following pattern: + /// 0: fails + /// 1: passes electron ID only + /// 2: passes electron Isolation only + /// 3: passes electron ID and Isolation only + /// 4: passes conversion rejection + /// 5: passes conversion rejection and ID + /// 6: passes conversion rejection and Isolation + /// 7: passes the whole selection + /// As described on https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID + int eidPattern_; + /// jet corrector as extra selection type + std::string jetCorrector_; + /// choice for b-tag as extra selection type + edm::EDGetTokenT< reco::JetTagCollection > btagLabel_; + /// choice of b-tag working point as extra selection type + double btagWorkingPoint_; + /// jetID as an extra selection type + edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_; + + edm::EDGetTokenT< edm::View > pvs_; + + /// string cut selector + StringCutObjectSelector select_; + /// selection string on the jetID + StringCutObjectSelector* jetIDSelect_; +}; + +/// default constructor +template +SelectionStepHLT::SelectionStepHLT(const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC) : + src_( iC.consumes< edm::View >(cfg.getParameter( "src" ))), + select_( cfg.getParameter("select")), + jetIDSelect_(0) +{ + // construct min/max if the corresponding params + // exist otherwise they are initialized with -1 + cfg.exists("min") ? min_= cfg.getParameter("min") : min_= -1; + cfg.exists("max") ? max_= cfg.getParameter("max") : max_= -1; + // read electron extras if they exist + if(cfg.existsAs("electronId")){ + edm::ParameterSet elecId=cfg.getParameter("electronId"); + electronId_= iC.consumes< edm::ValueMap >(elecId.getParameter("src")); + eidPattern_= elecId.getParameter("pattern"); + } + // read jet corrector label if it exists + if(cfg.exists("jetCorrector")){ jetCorrector_= cfg.getParameter("jetCorrector"); } + // read btag information if it exists + if(cfg.existsAs("jetBTagger")){ + edm::ParameterSet jetBTagger=cfg.getParameter("jetBTagger"); + btagLabel_= iC.consumes< reco::JetTagCollection >(jetBTagger.getParameter("label")); + btagWorkingPoint_=jetBTagger.getParameter("workingPoint"); + } + // read jetID information if it exists + if(cfg.existsAs("jetID")){ + edm::ParameterSet jetID=cfg.getParameter("jetID"); + jetIDLabel_ = iC.consumes< reco::JetIDValueMap >(jetID.getParameter("label")); + jetIDSelect_= new StringCutObjectSelector(jetID.getParameter("select")); + } +} + +/// apply selection +template +bool SelectionStepHLT::select(const edm::Event& event) +{ + // fetch input collection + edm::Handle > src; + if( !event.getByToken(src_, src) ) return false; + + // load electronId value map if configured such + edm::Handle > electronId; + if(!electronId_.isUninitialized()) { + if( !event.getByToken(electronId_, electronId) ) return false; + } + + // determine multiplicity of selected objects + int n=0; + for(typename edm::View::const_iterator obj=src->begin(); obj!=src->end(); ++obj){ + // special treatment for electrons + if(dynamic_cast(&*obj)){ + unsigned int idx = obj-src->begin(); + if( electronId_.isUninitialized() ? true : ((int)(*electronId)[src->refAt(idx)] & eidPattern_) ){ + if(select_(*obj))++n; + } + } + // normal treatment + else{ + if(select_(*obj))++n; + } + } + bool accept=(min_>=0 ? n>=min_:true) && (max_>=0 ? n<=max_:true); + return (min_<0 && max_<0) ? (n>0):accept; +} +template +bool SelectionStepHLT::selectVertex(const edm::Event& event) +{ + // fetch input collection + edm::Handle > src; + if( !event.getByToken(src_, src) ) return false; + + // load electronId value map if configured such + edm::Handle > electronId; + if(!electronId_.isUninitialized()) { + if( !event.getByToken(electronId_, electronId) ) return false; + } + + // determine multiplicity of selected objects + int n=0; + for(typename edm::View::const_iterator obj=src->begin(); obj!=src->end(); ++obj){ + + if(select_(*obj))++n; + } + bool accept=(min_>=0 ? n>=min_:true) && (max_>=0 ? n<=max_:true); + return (min_<0 && max_<0) ? (n>0):accept; +} + +template +bool SelectionStepHLT::select(const edm::Event& event, const edm::EventSetup& setup) +{ + throw cms::Exception("SelectionStepHLT") << "you fail" << std::endl; + return false; +} +#endif diff --git a/DQMOffline/Trigger/interface/TopSingleLeptonHLTOfflineDQM.h b/DQMOffline/Trigger/interface/TopSingleLeptonHLTOfflineDQM.h new file mode 100644 index 0000000000000..28ca2749fd255 --- /dev/null +++ b/DQMOffline/Trigger/interface/TopSingleLeptonHLTOfflineDQM.h @@ -0,0 +1,279 @@ +#ifndef TOPSINGLELEPTONHLTOFFLINEDQM +#define TOPSINGLELEPTONHLTOFFLINEDQM + +#include +#include + +#include "FWCore/Framework/interface/Event.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +#include "DataFormats/JetReco/interface/Jet.h" +#include "DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/METReco/interface/CaloMET.h" +#include "JetMETCorrections/Objects/interface/JetCorrector.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" +#include "DataFormats/VertexReco/interface/Vertex.h" + +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" + +#include "FWCore/Framework/interface/ConsumesCollector.h" + +/*Originally from DQM/Physics by R. Wolf and J. Andrea*/ + +/** + \class MonitorSingleLepton TopHLTOfflineDQMHelper.h + + \brief Helper class to define histograms for monitoring of muon/electron/jet/met quantities. + + Helper class to contain histograms for the monitoring of muon/electron/jet/met quantities. + This class can be instantiated several times after several event selection steps. It can + be used to fill histograms in three different granularity levels according to STANDARD + (<10 histograms), VERBOSE(<20 histograms), DEBUG(<30 histgorams). Note that for the sake + of simplicity and to force the analyst to keep the number of histograms to be monitored + small the MonitorSingleLepton class contains the histograms for all objects at once. It should + not contain much more than 10 histograms though in the STANDARD configuration, as these + histograms will be monitored at each SelectionStep. Monitoring of histograms after selec- + tion steps within the same object collection needs to be implemented within the Monitor- + Ensemble. It will not be covered by the SelectionStep class. + */ + +namespace HLTOfflineDQMTopSingleLepton { + + class MonitorSingleLepton { + public: + + public: + /// default contructor + MonitorSingleLepton(const char* label, const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC); + /// default destructor + ~MonitorSingleLepton(){}; + + /// book histograms in subdirectory _directory_ + void book(DQMStore::IBooker& store_); + /// fill monitor histograms with electronId and jetCorrections + void fill(const edm::Event& event, const edm::EventSetup& setup, const HLTConfigProvider& hltConfig, const std::vector triggerPaths); + + private: + /// deduce monitorPath from label, the label is expected + /// to be of type 'selectionPath:monitorPath' + std::string monitorPath(const std::string& label) const { return label.substr(label.find(':')+1); }; + /// deduce selectionPath from label, the label is + /// expected to be of type 'selectionPath:monitorPath' + std::string selectionPath(const std::string& label) const { return label.substr(0, label.find(':')); }; + + /// set configurable labels for trigger monitoring histograms + void triggerBinLabels(std::string channel, const std::vector& labels); + /// fill trigger monitoring histograms + void fill(const edm::Event& event, const edm::TriggerResults& triggerTable, std::string channel, const std::vector& labels) const; + + /// check if histogram was booked + bool booked(const std::string histName) const { return hists_.find(histName.c_str())!=hists_.end(); }; + /// fill histogram if it had been booked before + void fill(const std::string histName, double value) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue); }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue, double zValue) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue); }; + + private: + std::string folder_; + /// instance label + std::string label_; + /// considers a vector of METs + std::vector< edm::EDGetTokenT< edm::View > > mets_; + /// input sources for monitoring + edm::EDGetTokenT< edm::View > elecs_; + edm::EDGetTokenT< edm::View > muons_; + edm::EDGetTokenT< edm::View > jets_; + edm::EDGetTokenT< edm::View > pvs_; + + /// trigger table + edm::EDGetTokenT< edm::TriggerResults > triggerTable_; + edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventWithRefsTag_; + /// trigger paths for monitoring, expected + /// to be of form signalPath:MonitorPath + std::vector triggerPaths_; + + /// electronId label + edm::EDGetTokenT< edm::ValueMap > electronId_; + /// electronId pattern we expect the following pattern: + /// 0: fails + /// 1: passes electron ID only + /// 2: passes electron Isolation only + /// 3: passes electron ID and Isolation only + /// 4: passes conversion rejection + /// 5: passes conversion rejection and ID + /// 6: passes conversion rejection and Isolation + /// 7: passes the whole selection + /// As described on https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID + int eidPattern_; + /// extra isolation criterion on electron + StringCutObjectSelector* elecIso_; + /// extra selection on electrons + StringCutObjectSelector* elecSelect_; + + /// extra selection on primary vertices; meant to investigate the pile-up effect + StringCutObjectSelector* pvSelect_; + + /// extra isolation criterion on muon + StringCutObjectSelector* muonIso_; + /// extra selection on muons + StringCutObjectSelector* muonSelect_; + + /// jetCorrector + std::string jetCorrector_; + /// jetID as an extra selection type + edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_; + /// extra jetID selection on calo jets + StringCutObjectSelector* jetIDSelect_; + /// extra selection on jets (here given as std::string as it depends + /// on the the jet type, which selections are valid and which not) + std::string jetSelect_; + /// include btag information or not + /// to be determined from the cfg + bool includeBTag_; + /// btag discriminator labels + edm::EDGetTokenT< reco::JetTagCollection > btagEff_; + edm::EDGetTokenT< reco::JetTagCollection > btagPur_; + edm::EDGetTokenT< reco::JetTagCollection > btagVtx_; + /// btag working points + double btagEffWP_, btagPurWP_, btagVtxWP_; + /// mass window upper and lower edge + double lowerEdge_, upperEdge_; + + /// number of logged interesting events + int logged_; + /// histogram container + std::map hists_; + + /// hlt objects + trigger::Vids electronIds_; + trigger::VRelectron electronRefs_; + trigger::Vids muonIds_; + trigger::VRmuon muonRefs_; + trigger::Vids pfjetIds_; + trigger::VRpfjet pfjetRefs_; + }; + + inline void + MonitorSingleLepton::triggerBinLabels(std::string channel, const std::vector& labels) + { + for(unsigned int idx=0; idxsetBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1); + } + } + + inline void + MonitorSingleLepton::fill(const edm::Event& event, const edm::TriggerResults& triggerTable, std::string channel, const std::vector& labels) const + { + for(unsigned int idx=0; idx + +#include "DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h" +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/Common/interface/TriggerResults.h" +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" + +/** + \class TopSingleLeptonHLTOfflineDQM TopSingleLeptonHLTOfflineDQM.h + + \brief Module to apply a monitored selection of top like events in the semi-leptonic channel + + Plugin to apply a monitored selection of top like events with some minimal flexibility + in the number and definition of the selection steps. To achieve this flexibility it + employes the SelectionStep class. The MonitorSingleLepton class is used to provide a well + defined set of histograms to be monitored after each selection step. The SelectionStep + class provides a flexible and intuitive selection via the StringCutParser. SelectionStep + and MonitorSingleLepton classes are interleaved. The monitoring starts after a preselection + step (which is not monitored in the context of this module) with an instance of the + MonitorSingleLepton class. The following objects are supported for selection: + + - jets : of type reco::Jet (jets), reco::CaloJet (jets/calo) or reco::PFJet (jets/pflow) + - elecs : of type reco::GsfElectron + - muons : of type reco::Muon + - met : of type reco::MET + + These types have to be present as prefix of the selection step paramter _label_ separated + from the rest of the label by a ':' (e.g. in the form "jets:step0"). The class expects + selection labels of this type. They will be disentangled by the private helper functions + _objectType_ and _seletionStep_ as declared below. + */ + +/// define MonitorSingleLepton to be used +//using HLTOfflineDQMTopSingleLepton::MonitorSingleLepton; + +class TopSingleLeptonHLTOfflineDQM : public DQMEDAnalyzer { + public: + /// default constructor + TopSingleLeptonHLTOfflineDQM(const edm::ParameterSet& cfg); + /// default destructor + ~TopSingleLeptonHLTOfflineDQM(){ + if( vertexSelect_ ) delete vertexSelect_; + if( beamspotSelect_ ) delete beamspotSelect_; + }; + + /// do this during the event loop + virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c); + virtual void analyze(const edm::Event& event, const edm::EventSetup& setup); + void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; + + private: + /// deduce object type from ParameterSet label, the label + /// is expected to be of type 'objectType:selectionStep' + std::string objectType(const std::string& label) { return label.substr(0, label.find(':')); }; + /// deduce selection step from ParameterSet label, the + /// label is expected to be of type 'objectType:selectionStep' + std::string selectionStep(const std::string& label) { return label.substr(label.find(':')+1); }; + + private: + /// trigger table + edm::EDGetTokenT< edm::TriggerResults > triggerTable_; + /// trigger paths + std::vector triggerPaths_; + /// primary vertex + edm::EDGetTokenT< std::vector > vertex_; + /// string cut selector + StringCutObjectSelector* vertexSelect_; + + /// beamspot + edm::EDGetTokenT< reco::BeamSpot > beamspot_; + /// string cut selector + StringCutObjectSelector* beamspotSelect_; + + HLTConfigProvider hltConfig_; + + + + /// needed to guarantee the selection order as defined by the order of + /// ParameterSets in the _selection_ vector as defined in the config + std::vector selectionOrder_; + /// this is the heart component of the plugin; std::string keeps a label + /// the selection step for later identification, edm::ParameterSet keeps + /// the configuration of the selection for the SelectionStep class, + /// MonitoringEnsemble keeps an instance of the MonitorSingleLepton class to + /// be filled _after_ each selection step + std::map > selection_; + + std::map selectmap_; +}; + +#endif diff --git a/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py b/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py index 170886070e6f9..240523198ab65 100644 --- a/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py +++ b/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py @@ -67,6 +67,7 @@ # Remove topElectronHLTOffDQMSource # remove quadJetAna +from DQMOffline.Trigger.topHLTOfflineDQM_cff import * offlineHLTSource = cms.Sequence( hltResults * egHLTOffDQMSource * @@ -77,7 +78,8 @@ #TnPEfficiency * hltInclusiveVBFSource * TrackerCollisionTrackMonHLT * - dqmEnvHLT) + dqmEnvHLT * + topHLTriggerOfflineDQM) #triggerOfflineDQMSource = cms.Sequence(onlineHLTSource*offlineHLTSource) triggerOfflineDQMSource = cms.Sequence(offlineHLTSource) diff --git a/DQMOffline/Trigger/python/singletopHLTEventDQM_cfi.py b/DQMOffline/Trigger/python/singletopHLTEventDQM_cfi.py new file mode 100644 index 0000000000000..961410c14f8ee --- /dev/null +++ b/DQMOffline/Trigger/python/singletopHLTEventDQM_cfi.py @@ -0,0 +1,274 @@ +import FWCore.ParameterSet.Config as cms + +SingleTopSingleMuonHLTOfflineDQM = cms.EDAnalyzer("TopSingleLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/SingleTop/SingleMuon/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet"), + pvs = cms.InputTag("offlinePrimaryVertices") + + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>26 & abs(eta)<2.1 & isPFMuon & isGlobalMuon & globalTrack.normalizedChi2<10 & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0 & numberOfMatches>1"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>40 & abs(eta)<5.0"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("pfJetProbabilityBJetTags" ), + workingPoint = cms.double(0.275) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("pfTrackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.41) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("pfCombinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.679) + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet45_35_25','HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet30']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + select = cms.vstring(['HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet45_35_25','HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet30']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + cms.PSet( + label = cms.string("muons:step1"), + src = cms.InputTag("muons"), + select = cms.string("pt>26 & abs(eta)<2.1 & isPFMuon & isGlobalMuon & globalTrack.normalizedChi2<10 & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0 & numberOfMatches>1 & (pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.12"), + min = cms.int32(1), + max = cms.int32(1), + ), + #cms.PSet( + # label = cms.string("jets/pf:step2"), + # src = cms.InputTag("PFJetsFilter"), + # jetCorrector = cms.string("ak5PFL2L3"), + # select = cms.string("pt>40 & abs(eta)<5.0"), + # min = cms.int32(1), + #), + cms.PSet( + label = cms.string("jets/pf:step2"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>40 & abs(eta)<5.0"), + min = cms.int32(2), + ), + ) +) + +SingleTopSingleElectronHLTOfflineDQM = cms.EDAnalyzer("TopSingleLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/SingleTop/SingleElectron/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet"), + pvs = cms.InputTag("offlinePrimaryVertices") + + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>30 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr04EcalRecHitSumEt+dr04HcalTowerSumEt)/pt<0.1"), + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>40 & abs(eta)<5.0"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("pfJetProbabilityBJetTags" ), + workingPoint = cms.double(0.275) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("pfTrackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.41) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("pfCombinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.679) + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet45_35_25','HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet30']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + select = cms.vstring(['HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet45_35_25','HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet30']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + cms.PSet( + label = cms.string("elecs:step1"), + src = cms.InputTag("gedGsfElectrons"), + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + select = cms.string("pt>30 & abs(eta)<2.5 & (dr03TkSumPt+dr04EcalRecHitSumEt+dr04HcalTowerSumEt)/pt<0.1"), + min = cms.int32(1), + max = cms.int32(1), + ), + #cms.PSet( + # label = cms.string("jets/pf:step2"), + # src = cms.InputTag("PFJetsFilter"), + # jetCorrector = cms.string("ak5PFL2L3"), + # select = cms.string("pt>40 & abs(eta)<5.0"), + # min = cms.int32(1), + #), + cms.PSet( + label = cms.string("jets/pf:step2"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>40 & abs(eta)<5.0"), + min = cms.int32(2), + ), + ) +) diff --git a/DQMOffline/Trigger/python/topDiLeptonHLTEventDQM_cfi.py b/DQMOffline/Trigger/python/topDiLeptonHLTEventDQM_cfi.py new file mode 100644 index 0000000000000..e6e5ed3fa11ef --- /dev/null +++ b/DQMOffline/Trigger/python/topDiLeptonHLTEventDQM_cfi.py @@ -0,0 +1,537 @@ +import FWCore.ParameterSet.Config as cms + +topDiLeptonHLTOfflineDQM = cms.EDAnalyzer("TopDiLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/DiLeptonic/"), + + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.15"), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>20 & abs(eta)<2.4 & isPFMuon & (isGlobalMuon || isTrackerMuon)"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30. & abs(eta)<2.5"), + ), + ## [optional] : when omitted no mass window will be applied + ## for the same flavor lepton monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.0), + upperEdge = cms.double(110.0) + ), + ## [optional] : when omitted all monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + pathsELECMU = cms.vstring([ 'HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL', + 'HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']), + pathsDIMUON = cms.vstring([ 'HLT_Mu17_Mu8', + 'HLT_Mu17_TkMu8']), + pathsDIELEC = cms.vstring([ 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']) + ) + ), + + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + select = cms.vstring(['HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL','HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL','HLT_Mu17_Mu8','HLT_Mu17_TkMu8','HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. && abs(y)<1. && abs(z)<20. && tracksSize>3 && !isFake') + ) + ), + + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets as given below: + ## + selection = cms.VPSet( + #cms.PSet( + ### [mandatory] : 'jets' defines the objects to + ### select on, 'step0' labels the histograms; + ### instead of 'step0' you can choose any label + #label = cms.string("empty:step0") + #), + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + cms.PSet( + label = cms.string("jets/pf:step1"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>30. & abs(eta)<2.5"), + min = cms.int32(2), + ) + ) +) + + + +DiMuonHLTOfflineDQM = cms.EDAnalyzer("TopDiLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/DiMuon/"), + + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.15"), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>20 & abs(eta)<2.4 & isPFMuon & (isGlobalMuon || isTrackerMuon)"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30. & abs(eta)<2.5"), + ), + ## [optional] : when omitted no mass window will be applied + ## for the same flavor lepton monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.0), + upperEdge = cms.double(110.0) + ), + ## [optional] : when omitted all monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + pathsELECMU = cms.vstring([ 'HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL', + 'HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']), + pathsDIMUON = cms.vstring([ 'HLT_Mu17_Mu8', + 'HLT_Mu17_TkMu8']), + pathsDIELEC = cms.vstring([ 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']) + ) + ), + + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Mu9','HLT_Ele15_SW_L1R','HLT_DoubleMu3']) + select = cms.vstring([ 'HLT_Mu17_Mu8','HLT_Mu17_TkMu8']), + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. && abs(y)<1. && abs(z)<20. && tracksSize>3 && !isFake') + ) + ), + + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets as given below: + ## + selection = cms.VPSet( + #cms.PSet( + ### [mandatory] : 'jets' defines the objects to + ### select on, 'step0' labels the histograms; + ### instead of 'step0' you can choose any label + #label = cms.string("empty:step0") + #), + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + + cms.PSet( + label = cms.string("muons:step1"), + src = cms.InputTag("muons"), + select = cms.string("pt>20 & abs(eta)<2.4 & isPFMuon & (isGlobalMuon || isTrackerMuon) & (isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.2"), + min = cms.int32(2), + max = cms.int32(2), + ), + cms.PSet( + label = cms.string("jets/pf:step2"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>30. & abs(eta)<2.5"), + min = cms.int32(2), + ), + ), +) + +DiElectronHLTOfflineDQM = cms.EDAnalyzer("TopDiLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/DiElectron/"), + + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.15"), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>20 & abs(eta)<2.4 & isPFMuon & (isGlobalMuon || isTrackerMuon)"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30. & abs(eta)<2.5"), + ), + ## [optional] : when omitted no mass window will be applied + ## for the same flavor lepton monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.0), + upperEdge = cms.double(110.0) + ), + ## [optional] : when omitted all monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + pathsELECMU = cms.vstring([ 'HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL', + 'HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']), + pathsDIMUON = cms.vstring([ 'HLT_Mu17_Mu8', + 'HLT_Mu17_TkMu8']), + pathsDIELEC = cms.vstring([ 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']) + ) + ), + + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Mu9','HLT_Ele15_SW_L1R','HLT_DoubleMu3']) + select = cms.vstring([ 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. && abs(y)<1. && abs(z)<20. && tracksSize>3 && !isFake') + ) + ), + + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets as given below: + ## + selection = cms.VPSet( + #cms.PSet( + ### [mandatory] : 'jets' defines the objects to + ### select on, 'step0' labels the histograms; + ### instead of 'step0' you can choose any label + #label = cms.string("empty:step0") + #), + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + + cms.PSet( + label = cms.string("elecs:step1"), + src = cms.InputTag("gedGsfElectrons"), + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + select = cms.string("pt>20 & abs(eta)<2.5 & (dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.15"), + min = cms.int32(2), + max = cms.int32(2), + ), + cms.PSet( + label = cms.string("jets/pf:step2"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>30. & abs(eta)<2.5"), + min = cms.int32(2), + ), + ), +) + +ElecMuonHLTOfflineDQM = cms.EDAnalyzer("TopDiLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/ElecMuon/"), + + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.15"), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>20 & abs(eta)<2.4 & isPFMuon & (isGlobalMuon || isTrackerMuon)"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30. & abs(eta)<2.5"), + ), + ## [optional] : when omitted no mass window will be applied + ## for the same flavor lepton monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.0), + upperEdge = cms.double(110.0) + ), + ## [optional] : when omitted all monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + pathsELECMU = cms.vstring([ 'HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL', + 'HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']), + pathsDIMUON = cms.vstring([ 'HLT_Mu17_Mu8', + 'HLT_Mu17_TkMu8']), + pathsDIELEC = cms.vstring([ 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']) + ) + ), + + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Mu9','HLT_Ele15_SW_L1R','HLT_DoubleMu3']) + select = cms.vstring([ 'HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL', + 'HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL']), + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. && abs(y)<1. && abs(z)<20. && tracksSize>3 && !isFake') + ) + ), + + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets as given below: + ## + selection = cms.VPSet( + #cms.PSet( + ### [mandatory] : 'jets' defines the objects to + ### select on, 'step0' labels the histograms; + ### instead of 'step0' you can choose any label + #label = cms.string("empty:step0") + #), + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + + cms.PSet( + label = cms.string("muons:step1"), + src = cms.InputTag("muons"), + select = cms.string("pt>20 & abs(eta)<2.4 & isPFMuon & (isGlobalMuon || isTrackerMuon) & (pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("elecs:step2"), + src = cms.InputTag("gedGsfElectrons"), + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + select = cms.string("pt>20 & abs(eta)<2.5 & (dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.15"), + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets/pf:step3"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>30. & abs(eta)<2.5"), + min = cms.int32(2), + ), + ), +) + diff --git a/DQMOffline/Trigger/python/topHLTOfflineDQM_cff.py b/DQMOffline/Trigger/python/topHLTOfflineDQM_cff.py new file mode 100644 index 0000000000000..44be7a1806f43 --- /dev/null +++ b/DQMOffline/Trigger/python/topHLTOfflineDQM_cff.py @@ -0,0 +1,19 @@ +import FWCore.ParameterSet.Config as cms + +from DQMOffline.Trigger.topDiLeptonHLTEventDQM_cfi import * +from DQMOffline.Trigger.topSingleLeptonHLTEventDQM_cfi import * +from DQMOffline.Trigger.singletopHLTEventDQM_cfi import * +from JetMETCorrections.Configuration.JetCorrectionProducersAllAlgos_cff import * + + + +topHLTriggerOfflineDQM = cms.Sequence( + DiMuonHLTOfflineDQM + *DiElectronHLTOfflineDQM + *ElecMuonHLTOfflineDQM + *topSingleMuonHLTOfflineDQM + *topSingleElectronHLTOfflineDQM + *SingleTopSingleMuonHLTOfflineDQM + *SingleTopSingleElectronHLTOfflineDQM + ) + diff --git a/DQMOffline/Trigger/python/topSingleLeptonHLTEventDQM_cfi.py b/DQMOffline/Trigger/python/topSingleLeptonHLTEventDQM_cfi.py new file mode 100644 index 0000000000000..bc0e481d7c2eb --- /dev/null +++ b/DQMOffline/Trigger/python/topSingleLeptonHLTEventDQM_cfi.py @@ -0,0 +1,424 @@ +import FWCore.ParameterSet.Config as cms + +topSingleLeptonHLTOfflineDQM = cms.EDAnalyzer("TopSingleLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/SemiLeptonic/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet"), + pvs = cms.InputTag("offlinePrimaryVertices") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>30 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr04EcalRecHitSumEt+dr04HcalTowerSumEt)/pt<0.1"), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>26 & abs(eta)<2.1 & isPFMuon & isGlobalMuon & globalTrack.normalizedChi2<10 & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0 & numberOfMatches>1"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>20 & abs(eta)<2.5"), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass befor filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + #triggerExtras = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', + # 'HLT_Mu5:HLT_QuadJet15U', + # 'HLT_Mu7:HLT_QuadJet15U', + # 'HLT_Mu9:HLT_QuadJet15U']) + #) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + select = cms.vstring(['HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet45_35_25','HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet30','HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet45_35_25','HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet30']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + ## + selection = cms.VPSet( + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + cms.PSet( + label = cms.string("jets/pf:step1"), + src = cms.InputTag("PFJetsFilter"), + select = cms.string("pt>20 & abs(eta)<2.5"), + min = cms.int32(4), + ), + ) +) + +topSingleMuonHLTOfflineDQM = cms.EDAnalyzer("TopSingleLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/SemiMuonic/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet"), + pvs = cms.InputTag("offlinePrimaryVertices") + + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>26 & abs(eta)<2.1 & isPFMuon & isGlobalMuon & globalTrack.normalizedChi2<10 & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0 & numberOfMatches>1"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string("(pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.2"), + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("pfJetProbabilityBJetTags" ), + workingPoint = cms.double(0.275) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("pfTrackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.41) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("pfCombinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.679) + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet45_35_25','HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet30']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + select = cms.vstring(['HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet45_35_25','HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet30']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + cms.PSet( + label = cms.string("muons:step1"), + src = cms.InputTag("muons"), + select = cms.string("pt>26 & abs(eta)<2.1 & isPFMuon & isGlobalMuon & globalTrack.normalizedChi2<10 & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0 & numberOfMatches>1 & (pfIsolationR04.sumChargedHadronPt+pfIsolationR04.sumPhotonEt+pfIsolationR04.sumNeutralHadronEt)/pt<0.12"), + min = cms.int32(1), + max = cms.int32(1), + ), +# cms.PSet( +# label = cms.string("jets/pf:step2"), +# src = cms.InputTag("PFJetsFilter"), +# jetCorrector = cms.string("ak5PFL2L3"), +# select = cms.string("pt>20 & abs(eta)<2.5"), +# min = cms.int32(1), +# ), +# cms.PSet( +# label = cms.string("jets/pf:step3"), +# src = cms.InputTag("PFJetsFilter"), +# jetCorrector = cms.string("ak5PFL2L3"), +# select = cms.string("pt>20 & abs(eta)<2.5"), +# min = cms.int32(2), +# ), +# cms.PSet( +# label = cms.string("jets/pf:step4"), +# src = cms.InputTag("PFJetsFilter"), +# jetCorrector = cms.string("ak5PFL2L3"), +# select = cms.string("pt>20 & abs(eta)<2.5"), +# min = cms.int32(3), +# ), + cms.PSet( +# label = cms.string("jets/pf:step5"), + label = cms.string("jets/pf:step2"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>20 & abs(eta)<2.5"), + min = cms.int32(4), + ), + ) +) + +topSingleElectronHLTOfflineDQM = cms.EDAnalyzer("TopSingleLeptonHLTOfflineDQM", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("HLTriggerOffline/Top/SemiElectronic/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("muons"), + elecs = cms.InputTag("gedGsfElectrons"), + jets = cms.InputTag("PFJetsFilter"), + mets = cms.VInputTag("met", "tcMet", "pfMet"), + pvs = cms.InputTag("offlinePrimaryVertices") + + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>30 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string("(dr03TkSumPt+dr04EcalRecHitSumEt+dr04HcalTowerSumEt)/pt<0.1"), + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + jetCorrector = cms.string("ak5PFL2L3"), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("pfJetProbabilityBJetTags" ), + workingPoint = cms.double(0.275) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("pfTrackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.41) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("pfCombinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.679) + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet45_35_25','HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet30']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + trigger = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + select = cms.vstring(['HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet45_35_25','HLT_Ele25_CaloIdVT_CaloIsoVL_TrkIdVL_TrkIsoT_TriCentralPFNoPUJet30']) + ), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlinePrimaryVertices"), + select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("Hlt:step0"), + src = cms.InputTag(""), + select = cms.string(""), + min = cms.int32(0), + max = cms.int32(0), + ), + cms.PSet( + label = cms.string("elecs:step1"), + src = cms.InputTag("gedGsfElectrons"), + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), pattern = cms.int32(1) ), + select = cms.string("pt>30 & abs(eta)<2.5 & (dr03TkSumPt+dr04EcalRecHitSumEt+dr04HcalTowerSumEt)/pt<0.1"), + min = cms.int32(1), + max = cms.int32(1), + ), +# cms.PSet( +# label = cms.string("jets/pf:step2"), +# src = cms.InputTag("PFJetsFilter"), +# jetCorrector = cms.string("ak5PFL2L3"), +# select = cms.string("pt>20 & abs(eta)<2.5"), +# min = cms.int32(1), +# ), +# cms.PSet( +# label = cms.string("jets/pf:step3"), +# src = cms.InputTag("PFJetsFilter"), +# jetCorrector = cms.string("ak5PFL2L3"), +# select = cms.string("pt>20 & abs(eta)<2.5"), +# min = cms.int32(2), +# ), +# cms.PSet( +# label = cms.string("jets/pf:step4"), +# src = cms.InputTag("PFJetsFilter"), +# jetCorrector = cms.string("ak5PFL2L3"), +# select = cms.string("pt>20 & abs(eta)<2.5"), +# min = cms.int32(3), +# ), + cms.PSet( +# label = cms.string("jets/pf:step5"), + label = cms.string("jets/pf:step2"), + src = cms.InputTag("PFJetsFilter"), + jetCorrector = cms.string("ak5PFL2L3"), + select = cms.string("pt>20 & abs(eta)<2.5"), + min = cms.int32(4), + ), + ) +) diff --git a/DQMOffline/Trigger/src/SealModule.cc b/DQMOffline/Trigger/src/SealModule.cc index e327c7c4fbb66..ea187e43db685 100644 --- a/DQMOffline/Trigger/src/SealModule.cc +++ b/DQMOffline/Trigger/src/SealModule.cc @@ -17,6 +17,8 @@ #include "DQMOffline/Trigger/interface/TopHLTDiMuonDQMClient.h" #include "DQMOffline/Trigger/interface/HLTInclusiveVBFSource.h" #include "DQMOffline/Trigger/interface/HLTInclusiveVBFClient.h" +#include "DQMOffline/Trigger/interface/TopDiLeptonHLTOfflineDQM.h" +#include "DQMOffline/Trigger/interface/TopSingleLeptonHLTOfflineDQM.h" #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(FourVectorHLTClient); @@ -37,3 +39,5 @@ DEFINE_FWK_MODULE(TopHLTDiMuonDQM); DEFINE_FWK_MODULE(TopHLTDiMuonDQMClient); DEFINE_FWK_MODULE(HLTInclusiveVBFSource); DEFINE_FWK_MODULE(HLTInclusiveVBFClient); +DEFINE_FWK_MODULE(TopDiLeptonHLTOfflineDQM); +DEFINE_FWK_MODULE(TopSingleLeptonHLTOfflineDQM); diff --git a/DQMOffline/Trigger/src/TopDiLeptonHLTOfflineDQM.cc b/DQMOffline/Trigger/src/TopDiLeptonHLTOfflineDQM.cc new file mode 100644 index 0000000000000..e818d6f3cdd7b --- /dev/null +++ b/DQMOffline/Trigger/src/TopDiLeptonHLTOfflineDQM.cc @@ -0,0 +1,824 @@ +//#include +#include "JetMETCorrections/Objects/interface/JetCorrectionsRecord.h" +#include "DataFormats/JetReco/interface/CaloJet.h" +#include "DataFormats/BTauReco/interface/JetTag.h" +#include "DQMOffline/Trigger/interface/TopDiLeptonHLTOfflineDQM.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h" +#include "DataFormats/EgammaCandidates/interface/Electron.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DataFormats/Math/interface/deltaR.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" +#include "FWCore/Common/interface/TriggerNames.h" +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" + +#include "CommonTools/UtilAlgos/interface/DeltaR.h" + +#include "FWCore/Framework/interface/ConsumesCollector.h" + +/*Originally from DQM/Physics by R. Wolf and J. Andrea*/ +using namespace std; +namespace HLTOfflineDQMTopDiLepton { + + // maximal Delta to consider + // hlt and reco objects matched + static const double DRMIN = 0.05; + + MonitorDiLepton::MonitorDiLepton(const char* label, const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC) : + label_(label), eidPattern_(0), elecIso_(0), elecSelect_(0), muonIso_(0), muonSelect_(0), jetIDSelect_(0), + lowerEdge_(-1.), upperEdge_(-1.), elecMuLogged_(0), diMuonLogged_(0), diElecLogged_(0) + { + // sources have to be given; this PSet is not optional + edm::ParameterSet sources=cfg.getParameter("sources"); + muons_= iC.consumes< edm::View >(sources.getParameter("muons")); + elecs_= iC.consumes< edm::View >(sources.getParameter("elecs")); + jets_ = iC.consumes< edm::View >(sources.getParameter("jets" )); + + const auto& mets = sources.getParameter>("mets"); + for (const auto& met: mets) { + mets_.push_back(iC.consumes>(met)); + } + + // elecExtras are optional; they may be omitted or empty + if( cfg.existsAs("elecExtras") ){ + edm::ParameterSet elecExtras=cfg.getParameter("elecExtras"); + // select is optional; in case it's not found no + // selection will be applied + if( elecExtras.existsAs("select") ){ + elecSelect_= new StringCutObjectSelector(elecExtras.getParameter("select")); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if( elecExtras.existsAs("isolation") ){ + elecIso_= new StringCutObjectSelector(elecExtras.getParameter("isolation")); + } + // electronId is optional; in case it's not found the + // InputTag will remain empty + if( elecExtras.existsAs("electronId") ){ + edm::ParameterSet elecId=elecExtras.getParameter("electronId"); + electronId_= iC.consumes< edm::ValueMap >(elecId.getParameter("src")); + eidPattern_= elecId.getParameter("pattern"); + } + } + // muonExtras are optional; they may be omitted or empty + if( cfg.existsAs("muonExtras") ){ + edm::ParameterSet muonExtras=cfg.getParameter("muonExtras"); + // select is optional; in case it's not found no + // selection will be applied + if( muonExtras.existsAs("select") ){ + muonSelect_= new StringCutObjectSelector(muonExtras.getParameter("select")); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if( muonExtras.existsAs("isolation") ){ + muonIso_= new StringCutObjectSelector(muonExtras.getParameter("isolation")); + } + } + // jetExtras are optional; they may be omitted or empty + if( cfg.existsAs("jetExtras") ){ + edm::ParameterSet jetExtras=cfg.getParameter("jetExtras"); + // jetCorrector is optional; in case it's not found + // the InputTag will remain empty + if( jetExtras.existsAs("jetCorrector") ){ + jetCorrector_= jetExtras.getParameter("jetCorrector"); + } + // read jetID information if it exists + if(jetExtras.existsAs("jetID")){ + edm::ParameterSet jetID=jetExtras.getParameter("jetID"); + jetIDLabel_ = iC.consumes< reco::JetIDValueMap >(jetID.getParameter("label")); + jetIDSelect_= new StringCutObjectSelector(jetID.getParameter("select")); + } + // select is optional; in case it's not found no + // selection will be applied (only implemented for + // CaloJets at the moment) + if( jetExtras.existsAs("select") ){ + jetSelect_= jetExtras.getParameter("select"); + } + } + // triggerExtras are optional; they may be omitted or empty + if( cfg.existsAs("triggerExtras") ){ + edm::ParameterSet triggerExtras=cfg.getParameter("triggerExtras"); + triggerTable_= iC.consumes< edm::TriggerResults >(triggerExtras.getParameter("src")); + elecMuPaths_ =triggerExtras.getParameter >("pathsELECMU"); + diMuonPaths_ =triggerExtras.getParameter >("pathsDIMUON"); + diElecPaths_ =triggerExtras.getParameter >("pathsDIELEC"); + } + // massExtras is optional; in case it's not found no mass + // window cuts are applied for the same flavor monitor + // histograms + if( cfg.existsAs("massExtras") ){ + edm::ParameterSet massExtras=cfg.getParameter("massExtras"); + lowerEdge_= massExtras.getParameter("lowerEdge"); + upperEdge_= massExtras.getParameter("upperEdge"); + } + + // and don't forget to do the histogram booking + folder_=cfg.getParameter("directory"); + + triggerEventWithRefsTag_ = iC.consumes< trigger::TriggerEventWithRefs >(edm::InputTag("hltTriggerSummaryRAW","","HLT")); + + } + + void + MonitorDiLepton::book(DQMStore::IBooker& store_) + { + //set up the current directory path + std::string current(folder_); current+=label_; + store_.setCurrentFolder(current); + + // determine number of bins for trigger monitoring + unsigned int nElecMu=elecMuPaths_.size(); + unsigned int nDiMuon=diMuonPaths_.size(); + unsigned int nDiElec=diElecPaths_.size(); + + // invariant mass of opposite charge lepton pair (only filled for same flavor) + hists_["invMass_" ] = store_.book1D("InvMass" , "M(lep1, lep2)" , 80, 0., 320.); //OK + // invariant mass of same charge lepton pair (only filled for same flavor) + hists_["invMassWC_" ] = store_.book1D("InvMassWC" , "M_{WC}(L1, L2)" , 80, 0., 320.); //OK + // decay channel [1]: muon/muon, [2]:elec/elec, [3]:elec/muon + hists_["decayChannel_"] = store_.book1D("DecayChannel", "Decay Channel" , 3, 0, 3); //OK + // // trigger efficiency estimates for the electron muon channel + // hists_["elecMuEff_" ] = store_.book1D("ElecMuEff" , "Eff(e/#mu paths)" , nElecMu, 0., nElecMu); + // monitored trigger occupancy for the electron muon channel + hists_["elecMuMon_" ] = store_.book1D("ElecMuMon" , "Mon(e/#mu paths)" , nElecMu, 0., nElecMu); + // // trigger efficiency estimates for the di muon channel + // hists_["diMuonEff_" ] = store_.book1D("DiMuonEff" , "Eff(#mu/#mu paths)" , nDiMuon, 0., nDiMuon); + // monitored trigger occupancy for the di muon channel + hists_["diMuonMon_" ] = store_.book1D("DiMuonMon" , "Mon(#mu/#mu paths)" , nDiMuon, 0., nDiMuon); + // // trigger efficiency estimates for the di electron channel + // hists_["diElecEff_" ] = store_.book1D("DiElecEff" , "Eff(e/e paths)" , nDiElec, 0., nDiElec); + // monitored trigger occupancy for the di electron channel + hists_["diElecMon_" ] = store_.book1D("DiElecMon" , "Mon(e/e paths)" , nDiElec, 0., nDiElec); + // multiplicity of jets with pt>30 (corrected to L2+L3) + hists_["jetMult_" ] = store_.book1D("JetMult" , "N_{30}(jet)" , 21, -0.5, 20.5); //OK + + // set bin labels for trigger monitoring + triggerBinLabels(std::string("elecMu"), elecMuPaths_); + triggerBinLabels(std::string("diMuon"), diMuonPaths_); + triggerBinLabels(std::string("diElec"), diElecPaths_); + // set bin labels for decayChannel_ + hists_["decayChannel_"]->setBinLabel( 1, "#mu e" , 1); + hists_["decayChannel_"]->setBinLabel( 2, "#mu #mu", 1); + hists_["decayChannel_"]->setBinLabel( 3, "e e" , 1); + + // selected dimuon events + hists_["diMuonLogger_"] = store_.book2D("DiMuonLogger", "Logged DiMuon Events" , 8, 0., 8., 10, 0., 10.); //OK + // selected dielec events + hists_["diElecLogger_"] = store_.book2D("DiElecLogger", "Logged DiElec Events" , 8, 0., 8., 10, 0., 10.); //OK + // selected elemu events + hists_["elecMuLogger_"] = store_.book2D("ElecMuLogger", "Logged ElecMu Events" , 8, 0., 8., 10, 0., 10.); //OK + + // set bin labels for trigger monitoring + loggerBinLabels(std::string("diMuonLogger_")); + loggerBinLabels(std::string("diElecLogger_")); + loggerBinLabels(std::string("elecMuLogger_")); + + // deltaR min between hlt iso lepton and reco iso lepton wrt eta + hists_["leptDeltaREta_"] = store_.book2D("DeltaRMinEtaLepton", "#Delta R_{min}(leptons) wrt #eta", 30, -3, 3, 10, 0., 0.1); + // resolution in pT for matched isolated leptons + hists_["leptResolution_"] = store_.book1D("ResIsoLeptons", "#Delta p_{T}/p_{T}(matched leptons)", 20, 0., 0.1); + // matching monitoring + hists_["matchingMon_"] = store_.book1D("MatchingMon", "Mon(matching)", 3, 0., 3.); + // set axes titles for matching monitoring + hists_["matchingMon_"]->setBinLabel( 1 , "1st lepton" ); + hists_["matchingMon_"]->setBinLabel( 2 , "2nd lepton" ); + hists_["matchingMon_"]->setBinLabel( 3 , "both " ); + + return; + } + + void + MonitorDiLepton::fill(const edm::Event& event, const edm::EventSetup& setup, const HLTConfigProvider& hltConfig, const std::vector triggerPaths) + { + // fetch trigger event if configured such + edm::Handle triggerTable; + if(!triggerTable_.isUninitialized()) { + if( !event.getByToken(triggerTable_, triggerTable) ) return; + } + + edm::Handle triggerEventWithRefsHandle; + if(!event.getByToken(triggerEventWithRefsTag_,triggerEventWithRefsHandle)) return; + + /* + ------------------------------------------------------------ + + Run information + + ------------------------------------------------------------ + */ + + if (!event.eventAuxiliary().run()) return; + + /* + ------------------------------------------------------------ + + Muon Selection + + ------------------------------------------------------------ + */ + + // buffer isolated muons + std::vector isoMuons; + + edm::Handle > muons; + if( !event.getByToken(muons_, muons) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Muon collection not found \n"; + return; + } + + for(edm::View::const_iterator muon=muons->begin(); muon!=muons->end(); ++muon){ + // restrict to globalMuons + if( muon->isGlobalMuon() ){ + // apply preselection + if(!muonSelect_ || (*muonSelect_)(*muon)){ + if(!muonIso_ || (*muonIso_)(*muon)) isoMuons.push_back(&(*muon)); + } + } + } + + /* + ------------------------------------------------------------ + + Electron Selection + + ------------------------------------------------------------ + */ + + // buffer isolated electronss + std::vector isoElecs; + edm::Handle > electronId; + if(!electronId_.isUninitialized()) { + if( !event.getByToken(electronId_, electronId) ) return; + } + + edm::Handle > elecs; + if( !event.getByToken(elecs_, elecs) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Electron collection not found \n"; + return; + } + + for(edm::View::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){ + // restrict to electrons with good electronId + int idx = elec-elecs->begin(); + if( electronId_.isUninitialized() ? true : ((int)(*electronId)[elecs->refAt(idx)] & eidPattern_) ){ + // apply preselection + if(!elecSelect_ || (*elecSelect_)(*elec)){ + if(!elecIso_ || (*elecIso_)(*elec)) isoElecs.push_back(&(*elec)); + } + } + } + + /* + ------------------------------------------------------------ + + Jet Selection + + ------------------------------------------------------------ + */ + + const JetCorrector* corrector=0; + if(!jetCorrector_.empty()){ + // check whether a jet correcto is in the event setup or not + if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey() )){ + corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); + } + else{ + edm::LogVerbatim( "TopDiLeptonHLTOfflineDQM" ) + << "\n" + << "------------------------------------------------------------------------------------- \n" + << " No JetCorrectionsRecord available from EventSetup: \n" + << " - Jets will not be corrected. \n" + << " - If you want to change this add the following lines to your cfg file: \n" + << " \n" + << " ## load jet corrections \n" + << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n" + << " process.prefer(\"ak5CaloL2L3\") \n" + << " \n" + << "------------------------------------------------------------------------------------- \n"; + } + } + + unsigned int mult=0; + // buffer leadingJets + std::vector leadingJets; + edm::Handle > jets; + if( !event.getByToken(jets_, jets) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Jet collection not found \n"; + return; + } + + edm::Handle jetID; + if(jetIDSelect_){ + if( !event.getByToken(jetIDLabel_, jetID) ) return; + } + + for(edm::View::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){ + unsigned int idx=jet-jets->begin(); + if( jetIDSelect_ && dynamic_cast(jets->refAt(idx).get())){ + if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue; + } + // chekc additional jet selection for calo, pf and bare reco jets + if(dynamic_cast(&*jet)){ + reco::CaloJet sel = dynamic_cast(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if(!jetSelect(sel)){ continue;} + } + else if(dynamic_cast(&*jet)){ + reco::PFJet sel= dynamic_cast(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if(!jetSelect(sel)) continue; + } + else{ + reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if(!jetSelect(sel)) continue; + } + // check for overlaps + bool overlap=false; + for(std::vector::const_iterator elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){ + if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi())<0.4){overlap=true; break;} + } if(overlap){continue;} + // prepare jet to fill monitor histograms + reco::Jet monitorJet=*jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + ++mult; // determine jet multiplicity + if(idx==0) { + leadingJets.push_back(monitorJet); + } + if(idx==1) { + leadingJets.push_back(monitorJet); + } + } + fill("jetMult_", mult); + + /* + ------------------------------------------------------------ + + MET Selection + + ------------------------------------------------------------ + */ + + // buffer for event logging + reco::MET caloMET; + for(std::vector< edm::EDGetTokenT< edm::View > >::const_iterator met_=mets_.begin(); met_!=mets_.end(); ++met_){ + + edm::Handle > met; + if( !event.getByToken(*met_, met) ) continue; + + if(met->begin()!=met->end()){ + unsigned int idx=met_-mets_.begin(); + if(idx==0){ + caloMET=*met->begin(); + } + } + } + + + /* + ------------------------------------------------------------ + + Event Monitoring + + ------------------------------------------------------------ + */ + const edm::TriggerNames& triggerNames = event.triggerNames(*triggerTable); + // loop over trigger paths + for(unsigned int i=0; i0 && isoMuons.size()>0 ) { + double mass = (isoElecs[0]->p4()+isoMuons[0]->p4()).mass(); + if( (lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_second->getNbinsY()){ + // log runnumber, lumi block, event number & some + // more pysics infomation for interesting events + fill("elecMuLogger_", 0.5, elecMuLogged_+0.5, event.eventAuxiliary().run()); + fill("elecMuLogger_", 1.5, elecMuLogged_+0.5, event.eventAuxiliary().luminosityBlock()); + fill("elecMuLogger_", 2.5, elecMuLogged_+0.5, event.eventAuxiliary().event()); + fill("elecMuLogger_", 3.5, elecMuLogged_+0.5, isoMuons[0]->pt()); + fill("elecMuLogger_", 4.5, elecMuLogged_+0.5, isoElecs[0]->pt()); + if(leadingJets.size()>0) fill("elecMuLogger_", 5.5, elecMuLogged_+0.5, leadingJets[0].pt()); + if(leadingJets.size()>1) fill("elecMuLogger_", 6.5, elecMuLogged_+0.5, leadingJets[1].pt()); + fill("elecMuLogger_", 7.5, elecMuLogged_+0.5, caloMET.et()); + ++elecMuLogged_; + } + } + } + } + + // DIMUON channel + if( dimuon ){ + fill("decayChannel_", 1.5); + if (isoMuons.size()>1) { + int charge = isoMuons[0]->charge()*isoMuons[1]->charge(); + double mass = (isoMuons[0]->p4()+isoMuons[1]->p4()).mass(); + fill(charge<0 ? "invMass_" : "invMassWC_" , mass ); + if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_second->getNbinsY()){ + // log runnumber, lumi block, event number & some + // more pysics infomation for interesting events + fill("diMuonLogger_", 0.5, diMuonLogged_+0.5, event.eventAuxiliary().run()); + fill("diMuonLogger_", 1.5, diMuonLogged_+0.5, event.eventAuxiliary().luminosityBlock()); + fill("diMuonLogger_", 2.5, diMuonLogged_+0.5, event.eventAuxiliary().event()); + fill("diMuonLogger_", 3.5, diMuonLogged_+0.5, isoMuons[0]->pt()); + fill("diMuonLogger_", 4.5, diMuonLogged_+0.5, isoMuons[1]->pt()); + if(leadingJets.size()>0) fill("diMuonLogger_", 5.5, diMuonLogged_+0.5, leadingJets[0].pt()); + if(leadingJets.size()>1) fill("diMuonLogger_", 6.5, diMuonLogged_+0.5, leadingJets[1].pt()); + fill("diMuonLogger_", 7.5, diMuonLogged_+0.5, caloMET.et()); + ++diMuonLogged_; + } + } + } + } + + // DIELEC channel + if( dielec ){ + fill("decayChannel_", 2.5); + if( dielec && isoElecs.size()>1 ){ + int charge = isoElecs[0]->charge()*isoElecs[1]->charge(); + double mass = (isoElecs[0]->p4()+isoElecs[1]->p4()).mass(); + fill(charge<0 ? "invMass_" : "invMassWC_" , mass ); + if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_second->getNbinsY()){ + // log runnumber, lumi block, event number & some + // more pysics infomation for interesting events + fill("diElecLogger_", 0.5, diElecLogged_+0.5, event.eventAuxiliary().run()); + fill("diElecLogger_", 1.5, diElecLogged_+0.5, event.eventAuxiliary().luminosityBlock()); + fill("diElecLogger_", 2.5, diElecLogged_+0.5, event.eventAuxiliary().event()); + fill("diElecLogger_", 3.5, diElecLogged_+0.5, isoElecs[0]->pt()); + fill("diElecLogger_", 4.5, diElecLogged_+0.5, isoElecs[1]->pt()); + if(leadingJets.size()>0) fill("diElecLogger_", 5.5, diElecLogged_+0.5, leadingJets[0].pt()); + if(leadingJets.size()>1) fill("diElecLogger_", 6.5, diElecLogged_+0.5, leadingJets[1].pt()); + fill("diElecLogger_", 7.5, diElecLogged_+0.5, caloMET.et()); + ++diElecLogged_; + } + } + } + } + } + + /* + ------------------------------------------------------------ + + HLT Objects Monitoring + + ------------------------------------------------------------ + */ + + // loop over trigger paths + for(unsigned int i=0; i& moduleLabels(hltConfig.moduleLabels(triggerIndex)); + const unsigned int moduleIndex(triggerTable->index(triggerIndex)); + // Results from TriggerEventWithRefs product + electronIds_.clear(); electronRefs_.clear(); + muonIds_.clear(); muonRefs_.clear(); + // look only for modules actually run in this path + unsigned int kElec=0; + unsigned int kMuon=0; + for (unsigned int k=0; k<=moduleIndex; ++k) { + const string& moduleLabel(moduleLabels[k]); + const string moduleType(hltConfig.moduleType(moduleLabel)); + // check whether the module is packed up in TriggerEventWithRef product + const unsigned int filterIndex(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabel,"","HLT"))); + if (filterIndexsize()) { + triggerEventWithRefsHandle->getObjects(filterIndex,electronIds_,electronRefs_); + const unsigned int nElectrons(electronIds_.size()); + if (nElectrons>0) kElec = k; + + triggerEventWithRefsHandle->getObjects(filterIndex,muonIds_,muonRefs_); + const unsigned int nMuons(muonIds_.size()); + if (nMuons>0) kMuon = k; + + } + } + bool l1Matched = false; + bool l2Matched = false; + double l1DeltaRMin = 500.; + double l2DeltaRMin = 500.; + unsigned int l1IndMatched = 500; + unsigned int l2IndMatched = 500; + // access to hlt dielecs + electronIds_.clear(); electronRefs_.clear(); + if (kElec > 0 && kMuon < 1 && isoElecs.size()>0) { + const string& moduleLabelElec(moduleLabels[kElec]); + const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec)); + const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_); + const unsigned int nElectrons(electronIds_.size()); + double deltar1 = 600.; + double deltar2 = 600.; + for (unsigned int inde = 0; inde < isoElecs.size(); inde++) { + if (nElectrons > 0) deltar1 = deltaR(*electronRefs_[0],*isoElecs[inde]); + if (nElectrons > 1) deltar2 = deltaR(*electronRefs_[1],*isoElecs[inde]); + if (deltar1 < deltar2 && deltar1 < l1DeltaRMin) { + l1DeltaRMin = deltar1; + l1IndMatched = inde; + } + if (deltar2 < deltar1 && deltar2 < l2DeltaRMin) { + l2DeltaRMin = deltar2; + l2IndMatched = inde; + } + } + if (nElectrons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoElecs[l1IndMatched]->eta(), l1DeltaRMin); + if (nElectrons > 1 && l2IndMatched < 500) fill("leptDeltaREta_", isoElecs[l2IndMatched]->eta(), l2DeltaRMin); + if (l1DeltaRMin < DRMIN) { + l1Matched = true; + fill("matchingMon_", 0.5 ); + fill("leptResolution_", fabs(isoElecs[l1IndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[l1IndMatched]->pt() ); + } + if (l2DeltaRMin < DRMIN) { + l2Matched = true; + fill("matchingMon_", 1.5 ); + fill("leptResolution_", fabs(isoElecs[l2IndMatched]->pt()-electronRefs_[1]->pt())/isoElecs[l2IndMatched]->pt() ); + } + } + // access to hlt dimuons + muonIds_.clear(); muonRefs_.clear(); + l1DeltaRMin = 500.; l2DeltaRMin = 500.; double l3DeltaRMin = 500.; + l1IndMatched = 500; l2IndMatched = 500; double l3IndMatched = 500; + if (kMuon > 0 && kElec < 1 && isoMuons.size()>0) { + const string& moduleLabelMuon(moduleLabels[kMuon]); + const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon)); + const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_); + trigger::VRmuon myMuonRefs; + const unsigned int nMuons(muonIds_.size()); + for (unsigned int l=0; lpt()-muonRefs_[l]->pt())/muonRefs_[l]->pt()) < 1e-5) isNew = false; + } + if (isNew) myMuonRefs.push_back(muonRefs_[l]); + } + const unsigned int nMyMuons(myMuonRefs.size()); + double deltar1 = 600.; + double deltar2 = 600.; + double deltar3 = 600.; + for (unsigned int indm = 0; indm < isoMuons.size(); indm++) { + if (nMyMuons > 0) deltar1 = deltaR(*myMuonRefs[0],*isoMuons[indm]); + if (nMyMuons > 1) deltar2 = deltaR(*myMuonRefs[1],*isoMuons[indm]); + if (nMyMuons > 2) deltar3 = deltaR(*myMuonRefs[2],*isoMuons[indm]); + if (nMyMuons > 0 && (nMyMuons<1 || deltar1 < deltar2) && (nMyMuons<2 || deltar1 1 && deltar2 < deltar1 && (nMyMuons<3 || deltar2 2 && deltar3 < deltar1 && deltar3 < deltar2 && deltar3 < l3DeltaRMin) { + l3DeltaRMin = deltar3; + l3IndMatched = indm; + } + } + if (nMyMuons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoMuons[l1IndMatched]->eta(), l1DeltaRMin); + if (nMyMuons > 1 && l2IndMatched < 500) fill("leptDeltaREta_", isoMuons[l2IndMatched]->eta(), l2DeltaRMin); + if (nMyMuons > 2 && l3IndMatched < 500) fill("leptDeltaREta_", isoMuons[l3IndMatched]->eta(), l3DeltaRMin); + if (l1DeltaRMin < DRMIN) { + l1Matched = true; + fill("matchingMon_", 0.5 ); + fill("leptResolution_", fabs(isoMuons[l1IndMatched]->pt()-myMuonRefs[0]->pt())/isoMuons[l1IndMatched]->pt() ); + if (l2DeltaRMin < DRMIN) { + l2Matched = true; + fill("matchingMon_", 1.5 ); + fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-myMuonRefs[1]->pt())/isoMuons[l2IndMatched]->pt() ); + } else if (l3DeltaRMin < DRMIN) { + l2Matched = true; + fill("matchingMon_", 1.5 ); + fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() ); + } + } else { + if (l2DeltaRMin < DRMIN) { + l1Matched = true; + fill("matchingMon_", 0.5 ); + fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-myMuonRefs[1]->pt())/isoMuons[l2IndMatched]->pt() ); + if (l3DeltaRMin < DRMIN) { + l2Matched = true; + fill("matchingMon_", 1.5 ); + fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() ); + } + } + if (l3DeltaRMin < DRMIN) { + l1Matched = true; + fill("matchingMon_", 0.5 ); + fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() ); + } + } + } + // access to hlt elec-muon + electronIds_.clear(); electronRefs_.clear(); + muonIds_.clear(); muonRefs_.clear(); + l1DeltaRMin = 500.; l2DeltaRMin = 500.; + l1IndMatched = 500; l2IndMatched = 500; + if (kElec > 0 && kMuon > 0 && isoElecs.size()>0) { + const string& moduleLabelElec(moduleLabels[kElec]); + const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec)); + const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_); + const unsigned int nElectrons(electronIds_.size()); + double deltar = 600.; + for (unsigned int inde = 0; inde < isoElecs.size(); inde++) { + if (nElectrons > 0) deltar = deltaR(*electronRefs_[0],*isoElecs[inde]); + if (deltar < l1DeltaRMin) { + l1DeltaRMin = deltar; + l1IndMatched = inde; + } + } + if (nElectrons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoElecs[l1IndMatched]->eta(), l1DeltaRMin); + if (l1DeltaRMin < DRMIN) { + l1Matched = true; + fill("matchingMon_", 0.5 ); + fill("leptResolution_", fabs(isoElecs[l1IndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[l1IndMatched]->pt() ); + } + } + if (kElec > 0 && kMuon > 0 && isoMuons.size()>0) { + const string& moduleLabelMuon(moduleLabels[kMuon]); + const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon)); + const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_); + const unsigned int nMuons(muonIds_.size()); + if (isoMuons.size()<1) continue; + double deltar = 600.; + for (unsigned int indm = 0; indm < isoMuons.size(); indm++) { + if (nMuons > 0) deltar = deltaR(*muonRefs_[0],*isoMuons[indm]); + if (deltar < l2DeltaRMin) { + l2DeltaRMin = deltar; + l2IndMatched = indm; + } + } + if (nMuons > 0 && l2IndMatched < 500) fill("leptDeltaREta_", isoMuons[l2IndMatched]->eta(), l2DeltaRMin); + if (l2DeltaRMin < DRMIN) { + l2Matched = true; + fill("matchingMon_", 1.5 ); + fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-muonRefs_[0]->pt())/isoMuons[l2IndMatched]->pt() ); + } + } + if (l1Matched && l2Matched) fill("matchingMon_", 2.5 ); + } + + } + +} + +TopDiLeptonHLTOfflineDQM::TopDiLeptonHLTOfflineDQM(const edm::ParameterSet& cfg): vertexSelect_(0), beamspotSelect_(0) +{ + // configure the preselection + edm::ParameterSet presel=cfg.getParameter("preselection"); + if( presel.existsAs("trigger") ){ + edm::ParameterSet trigger=presel.getParameter("trigger"); + triggerTable_= consumes< edm::TriggerResults >(trigger.getParameter("src")); + triggerPaths_=trigger.getParameter >("select"); + } + if( presel.existsAs("vertex" ) ){ + edm::ParameterSet vertex=presel.getParameter("vertex"); + vertex_= consumes< std::vector >(vertex.getParameter("src")); + vertexSelect_= new StringCutObjectSelector(vertex.getParameter("select")); + } + if( presel.existsAs("beamspot" ) ){ + edm::ParameterSet beamspot=presel.getParameter("beamspot"); + beamspot_= consumes< reco::BeamSpot >(beamspot.getParameter("src")); + beamspotSelect_= new StringCutObjectSelector(beamspot.getParameter("select")); + } + + // configure the selection + std::vector sel=cfg.getParameter >("selection"); + for(unsigned int i=0; i("label")); + selection_[selectionStep(selectionOrder_.back())] = std::make_pair(sel.at(i), new HLTOfflineDQMTopDiLepton::MonitorDiLepton(selectionStep(selectionOrder_.back()).c_str(), cfg.getParameter("setup"), consumesCollector())); + } + + for (const std::string& s: selectionOrder_) { + std::string key = selectionStep(s), type = objectType(s); + + if (selection_.find(key) == selection_.end()) + continue; + + if (type == "muons"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "elecs"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "jets"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "jets/pf"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "jets/calo"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "met"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + } +} + + void +TopDiLeptonHLTOfflineDQM::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) +{ + using namespace std; + using namespace edm; + + std::string processName = "HLT"; + + bool changed(true); + if (!hltConfig_.init(iRun,iSetup,processName,changed)) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Config extraction failure with process name " + << processName + << "\n"; + return; + } +} + + void +TopDiLeptonHLTOfflineDQM::analyze(const edm::Event& event, const edm::EventSetup& setup) +{ + if(!triggerTable_.isUninitialized()){ + edm::Handle triggerTable; + if( !event.getByToken(triggerTable_, triggerTable) ) return; + if(!acceptHLT(event, *triggerTable, triggerPaths_)) return; + } + if(!vertex_.isUninitialized()){ + edm::Handle > vertex; + if( !event.getByToken(vertex_, vertex) ) return; + if(vertex->empty() || !(*vertexSelect_)(vertex->front())) return; + } + if(!beamspot_.isUninitialized()){ + edm::Handle beamspot; + if( !event.getByToken(beamspot_, beamspot) ) return; + if(!(*beamspotSelect_)(*beamspot)) return; + } + // apply selection steps + for(std::vector::const_iterator selIt=selectionOrder_.begin(); selIt!=selectionOrder_.end(); ++selIt){ + std::string key = selectionStep(*selIt), type = objectType(*selIt); + if(selection_.find(key)!=selection_.end()){ + + if(type=="empty"){ + selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_); + continue; + } + if(type=="Hlt" ){ + selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_); + continue; + } + + bool passSel = true; + + for(std::vector::const_iterator selIt2=selectionOrder_.begin(); selIt2<=selIt; ++selIt2){ + std::string key2 = selectionStep(*selIt2), type2 = objectType(*selIt2); + if(selection_.find(key2)==selection_.end()) continue; + + if(type2=="Hlt" || type2=="empty" ) continue; + if (!selectmap_[type2]->select(event)) passSel=false; + + } // end 2nd loop + + // Apply cumulative event selection + if ( !passSel ) continue; + + selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_); + + } + } +} + +void +TopDiLeptonHLTOfflineDQM::bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) +{ + for (auto& sel: selection_) { + sel.second.second->book(i); + } +} diff --git a/DQMOffline/Trigger/src/TopHLTOfflineDQMHelper.cc b/DQMOffline/Trigger/src/TopHLTOfflineDQMHelper.cc new file mode 100644 index 0000000000000..9e38c06a945d5 --- /dev/null +++ b/DQMOffline/Trigger/src/TopHLTOfflineDQMHelper.cc @@ -0,0 +1,223 @@ +#include "DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h" +#include +/*Originally from DQM/Physics package, written by Roger Wolf and Jeremy Andrea*/ + +using namespace std; + +/// apply selection (w/o using the template class Object), override for jets +template <> +bool SelectionStepHLT::select(const edm::Event& event, const edm::EventSetup& setup) +{ + // fetch input collection + edm::Handle > src; + if( !event.getByToken(src_, src) ) return false; + + // load btag collection if configured such + // NOTE that the JetTagCollection needs an + // edm::View to reco::Jets; we have to add + // another Handle bjets for this purpose + edm::Handle > bjets; + edm::Handle btagger; + edm::Handle > pvertex; + if(!btagLabel_.isUninitialized()){ + if( !event.getByToken(src_, bjets) ) return false; + if( !event.getByToken(btagLabel_, btagger) ) return false; + if( !event.getByToken(pvs_, pvertex) ) return false; + } + + // load jetID value map if configured such + edm::Handle jetID; + if(jetIDSelect_){ + if( !event.getByToken(jetIDLabel_, jetID) ) return false; + + } + + // load jet corrector if configured such + const JetCorrector* corrector=0; + if(!jetCorrector_.empty()){ + // check whether a jet correcto is in the event setup or not + if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey() )){ + corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); + } + else{ + edm::LogVerbatim( "TopHLTOfflineDQMHelper" ) + << "\n" + << "------------------------------------------------------------------------------------- \n" + << " No JetCorrectionsRecord available from EventSetup: \n" + << " - Jets will not be corrected. \n" + << " - If you want to change this add the following lines to your cfg file \n" + << " \n" + << " ## load jet corrections \n" + << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n" + << " process.prefer(\"ak5CaloL2L3\") \n" + << " \n" + << "------------------------------------------------------------------------------------- \n"; + } + } + // determine multiplicity of selected objects + int n=0; + for(typename edm::View::const_iterator obj=src->begin(); obj!=src->end(); ++obj){ + // check for chosen btag discriminator to be above the + // corresponding working point if configured such + unsigned int idx = obj-src->begin(); + if( btagLabel_.isUninitialized() ? true : (*btagger)[bjets->refAt(idx)]>btagWorkingPoint_ ){ + bool passedJetID=true; + // check jetID for calo jets + if( jetIDSelect_ && dynamic_cast(src->refAt(idx).get())){ + passedJetID=(*jetIDSelect_)((*jetID)[src->refAt(idx)]); + } + if(passedJetID){ + // scale jet energy if configured such + reco::Jet jet=*obj; jet.scaleEnergy(corrector ? corrector->correction(*obj) : 1.); + if(select_(jet))++n; + } + } + } + bool accept=(min_>=0 ? n>=min_:true) && (max_>=0 ? n<=max_:true); + return (min_<0 && max_<0) ? (n>0):accept; +} + + +CalculateHLT::CalculateHLT(int maxNJets, double wMass): + failed_(false), maxNJets_(maxNJets), wMass_(wMass), massWBoson_(-1.), massTopQuark_(-1.),tmassWBoson_(-1),tmassTopQuark_(-1),mlb_(-1) +{ +} + + +double +CalculateHLT::massWBoson(const std::vector& jets) +{ + if(!failed_&& massWBoson_<0) operator()(jets); return massWBoson_; +} + + +double +CalculateHLT::massTopQuark(const std::vector& jets) +{ + if(!failed_&& massTopQuark_<0) operator()(jets); return massTopQuark_; +} + +/* +double +Calculate::tmassWBoson(const T& mu, const reco::MET& met, const reco::Jet& b) +{ + if(!failed_&& tmassWBoson_<0) operator()(b,mu,met); return tmassWBoson_; +} + + +double +Calculate::masslb(const T& mu, const reco::MET& met, const reco::Jet& b) +{ + if(!failed_&& mlb_<0) operator()(b,mu,met); return mlb_; +} + + +double +Calculate::tmassTopQuark(const T& lepton, const reco::MET& met, const reco::Jet& b) +{ + if(!failed_&& tmassTopQuark_<0) operator()(b,lepton,met); return tmassTopQuark_; +} + + +void Calculate::operator()( const reco::Jet& bJet, const T& lepton, const reco::MET& met){ + reco::Particle::LorentzVector WT = lepton.p4() + met.p4(); + tmassWBoson_ = sqrt((WT.px()*WT.px()) + (WT.py()*WT.py())); + reco::Particle::LorentzVector topT = WT + bJet.p4(); + tmassTopQuark_ = sqrt((topT.px()*topT.px()) + (topT.py()*topT.py())); + reco::Particle::LorentzVector lb = bJet.p4() + lepton.p4(); + mlb_ = lb.mass(); +}*/ + + +double +CalculateHLT::tmassWBoson(reco::RecoCandidate* mu, const reco::MET& met, const reco::Jet& b) +{ + if(!failed_&& tmassWBoson_<0) operator()(b,mu,met); return tmassWBoson_; +} + + +double +CalculateHLT::masslb(reco::RecoCandidate* mu, const reco::MET& met, const reco::Jet& b) +{ + if(!failed_&& mlb_<0) operator()(b,mu,met); return mlb_; +} + + +double +CalculateHLT::tmassTopQuark(reco::RecoCandidate* lepton, const reco::MET& met, const reco::Jet& b) +{ + if(!failed_&& tmassTopQuark_<0) operator()(b,lepton,met); return tmassTopQuark_; +} + + +void CalculateHLT::operator()( const reco::Jet& bJet, reco::RecoCandidate* lepton, const reco::MET& met){ + double metT = sqrt(pow(met.px(),2) + pow(met.py(),2)); + double lepT = sqrt(pow(lepton->px(),2) + pow(lepton->py(),2)); + double bT = sqrt(pow(bJet.px(),2) + pow(bJet.py(),2)); + reco::Particle::LorentzVector WT = lepton->p4() + met.p4(); + cout<<"in calculate:\n\t"<pt()<<"\t"<p4(); + mlb_ = lb.mass(); +} + + +void +CalculateHLT::operator()(const std::vector& jets) +{ + + if(maxNJets_<0) maxNJets_=jets.size(); + failed_= jets.size()<(unsigned int) maxNJets_; + if( failed_){ return; } + + // associate those jets with maximum pt of the vectorial + // sum to the hadronic decay chain + double maxPt=-1.; + std::vector maxPtIndices; + maxPtIndices.push_back(-1); + maxPtIndices.push_back(-1); + maxPtIndices.push_back(-1); + for(int idx=0; idx wMassIndices; + wMassIndices.push_back(-1); + wMassIndices.push_back(-1); + for(unsigned idx=0; idxmaxPtIndices[jdx] ) continue; + reco::Particle::LorentzVector sum = jets[maxPtIndices[idx]].p4()+jets[maxPtIndices[jdx]].p4(); + if( wDist<0. || wDist>fabs(sum.mass()-wMass_) ){ + wDist=fabs(sum.mass()-wMass_); + wMassIndices.clear(); + wMassIndices.push_back(maxPtIndices[idx]); + wMassIndices.push_back(maxPtIndices[jdx]); + } + } + } + massWBoson_= (jets[wMassIndices[0]].p4()+ + jets[wMassIndices[1]].p4()).mass(); +} + + + diff --git a/DQMOffline/Trigger/src/TopSingleLeptonHLTOfflineDQM.cc b/DQMOffline/Trigger/src/TopSingleLeptonHLTOfflineDQM.cc new file mode 100644 index 0000000000000..255f1be741657 --- /dev/null +++ b/DQMOffline/Trigger/src/TopSingleLeptonHLTOfflineDQM.cc @@ -0,0 +1,781 @@ +#include "JetMETCorrections/Objects/interface/JetCorrectionsRecord.h" +#include "DataFormats/JetReco/interface/CaloJet.h" +#include "DataFormats/BTauReco/interface/JetTag.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DataFormats/EgammaCandidates/interface/Electron.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" + +#include "DataFormats/Math/interface/deltaR.h" +#include "DQMOffline/Trigger/interface/TopSingleLeptonHLTOfflineDQM.h" +#include "DQMOffline/Trigger/interface/TopHLTOfflineDQMHelper.h" +#include + +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" +#include "FWCore/Common/interface/TriggerNames.h" +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" + +#include "CommonTools/UtilAlgos/interface/DeltaR.h" + +#include "FWCore/Framework/interface/ConsumesCollector.h" + +/*Originally from DQM/Physics by R. Wolf and J. Andrea*/ +using namespace std; +namespace HLTOfflineDQMTopSingleLepton { + + // maximal number of leading jets + // to be used for top mass estimate + static const unsigned int MAXJETS = 4; + // nominal mass of the W boson to + // be used for the top mass estimate + static const double WMASS = 80.4; + // maximal Delta to consider + // hlt and reco objects matched + static const double DRMIN = 0.05; + + MonitorSingleLepton::MonitorSingleLepton(const char* label, const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC) : + label_(label), elecIso_(0), elecSelect_(0), pvSelect_(0), muonIso_(0), muonSelect_(0), jetIDSelect_(0), includeBTag_(false), lowerEdge_(-1.), upperEdge_(-1.), logged_(0) + { + // sources have to be given; this PSet is not optional + edm::ParameterSet sources=cfg.getParameter("sources"); + muons_= iC.consumes< edm::View >(sources.getParameter("muons")); + elecs_= iC.consumes< edm::View >(sources.getParameter("elecs")); + jets_ = iC.consumes< edm::View >(sources.getParameter("jets" )); + + const auto& mets = sources.getParameter>("mets"); + for (const auto& met: mets) { + mets_.push_back(iC.consumes>(met)); + } + + pvs_ = iC.consumes< edm::View >(sources.getParameter("pvs" )); + + // electronExtras are optional; they may be omitted or + // empty + if( cfg.existsAs("elecExtras") ){ + edm::ParameterSet elecExtras=cfg.getParameter("elecExtras"); + // select is optional; in case it's not found no + // selection will be applied + if( elecExtras.existsAs("select") ){ + elecSelect_= new StringCutObjectSelector(elecExtras.getParameter("select")); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if( elecExtras.existsAs("isolation") ){ + elecIso_= new StringCutObjectSelector(elecExtras.getParameter("isolation")); + } + // electronId is optional; in case it's not found the + // InputTag will remain empty + if( elecExtras.existsAs("electronId") ){ + edm::ParameterSet elecId=elecExtras.getParameter("electronId"); + electronId_= iC.consumes< edm::ValueMap >(elecId.getParameter("src")); + eidPattern_= elecId.getParameter("pattern"); + } + } + // pvExtras are optional; they may be omitted or empty + if(cfg.existsAs("pvExtras")){ + edm::ParameterSet pvExtras=cfg.getParameter("pvExtras"); + // select is optional; in case it's not found no + // selection will be applied + if( pvExtras.existsAs("select") ){ + pvSelect_= new StringCutObjectSelector(pvExtras.getParameter("select")); + } + } + // muonExtras are optional; they may be omitted or empty + if( cfg.existsAs("muonExtras") ){ + edm::ParameterSet muonExtras=cfg.getParameter("muonExtras"); + // select is optional; in case it's not found no + // selection will be applied + if( muonExtras.existsAs("select") ){ + muonSelect_= new StringCutObjectSelector(muonExtras.getParameter("select")); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if( muonExtras.existsAs("isolation") ){ + muonIso_= new StringCutObjectSelector(muonExtras.getParameter("isolation")); + } + } + + // jetExtras are optional; they may be omitted or + // empty + if( cfg.existsAs("jetExtras") ){ + edm::ParameterSet jetExtras=cfg.getParameter("jetExtras"); + // jetCorrector is optional; in case it's not found + // the InputTag will remain empty + if( jetExtras.existsAs("jetCorrector") ){ + jetCorrector_= jetExtras.getParameter("jetCorrector"); + } + // read jetID information if it exists + if(jetExtras.existsAs("jetID")){ + edm::ParameterSet jetID=jetExtras.getParameter("jetID"); + jetIDLabel_ = iC.consumes< reco::JetIDValueMap >(jetID.getParameter("label")); + jetIDSelect_= new StringCutObjectSelector(jetID.getParameter("select")); + } + // select is optional; in case it's not found no + // selection will be applied (only implemented for + // CaloJets at the moment) + if( jetExtras.existsAs("select") ){ + jetSelect_= jetExtras.getParameter("select"); + } + // jetBDiscriminators are optional; in case they are + // not found the InputTag will remain empty; they + // consist of pairs of edm::JetFlavorAssociation's & + // corresponding working points + includeBTag_=jetExtras.existsAs("jetBTaggers"); + if( includeBTag_ ){ + edm::ParameterSet btagEff=jetExtras.getParameter("jetBTaggers").getParameter("trackCountingEff"); + btagEff_= iC.consumes< reco::JetTagCollection >(btagEff.getParameter("label")); btagEffWP_= btagEff.getParameter("workingPoint"); + edm::ParameterSet btagPur=jetExtras.getParameter("jetBTaggers").getParameter("trackCountingPur"); + btagPur_= iC.consumes< reco::JetTagCollection >(btagPur.getParameter("label")); btagPurWP_= btagPur.getParameter("workingPoint"); + edm::ParameterSet btagVtx=jetExtras.getParameter("jetBTaggers").getParameter("secondaryVertex" ); + btagVtx_= iC.consumes< reco::JetTagCollection >(btagVtx.getParameter("label")); btagVtxWP_= btagVtx.getParameter("workingPoint"); + } + } + + // triggerExtras are optional; they may be omitted or empty + if( cfg.existsAs("triggerExtras") ){ + edm::ParameterSet triggerExtras=cfg.getParameter("triggerExtras"); + triggerTable_= iC.consumes< edm::TriggerResults >(triggerExtras.getParameter("src")); + triggerPaths_=triggerExtras.getParameter >("paths"); + } + + // massExtras is optional; in case it's not found no mass + // window cuts are applied for the same flavor monitor + // histograms + if( cfg.existsAs("massExtras") ){ + edm::ParameterSet massExtras=cfg.getParameter("massExtras"); + lowerEdge_= massExtras.getParameter("lowerEdge"); + upperEdge_= massExtras.getParameter("upperEdge"); + } + + // and don't forget to do the histogram booking + folder_=cfg.getParameter("directory"); + + triggerEventWithRefsTag_ = iC.consumes< trigger::TriggerEventWithRefs >(edm::InputTag("hltTriggerSummaryRAW","","HLT")); + + } + + void + MonitorSingleLepton::book(DQMStore::IBooker& store_) + { + //set up the current directory path + std::string current(folder_); current+=label_; + store_.setCurrentFolder(current); + + // determine number of bins for trigger monitoring + unsigned int nPaths=triggerPaths_.size(); + + // number of selected primary vertices + hists_["pvMult_" ] = store_.book1D("PvMult" , "N_{pvs}" , 100, 0., 100.); + // multiplicity of jets with pt>20 (corrected to L2+L3) + hists_["jetMult_" ] = store_.book1D("JetMult" , "N_{20}(jet)" , 10, 0., 10.); + // // trigger efficiency estimates for single lepton triggers + // hists_["triggerEff_" ] = store_.book1D("TriggerEff" , "Eff(trigger)" , nPaths, 0., nPaths); + // monitored trigger occupancy for single lepton triggers + hists_["triggerMon_" ] = store_.book1D("TriggerMon" , "Mon(trigger)" , nPaths, 0., nPaths); + // W mass estimate + hists_["massW_" ] = store_.book1D("MassW" , "M(W)" , 60, 0., 300.); + // Top mass estimate + hists_["massTop_" ] = store_.book1D("MassTop" , "M(Top)" , 50, 0., 500.); + // Mlb mu + hists_["mMub_" ] = store_.book1D("mMub" , "m_{#mub}" , 50, 0., 500.); + // W mass transverse estimate mu + hists_["MTWm_" ] = store_.book1D("MTWm" , "M_{T}^{W}(#mu)" , 60, 0., 300.); + // Top mass transverse estimate mu + hists_["mMTT_" ] = store_.book1D("mMTT" , "M_{T}^{t}(#mu)" , 50, 0., 500.); + // Mlb e + hists_["mEb_" ] = store_.book1D("mEb" , "m_{eb}" , 50, 0., 500.); + // W mass transverse estimate e + hists_["MTWe_" ] = store_.book1D("MTWe" , "M_{T}^{W}(e)" , 60, 0., 300.); + // Top mass transverse estimate e + hists_["eMTT_" ] = store_.book1D("eMTT" , "M_{T}^{t}(e)" , 50, 0., 500.); + // set bin labels for trigger monitoring + triggerBinLabels(std::string("trigger"), triggerPaths_); + // multiplicity of btagged jets (for track counting high efficiency) with pt(L2L3)>20 + hists_["jetMultBEff_"] = store_.book1D("JetMultBProb", "N_{20}(b/prob)" , 10, 0., 10.); + // btag discriminator for track counting high efficiency for jets with pt(L2L3)>20 + hists_["jetBDiscEff_"] = store_.book1D("JetBDiscProb", "Disc_{b/prob}(jet)", 25, 0., 2.5); + // multiplicity of btagged jets (for track counting high purity) with pt(L2L3)>20 + hists_["jetMultBPur_"] = store_.book1D("JetMultBPur", "N_{20}(b/pur)" , 10, 0., 10.); + // btag discriminator for track counting high purity + hists_["jetBDiscPur_"] = store_.book1D("JetBDiscPur", "Disc_{b/pur}(Jet)", 100, 0., 10.); + // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>20 + hists_["jetMultBVtx_"] = store_.book1D("JetMultBVtx", "N_{20}(b/vtx)" , 10, 0., 10.); + // btag discriminator for simple secondary vertex + hists_["jetBDiscVtx_"] = store_.book1D("JetBDiscVtx", "Disc_{b/vtx}(Jet)", 35, -1., 6.); + // selected events + hists_["eventLogger_"] = store_.book2D("EventLogger", "Logged Events" , 3, 0., 3., 4, 0., 4.); + // set axes titles for selected events + hists_["eventLogger_"]->getTH1()->SetOption("TEXT"); + hists_["eventLogger_"]->setBinLabel( 1 , "Run" , 1); + hists_["eventLogger_"]->setBinLabel( 2 , "Block" , 1); + hists_["eventLogger_"]->setBinLabel( 3 , "Event" , 1); + hists_["eventLogger_"]->setAxisTitle("logged evts" , 2); + + // deltaR min between hlt iso lepton and reco iso lepton wrt eta + hists_["leptDeltaREta_"] = store_.book2D("DeltaRMinEtaLepton", "#Delta R_{min}(leptons) wrt #eta", 30, -3, 3, 10, 0., 0.1); + // deltaR min between hlt jets and reco jets wrt eta + hists_["jetDeltaREta_"] = store_.book2D("DeltaRMinEtaJet", "#Delta R_{min}(jets) wrt #eta", 30, -3, 3, 10, 0., 0.1); + // resolution in pT for matched isolated leptons + hists_["leptResolution_"] = store_.book1D("ResIsoLeptons", "#Delta p_{T}/p_{T}(matched leptons)", 20, 0., 0.1); + // resolution in pT for matched jets + hists_["jetResolution_"] = store_.book1D("ResIsoJets", "#Delta p_{T}/p_{T}(matched jets)", 20, 0., 0.1); + // matching monitoring + hists_["matchingMon_"] = store_.book1D("MatchingMon", "Mon(matching)", 5, 0., 5.); + // set axes titles for matching monitoring + hists_["matchingMon_"]->setBinLabel( 1 , "iso lepton" ); + hists_["matchingMon_"]->setBinLabel( 2 , "1st jet" ); + hists_["matchingMon_"]->setBinLabel( 3 , "2nd jet" ); + hists_["matchingMon_"]->setBinLabel( 4 , "3rd jet" ); + hists_["matchingMon_"]->setBinLabel( 5 , "all " ); + + return; + } + + void + MonitorSingleLepton::fill(const edm::Event& event, const edm::EventSetup& setup, const HLTConfigProvider& hltConfig, const std::vector triggerPaths) + { + // fetch trigger event if configured such + edm::Handle triggerTable; + if(!triggerTable_.isUninitialized()) { + if( !event.getByToken(triggerTable_, triggerTable) ) return; + } + + edm::Handle triggerEventWithRefsHandle; + if(!event.getByToken(triggerEventWithRefsTag_,triggerEventWithRefsHandle)) return; + + /* + ------------------------------------------------------------ + + Primary Vertex Monitoring + + ------------------------------------------------------------ + */ + // fill monitoring plots for primary verices + edm::Handle > pvs; + if( !event.getByToken(pvs_, pvs) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Vertex collection not found \n"; + return; + } + unsigned int pvMult = 0; + for(edm::View::const_iterator pv=pvs->begin(); pv!=pvs->end(); ++pv){ + if(!pvSelect_ || (*pvSelect_)(*pv)) + pvMult++; + } + fill("pvMult_", pvMult ); + + /* + ------------------------------------------------------------ + + Electron Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring plots for electrons + edm::Handle > elecs; + if( !event.getByToken(elecs_, elecs) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Electron collection not found \n"; + return; + } + + // check availability of electron id + edm::Handle > electronId; + if(!electronId_.isUninitialized()) { + if( !event.getByToken(electronId_, electronId) ) return; + } + + // loop electron collection + unsigned int eMultIso=0; + std::vector isoElecs; + reco::GsfElectron e; + for(edm::View::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){ + unsigned int idx = elec-elecs->begin(); + // restrict to electrons with good electronId + if( electronId_.isUninitialized() ? true : ((int)(*electronId)[elecs->refAt(idx)] & eidPattern_) ){ + if(!elecSelect_ || (*elecSelect_)(*elec)){ + if(!elecIso_ || (*elecIso_)(*elec)){ if(eMultIso == 0) e = *elec; isoElecs.push_back(&(*elec)); ++eMultIso;} + } + } + } + + /* + ------------------------------------------------------------ + + Muon Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring plots for muons + unsigned int mMultIso=0; + edm::Handle > muons; + std::vector isoMuons; + if( !event.getByToken(muons_, muons) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Muon collection not found \n"; + return; + } + reco::Muon mu; + for(edm::View::const_iterator muon=muons->begin(); muon!=muons->end(); ++muon){ + // restrict to globalMuons + if( muon->isGlobalMuon() ){ + // apply preselection + if(!muonSelect_ || (*muonSelect_)(*muon)){ + if(!muonIso_ || (*muonIso_)(*muon)) {if(mMultIso == 0) mu = *muon; isoMuons.push_back(&(*muon)); ++mMultIso;} + } + } + } + + /* + ------------------------------------------------------------ + + Jet Monitoring + + ------------------------------------------------------------ + */ + + // check availability of the btaggers + edm::Handle btagEff, btagPur, btagVtx; + if( includeBTag_ ){ + if( !event.getByToken(btagEff_, btagEff) ) return; + if( !event.getByToken(btagPur_, btagPur) ) return; + if( !event.getByToken(btagVtx_, btagVtx) ) return; + } + // load jet corrector if configured such + const JetCorrector* corrector=0; + if(!jetCorrector_.empty()){ + // check whether a jet corrector is in the event setup or not + if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey() )){ + corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); + } + else{ + edm::LogVerbatim( "TopSingleLeptonHLTOfflineDQM" ) + << "\n" + << "------------------------------------------------------------------------------------- \n" + << " No JetCorrectionsRecord available from EventSetup: \n" + << " - Jets will not be corrected. \n" + << " - If you want to change this add the following lines to your cfg file: \n" + << " \n" + << " ## load jet corrections \n" + << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n" + << " process.prefer(\"ak5CaloL2L3\") \n" + << " \n" + << "------------------------------------------------------------------------------------- \n"; + } + } + + // loop jet collection + std::vector correctedJets; + unsigned int mult=0, multBEff=0, multBPur=0, multBVtx=0; + + edm::Handle > jets; + if( !event.getByToken(jets_, jets) ) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Jet collection not found \n"; + return; + } + + edm::Handle jetID; + if(jetIDSelect_){ + if( !event.getByToken(jetIDLabel_, jetID) ) return; + } + reco::Jet bJetCand; + for(edm::View::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){ + // check jetID for calo jets + unsigned int idx = jet-jets->begin(); + if( jetIDSelect_ && dynamic_cast(jets->refAt(idx).get())){ + if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue; + } + // chekc additional jet selection for calo, pf and bare reco jets + if(dynamic_cast(&*jet)){ + reco::CaloJet sel = dynamic_cast(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if(!jetSelect(sel)){ continue;} + } + else if(dynamic_cast(&*jet)){ + reco::PFJet sel= dynamic_cast(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if(!jetSelect(sel)) continue; + } + else{ + reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if(!jetSelect(sel)) continue; + } + + // prepare jet to fill monitor histograms + reco::Jet monitorJet = *jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + correctedJets.push_back(monitorJet); + ++mult; // determine jet multiplicity + if( includeBTag_ ){ + // fill b-discriminators + edm::RefToBase jetRef = jets->refAt(idx); + // for the btagEff collection + double btagEffDisc = (*btagEff)[jetRef]; + fill("jetBDiscEff_", btagEffDisc); + if( (*btagEff)[jetRef]>btagEffWP_ ) ++multBEff; + // for the btagPur collection + double btagPurDisc = (*btagPur)[jetRef]; + fill("jetBDiscPur_", btagPurDisc); + if( (*btagPur)[jetRef]>btagPurWP_ ) {if(multBPur == 0) bJetCand = *jet; ++multBPur;} + // for the btagVtx collection + double btagVtxDisc = (*btagVtx)[jetRef]; + fill("jetBDiscVtx_", btagVtxDisc); + if( (*btagVtx)[jetRef]>btagVtxWP_ ) ++multBVtx; + } + } + fill("jetMult_" , mult ); + fill("jetMultBEff_", multBEff); + fill("jetMultBPur_", multBPur); + fill("jetMultBVtx_", multBVtx); + + /* + ------------------------------------------------------------ + + MET Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring histograms for met + reco::MET mET; + for(std::vector< edm::EDGetTokenT< edm::View > >::const_iterator met_=mets_.begin(); met_!=mets_.end(); ++met_){ + edm::Handle > met; + if( !event.getByToken(*met_, met) ) continue; + if(met->begin()!=met->end()){ + mET = *(met->begin()); + } + } + + /* + ------------------------------------------------------------ + + Event Monitoring + + ------------------------------------------------------------ + */ + + // fill W boson and top mass estimates + CalculateHLT eventKinematics(MAXJETS, WMASS); + double wMass = eventKinematics.massWBoson (correctedJets); + double topMass = eventKinematics.massTopQuark(correctedJets); + if(wMass>=0 && topMass>=0) {fill("massW_" , wMass ); fill("massTop_" , topMass);} + // fill plots for trigger monitoring + if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_second->getNbinsY()){ + // log runnumber, lumi block, event number & some + // more pysics infomation for interesting events + fill("eventLogger_", 0.5, logged_+0.5, event.eventAuxiliary().run()); + fill("eventLogger_", 1.5, logged_+0.5, event.eventAuxiliary().luminosityBlock()); + fill("eventLogger_", 2.5, logged_+0.5, event.eventAuxiliary().event()); + ++logged_; + } + } + if(multBPur != 0 && mMultIso == 1 ){ + double mtW = eventKinematics.tmassWBoson(&mu,mET,bJetCand); if (mtW == mtW) fill("MTWm_",mtW); + double Mlb = eventKinematics.masslb(&mu,mET,bJetCand); if (Mlb == Mlb) fill("mMub_", Mlb); + double MTT = eventKinematics.tmassTopQuark(&mu,mET,bJetCand); if (MTT == MTT) fill("mMTT_", MTT); + } + + if(multBPur != 0 && eMultIso == 1 ){ + double mtW = eventKinematics.tmassWBoson(&mu,mET,bJetCand); if (mtW == mtW)fill("MTWe_",mtW); + double Mlb = eventKinematics.masslb(&mu,mET,bJetCand); if (Mlb == Mlb) fill("mEb_", Mlb); + double MTT = eventKinematics.tmassTopQuark(&mu,mET,bJetCand); if (MTT == MTT) fill("eMTT_", MTT); + } + + + /* + ------------------------------------------------------------ + + HLT Objects Monitoring + + ------------------------------------------------------------ + */ + + const edm::TriggerNames& triggerNames = event.triggerNames(*triggerTable); + // loop over trigger paths + for(unsigned int i=0; i& moduleLabels(hltConfig.moduleLabels(triggerIndex)); + const unsigned int moduleIndex(triggerTable->index(triggerIndex)); + // Results from TriggerEventWithRefs product + electronIds_.clear(); electronRefs_.clear(); + muonIds_.clear(); muonRefs_.clear(); + pfjetIds_.clear(); pfjetRefs_.clear(); + // look only for modules actually run in this path + unsigned int kElec=0; + unsigned int kMuon=0; + unsigned int kJet=0; + for (unsigned int k=0; k<=moduleIndex; ++k) { + const string& moduleLabel(moduleLabels[k]); + const string moduleType(hltConfig.moduleType(moduleLabel)); + // check whether the module is packed up in TriggerEventWithRef product + const unsigned int filterIndex(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabel,"","HLT"))); + if (filterIndexsize()) { + triggerEventWithRefsHandle->getObjects(filterIndex,electronIds_,electronRefs_); + const unsigned int nElectrons(electronIds_.size()); + if (nElectrons>0) kElec = k; + + triggerEventWithRefsHandle->getObjects(filterIndex,muonIds_,muonRefs_); + const unsigned int nMuons(muonIds_.size()); + if (nMuons>0) kMuon = k; + + triggerEventWithRefsHandle->getObjects(filterIndex,pfjetIds_,pfjetRefs_); + const unsigned int nPFJets(pfjetIds_.size()); + if (nPFJets>0) kJet = k; + } + } + bool isMatched = true; + bool lMatched = false; + bool j1Matched = false; + bool j2Matched = false; + bool j3Matched = false; + // access to hlt elecs + double eDeltaRMin = 500.; + unsigned int eIndMatched = 500; + electronIds_.clear(); electronRefs_.clear(); + if (kElec > 0) { + const string& moduleLabelElec(moduleLabels[kElec]); + const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec)); + const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_); + for (unsigned int inde = 0; inde < isoElecs.size(); inde++) { + double deltar = deltaR(*electronRefs_[0],*isoElecs[inde]); + if (deltar < eDeltaRMin) { + eDeltaRMin = deltar; + eIndMatched = inde; + } + } + if (eDeltaRMin < DRMIN) lMatched = true; + } + // access to hlt muons + muonIds_.clear(); muonRefs_.clear(); + double mDeltaRMin = 500.; + unsigned int mIndMatched = 500; + if (kMuon > 0) { + const string& moduleLabelMuon(moduleLabels[kMuon]); + const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon)); + const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_); + for (unsigned int indm = 0; indm < isoMuons.size(); indm++) { + double deltar = deltaR(*muonRefs_[0],*isoMuons[indm]); + if (deltar < mDeltaRMin) { + mDeltaRMin = deltar; + mIndMatched = indm; + } + } + if (mDeltaRMin < DRMIN) lMatched = true; + } + // access to hlt pf jets + const unsigned int nPFJets(pfjetIds_.size()); + pfjetIds_.clear(); pfjetRefs_.clear(); + double j1DeltaRMin = 500.; + double j2DeltaRMin = 500.; + double j3DeltaRMin = 500.; + unsigned int j1IndMatched = 500; + unsigned int j2IndMatched = 500; + unsigned int j3IndMatched = 500; + if (kJet > 0) { + const string& moduleLabelJet(moduleLabels[kJet]); + const string moduleTypeJet(hltConfig.moduleType(moduleLabelJet)); + const unsigned int filterIndexJet(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelJet,"","HLT"))); + triggerEventWithRefsHandle->getObjects(filterIndexJet,pfjetIds_,pfjetRefs_); + for (unsigned int indj = 0; indj < correctedJets.size(); indj++) { + double deltar1 = deltaR(*pfjetRefs_[0],correctedJets[indj]); + if (deltar1 < j1DeltaRMin) {j1DeltaRMin = deltar1; j1IndMatched = indj;} + if (nPFJets > 1) { + double deltar2 = deltaR(*pfjetRefs_[1],correctedJets[indj]); + if (deltar2 < j2DeltaRMin) {j2DeltaRMin = deltar2; j2IndMatched = indj;} + if (nPFJets > 2) { + double deltar3 = deltaR(*pfjetRefs_[2],correctedJets[indj]); + if (deltar3 < j3DeltaRMin) {j3DeltaRMin = deltar3; j3IndMatched = indj;} + } + } + } + if (nPFJets > 0 && j1DeltaRMin < DRMIN) j1Matched = true; + if (nPFJets > 1 && j2DeltaRMin < DRMIN) j2Matched = true; + if (nPFJets > 2 && j3DeltaRMin < DRMIN) j3Matched = true; + } + if (eIndMatched < 500) { + fill("leptDeltaREta_", isoElecs[eIndMatched]->eta(), eDeltaRMin); + if (lMatched) fill("leptResolution_", fabs(isoElecs[eIndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[eIndMatched]->pt() ); + } + if (mIndMatched < 500) { + fill("leptDeltaREta_", isoMuons[mIndMatched]->eta(), mDeltaRMin); + if (lMatched) fill("leptResolution_", fabs(isoMuons[mIndMatched]->pt()-muonRefs_[0]->pt())/isoMuons[mIndMatched]->pt() ); + } + if (lMatched) fill("matchingMon_", 0.5 ); + else isMatched = false; + if (kJet > 0) { + fill("jetDeltaREta_", correctedJets[j1IndMatched].eta(), j1DeltaRMin); + if (j1Matched) { + fill("jetResolution_", fabs(correctedJets[j1IndMatched].pt()-pfjetRefs_[0]->pt())/correctedJets[j1IndMatched].pt() ); + fill("matchingMon_", 1.5 ); + } + else isMatched = false; + if (nPFJets > 1) { + fill("jetDeltaREta_", correctedJets[j2IndMatched].eta(), j2DeltaRMin); + if (j2Matched) { + fill("jetResolution_", fabs(correctedJets[j2IndMatched].pt()-pfjetRefs_[1]->pt())/correctedJets[j2IndMatched].pt() ); + fill("matchingMon_", 2.5 ); + } + else isMatched = false; + if (nPFJets > 2) { + fill("jetDeltaREta_", correctedJets[j3IndMatched].eta(), j3DeltaRMin); + if (j3Matched) { + fill("jetResolution_", fabs(correctedJets[j3IndMatched].pt()-pfjetRefs_[2]->pt())/correctedJets[j3IndMatched].pt() ); + fill("matchingMon_", 3.5 ); + } + else isMatched = false; + } + } + } + if (isMatched) fill("matchingMon_", 4.5 ); + + } + + } + +} + +///=========================================================================================================== + +TopSingleLeptonHLTOfflineDQM::TopSingleLeptonHLTOfflineDQM(const edm::ParameterSet& cfg): vertexSelect_(0), beamspotSelect_(0) +{ + // configure preselection + edm::ParameterSet presel=cfg.getParameter("preselection"); + if( presel.existsAs("trigger") ){ + edm::ParameterSet trigger=presel.getParameter("trigger"); + triggerTable_= consumes< edm::TriggerResults >(trigger.getParameter("src")); + triggerPaths_=trigger.getParameter >("select"); + } + if( presel.existsAs("vertex" ) ){ + edm::ParameterSet vertex=presel.getParameter("vertex"); + vertex_= consumes< std::vector >(vertex.getParameter("src")); + vertexSelect_= new StringCutObjectSelector(vertex.getParameter("select")); + } + if( presel.existsAs("beamspot" ) ){ + edm::ParameterSet beamspot=presel.getParameter("beamspot"); + beamspot_= consumes< reco::BeamSpot >(beamspot.getParameter("src")); + beamspotSelect_= new StringCutObjectSelector(beamspot.getParameter("select")); + } + + // configure the selection + std::vector sel=cfg.getParameter >("selection"); + for(unsigned int i=0; i("label")); + selection_[selectionStep(selectionOrder_.back())] = std::make_pair(sel.at(i), new HLTOfflineDQMTopSingleLepton::MonitorSingleLepton(selectionStep(selectionOrder_.back()).c_str(), cfg.getParameter("setup"), consumesCollector())); + } + + for (const std::string& s: selectionOrder_) { + std::string key = selectionStep(s), type = objectType(s); + + if (selection_.find(key) == selection_.end()) + continue; + + if (type == "muons"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "elecs"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "jets"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "jets/pf"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "jets/calo"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + if (type == "met"){ + selectmap_[type] = new SelectionStepHLT(selection_[key].first, consumesCollector()); + } + } +} + + void +TopSingleLeptonHLTOfflineDQM::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) +{ + using namespace std; + using namespace edm; + + std::string processName = "HLT"; + + bool changed(true); + if (!hltConfig_.init(iRun,iSetup,processName,changed)) { + edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" ) + << "Config extraction failure with process name " + << processName + << "\n"; + return; + } +} + + void +TopSingleLeptonHLTOfflineDQM::analyze(const edm::Event& event, const edm::EventSetup& setup) +{ + if(!triggerTable_.isUninitialized()){ + edm::Handle triggerTable; + if( !event.getByToken(triggerTable_, triggerTable) ) return; + if(!acceptHLT(event, *triggerTable, triggerPaths_)) return; + } + if(!vertex_.isUninitialized()){ + edm::Handle > vertex; + if( !event.getByToken(vertex_, vertex) ) return; + if(vertex->empty() || !(*vertexSelect_)(vertex->front())) return; + } + if(!beamspot_.isUninitialized()){ + edm::Handle beamspot; + if( !event.getByToken(beamspot_, beamspot) ) return; + if(!(*beamspotSelect_)(*beamspot)) return; + } + // apply selection steps + for(std::vector::const_iterator selIt=selectionOrder_.begin(); selIt!=selectionOrder_.end(); ++selIt){ + std::string key = selectionStep(*selIt), type = objectType(*selIt); + if(selection_.find(key)!=selection_.end()){ + + if(type=="empty"){ + selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_); + continue; + } + if(type=="Hlt" ){ + selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_); + continue; + } + + bool passSel = true; + + for(std::vector::const_iterator selIt2=selectionOrder_.begin(); selIt2<=selIt; ++selIt2){ + std::string key2 = selectionStep(*selIt2), type2 = objectType(*selIt2); + if(selection_.find(key2)==selection_.end()) continue; + + if(type2=="Hlt" || type2=="empty" ) continue; + if (!selectmap_[type2]->select(event)) passSel=false; + + } // end 2nd loop + + // Apply cumulative event selection + if ( !passSel ) continue; + + selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_); + + } + } +} + +void +TopSingleLeptonHLTOfflineDQM::bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) +{ + for (auto& sel: selection_) { + sel.second.second->book(i); + } +} diff --git a/DQMServices/Components/src/DQMEventInfo.cc b/DQMServices/Components/src/DQMEventInfo.cc index 68384a6bd2f87..57eb9e0c3e81a 100644 --- a/DQMServices/Components/src/DQMEventInfo.cc +++ b/DQMServices/Components/src/DQMEventInfo.cc @@ -46,14 +46,14 @@ DQMEventInfo::~DQMEventInfo(){ } void DQMEventInfo::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & /* iRun*/, + edm::Run const & iRun, edm::EventSetup const & /* iSetup */) { ibooker.setCurrentFolder(eventInfoFolder_) ; //Event specific contents runId_ = ibooker.bookInt("iRun"); - runId_->Fill(-1); + runId_->Fill(iRun.id().run()); lumisecId_ = ibooker.bookInt("iLumiSection"); lumisecId_->Fill(-1); eventId_ = ibooker.bookInt("iEvent"); @@ -79,6 +79,7 @@ void DQMEventInfo::bookHistograms(DQMStore::IBooker & ibooker, processStartTimeStamp_ = ibooker.bookFloat("processStartTimeStamp"); processStartTimeStamp_->Fill(currentTime_); runStartTimeStamp_ = ibooker.bookFloat("runStartTimeStamp"); + runStartTimeStamp_->Fill(stampToReal(iRun.beginTime())); hostName_= ibooker.bookString("hostName",gSystem->HostName()); processName_= ibooker.bookString("processName",subsystemname_); workingDir_= ibooker.bookString("workingDir",gSystem->pwd()); @@ -103,14 +104,10 @@ void DQMEventInfo::bookHistograms(DQMStore::IBooker & ibooker, ibooker.bookString("eventSelection",evSelection); } -} -void DQMEventInfo::dqmBeginRun(const edm::Run& r, const edm::EventSetup &c ) -{ - runId_->Fill(r.id().run()); - runStartTimeStamp_->Fill(stampToReal(r.beginTime())); } + void DQMEventInfo::beginLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c) { lumisecId_->Fill(l.id().luminosityBlock()); diff --git a/DQMServices/Components/src/DQMEventInfo.h b/DQMServices/Components/src/DQMEventInfo.h index 1cb28d16f588f..f66762b66b337 100644 --- a/DQMServices/Components/src/DQMEventInfo.h +++ b/DQMServices/Components/src/DQMEventInfo.h @@ -44,7 +44,6 @@ class DQMEventInfo: public DQMEDAnalyzer{ /// Analyze void analyze(const edm::Event& e, const edm::EventSetup& c); void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) ; void beginLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c); private: diff --git a/DQMServices/Core/src/DQMEDAnalyzer.cc b/DQMServices/Core/src/DQMEDAnalyzer.cc index 7dc7b77aa8b40..6d2a80ceeee84 100644 --- a/DQMServices/Core/src/DQMEDAnalyzer.cc +++ b/DQMServices/Core/src/DQMEDAnalyzer.cc @@ -16,6 +16,7 @@ void DQMEDAnalyzer::beginStream(edm::StreamID id) void DQMEDAnalyzer::beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) { + dqmBeginRun(iRun, iSetup); DQMStore * store = edm::Service().operator->(); store->bookTransaction([this, &iRun, &iSetup](DQMStore::IBooker &b) { this->bookHistograms(b, iRun, iSetup); @@ -23,7 +24,6 @@ void DQMEDAnalyzer::beginRun(edm::Run const &iRun, iRun.run(), streamId(), iRun.moduleCallingContext()->moduleDescription()->id()); - dqmBeginRun(iRun, iSetup); } diff --git a/DQMServices/FwkIO/plugins/BuildFile.xml b/DQMServices/FwkIO/plugins/BuildFile.xml index 9707e02774bc4..241f02c440603 100644 --- a/DQMServices/FwkIO/plugins/BuildFile.xml +++ b/DQMServices/FwkIO/plugins/BuildFile.xml @@ -5,6 +5,7 @@ + diff --git a/DQMServices/FwkIO/plugins/DQMRootOutputModule.cc b/DQMServices/FwkIO/plugins/DQMRootOutputModule.cc index 07f48acd6442f..e9dfd382fb5a8 100644 --- a/DQMServices/FwkIO/plugins/DQMRootOutputModule.cc +++ b/DQMServices/FwkIO/plugins/DQMRootOutputModule.cc @@ -18,6 +18,7 @@ #include #include #include +#include #include "TFile.h" #include "TTree.h" #include "TString.h" @@ -190,6 +191,7 @@ class DQMRootOutputModule : public edm::OutputModule { virtual bool isFileOpen() const override; virtual void openFile(edm::FileBlock const&) override; virtual void reallyCloseFile() override; + virtual void postForkReacquireResources(unsigned int childIndex, unsigned int numberOfChildren) override; void startEndFile(); void finishEndFile(); @@ -367,10 +369,33 @@ DQMRootOutputModule::openFile(edm::FileBlock const&) } +void +DQMRootOutputModule::postForkReacquireResources(unsigned int childIndex, unsigned int numberOfChildren) { + // this is copied from IOPool/Output/src/PoolOutputModule.cc, for consistency + unsigned int digits = 0; + while (numberOfChildren != 0) { + ++digits; + numberOfChildren /= 10; + } + // protect against zero numberOfChildren + if (digits == 0) { + digits = 3; + } + + char buffer[digits + 2]; + snprintf(buffer, digits + 2, "_%0*d", digits, childIndex); + + boost::filesystem::path filename(m_fileName); + m_fileName = (filename.parent_path() / (filename.stem().string() + buffer + filename.extension().string())).string(); +} + + void DQMRootOutputModule::write(edm::EventPrincipal const&, edm::ModuleCallingContext const*){ } + + void DQMRootOutputModule::writeLuminosityBlock(edm::LuminosityBlockPrincipal const& iLumi, edm::ModuleCallingContext const*) { diff --git a/DataFormats/EgammaCandidates/interface/GsfElectron.h b/DataFormats/EgammaCandidates/interface/GsfElectron.h index 678e88d2a8318..062976c9e3120 100644 --- a/DataFormats/EgammaCandidates/interface/GsfElectron.h +++ b/DataFormats/EgammaCandidates/interface/GsfElectron.h @@ -215,12 +215,12 @@ class GsfElectron : public RecoCandidate eSeedClusterOverP(0.), eSeedClusterOverPout(0.), eEleClusterOverPout(0.), - deltaEtaSuperClusterAtVtx(std::numeric_limits::infinity()), - deltaEtaSeedClusterAtCalo(std::numeric_limits::infinity()), - deltaEtaEleClusterAtCalo(std::numeric_limits::infinity()), - deltaPhiEleClusterAtCalo(std::numeric_limits::infinity()), - deltaPhiSuperClusterAtVtx(std::numeric_limits::infinity()), - deltaPhiSeedClusterAtCalo(std::numeric_limits::infinity()) + deltaEtaSuperClusterAtVtx(std::numeric_limits::max()), + deltaEtaSeedClusterAtCalo(std::numeric_limits::max()), + deltaEtaEleClusterAtCalo(std::numeric_limits::max()), + deltaPhiEleClusterAtCalo(std::numeric_limits::max()), + deltaPhiSuperClusterAtVtx(std::numeric_limits::max()), + deltaPhiSeedClusterAtCalo(std::numeric_limits::max()) {} } ; @@ -367,11 +367,11 @@ class GsfElectron : public RecoCandidate float hcalDepth1OverEcalBc ; // hcal over ecal seed cluster energy using 1st hcal depth (using hcal towers behind clusters) float hcalDepth2OverEcalBc ; // hcal over ecal seed cluster energy using 2nd hcal depth (using hcal towers behind clusters) ShowerShape() - : sigmaEtaEta(std::numeric_limits::infinity()), - sigmaIetaIeta(std::numeric_limits::infinity()), - sigmaIphiIphi(std::numeric_limits::infinity()), + : sigmaEtaEta(std::numeric_limits::max()), + sigmaIetaIeta(std::numeric_limits::max()), + sigmaIphiIphi(std::numeric_limits::max()), e1x5(0.), e2x5Max(0.), e5x5(0.), - r9(-std::numeric_limits::infinity()), + r9(-std::numeric_limits::max()), hcalDepth1OverEcal(0.), hcalDepth2OverEcal(0.), hcalDepth1OverEcalBc(0.), hcalDepth2OverEcalBc(0.) {} @@ -479,16 +479,16 @@ class GsfElectron : public RecoCandidate struct ConversionRejection { - int flags ; // -infinity:not-computed, other: as computed by Puneeth conversion code + int flags ; // -max:not-computed, other: as computed by Puneeth conversion code TrackBaseRef partner ; // conversion partner float dist ; // distance to the conversion partner float dcot ; // difference of cot(angle) with the conversion partner track float radius ; // signed conversion radius ConversionRejection() - : flags(-std::numeric_limits::infinity()), - dist(std::numeric_limits::infinity()), - dcot(std::numeric_limits::infinity()), - radius(std::numeric_limits::infinity()) + : flags(-1), + dist(std::numeric_limits::max()), + dcot(std::numeric_limits::max()), + radius(std::numeric_limits::max()) {} } ; @@ -540,11 +540,11 @@ class GsfElectron : public RecoCandidate float etOutsideMustache ; MvaInput() : earlyBrem(-2), lateBrem(-2), - sigmaEtaEta(std::numeric_limits::infinity()), + sigmaEtaEta(std::numeric_limits::max()), hadEnergy(0.), - deltaEta(std::numeric_limits::infinity()), + deltaEta(std::numeric_limits::max()), nClusterOutsideMustache(-2), - etOutsideMustache(-std::numeric_limits::infinity()) + etOutsideMustache(-std::numeric_limits::max()) {} } ; diff --git a/DataFormats/EgammaCandidates/interface/Photon.h b/DataFormats/EgammaCandidates/interface/Photon.h index c4047f3b8b599..bd992cb4b379f 100644 --- a/DataFormats/EgammaCandidates/interface/Photon.h +++ b/DataFormats/EgammaCandidates/interface/Photon.h @@ -148,8 +148,8 @@ namespace reco { float hcalDepth2OverEcalBc; std::vector hcalTowersBehindClusters; ShowerShape() - : sigmaEtaEta(std::numeric_limits::infinity()), - sigmaIetaIeta(std::numeric_limits::infinity()), + : sigmaEtaEta(std::numeric_limits::max()), + sigmaIetaIeta(std::numeric_limits::max()), e1x5(0), e2x5(0), e3x3(0), diff --git a/FastSimulation/Configuration/python/CommonInputs_cff.py b/FastSimulation/Configuration/python/CommonInputs_cff.py index 58027aceef41d..2fe7f3c4d2b96 100644 --- a/FastSimulation/Configuration/python/CommonInputs_cff.py +++ b/FastSimulation/Configuration/python/CommonInputs_cff.py @@ -37,7 +37,6 @@ CaloMode = 3 # This flag is to switch between GEN-level and SIM/RECO-level pileup mixing -# 1: GEN-level <---- DEFAULT -# 2: SIM/RECO-level; to be used only if CaloMode==3 -MixingMode = 1 +MixingMode = 'GenMixing' # GEN-level <---- DEFAULT +#MixingMode = 'DigiRecoMixing' # SIM/RECO-level; can be used only if CaloMode==3 diff --git a/FastSimulation/Configuration/python/FamosSequences_cff.py b/FastSimulation/Configuration/python/FamosSequences_cff.py index 063a441818e6c..5b96326301ed6 100644 --- a/FastSimulation/Configuration/python/FamosSequences_cff.py +++ b/FastSimulation/Configuration/python/FamosSequences_cff.py @@ -109,12 +109,6 @@ simMuonCSCDigis.strips.doCorrelatedNoise = False ## Saves a little bit of time -#if (MixingMode==2): -# simMuonCSCDigis.mixLabel = 'mixSimCaloHits' -# simMuonDTDigis.mixLabel = 'mixSimCaloHits' -# simMuonRPCDigis.mixLabel = 'mixSimCaloHits' -#else: -#if (MixingMode==1): simMuonCSCDigis.InputCollection = 'MuonSimHitsMuonCSCHits' simMuonDTDigis.InputCollection = 'MuonSimHitsMuonDTHits' simMuonRPCDigis.InputCollection = 'MuonSimHitsMuonRPCHits' @@ -206,6 +200,9 @@ allConversions.src = 'gsfGeneralConversionTrackMerger' famosConversionSequence = cms.Sequence(conversionTrackSequenceNoEcalSeeded*allConversionSequence) +if (MixingMode=='DigiRecoMixing'): + generalConversionTrackProducer.TrackProducer = 'generalTracksBeforeMixing' + from TrackingTools.GsfTracking.CkfElectronCandidateMaker_cff import * from TrackingTools.GsfTracking.FwdElectronPropagator_cfi import * import TrackingTools.GsfTracking.GsfElectronFit_cfi @@ -351,10 +348,7 @@ caloTowersRec ) elif(CaloMode==3): - - dump = cms.EDAnalyzer("EventContentAnalyzer") #TEMP - - if(MixingMode==1): + if(MixingMode=='GenMixing'): simulationSequence = cms.Sequence( offlineBeamSpot+ cms.SequencePlaceholder("famosMixing")+ @@ -371,7 +365,8 @@ iterativeTracking+ vertexreco ) - else: + elif(MixingMode=='DigiRecoMixing'): + #dump = cms.EDAnalyzer("EventContentAnalyzer") #TEMP simulationSequence = cms.Sequence( offlineBeamSpot+ famosSimHits+ @@ -382,33 +377,38 @@ iterativeTracking ) digitizationSequence = cms.Sequence( - cms.SequencePlaceholder("mix")+ + cms.SequencePlaceholder("mixHitsAndTracks")+ muonDigi+ caloDigis ) trackDigiVertexSequence = cms.Sequence( trackReco+ + #dump+ #TEMP digitizationSequence+ vertexreco ) trackVertexReco = cms.Sequence( # for backward compatibility trackDigiVertexSequence ) + else: + print 'unsupported MixingMode label' # out of the 'if': caloTowersSequence = cms.Sequence( caloRecHits+ caloTowersRec ) - if(MixingMode==1): + if(MixingMode=='GenMixing'): famosSimulationSequence = cms.Sequence( simulationSequence+ digitizationSequence#+ # temporary; eventually it will be a block of its own, but it requires intervention on ConfigBuilder ) - else: + elif(MixingMode=='DigiRecoMixing'): famosSimulationSequence = cms.Sequence( simulationSequence+ trackDigiVertexSequence ) + else: + print 'unsupported MixingMode label' famosEcalDrivenElectronSequence = cms.Sequence( famosGsfTrackSequence+ @@ -417,7 +417,7 @@ # The reconstruction sequence if(CaloMode==3): - if(MixingMode==1): + if(MixingMode=='GenMixing'): reconstructionWithFamos = cms.Sequence( digitizationSequence+ # temporary; repetition! trackVertexReco+ @@ -445,7 +445,7 @@ famosBTaggingSequence+ famosPFTauTaggingSequence ) - else: + elif(MixingMode=='DigiRecoMixing'): reconstructionWithFamos = cms.Sequence( caloTowersSequence+ particleFlowCluster+ @@ -471,6 +471,8 @@ famosBTaggingSequence+ famosPFTauTaggingSequence ) + else: + print 'unsupported MixingMode label' else: reconstructionWithFamos = cms.Sequence( trackVertexReco+ diff --git a/FastSimulation/Configuration/python/MixingHitsAndTracks_cff.py b/FastSimulation/Configuration/python/MixingHitsAndTracks_cff.py index 87dfbdda47bb7..df6ee94d92a4e 100644 --- a/FastSimulation/Configuration/python/MixingHitsAndTracks_cff.py +++ b/FastSimulation/Configuration/python/MixingHitsAndTracks_cff.py @@ -1,7 +1,6 @@ #from FastSimulation.Configuration.mixNoPU_cfi import * from SimGeneral.PileupInformation.AddPileupSummary_cfi import * -#addPileupInfo.PileupMixingLabel = 'mixSimCaloHits' addPileupInfo.PileupMixingLabel = 'mix' addPileupInfo.simHitLabel = 'g4SimHits' @@ -11,15 +10,3 @@ addPileupInfo ) - -#from FastSimulation.Configuration.mixHitsWithPU_cfi import * -#mixHits = cms.Sequence( -# mixSimCaloHits+ -# addPileupInfo -# ) - -#from FastSimulation.Configuration.mixTracksWithPU_cfi import * -#mixTracks = cms.Sequence( -# mixRecoTracks -# ) - diff --git a/FastSimulation/Configuration/python/mixFastSimObjects_cfi.py b/FastSimulation/Configuration/python/mixFastSimObjects_cfi.py index 66356609f21db..bcfc3e3711f30 100644 --- a/FastSimulation/Configuration/python/mixFastSimObjects_cfi.py +++ b/FastSimulation/Configuration/python/mixFastSimObjects_cfi.py @@ -2,7 +2,7 @@ from FastSimulation.Configuration.CommonInputs_cff import * # temporary, just to select the MixingMode -if (MixingMode==2): +if (MixingMode=='DigiRecoMixing'): mixReconstructedTracks = cms.PSet( input = cms.VInputTag(cms.InputTag("generalTracks")), type = cms.string('RecoTrack') diff --git a/FastSimulation/Configuration/python/mixHitsAndTracksWithPU_cfi.py b/FastSimulation/Configuration/python/mixHitsAndTracksWithPU_cfi.py index ae7fb3e5fa277..536ceb5ee04a7 100644 --- a/FastSimulation/Configuration/python/mixHitsAndTracksWithPU_cfi.py +++ b/FastSimulation/Configuration/python/mixHitsAndTracksWithPU_cfi.py @@ -1,13 +1,5 @@ import FWCore.ParameterSet.Config as cms -simEcalUnsuppressedDigis = cms.EDAlias( #remove? - mixSimCaloHits = cms.VPSet( - cms.PSet(type = cms.string('EBDigiCollection')), - cms.PSet(type = cms.string('EEDigiCollection')), - cms.PSet(type = cms.string('ESDigiCollection')) - ) - ) - simEcalUnsuppressedDigis = cms.EDAlias( mix = cms.VPSet( cms.PSet(type = cms.string('EBDigiCollection')), @@ -16,16 +8,6 @@ ) ) -simHcalUnsuppressedDigis = cms.EDAlias(#remove? - mixSimCaloHits = cms.VPSet( - cms.PSet(type = cms.string('HBHEDataFramesSorted')), - cms.PSet(type = cms.string('HFDataFramesSorted')), - cms.PSet(type = cms.string('HODataFramesSorted')), - cms.PSet(type = cms.string('HcalUpgradeDataFramesSorted')), - cms.PSet(type = cms.string('ZDCDataFramesSorted')) - ) - ) - simHcalUnsuppressedDigis = cms.EDAlias( mix = cms.VPSet( cms.PSet(type = cms.string('HBHEDataFramesSorted')), @@ -37,10 +19,17 @@ ) generalTracks = cms.EDAlias( - mix = cms.VPSet( cms.PSet(type=cms.string('recoTracks') ) ) + mix = cms.VPSet( cms.PSet(type=cms.string('recoTracks'), + fromProductInstance = cms.string('generalTracks'), + toProductInstance = cms.string('') ), + cms.PSet(type=cms.string('recoTrackExtras'), + fromProductInstance = cms.string('generalTracks'), + toProductInstance = cms.string('') ), + cms.PSet(type=cms.string('TrackingRecHitsOwned'), + fromProductInstance = cms.string('generalTracks'), + toProductInstance = cms.string('') ) ) ) - from SimGeneral.MixingModule.ecalDigitizer_cfi import * import SimCalorimetry.EcalSimProducers.ecalDigiParameters_cff ecal_digi_parameters =SimCalorimetry.EcalSimProducers.ecalDigiParameters_cff.ecal_digi_parameters.clone() @@ -75,7 +64,7 @@ tracker = cms.PSet(trackAccumulator)), LabelPlayback = cms.string(''), maxBunch = cms.int32(0), - minBunch = cms.int32(0), ## -4in terms of 25nsec + minBunch = cms.int32(0), ## in terms of 25nsec bunchspace = cms.int32(250), ##ns mixProdStep1 = cms.bool(False), @@ -87,7 +76,7 @@ input = cms.SecSource("PoolSource", nbPileupEvents = cms.PSet( - averageNumber = cms.double(16.) ###fede prova tracce + averageNumber = cms.double(0.) ), type = cms.string('poisson'), sequential = cms.untracked.bool(False), diff --git a/FastSimulation/ParticleFlow/python/ParticleFlowFastSimNeutralHadron_cff.py b/FastSimulation/ParticleFlow/python/ParticleFlowFastSimNeutralHadron_cff.py index b419daa66910f..95a248e83b571 100644 --- a/FastSimulation/ParticleFlow/python/ParticleFlowFastSimNeutralHadron_cff.py +++ b/FastSimulation/ParticleFlow/python/ParticleFlowFastSimNeutralHadron_cff.py @@ -45,6 +45,11 @@ #particleFlow.usePFConversions = cms.bool(True) #particleFlow.usePFDecays = cms.bool(True) +### With the new mixing scheme, the label of the Trajectory collection for the primary event is different: +from FastSimulation.Configuration.CommonInputs_cff import * +if(CaloMode==3 and MixingMode=='DigiRecoMixing'): + trackerDrivenElectronSeeds.TkColList = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")) + famosParticleFlowSequence = cms.Sequence( caloTowersRec+ diff --git a/FastSimulation/ParticleFlow/python/ParticleFlowFastSim_cff.py b/FastSimulation/ParticleFlow/python/ParticleFlowFastSim_cff.py index 2847f0cc6cd43..9808734a4ced4 100644 --- a/FastSimulation/ParticleFlow/python/ParticleFlowFastSim_cff.py +++ b/FastSimulation/ParticleFlow/python/ParticleFlowFastSim_cff.py @@ -44,6 +44,11 @@ #particleFlow.usePFConversions = cms.bool(True) #particleFlow.usePFDecays = cms.bool(True) +### With the new mixing scheme, the label of the Trajectory collection for the primary event is different: +from FastSimulation.Configuration.CommonInputs_cff import * +if(CaloMode==3 and MixingMode=='DigiRecoMixing'): + trackerDrivenElectronSeeds.TkColList = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")) + famosParticleFlowSequence = cms.Sequence( caloTowersRec+ diff --git a/FastSimulation/PileUpProducer/python/mix_2012_Summer_inTimeOnly_cff.py b/FastSimulation/PileUpProducer/python/mix_2012_Summer_inTimeOnly_cff.py index d2e8e54df3802..54129ec7ae942 100644 --- a/FastSimulation/PileUpProducer/python/mix_2012_Summer_inTimeOnly_cff.py +++ b/FastSimulation/PileUpProducer/python/mix_2012_Summer_inTimeOnly_cff.py @@ -1,4 +1,4 @@ -from FastSimulation.PileUpProducer.PileUpSimulator8TeV_cfi import * +from FastSimulation.PileUpProducer.PileUpSimulator13TeV_cfi import * npu = cms.vint32(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59) prob = cms.vdouble( @@ -63,20 +63,18 @@ 1.570E-05, 5.005E-06) -from FastSimulation.Configuration.CommonInputs_cff import * # CaloMode and MixingMode are defined here +from FastSimulation.Configuration.CommonInputs_cff import MixingMode # CaloMode and MixingMode are defined here -if (MixingMode==2): +if (MixingMode=='DigiRecoMixing'): # mix at SIM and RECO levels: from FastSimulation.Configuration.MixingHitsAndTracks_cff import * mix.input.nbPileupEvents.probFunctionVariable = npu mix.input.nbPileupEvents.probValue = prob -# mixSimCaloHits.input.nbPileupEvents.probFunctionVariable = npu -# mixSimCaloHits.input.nbPileupEvents.probValue = prob -# mixRecoTracks.input.nbPileupEvents.probFunctionVariable = npu -# mixRecoTracks.input.nbPileupEvents.probValue = prob -else: +elif (MixingMode=='GenMixing'): # mix at GEN level: from FastSimulation.Configuration.MixingFull_cff import * mixGenPU.input.nbPileupEvents.probFunctionVariable = npu mixGenPU.input.nbPileupEvents.probValue = prob +else: + print 'unsupported MixingMode label' diff --git a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_10_BX_inTimeOnly.py b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_10_BX_inTimeOnly.py index 5219f80588df6..4cbd6049a743a 100644 --- a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_10_BX_inTimeOnly.py +++ b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_10_BX_inTimeOnly.py @@ -2,7 +2,7 @@ from FastSimulation.Configuration.CommonInputs_cff import * -if (MixingMode==2): +if (MixingMode=='DigiRecoMixing'): # mix at SIM level: from FastSimulation.Configuration.MixingHitsAndTracks_cff import * mixSimCaloHits.input.nbPileupEvents.averageNumber = cms.double(10.0) diff --git a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_140_BX_inTimeOnly.py b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_140_BX_inTimeOnly.py index c8a7dbd4407f3..40d9ea3cfadce 100644 --- a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_140_BX_inTimeOnly.py +++ b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_140_BX_inTimeOnly.py @@ -2,7 +2,7 @@ from FastSimulation.Configuration.CommonInputs_cff import * -if (MixingMode==2): +if (MixingMode=='DigiRecoMixing'): # mix at SIM level: from FastSimulation.Configuration.MixingHitsAndTracks_cff import * mixSimCaloHits.input.nbPileupEvents.averageNumber = cms.double(140.0) diff --git a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_200_BX_inTimeOnly.py b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_200_BX_inTimeOnly.py index 071c466c914a2..67570ca647cbc 100644 --- a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_200_BX_inTimeOnly.py +++ b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_200_BX_inTimeOnly.py @@ -2,7 +2,7 @@ from FastSimulation.Configuration.CommonInputs_cff import * -if (MixingMode==2): +if (MixingMode=='DigiRecoMixing'): # mix at SIM level: from FastSimulation.Configuration.MixingHitsAndTracks_cff import * mixSimCaloHits.input.nbPileupEvents.averageNumber = cms.double(200.0) diff --git a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_70_BX_inTimeOnly.py b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_70_BX_inTimeOnly.py index 3a75d863ad009..cbae486e001cd 100644 --- a/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_70_BX_inTimeOnly.py +++ b/FastSimulation/PileUpProducer/python/mix_E8TeV_AVE_70_BX_inTimeOnly.py @@ -2,8 +2,8 @@ from FastSimulation.Configuration.CommonInputs_cff import * -if (MixingMode==2): - # mix at SIM level: +if (MixingMode=='DigiRecoMixing'): + # mix at SIM/RECO level: from FastSimulation.Configuration.MixingHitsAndTracks_cff import * mixSimCaloHits.input.nbPileupEvents.averageNumber = cms.double(70.0) mixSimCaloHits.input.type = cms.string('poisson') diff --git a/FastSimulation/PileUpProducer/python/mix_NoPileUp_cfi.py b/FastSimulation/PileUpProducer/python/mix_NoPileUp_cfi.py index 58dc2fe1178c7..b00df3b26a81a 100644 --- a/FastSimulation/PileUpProducer/python/mix_NoPileUp_cfi.py +++ b/FastSimulation/PileUpProducer/python/mix_NoPileUp_cfi.py @@ -2,12 +2,8 @@ from FastSimulation.Configuration.CommonInputs_cff import * -if (MixingMode==2): - # mix at SIM level: +if (MixingMode=='DigiRecoMixing'): + # mix at SIM and RECO level: from FastSimulation.Configuration.MixingHitsAndTracks_cff import * mix.input.nbPileupEvents.averageNumber = cms.double(0.0) mix.input.type = cms.string('poisson') -# mixSimCaloHits.input.nbPileupEvents.averageNumber = cms.double(0.0) -# mixSimCaloHits.input.type = cms.string('poisson') -# mixRecoTracks.input.nbPileupEvents.averageNumber = cms.double(0.0) -# mixRecoTracks.input.type = cms.string('poisson') diff --git a/FastSimulation/Tracking/plugins/RecoTrackAccumulator.cc b/FastSimulation/Tracking/plugins/RecoTrackAccumulator.cc index ce40dcf39a3bb..7dd32cf489633 100644 --- a/FastSimulation/Tracking/plugins/RecoTrackAccumulator.cc +++ b/FastSimulation/Tracking/plugins/RecoTrackAccumulator.cc @@ -3,12 +3,20 @@ #include "FWCore/Framework/interface/one/EDProducer.h" RecoTrackAccumulator::RecoTrackAccumulator(const edm::ParameterSet& conf, edm::one::EDProducerBase& mixMod, edm::ConsumesCollector& iC) : - GeneralTrackInput_(conf.getParameter("GeneralTrackInput")), - GeneralTrackOutput_(conf.getParameter("GeneralTrackOutput")) + InputSignal_(conf.getParameter("InputSignal")), + InputPileup_(conf.getParameter("InputPileup")), + GeneralTrackOutput_(conf.getParameter("GeneralTrackOutput")), + HitOutput_(conf.getParameter("HitOutput")), + GeneralTrackExtraOutput_(conf.getParameter("GeneralTrackExtraOutput")) { mixMod.produces(GeneralTrackOutput_); - iC.consumes(GeneralTrackInput_); + mixMod.produces(HitOutput_); + mixMod.produces(GeneralTrackExtraOutput_); + + iC.consumes(InputSignal_); + iC.consumes(InputSignal_); + iC.consumes(InputSignal_); } RecoTrackAccumulator::~RecoTrackAccumulator() { @@ -18,6 +26,12 @@ RecoTrackAccumulator::~RecoTrackAccumulator() { void RecoTrackAccumulator::initializeEvent(edm::Event const& e, edm::EventSetup const& iSetup) { NewTrackList_ = std::auto_ptr(new reco::TrackCollection()); + NewHitList_ = std::auto_ptr(new TrackingRecHitCollection()); + NewTrackExtraList_ = std::auto_ptr(new reco::TrackExtraCollection()); + + // this is needed to get the ProductId of the TrackExtra and TrackingRecHit collections + rTrackExtras=const_cast( e ).getRefBeforePut(GeneralTrackExtraOutput_); + rHits=const_cast( e ).getRefBeforePut(HitOutput_); } @@ -25,35 +39,64 @@ void RecoTrackAccumulator::accumulate(edm::Event const& e, edm::EventSetup const edm::Handle tracks; - e.getByLabel(GeneralTrackInput_, tracks); - - if (tracks.isValid()) { - for (auto const& track : *tracks) { - NewTrackList_->push_back(track); - } - } + edm::Handle hits; + edm::Handle trackExtras; + e.getByLabel(InputSignal_, tracks); + e.getByLabel(InputSignal_, hits); + e.getByLabel(InputSignal_, trackExtras); + + // Call the templated version that does the same for both signal and pileup events + accumulateEvent( e, iSetup, tracks, trackExtras, hits ); } + void RecoTrackAccumulator::accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& iSetup) { if (e.bunchCrossing()==0) { edm::Handle tracks; - e.getByLabel(GeneralTrackInput_, tracks); + edm::Handle hits; + edm::Handle trackExtras; + e.getByLabel(InputPileup_, tracks); + e.getByLabel(InputPileup_, hits); + e.getByLabel(InputPileup_, trackExtras); - if (tracks.isValid()) { - for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) { - NewTrackList_->push_back(*track); - } - } - } + // Call the templated version that does the same for both signal and pileup events + accumulateEvent( e, iSetup, tracks, trackExtras, hits ); + } } void RecoTrackAccumulator::finalizeEvent(edm::Event& e, const edm::EventSetup& iSetup) { e.put( NewTrackList_, GeneralTrackOutput_ ); + e.put( NewHitList_, HitOutput_ ); + e.put( NewTrackExtraList_, GeneralTrackExtraOutput_ ); } +template void RecoTrackAccumulator::accumulateEvent(const T& e, edm::EventSetup const& iSetup, edm::Handle tracks, edm::Handle tracksExtras, edm::Handle hits) { + + if (tracks.isValid()) { + short track_counter = 0; + // short hit_counter = 0; + for (auto const& track : *tracks) { + NewTrackList_->push_back(track); + // track extras: + NewTrackExtraList_->push_back(tracksExtras->at(track_counter)); + NewTrackList_->back().setExtra( reco::TrackExtraRef( rTrackExtras, NewTrackExtraList_->size() - 1) ); + //reco::TrackExtra & tx = NewTrackExtraList_->back(); + //tx.setResiduals(track.residuals()); + // rechits: + for( trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++ hit ) { + NewHitList_->push_back( (*hit)->clone() ); // is this safe? + // tx.add( TrackingRecHitRef( rHits, NewHitList_->size() - 1) ); + // hit_counter++; + } + + track_counter++; + } + } + +} diff --git a/FastSimulation/Tracking/plugins/RecoTrackAccumulator.h b/FastSimulation/Tracking/plugins/RecoTrackAccumulator.h index 3d700f51ed62b..11bb4e2ed5aa5 100644 --- a/FastSimulation/Tracking/plugins/RecoTrackAccumulator.h +++ b/FastSimulation/Tracking/plugins/RecoTrackAccumulator.h @@ -21,17 +21,9 @@ #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/TrackReco/interface/TrackExtra.h" +#include "DataFormats/TrackReco/interface/TrackExtraFwd.h" -/* -namespace edm { - class EDProducer; - class Event; - class EventSetup; - class ParameterSet; - template class Handle; -} -*/ namespace edm { class ConsumesCollector; template class Handle; @@ -53,9 +45,22 @@ class RecoTrackAccumulator : public DigiAccumulatorMixMod virtual void finalizeEvent(edm::Event& e, edm::EventSetup const& c); private: + template void accumulateEvent(const T& e, edm::EventSetup const& c, edm::Handle t, edm::Handle tx, edm::Handle h); + std::auto_ptr NewTrackList_; - edm::InputTag GeneralTrackInput_; + std::auto_ptr NewTrackExtraList_; + std::auto_ptr NewHitList_; + + reco::TrackExtraRefProd rTrackExtras; + TrackingRecHitRefProd rHits; + + edm::InputTag InputSignal_; + edm::InputTag InputPileup_; + std::string GeneralTrackOutput_; + std::string HitOutput_; + std::string GeneralTrackExtraOutput_; + }; diff --git a/FastSimulation/Tracking/python/GeneralTracks_cfi.py b/FastSimulation/Tracking/python/GeneralTracks_cfi.py index f1603a6f19836..a706e1e0389bf 100644 --- a/FastSimulation/Tracking/python/GeneralTracks_cfi.py +++ b/FastSimulation/Tracking/python/GeneralTracks_cfi.py @@ -1,23 +1,7 @@ import FWCore.ParameterSet.Config as cms -#generalTracks = cms.EDProducer("FastTrackMerger", -# # new quality setting -# newQuality = cms.untracked.string('confirmed'), -# # set new quality for confirmed tracks -# promoteTrackQuality = cms.untracked.bool(True), -# TrackProducers = cms.VInputTag( -# cms.InputTag("zeroStepFilter"), -# cms.InputTag("zerofivefilter"), -# cms.InputTag("firstfilter"), -# cms.InputTag("secfilter"), -# cms.InputTag("thfilter"), -# cms.InputTag("foufilter"), -# cms.InputTag("fifthfilter"), -# ) -#) - import RecoTracker.FinalTrackSelectors.trackListMerger_cfi -generalTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone( +generalTracksBase = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone( TrackProducers = (cms.InputTag('initialStepTracks'), cms.InputTag('lowPtTripletStepTracks'), cms.InputTag('pixelPairStepTracks'), @@ -25,10 +9,10 @@ cms.InputTag('mixedTripletStepTracks'), cms.InputTag('pixelLessStepTracks'), cms.InputTag('tobTecStepTracks'), -#### not validated yet cms.InputTag('muonSeededTracksOutIn'), -#### not validated yet cms.InputTag('muonSeededTracksInOut') + #### not validated yet cms.InputTag('muonSeededTracksOutIn'), + #### not validated yet cms.InputTag('muonSeededTracksInOut') ), -### hasSelector=cms.vint32(1,1,1,1,1,1,1,1,1), + ### hasSelector=cms.vint32(1,1,1,1,1,1,1,1,1), hasSelector=cms.vint32(1,1,1,1,1,1,1), selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStepSelector","initialStep"), cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"), @@ -37,12 +21,22 @@ cms.InputTag("mixedTripletStep"), cms.InputTag("pixelLessStepSelector","pixelLessStep"), cms.InputTag("tobTecStepSelector","tobTecStep"), -#### not validated yet cms.InputTag("muonSeededTracksOutInSelector","muonSeededTracksOutInHighPurity"), -#### not validated yet cms.InputTag("muonSeededTracksInOutSelector","muonSeededTracksInOutHighPurity") + #### not validated yet cms.InputTag("muonSeededTracksOutInSelector","muonSeededTracksOutInHighPurity"), + #### not validated yet cms.InputTag("muonSeededTracksInOutSelector","muonSeededTracksInOutHighPurity") ), -### setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4,5,6,7,8), pQual=cms.bool(True) ) + ### setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4,5,6,7,8), pQual=cms.bool(True) ) setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4,5,6), pQual=cms.bool(True) ) ), copyExtras = True, makeReKeyedSeeds = cms.untracked.bool(False) ) + + +# this block is to switch between defaul behaviour (MixingMode=='GenMixing') and new mixing +from FastSimulation.Configuration.CommonInputs_cff import MixingMode +if (MixingMode=='GenMixing'): + generalTracks = generalTracksBase.clone() +elif (MixingMode=='DigiRecoMixing'): + generalTracksBeforeMixing = generalTracksBase.clone() +else: + print 'unsupported MixingMode label' diff --git a/FastSimulation/Tracking/python/IterativeTracking_cff.py b/FastSimulation/Tracking/python/IterativeTracking_cff.py index 171ca17673699..6912ef3c2c7f7 100644 --- a/FastSimulation/Tracking/python/IterativeTracking_cff.py +++ b/FastSimulation/Tracking/python/IterativeTracking_cff.py @@ -15,6 +15,17 @@ from FastSimulation.Tracking.IterativeTobTecStep_cff import * from FastSimulation.Tracking.MuonSeededStep_cff import * +# this block is to switch between defaul behaviour (MixingMode=='GenMixing') and new mixing +from FastSimulation.Configuration.CommonInputs_cff import MixingMode +if (MixingMode=='DigiRecoMixing'): +# generalTracksBeforeMixing = FastSimulation.Tracking.GeneralTracks_cfi.generalTracks.clone() + trackExtrapolator.trackSrc = cms.InputTag("generalTracksBeforeMixing") + lastTrackingSteps = cms.Sequence(generalTracksBeforeMixing+trackExtrapolator) +elif (MixingMode=='GenMixing'): + lastTrackingSteps = cms.Sequence(generalTracks+trackExtrapolator) +else: + print 'unsupported MixingMode label' + import RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi MeasurementTrackerEvent = RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi.MeasurementTrackerEvent.clone( pixelClusterProducer = '', @@ -33,7 +44,7 @@ +iterativePixelLessStep +iterativeTobTecStep # not validated yet: +muonSeededStep - +generalTracks - +trackExtrapolator) - +# +generalTracks +# +trackExtrapolator) + +lastTrackingSteps) diff --git a/FastSimulation/Tracking/python/recoTrackAccumulator_cfi.py b/FastSimulation/Tracking/python/recoTrackAccumulator_cfi.py index e13a1fa62e913..1bfd390839591 100644 --- a/FastSimulation/Tracking/python/recoTrackAccumulator_cfi.py +++ b/FastSimulation/Tracking/python/recoTrackAccumulator_cfi.py @@ -1,8 +1,14 @@ import FWCore.ParameterSet.Config as cms trackAccumulator = cms.PSet( - GeneralTrackInput = cms.InputTag("generalTracks"), + + InputSignal = cms.InputTag("generalTracksBeforeMixing"), + InputPileup = cms.InputTag("generalTracks"), + GeneralTrackOutput = cms.string("generalTracks"), + GeneralTrackExtraOutput = cms.string("generalTracks"), + HitOutput = cms.string("generalTracks"), + accumulatorType = cms.string("RecoTrackAccumulator"), makeDigiSimLinks = cms.untracked.bool(False) ) diff --git a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py index aa0b9407bfd97..792c302376afc 100644 --- a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py +++ b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py @@ -21,12 +21,6 @@ hfv7 = heavyFlavorValidationHarvesting.clone( MyDQMrootFolder = cms.untracked.string('HLT/HeavyFlavor/HLT/HLT_DoubleMu4_Jpsi_Displaced_v') ) -hfv8 = heavyFlavorValidationHarvesting.clone( - MyDQMrootFolder = cms.untracked.string('HLT/HeavyFlavor/HLT/HLT_Mu3') -) -hfv9 = heavyFlavorValidationHarvesting.clone( - MyDQMrootFolder = cms.untracked.string('HLT/HeavyFlavor/HLT/HLT_DoubleMu3') -) combiner = cms.EDAnalyzer('PlotCombiner', MyDQMrootFolder = cms.untracked.string('HLT/HeavyFlavor/HLT'), @@ -51,8 +45,6 @@ 'HLT_Mu5_Track2_Jpsi_v', 'HLT_Mu7_Track7_Jpsi_v', 'HLT_DoubleMu4_Jpsi_Displaced_v', - 'HLT_Mu3', - 'HLT_DoubleMu3', ), OutputMEname = cms.untracked.string('effPathGlob_recoPt') ) @@ -60,6 +52,5 @@ ) heavyFlavorValidationHarvestingSequence = cms.Sequence(hfv1+hfv2+hfv3+hfv4+hfv5+hfv6+hfv7 - +hfv8+hfv9 +combiner) diff --git a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py index f2c66e68b8f1b..5fd80e2bf59d6 100644 --- a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py +++ b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py @@ -25,14 +25,7 @@ hfv7 = hfv1.clone( TriggerPathName = cms.untracked.string("HLT_DoubleMu4_Jpsi_Displaced_v") ) -hfv8 = hfv1.clone( - TriggerPathName = cms.untracked.string("HLT_Mu3") -) -hfv9 = hfv1.clone( - TriggerPathName = cms.untracked.string("HLT_DoubleMu3") -) heavyFlavorValidationSequence = cms.Sequence( hfv1+hfv2+hfv3+hfv4+hfv5+hfv6+hfv7 - +hfv8+hfv9 ) diff --git a/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc b/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc index b884abc72a886..ae0cd3e495b47 100755 --- a/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc +++ b/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc @@ -38,6 +38,7 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" +#include #include "CommonTools/Utils/interface/PtComparator.h" @@ -49,27 +50,28 @@ using namespace reco; using namespace l1extra; using namespace trigger; -class HeavyFlavorValidation : public edm::EDAnalyzer { +class HeavyFlavorValidation : public DQMEDAnalyzer { public: explicit HeavyFlavorValidation(const edm::ParameterSet&); ~HeavyFlavorValidation(); - private: - virtual void beginRun(const Run & iRun, const EventSetup & iSetup) override; + protected: + void dqmBeginRun(const edm::Run&, const edm::EventSetup&); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + private: int getMotherId( const Candidate * p ); void match( MonitorElement * me, vector & from, vector & to, double deltaRMatchingCut, vector & map ); - void myBook2D( TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel, TString title); - void myBook2D( TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel){ - myBook2D( name, xBins, xLabel, yBins, yLabel, name); + void myBook2D(DQMStore::IBooker & ibooker, TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel, TString title); + void myBook2D(DQMStore::IBooker & ibooker, TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel){ + myBook2D(ibooker, name, xBins, xLabel, yBins, yLabel, name); } - void myBookProfile2D( TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel, TString title); - void myBookProfile2D( TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel){ - myBookProfile2D( name, xBins, xLabel, yBins, yLabel, name); + void myBookProfile2D(DQMStore::IBooker & ibooker, TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel, TString title); + void myBookProfile2D(DQMStore::IBooker & ibooker, TString name, vector &xBins, TString xLabel, vector &yBins, TString yLabel){ + myBookProfile2D(ibooker, name, xBins, xLabel, yBins, yLabel, name); } - void myBook1D( TString name, vector &xBins, TString label, TString title ); - void myBook1D( TString name, vector &xBins, TString label ){ - myBook1D( name, xBins, label, name ); + void myBook1D(DQMStore::IBooker & ibooker, TString name, vector &xBins, TString label, TString title ); + void myBook1D(DQMStore::IBooker & ibooker, TString name, vector &xBins, TString label ){ + myBook1D(ibooker, name, xBins, label, name ); } string dqmFolder; string triggerProcessName; @@ -126,162 +128,153 @@ HeavyFlavorValidation::HeavyFlavorValidation(const ParameterSet& pset): recoMuonsTag = consumes(pset.getParameter("RecoMuons")); genParticlesTag = consumes(pset.getParameter("GenParticles")); } - -void HeavyFlavorValidation::beginRun(const Run & iRun, const EventSetup & iSetup){ -//discover HLT configuration - HLTConfigProvider hltConfig; - bool isChanged; - if(hltConfig.init(iRun, iSetup, triggerProcessName, isChanged)){ - LogDebug("HLTriggerOfflineHeavyFlavor") << "Successfully initialized HLTConfigProvider with process name: "< triggerNames = hltConfig.triggerNames(); - for( size_t i = 0; i < triggerNames.size(); i++) { - TString triggerName = triggerNames[i]; - if (triggerName.Contains(triggerPathName)){ - vector moduleNames = hltConfig.moduleLabels( triggerNames[i] ); - for( size_t j = 0; j < moduleNames.size(); j++) { - TString name = moduleNames[j]; - if(name.Contains("Filter")){ - int level = 0; - if(name.Contains("L1")) - level = 1; - else if(name.Contains("L2")) - level = 2; - else if(name.Contains("L3")) - level = 3; - else if(name.Contains("mumuFilter") || name.Contains("JpsiTrackMass")) - level = 4; - filterNamesLevels.push_back( pair(moduleNames[j],level) ); - os<<" "<().operator->(); - if( !dqmStore ){ - LogError("HLTriggerOfflineHeavyFlavor") << "Could not find DQMStore service\n"; - return; - } - dqmStore->setVerbose(0); - dqmStore->setCurrentFolder((dqmFolder+"/")+triggerProcessName+"/"+triggerPathName); -// Eta Pt Single - myBook2D( "genMuon_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)"); - myBook2D( "globMuon_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)"); - myBook2D( "globMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)"); - for(size_t i=0; i sizeBins; sizeBins.push_back(10); sizeBins.push_back(0); sizeBins.push_back(10); - myBook1D( "genMuon_size", sizeBins, "container size" ); - myBook1D( "globMuon_size", sizeBins, "container size" ); - for(size_t i=0; i triggerNames = hltConfig.triggerNames(); + for( size_t i = 0; i < triggerNames.size(); i++) { + TString triggerName = triggerNames[i]; + if (triggerName.Contains(triggerPathName)){ + vector moduleNames = hltConfig.moduleLabels( triggerNames[i] ); + for( size_t j = 0; j < moduleNames.size(); j++) { + TString name = moduleNames[j]; + if(name.Contains("Filter")){ + int level = 0; + if(name.Contains("L1")) + level = 1; + else if(name.Contains("L2")) + level = 2; + else if(name.Contains("L3")) + level = 3; + else if(name.Contains("mumuFilter") || name.Contains("JpsiTrackMass")) + level = 4; + filterNamesLevels.push_back( pair(moduleNames[j],level) ); + os<<" "< sizeBins; sizeBins.push_back(10); sizeBins.push_back(0); sizeBins.push_back(10); + myBook1D(ibooker, "genMuon_size", sizeBins, "container size" ); + myBook1D(ibooker, "globMuon_size", sizeBins, "container size" ); + for(size_t i=0; iFill(genMuons[i].eta(), genMuons[i].pt()); ME["genMuon_genEtaPhi"]->Fill(genMuons[i].eta(), genMuons[i].phi()); - if(glob_gen[i] != -1){ + if(glob_gen[i] != -1) { ME["resGlobGen_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt(), (globMuons[glob_gen[i]].pt()-genMuons[i].pt())/genMuons[i].pt() ); ME["globMuon_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt()); ME["globMuon_genEtaPhi"]->Fill(genMuons[i].eta(), genMuons[i].phi()); ME["globMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt()); ME["globMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi()); - for(size_t f=0; fFill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt(), (muonsAtFilter[f][filt_glob[f][glob_gen[i]]].pt()-globMuons[glob_gen[i]].pt())/globMuons[glob_gen[i]].pt() ); ME[TString::Format("filt%dMuon_recoEtaPt",int(f+1))]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt()); ME[TString::Format("filt%dMuon_recoEtaPhi",int(f+1))]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi()); @@ -456,9 +449,9 @@ void HeavyFlavorValidation::analyze(const Event& iEvent, const EventSetup& iSetu ME["resultMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi()); } } - } + } } - + //fill dimuon histograms (highest pT, opposite charge) int secondMuon = 0; for(size_t j=1; j 0){ -// int pos = genMuons[0].charge()>0 ? 0 : secondMuon ; -// int neg = genMuons[0].charge()<0 ? 0 : secondMuon ; //two generated double genDimuonPt = (genMuons[0].p4()+genMuons[secondMuon].p4()).pt(); double genDimuonEta = (genMuons[0].p4()+genMuons[secondMuon].p4()).eta(); @@ -540,9 +531,6 @@ void HeavyFlavorValidation::analyze(const Event& iEvent, const EventSetup& iSetu } } -void HeavyFlavorValidation::endJob(){ -} - int HeavyFlavorValidation::getMotherId( const Candidate * p ){ const Candidate* mother = p->mother(); if( mother ){ @@ -593,7 +581,7 @@ void HeavyFlavorValidation::match( MonitorElement * me, vector & } } -void HeavyFlavorValidation::myBook2D( TString name, vector &ptBins, TString ptLabel, vector &etaBins, TString etaLabel, TString title ) +void HeavyFlavorValidation::myBook2D(DQMStore::IBooker & ibooker, TString name, vector &ptBins, TString ptLabel, vector &etaBins, TString etaLabel, TString title ) { // dqmStore->setCurrentFolder(dqmFolder+"/"+folder); int ptN = ptBins.size()==3 ? (int)ptBins[0]+1 : ptBins.size(); @@ -610,11 +598,11 @@ void HeavyFlavorValidation::myBook2D( TString name, vector &ptBins, TStr h->SetXTitle(ptLabel); h->SetYTitle(etaLabel); h->SetTitle(title); - ME[name] = dqmStore->book2D( name.Data(), h ); + ME[name] = ibooker.book2D( name.Data(), h ); delete h; } -void HeavyFlavorValidation::myBookProfile2D( TString name, vector &ptBins, TString ptLabel, vector &etaBins, TString etaLabel, TString title ) +void HeavyFlavorValidation::myBookProfile2D(DQMStore::IBooker & ibooker, TString name, vector &ptBins, TString ptLabel, vector &etaBins, TString etaLabel, TString title ) { // dqmStore->setCurrentFolder(dqmFolder+"/"+folder); int ptN = ptBins.size()==3 ? (int)ptBins[0]+1 : ptBins.size(); @@ -631,11 +619,11 @@ void HeavyFlavorValidation::myBookProfile2D( TString name, vector &ptBin h->SetXTitle(ptLabel); h->SetYTitle(etaLabel); h->SetTitle(title); - ME[name] = dqmStore->bookProfile2D( name.Data(), h ); + ME[name] = ibooker.bookProfile2D( name.Data(), h ); delete h; } -void HeavyFlavorValidation::myBook1D( TString name, vector &bins, TString label, TString title ) +void HeavyFlavorValidation::myBook1D(DQMStore::IBooker & ibooker, TString name, vector &bins, TString label, TString title ) { // dqmStore->setCurrentFolder(dqmFolder+"/"+folder); int binsN = bins.size()==3 ? (int)bins[0]+1 : bins.size(); @@ -646,7 +634,7 @@ void HeavyFlavorValidation::myBook1D( TString name, vector &bins, TStrin TH1F *h = new TH1F( name, name, binsN-1, myBins ); h->SetXTitle(label); h->SetTitle(title); - ME[name] = dqmStore->book1D( name.Data(), h ); + ME[name] = ibooker.book1D( name.Data(), h ); delete h; } diff --git a/PhysicsTools/IsolationAlgos/python/CandIsolatorFromDeposits_cfi.py b/PhysicsTools/IsolationAlgos/python/CandIsolatorFromDeposits_cfi.py new file mode 100644 index 0000000000000..b25185d63152b --- /dev/null +++ b/PhysicsTools/IsolationAlgos/python/CandIsolatorFromDeposits_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +hltMuPFSumDRIsoValueCharged03 = cms.EDProducer("CandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("ISODEPOSIT_COLLECTION"), # input collection of type reco::IsoDepositMap + deltaR = cms.double(99999.), #cone size + weight = cms.string('1'), + vetos = cms.vstring('0.0001','Threshold(0.0)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum') + ) + ) + ) diff --git a/RecoVertex/BeamSpotProducer/interface/BeamFitter.h b/RecoVertex/BeamSpotProducer/interface/BeamFitter.h index 7ab74cb0e93ef..91ef076bb3c76 100644 --- a/RecoVertex/BeamSpotProducer/interface/BeamFitter.h +++ b/RecoVertex/BeamSpotProducer/interface/BeamFitter.h @@ -134,7 +134,6 @@ class BeamFitter { } private: - const char * formatBTime( const std::time_t &); // Update the fbeginTimeOfFit etc from the refTime void updateBTime(); std::vector fBSvector; diff --git a/RecoVertex/BeamSpotProducer/src/BeamFitter.cc b/RecoVertex/BeamSpotProducer/src/BeamFitter.cc index a25e52a7c02e7..63ab6ed67990e 100644 --- a/RecoVertex/BeamSpotProducer/src/BeamFitter.cc +++ b/RecoVertex/BeamSpotProducer/src/BeamFitter.cc @@ -24,23 +24,14 @@ ________________________________________________________________**/ #include "FWCore/MessageLogger/interface/MessageLogger.h" -// ---------------------------------------------------------------------- -// Useful function: -// ---------------------------------------------------------------------- -const char * BeamFitter::formatBTime(const std::time_t & t) { - struct std::tm * ptm; - ptm = gmtime(&t); - static char ts[] = "yyyy.mn.dd hh:mm:ss zzz "; - // This value should be taken directly from edm::Event::time(), which - // returns GMT (to be confirmed) - strftime(ts,sizeof(ts),"%Y.%m.%d %H:%M:%S GMT",ptm); - return ts; -} // Update the string representations of the time void BeamFitter::updateBTime() { - const char* fbeginTime = formatBTime(freftime[0]); + char ts[] = "yyyy.mn.dd hh:mm:ss zzz "; + char* fbeginTime = ts; + strftime(fbeginTime,sizeof(ts),"%Y.%m.%d %H:%M:%S GMT",gmtime(&freftime[0])); sprintf(fbeginTimeOfFit,"%s",fbeginTime); - const char* fendTime = formatBTime(freftime[1]); + char* fendTime = ts; + strftime(fendTime,sizeof(ts),"%Y.%m.%d %H:%M:%S GMT",gmtime(&freftime[1])); sprintf(fendTimeOfFit,"%s",fendTime); } diff --git a/Validation/RecoEgamma/python/photonFastSimPostProcessor_cff.py b/Validation/RecoEgamma/python/photonFastSimPostProcessor_cff.py index a3dc5fa154344..e48266bbc22c3 100644 --- a/Validation/RecoEgamma/python/photonFastSimPostProcessor_cff.py +++ b/Validation/RecoEgamma/python/photonFastSimPostProcessor_cff.py @@ -3,16 +3,24 @@ #from Validation.RecoEgamma.photonPostprocessing_cfi import * import Validation.RecoEgamma.photonPostprocessing_cfi fastSimPhotonPostProcessing=Validation.RecoEgamma.photonPostprocessing_cfi.photonPostprocessing.clone() - fastSimPhotonPostProcessing.batch = cms.bool(False) fastSimPhotonPostProcessing.standalone = cms.bool(False) fastSimPhotonPostProcessing.isRunCentrally = cms.bool(True) fastSimPhotonPostProcessing.fastSim = cms.bool(True) +fastSimGEDPhotonPostProcessing=Validation.RecoEgamma.photonPostprocessing_cfi.photonPostprocessing.clone() +fastSimGEDPhotonPostProcessing.ComponentName = cms.string('fastSimpfPhotonPostprocessing') +fastSimGEDPhotonPostProcessing.analyzerName = cms.string('pfPhotonValidator') +fastSimGEDPhotonPostProcessing.batch = cms.bool(False) +fastSimGEDPhotonPostProcessing.standalone = cms.bool(False) +fastSimGEDPhotonPostProcessing.isRunCentrally = cms.bool(True) +fastSimGEDPhotonPostProcessing.fastSim = cms.bool(True) + + #from Validation.RecoEgamma.conversionPostprocessing_cfi import * #conversionPostprocessing.batch = cms.bool(False) #conversionPostprocessing.standalone = cms.bool(False) #conversionPostprocessing.fastSim = cms.bool(True) -fastSimPhotonPostProcessor = cms.Sequence(fastSimPhotonPostProcessing) +fastSimPhotonPostProcessor = cms.Sequence(fastSimPhotonPostProcessing*fastSimGEDPhotonPostProcessing) diff --git a/Validation/RecoEgamma/test/fastSimValidation.csh b/Validation/RecoEgamma/test/fastSimValidation.csh index dea9b9428ce02..1e4f194a7fd65 100755 --- a/Validation/RecoEgamma/test/fastSimValidation.csh +++ b/Validation/RecoEgamma/test/fastSimValidation.csh @@ -1,4 +1,5 @@ -#!/bin/csh +#!/bin/csh -x +##!/bin/csh #This script can be used to generate a web page to compare histograms from #two input root files produced using the EDAnalyzers in RecoEgamma/Examples, @@ -16,13 +17,14 @@ #which can then be viewed in a web browser using validation.html. #=============BEGIN CONFIGURATION================= -setenv TYPE Photons +setenv TYPE GEDPhotons +setenv ANALYZERNAME pfPhotonValidator setenv CMSSWver1 7_0_0 setenv RELEASE 7_0_0 -setenv PRERELEASE pre8 +setenv PRERELEASE pre12 -setenv FULLGLOBALTAG START70_V2_amend-v4 -setenv FASTGLOBALTAG START70_V1_FastSim-v1 +setenv FULLGLOBALTAG POSTLS170_V1-v1 +setenv FASTGLOBALTAG START70_V5_FastSim-v1 setenv RELEASE ${RELEASE}_${PRERELEASE} #setenv RELEASE ${RELEASE} @@ -64,10 +66,10 @@ setenv FASTSIM ${WorkDir1}/PhotonValidationRelVal${RELEASE}_SingleGammaFlatPt10T else if ($SAMPLE == H130GGgluonfusion) then -setenv HISTOPATHNAME_Efficiencies DQMData/Run\ 1/EgammaV/Run\ summary/PhotonValidator/Efficiencies -setenv HISTOPATHNAME_Photons DQMData/Run\ 1/EgammaV/Run\ summary/PhotonValidator/Photons -setenv HISTOPATHNAME_Conversions DQMData/Run\ 1/EgammaV/Run\ summary/PhotonValidator/ConversionInfo -setenv FULLSIM ${WorkDir1}/DQM_V0001_R000000001__RelValH130GGgluonfusion__CMSSW_${RELEASE}-${FULLGLOBALTAG}__DQM.root +setenv HISTOPATHNAME_Efficiencies DQMData/Run\ 1/EgammaV/Run\ summary/${ANALYZERNAME}/Efficiencies +setenv HISTOPATHNAME_Photons DQMData/Run\ 1/EgammaV/Run\ summary/${ANALYZERNAME}/Photons +setenv HISTOPATHNAME_Conversions DQMData/Run\ 1/EgammaV/Run\ summary/${ANALYZERNAME}/ConversionInfo +setenv FULLSIM ${WorkDir1}/DQM_V0001_R000000001__RelValH130GGgluonfusion_13__CMSSW_${RELEASE}-${FULLGLOBALTAG}__DQM.root setenv FASTSIM ${WorkDir1}/DQM_V0001_R000000001__RelValH130GGgluonfusion__CMSSW_${RELEASE}-${FASTGLOBALTAG}__DQM.root @@ -126,7 +128,7 @@ cd $OUTDIR #The list of histograms to be compared for each TYPE can be configured below: -if ( $TYPE == Photons ) then +if ( $TYPE == Photons || $TYPE == GEDPhotons ) then cat > efficiencyForPhotons < scaledhistosGEDspecific < temp$N.C < + + + + +
+ +
+Number of offline reconstructed vertices + +
+ + +
@@ -92,7 +105,6 @@ first offline reconstructed PV. In case of single photons, where the reconstructed PV is not available since there are no tracks, the photon vertex is set to the nominal (0,0,0) hence the poor &Delta &eta - @@ -103,6 +115,10 @@
+ + + + + +
@@ -778,13 +794,16 @@
+ -
- +
Reconstructed photon matching a simulated photon: GED based photon isolation. +The distribution is for ecal barrel only.
@@ -796,28 +815,51 @@ + +
+Reconstructed photon matching a simulated photon: GED based photon isolation. +The distribution is for ecal endcaps only. + +
-
Reconstructed photon matching a simulated photon: GED based photon isolation. +
+Reconstructed photon matching a simulated photon: GED based photon isolation. The distribution is for ecal endcaps only.
+ + @@ -827,16 +869,32 @@
+ +
+Reconstructed photon matching a simulated photon: +GED based photon isolation: contribution from charged hadrons. +The distribution is for ecal barrel only. + +

Reconstructed photon matching a simulated photon: -GED based photon isolation: contribution from charged hadrons +GED based photon isolation contribution from charged hadrons. The distribution is for ecal barrel only.
+ +
+Reconstructed photon matching a simulated photon: GED based photon isolation: contribution from charged hadrons +The distribution is for ecal endcaps only. + +
-
Reconstructed photon matching a simulated photon. GED based photon isolation: contribution from charged hadrons. +
+Reconstructed photon matching a simulated photon: GED based photon isolation: contribution from charged hadrons The distribution is for ecal endcaps only.
+ + @@ -844,6 +902,125 @@ +
+ +
+Reconstructed photon matching a simulated photon: +GED based photon isolation: contribution from neutral hadrons. +The distribution is for ecal barrel only. + +

Reconstructed photon matching a simulated photon: -GED based photon isolation: contribution from neutral hadrons +GED based photon isolation contribution from neutral hadrons. The distribution is for ecal barrel only.
+ +
+Reconstructed photon matching a simulated photon: GED based photon isolation: contribution from neutral hadrons +The distribution is for ecal endcaps only. + +
-
Reconstructed photon matching a simulated photon. GED based photon isolation: contribution from neutral hadrons. +
+Reconstructed photon matching a simulated photon: GED based photon isolation: contribution from neutral hadrons The distribution is for ecal endcaps only.
+ + + + + + + + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation, contribution from photons. Defined as the sum of transverse momentum of photons falling in a cone with dR=0.4 around the lead photon. The contribution from the lead photon IS NOT removed. +The distribution is for ecal barrel only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation contribution from photons. Defined as the sum of transverse momentum of photons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS NOT removed +The distribution is for ecal endcap only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation: contribution from photons. Defined as the sum of transverse momentum of photons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS removed. +The distribution is for ecal barrel only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation: contribution from photons. Defined as the sum of transverse momentum of photons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS removed. +The distribution is for ecal endcap only. + +
+ + + + + + + + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation, contribution from charged hadrons. Defined as the sum of transverse momentum of charged hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the lead photon IS NOT removed. +The distribution is for ecal barrel only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation contribution from charged hadrons. Defined as the sum of transverse momentum of charged hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS NOT removed +The distribution is for ecal endcap only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation: contribution from charged hadrons. Defined as the sum of transverse momentum of charged hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS removed. +The distribution is for ecal barrel only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation: contribution from charged hadrons. Defined as the sum of transverse momentum of charged hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS removed. +The distribution is for ecal endcap only. + +
+ + + + + + + + + + + + + + + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation, contribution from neutral hadrons. Defined as the sum of transverse momentum of neutral hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the lead photon IS NOT removed. +The distribution is for ecal barrel only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation contribution from neutral hadrons. Defined as the sum of transverse momentum of neutral hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS NOT removed +The distribution is for ecal endcap only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation: contribution from neutral hadrons. Defined as the sum of transverse momentum of neutral hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS removed. +The distribution is for ecal barrel only. + +
+ +
+Reconstructed photon matching a simulated photon: +particle based photon isolation: contribution from neutral hadrons. Defined as the sum of transverse momentum of neutral hadrons falling in a cone with dR=0.4 around the lead photon. The contribution from the original photon IS removed. +The distribution is for ecal endcap only. + +
@@ -1353,7 +1530,7 @@
- + @@ -1481,6 +1658,7 @@ + diff --git a/Validation/RecoJets/python/JetValidation_cfi.py b/Validation/RecoJets/python/JetValidation_cfi.py index df65742683991..9acb7da12b4a1 100644 --- a/Validation/RecoJets/python/JetValidation_cfi.py +++ b/Validation/RecoJets/python/JetValidation_cfi.py @@ -4,7 +4,7 @@ ###------------------------------------------------------------------------------- #JetAnalyzerKt6PF = cms.EDAnalyzer("JetTester", # JetType = cms.untracked.string('calo'), -# OutputFile = cms.untracked.string('JetTester.root'), +# OutputFile = cms.untracked.string(''), # src = cms.InputTag("kt6PFJets"), # srcRho = cms.InputTag("fixedGridRhoFastjetAll"), # srcGen = cms.InputTag("kt6GenJets"), @@ -19,7 +19,7 @@ ##------------------------------------------------------------------------------- #JetAnalyzerKt6Calo = cms.EDAnalyzer("JetTester", # JetType = cms.untracked.string('calo'), -# OutputFile = cms.untracked.string('JetTester.root'), +# OutputFile = cms.untracked.string(''), # src = cms.InputTag("kt6CaloJets"), # srcRho = cms.InputTag("fixedGridRhoFastjetAllCalo"), # srcGen = cms.InputTag("kt6GenJets"), @@ -34,7 +34,7 @@ #------------------------------------------------------------------------------- JetAnalyzerAk5Calo = cms.EDAnalyzer("JetTester", JetType = cms.untracked.string('calo'), - OutputFile = cms.untracked.string('JetTester.root'), + OutputFile = cms.untracked.string(''), src = cms.InputTag("ak5CaloJets"), # srcRho = cms.InputTag("rho", "ak5CaloJets"), srcGen = cms.InputTag("ak5GenJets"), @@ -49,7 +49,7 @@ ##------------------------------------------------------------------------------- #JetAnalyzerAk7Calo = cms.EDAnalyzer("JetTester", # JetType = cms.untracked.string('calo'), -# OutputFile = cms.untracked.string('JetTester.root'), +# OutputFile = cms.untracked.string(''), # src = cms.InputTag("ak7CaloJets"), # srcRho = cms.InputTag("ak7CaloJets","rho"), # srcGen = cms.InputTag("ak7GenJets"), @@ -65,7 +65,7 @@ #------------------------------------------------------------------------------- JetAnalyzerAk5PF = cms.EDAnalyzer("JetTester", JetType = cms.untracked.string('pf'), - OutputFile = cms.untracked.string('JetTester.root'), + OutputFile = cms.untracked.string(''), src = cms.InputTag("ak5PFJets"), # srcRho = cms.InputTag("ak5PFJets","rho"), srcGen = cms.InputTag("ak5GenJets"), @@ -80,7 +80,7 @@ #------------------------------------------------------------------------------- JetAnalyzerAk5JPT = cms.EDAnalyzer("JetTester", JetType = cms.untracked.string('jpt'), - OutputFile = cms.untracked.string('JetTester.root'), + OutputFile = cms.untracked.string(''), src = cms.InputTag("JetPlusTrackZSPCorJetAntiKt5"), # srcRho = cms.InputTag("JetPlusTrackZSPCorJetAntiKt5","rho"), srcGen = cms.InputTag("ak5GenJets"), @@ -94,7 +94,7 @@ #------------------------------------------------------------------------------- JetAnalyzerAk5PFCHS = cms.EDAnalyzer("JetTester", JetType = cms.untracked.string('pf'), - OutputFile = cms.untracked.string('JetTester.root'), + OutputFile = cms.untracked.string(''), src = cms.InputTag("ak5PFJetsCHS"), # srcRho = cms.InputTag("ak5PFJetsCHS","rho"), srcGen = cms.InputTag("ak5GenJets"), @@ -108,7 +108,7 @@ ##------------------------------------------------------------------------------- #JetAnalyzerAk8PF = cms.EDAnalyzer("JetTester", # JetType = cms.untracked.string('pf'), -# OutputFile = cms.untracked.string('JetTester.root'), +# OutputFile = cms.untracked.string(''), # src = cms.InputTag("ak8PFJets"), # srcRho = cms.InputTag("ak8PFJets","rho"), ## srcGen = cms.InputTag("ak8GenJets"), @@ -123,7 +123,7 @@ ##------------------------------------------------------------------------------- #JetAnalyzerAk8PFCHS = cms.EDAnalyzer("JetTester", # JetType = cms.untracked.string('pf'), -# OutputFile = cms.untracked.string('JetTester.root'), +# OutputFile = cms.untracked.string(''), # src = cms.InputTag("ak8PFJetsCHS"), # srcRho = cms.InputTag("ak8PFJetsCHS","rho"), ## srcGen = cms.InputTag("ak8GenJets"), @@ -138,7 +138,7 @@ ##------------------------------------------------------------------------------- #JetAnalyzerCA8PFCHS = cms.EDAnalyzer("JetTester", # JetType = cms.untracked.string('pf'), -# OutputFile = cms.untracked.string('JetTester.root'), +# OutputFile = cms.untracked.string(''), # src = cms.InputTag("ca8PFJetsCHS"), # srcRho = cms.InputTag("ca8PFJetsCHS","rho"), ## srcGen = cms.InputTag("ca8GenJets"), diff --git a/Validation/RecoMET/python/METValidation_cfi.py b/Validation/RecoMET/python/METValidation_cfi.py index c70e09237366d..daa88812dc072 100644 --- a/Validation/RecoMET/python/METValidation_cfi.py +++ b/Validation/RecoMET/python/METValidation_cfi.py @@ -7,63 +7,63 @@ # Fill validation histograms for MET metAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("met"), METType = cms.untracked.string("calo") ) #metHOAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metHO") # ) # #metNoHFAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metNoHF") # ) # #metNoHFHOAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metNoHFHO") # ) # #metOptAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metOpt") # ) # #metOptHOAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metOptHO") # ) # #metOptNoHFAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metOptNoHF") # ) # #metOptNoHFHOAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("metOptNoHFHO") # ) pfMetAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("pfMet"), METType = cms.untracked.string("pf") ) tcMetAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("tcMet"), InputCaloMETLabel = cms.InputTag("met"), InputTrackLabel = cms.InputTag("generalTracks"), @@ -84,7 +84,7 @@ corMetGlobalMuonsAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("corMetGlobalMuons"), METType = cms.untracked.string("cor") @@ -93,50 +93,50 @@ #genMptTrueAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("genMptTrue"), # ) genMetTrueAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("genMetTrue"), METType = cms.untracked.string("gen") ) #genMetCaloAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("genMetCalo") # ) # #genMptCaloAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("genMptCalo") # ) # # #genMetCaloAndNonPromptAnalyzer = cms.EDAnalyzer( # "METTester", -# OutputFile = cms.untracked.string('METTester.root'), +# OutputFile = cms.untracked.string(''), # InputMETLabel = cms.InputTag("genMetCaloAndNonPrompt") # ) pfType0CorrectedMetAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("pfType0CorrectedMet"), METType = cms.untracked.string("pf") ) pfType1CorrectedMetAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("pfType1CorrectedMet"), METType = cms.untracked.string("pf") ) pfType01CorrectedMetAnalyzer = cms.EDAnalyzer( "METTester", - OutputFile = cms.untracked.string('METTester.root'), + OutputFile = cms.untracked.string(''), InputMETLabel = cms.InputTag("pfType01CorrectedMet"), METType = cms.untracked.string("pf") ) diff --git a/Validation/RecoTrack/BuildFile.xml b/Validation/RecoTrack/BuildFile.xml index dd95b08b8a3ed..5d96dc083bf74 100644 --- a/Validation/RecoTrack/BuildFile.xml +++ b/Validation/RecoTrack/BuildFile.xml @@ -2,9 +2,16 @@ - + + + + + + + + diff --git a/Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h b/Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h index 2c46b9be219de..bd2473b21f850 100644 --- a/Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h +++ b/Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h @@ -10,12 +10,20 @@ #include "FWCore/Framework/interface/Event.h" #include "DataFormats/Common/interface/Handle.h" +#include "FWCore/Utilities/interface/EDGetToken.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" + #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h" #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h" +#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackExtra.h" +#include "DataFormats/GeometryVector/interface/GlobalVector.h" +#include "DataFormats/GeometryVector/interface/LocalVector.h" + #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" @@ -61,450 +69,372 @@ #include +class SiStripDetCabling; +class SiStripDCSStatus; + class SiStripTrackingRecHitsValid : public edm::EDAnalyzer { public: - explicit SiStripTrackingRecHitsValid(const edm::ParameterSet& conf); + SiStripTrackingRecHitsValid(const edm::ParameterSet& conf); - virtual ~SiStripTrackingRecHitsValid(); + ~SiStripTrackingRecHitsValid(); + + // ALL + //Simple hits MEs either from matched either + //from hit1D, hit2D in all subdetectors. + struct SimpleHitsMEs{ + MonitorElement* meCategory; + MonitorElement* meTrackwidth; + MonitorElement* meExpectedwidth; + MonitorElement* meClusterwidth; + MonitorElement* meTrackanglealpha; + MonitorElement* meTrackanglebeta; + MonitorElement* meResolxMFTrackwidthProfile; + MonitorElement* meResolxMFTrackwidthProfileWClus1; + MonitorElement* meResolxMFTrackwidthProfileWClus2; + MonitorElement* meResolxMFTrackwidthProfileWClus3; + MonitorElement* meResolxMFTrackwidthProfileWClus4; + MonitorElement* meResMFTrackwidthProfileWClus1; + + MonitorElement* meResMFTrackwidthProfileWClus2; + MonitorElement* meResMFTrackwidthProfileWClus21; + MonitorElement* meResMFTrackwidthProfileWClus22; + MonitorElement* meResMFTrackwidthProfileWClus23; + + MonitorElement* meResMFTrackwidthProfileWClus3; + MonitorElement* meResMFTrackwidthProfileWClus4; + MonitorElement* meResolxMFTrackwidthProfileCategory1; + MonitorElement* meResolxMFTrackwidthProfileCategory2; + MonitorElement* meResolxMFTrackwidthProfileCategory3; + MonitorElement* meResolxMFTrackwidthProfileCategory4; + MonitorElement* meResolxMFClusterwidthProfileCategory1; + MonitorElement* meResolxMFAngleProfile; + MonitorElement* meResolxLF; + MonitorElement* meResLF; + MonitorElement* mePullLF; + MonitorElement* meResolxMF; + MonitorElement* meResMF; + MonitorElement* mePullMF; + + }; + + struct LayerMEs{ // MEs for Layer Level + MonitorElement* meWclusRphi; + MonitorElement* meAdcRphi; + MonitorElement* meResolxLFRphi; + MonitorElement* meResolxMFRphi; + MonitorElement* meResolxMFRphiwclus1; + MonitorElement* meResolxMFRphiwclus2; + MonitorElement* meResolxMFRphiwclus3; + MonitorElement* meResolxMFRphiwclus4; + MonitorElement* meResLFRphi; + MonitorElement* meResMFRphi; + MonitorElement* meResMFRphiwclus1; + MonitorElement* meResMFRphiwclus2; + MonitorElement* meResMFRphiwclus3; + MonitorElement* meResMFRphiwclus4; + MonitorElement* mePullLFRphi; + MonitorElement* mePullMFRphi; + MonitorElement* mePullMFRphiwclus1; + MonitorElement* mePullMFRphiwclus2; + MonitorElement* mePullMFRphiwclus3; + MonitorElement* mePullMFRphiwclus4; + MonitorElement* meTrackangleRphi; + MonitorElement* meTrackanglebetaRphi; + MonitorElement* meTrackangle2Rphi; + MonitorElement* mePullTrackangleProfileRphi; + MonitorElement* mePullTrackangle2DRphi; + MonitorElement* meTrackwidthRphi; + MonitorElement* meExpectedwidthRphi; + MonitorElement* meClusterwidthRphi; + MonitorElement* meCategoryRphi; + MonitorElement* mePullTrackwidthProfileRphi; + MonitorElement* mePullTrackwidthProfileRphiwclus1; + MonitorElement* mePullTrackwidthProfileRphiwclus2; + MonitorElement* mePullTrackwidthProfileRphiwclus3; + MonitorElement* mePullTrackwidthProfileRphiwclus4; + MonitorElement* mePullTrackwidthProfileCategory1Rphi; + MonitorElement* mePullTrackwidthProfileCategory2Rphi; + MonitorElement* mePullTrackwidthProfileCategory3Rphi; + MonitorElement* mePullTrackwidthProfileCategory4Rphi; + MonitorElement* meResolxMFTrackwidthProfileRphi; + + MonitorElement* meResolxMFTrackwidthProfileWclus1Rphi; + MonitorElement* meResolxMFTrackwidthProfileWclus2Rphi; + MonitorElement* meResolxMFTrackwidthProfileWclus3Rphi; + MonitorElement* meResolxMFTrackwidthProfileWclus4Rphi; + MonitorElement* meResMFTrackwidthProfileWclus1Rphi; + MonitorElement* meResMFTrackwidthProfileWclus2Rphi; + MonitorElement* meResMFTrackwidthProfileWclus3Rphi; + MonitorElement* meResMFTrackwidthProfileWclus4Rphi; + + MonitorElement* meResolxMFTrackwidthProfileCategory1Rphi; + MonitorElement* meResolxMFTrackwidthProfileCategory2Rphi; + MonitorElement* meResolxMFTrackwidthProfileCategory3Rphi; + MonitorElement* meResolxMFTrackwidthProfileCategory4Rphi; + MonitorElement* meResolxMFClusterwidthProfileCategory1Rphi; + MonitorElement* meResolxMFAngleProfileRphi; + MonitorElement* merapidityResProfilewclus1; + MonitorElement* merapidityResProfilewclus2; + MonitorElement* merapidityResProfilewclus3; + MonitorElement* merapidityResProfilewclus4; + + + }; + + struct StereoAndMatchedMEs{ // MEs for stereo and matched hits + + MonitorElement* meWclusSas; + MonitorElement* meAdcSas; + MonitorElement* meResolxLFSas; + MonitorElement* meResolxMFSas; + MonitorElement* meResLFSas; + MonitorElement* meResMFSas; + MonitorElement* mePullLFSas; + MonitorElement* mePullMFSas; + MonitorElement* meTrackangleSas; + MonitorElement* meTrackanglebetaSas; + MonitorElement* mePullTrackangleProfileSas; + MonitorElement* meTrackwidthSas; + MonitorElement* meExpectedwidthSas; + MonitorElement* meClusterwidthSas; + MonitorElement* meCategorySas; + MonitorElement* mePullTrackwidthProfileSas; + MonitorElement* mePullTrackwidthProfileCategory1Sas; + MonitorElement* mePullTrackwidthProfileCategory2Sas; + MonitorElement* mePullTrackwidthProfileCategory3Sas; + MonitorElement* mePullTrackwidthProfileCategory4Sas; + MonitorElement* meResolxMFTrackwidthProfileSas; + MonitorElement* meResolxMFTrackwidthProfileCategory1Sas; + MonitorElement* meResolxMFTrackwidthProfileCategory2Sas; + MonitorElement* meResolxMFTrackwidthProfileCategory3Sas; + MonitorElement* meResolxMFTrackwidthProfileCategory4Sas; + MonitorElement* meResolxMFClusterwidthProfileCategory1Sas; + MonitorElement* meResolxMFAngleProfileSas; + + MonitorElement* mePosxMatched; + MonitorElement* mePosyMatched; + MonitorElement* meResolxMatched; + MonitorElement* meResolyMatched; + MonitorElement* meResxMatched; + MonitorElement* meResyMatched; + MonitorElement* mePullxMatched; + MonitorElement* mePullyMatched; + + }; + + struct RecHitProperties{ + float x; + float y; + float z; + float resolxx; + float resolxy; + float resolyy; + float resolxxMF; // in Measurement Frame + float phi; + float resx; + float resy; + float resxMF;// in Measurement Frame + float pullx; + float pully; + float pullxMF;// in Measurement Frame + float trackangle; + float trackanglebeta; + float trackangle2; + float trackwidth; + int expectedwidth; + int category; + float thickness; + int clusiz; + float cluchg; + }; + + protected: virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void beginJob(const edm::EventSetup& es); + virtual void beginRun(const edm::Run&, const edm::EventSetup&); + const MagneticField * magfield2_ ; void endJob(); + private: + + DQMStore* dbe_; + std::string outputFile_; + std::string topFolderName_; + + + bool layerswitchResolx_LF; + bool layerswitchResolx_MF; + bool layerswitchRes_LF; + bool layerswitchRes_MF; + bool layerswitchPull_LF; + bool layerswitchPull_MF; + bool layerswitchCategory; + bool layerswitchTrackwidth; + bool layerswitchExpectedwidth; + bool layerswitchClusterwidth; + bool layerswitchTrackanglealpha; + bool layerswitchTrackanglebeta; + bool layerswitchResolxMFTrackwidthProfile_WClus1; + bool layerswitchResolxMFTrackwidthProfile_WClus2; + bool layerswitchResolxMFTrackwidthProfile_WClus3; + bool layerswitchResolxMFTrackwidthProfile_WClus4; + bool layerswitchResMFTrackwidthProfile_WClus1; + bool layerswitchResMFTrackwidthProfile_WClus2; + bool layerswitchResMFTrackwidthProfile_WClus21; + bool layerswitchResMFTrackwidthProfile_WClus22; + bool layerswitchResMFTrackwidthProfile_WClus23; + bool layerswitchResMFTrackwidthProfile_WClus3; + bool layerswitchResMFTrackwidthProfile_WClus4; + bool layerswitchResolxMFTrackwidthProfile; + bool layerswitchResolxMFTrackwidthProfile_Category1; + bool layerswitchResolxMFTrackwidthProfile_Category2; + bool layerswitchResolxMFTrackwidthProfile_Category3; + bool layerswitchResolxMFTrackwidthProfile_Category4; + bool layerswitchResolxMFClusterwidthProfile_Category1; + bool layerswitchResolxMFAngleProfile; + bool layerswitchWclusRphi; + bool layerswitchAdcRphi; + bool layerswitchResolxLFRphi; + bool layerswitchResolxMFRphi; + bool layerswitchResolxMFRphiwclus1 ; + bool layerswitchResolxMFRphiwclus2 ; + bool layerswitchResolxMFRphiwclus3 ; + bool layerswitchResolxMFRphiwclus4 ; + bool layerswitchResLFRphi; + bool layerswitchResMFRphi; + bool layerswitchResMFRphiwclus1; + bool layerswitchResMFRphiwclus2; + bool layerswitchResMFRphiwclus3; + bool layerswitchResMFRphiwclus4; + bool layerswitchPullLFRphi; + bool layerswitchPullMFRphi; + bool layerswitchPullMFRphiwclus1; + bool layerswitchPullMFRphiwclus2; + bool layerswitchPullMFRphiwclus3; + bool layerswitchPullMFRphiwclus4; + bool layerswitchTrackangleRphi; + bool layerswitchTrackanglebetaRphi; + bool layerswitchTrackangle2Rphi; + bool layerswitchPullTrackangleProfileRphi; + bool layerswitchPullTrackangle2DRphi; + bool layerswitchTrackwidthRphi; + bool layerswitchExpectedwidthRphi; + bool layerswitchClusterwidthRphi; + bool layerswitchCategoryRphi; + bool layerswitchPullTrackwidthProfileRphi; + bool layerswitchPullTrackwidthProfileRphiwclus1; + bool layerswitchPullTrackwidthProfileRphiwclus2; + bool layerswitchPullTrackwidthProfileRphiwclus3; + bool layerswitchPullTrackwidthProfileRphiwclus4; + bool layerswitchPullTrackwidthProfileCategory1Rphi; + bool layerswitchPullTrackwidthProfileCategory2Rphi; + bool layerswitchPullTrackwidthProfileCategory3Rphi; + bool layerswitchPullTrackwidthProfileCategory4Rphi; + bool layerswitchResolxMFTrackwidthProfileRphi; + bool layerswitchResolxMFTrackwidthProfileWclus1Rphi; + bool layerswitchResolxMFTrackwidthProfileWclus2Rphi; + bool layerswitchResolxMFTrackwidthProfileWclus3Rphi; + bool layerswitchResolxMFTrackwidthProfileWclus4Rphi; + bool layerswitchResMFTrackwidthProfileWclus1Rphi; + bool layerswitchResMFTrackwidthProfileWclus2Rphi; + bool layerswitchResMFTrackwidthProfileWclus3Rphi; + bool layerswitchResMFTrackwidthProfileWclus4Rphi; + bool layerswitchResolxMFTrackwidthProfileCategory1Rphi; + bool layerswitchResolxMFTrackwidthProfileCategory2Rphi; + bool layerswitchResolxMFTrackwidthProfileCategory3Rphi; + bool layerswitchResolxMFTrackwidthProfileCategory4Rphi; + bool layerswitchResolxMFAngleProfileRphi; + bool layerswitchResolxMFClusterwidthProfileCategory1Rphi; + bool layerswitchrapidityResProfilewclus1; + bool layerswitchrapidityResProfilewclus2; + bool layerswitchrapidityResProfilewclus3; + bool layerswitchrapidityResProfilewclus4; + bool layerswitchWclusSas; + bool layerswitchAdcSas; + bool layerswitchResolxLFSas; + bool layerswitchResolxMFSas; + bool layerswitchResLFSas; + bool layerswitchResMFSas; + bool layerswitchPullLFSas; + bool layerswitchPullMFSas; + bool layerswitchTrackangleSas; + bool layerswitchTrackanglebetaSas; + bool layerswitchPullTrackangleProfileSas; + bool layerswitchTrackwidthSas; + bool layerswitchExpectedwidthSas; + bool layerswitchClusterwidthSas; + bool layerswitchCategorySas; + bool layerswitchPullTrackwidthProfileSas; + bool layerswitchPullTrackwidthProfileCategory1Sas; + bool layerswitchPullTrackwidthProfileCategory2Sas; + bool layerswitchPullTrackwidthProfileCategory3Sas; + bool layerswitchPullTrackwidthProfileCategory4Sas; + bool layerswitchResolxMFTrackwidthProfileSas; + bool layerswitchResolxMFTrackwidthProfileCategory1Sas; + bool layerswitchResolxMFTrackwidthProfileCategory2Sas; + bool layerswitchResolxMFTrackwidthProfileCategory3Sas; + bool layerswitchResolxMFTrackwidthProfileCategory4Sas; + bool layerswitchResolxMFAngleProfileSas; + bool layerswitchResolxMFClusterwidthProfileCategory1Sas; + bool layerswitchPosxMatched; + bool layerswitchPosyMatched; + bool layerswitchResolxMatched; + bool layerswitchResolyMatched; + bool layerswitchResxMatched; + bool layerswitchResyMatched; + bool layerswitchPullxMatched; + bool layerswitchPullyMatched; + + SimpleHitsMEs simplehitsMEs; + std::vector matched; + std::map LayerMEsMap; + std::map StereoAndMatchedMEsMap; + std::map > LayerDetMap; + std::map > StereoAndMatchedDetMap; + + edm::ESHandle SiStripDetCabling_; + std::pair projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet,const BoundPlane& plane); LocalVector driftDirection(const StripGeomDetUnit* det)const; MonitorElement* Fit_SliceY(TH2F * Histo2D); - private: + void createMEs(const edm::EventSetup& es); + void createSimpleHitsMEs(); + void createLayerMEs(std::string label); + void createStereoAndMatchedMEs(std::string label); + + MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle); + MonitorElement* bookMEProfile(const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle); - edm::ParameterSet conf_; - std::string outputFile_; - edm::EDGetTokenT< std::vector > v_TrajectoryToken_; + inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);} + inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);} + inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);} + inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);} - DQMStore* dbe_; - MonitorElement* PullRMSvsTrackwidth; - MonitorElement* PullRMSvsExpectedwidth; - MonitorElement* PullRMSvsClusterwidth; - MonitorElement* PullRMSvsTrackangle; - MonitorElement* PullRMSvsTrackanglebeta; - - MonitorElement* PullRMSvsTrackwidthTIB; - MonitorElement* PullRMSvsExpectedwidthTIB; - MonitorElement* PullRMSvsClusterwidthTIB; - MonitorElement* PullRMSvsTrackangleTIB; - MonitorElement* PullRMSvsTrackanglebetaTIB; - - MonitorElement* PullRMSvsTrackwidthTOB; - MonitorElement* PullRMSvsExpectedwidthTOB; - MonitorElement* PullRMSvsClusterwidthTOB; - MonitorElement* PullRMSvsTrackangleTOB; - MonitorElement* PullRMSvsTrackanglebetaTOB; - - MonitorElement* PullRMSvsTrackwidthTID; - MonitorElement* PullRMSvsExpectedwidthTID; - MonitorElement* PullRMSvsClusterwidthTID; - MonitorElement* PullRMSvsTrackangleTID; - MonitorElement* PullRMSvsTrackanglebetaTID; - - MonitorElement* PullRMSvsTrackwidthTEC; - MonitorElement* PullRMSvsExpectedwidthTEC; - MonitorElement* PullRMSvsClusterwidthTEC; - MonitorElement* PullRMSvsTrackangleTEC; - MonitorElement* PullRMSvsTrackanglebetaTEC; + edm::ParameterSet conf_; + unsigned long long m_cacheID_; + edm::ParameterSet Parameters; + //const StripTopology* topol; + std::vector rechitrphi; + std::vector rechitstereo; + std::vector rechitmatched; + RecHitProperties rechitpro; - // ALL + void rechitanalysis(TrajectoryStateOnSurface tsos, const TransientTrackingRecHit::ConstRecHitPointer thit, const StripGeomDetUnit *stripdet, edm::ESHandle < StripClusterParameterEstimator > stripcpe, TrackerHitAssociator& associate, bool simplehit1or2D); + + void rechitanalysis_matched(TrajectoryStateOnSurface tsos, const TransientTrackingRecHit::ConstRecHitPointer thit, const GluedGeomDet* gluedDet,TrackerHitAssociator& associate, edm::ESHandle < StripClusterParameterEstimator > stripcpe, std::string matchedmonorstereo); + - MonitorElement* meCategory; - MonitorElement* meTrackwidth; - MonitorElement* meExpectedwidth; - MonitorElement* meClusterwidth; - MonitorElement* meTrackanglealpha; - MonitorElement* meTrackanglebeta; - MonitorElement* meErrxMFTrackwidthProfile; - MonitorElement* meErrxMFTrackwidthProfileWClus1; - MonitorElement* meErrxMFTrackwidthProfileWClus2; - MonitorElement* meErrxMFTrackwidthProfileWClus3; - MonitorElement* meErrxMFTrackwidthProfileWClus4; - MonitorElement* meResMFTrackwidthProfileWClus1; - - MonitorElement* meResMFTrackwidthProfileWClus2; - MonitorElement* meResMFTrackwidthProfileWClus21; - MonitorElement* meResMFTrackwidthProfileWClus22; - MonitorElement* meResMFTrackwidthProfileWClus23; - - MonitorElement* meResMFTrackwidthProfileWClus3; - MonitorElement* meResMFTrackwidthProfileWClus4; - MonitorElement* meErrxMFTrackwidthProfileCategory1; - MonitorElement* meErrxMFTrackwidthProfileCategory2; - MonitorElement* meErrxMFTrackwidthProfileCategory3; - MonitorElement* meErrxMFTrackwidthProfileCategory4; - MonitorElement* meErrxMFClusterwidthProfileCategory1; - MonitorElement* meErrxMFAngleProfile; - MonitorElement* meErrxLF; - MonitorElement* meResLF; - MonitorElement* mePullLF; - MonitorElement* meErrxMF; - MonitorElement* meResMF; - MonitorElement* mePullMF; - - - //TIB - MonitorElement* meNstpRphiTIB[4]; - MonitorElement* meAdcRphiTIB[4]; - MonitorElement* mePosxRphiTIB[4]; - MonitorElement* meErrxLFRphiTIB[4]; - MonitorElement* meErrxMFRphiTIB[4]; - MonitorElement* meResLFRphiTIB[4]; - MonitorElement* meResMFRphiTIB[4]; - MonitorElement* mePullLFRphiTIB[4]; - MonitorElement* mePullMFRphiTIB[4]; - MonitorElement* meTrackangleRphiTIB[4]; - MonitorElement* meTrackanglebetaRphiTIB[4]; - MonitorElement* meTrackangle2RphiTIB[4]; - MonitorElement* mePullTrackangleProfileRphiTIB[4]; - MonitorElement* mePullTrackangle2DRphiTIB[4]; - MonitorElement* meTrackwidthRphiTIB[4]; - MonitorElement* meExpectedwidthRphiTIB[4]; - MonitorElement* meClusterwidthRphiTIB[4]; - MonitorElement* meCategoryRphiTIB[4]; - MonitorElement* mePullTrackwidthProfileRphiTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory1RphiTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory2RphiTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory3RphiTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory4RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileRphiTIB[4]; - - MonitorElement* meErrxMFTrackwidthProfileWclus1RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileWclus2RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileWclus3RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileWclus4RphiTIB[4]; - MonitorElement* meResMFTrackwidthProfileWclus1RphiTIB[4]; - MonitorElement* meResMFTrackwidthProfileWclus2RphiTIB[4]; - MonitorElement* meResMFTrackwidthProfileWclus3RphiTIB[4]; - MonitorElement* meResMFTrackwidthProfileWclus4RphiTIB[4]; - - MonitorElement* meErrxMFTrackwidthProfileCategory1RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory2RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory3RphiTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory4RphiTIB[4]; - MonitorElement* meErrxMFClusterwidthProfileCategory1RphiTIB[4]; - MonitorElement* meErrxMFAngleProfileRphiTIB[4]; - - MonitorElement* meNstpSasTIB[4]; - MonitorElement* meAdcSasTIB[4]; - MonitorElement* mePosxSasTIB[4]; - MonitorElement* meErrxLFSasTIB[4]; - MonitorElement* meErrxMFSasTIB[4]; - MonitorElement* meResLFSasTIB[4]; - MonitorElement* meResMFSasTIB[4]; - MonitorElement* mePullLFSasTIB[4]; - MonitorElement* mePullMFSasTIB[4]; - MonitorElement* meTrackangleSasTIB[4]; - MonitorElement* meTrackanglebetaSasTIB[4]; - MonitorElement* mePullTrackangleProfileSasTIB[4]; - MonitorElement* meTrackwidthSasTIB[4]; - MonitorElement* meExpectedwidthSasTIB[4]; - MonitorElement* meClusterwidthSasTIB[4]; - MonitorElement* meCategorySasTIB[4]; - MonitorElement* mePullTrackwidthProfileSasTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory1SasTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory2SasTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory3SasTIB[4]; - MonitorElement* mePullTrackwidthProfileCategory4SasTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileSasTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory1SasTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory2SasTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory3SasTIB[4]; - MonitorElement* meErrxMFTrackwidthProfileCategory4SasTIB[4]; - MonitorElement* meErrxMFClusterwidthProfileCategory1SasTIB[4]; - MonitorElement* meErrxMFAngleProfileSasTIB[4]; - - MonitorElement* mePosxMatchedTIB[2]; - MonitorElement* mePosyMatchedTIB[2]; - MonitorElement* meErrxMatchedTIB[2]; - MonitorElement* meErryMatchedTIB[2]; - MonitorElement* meResxMatchedTIB[2]; - MonitorElement* meResyMatchedTIB[2]; - MonitorElement* mePullxMatchedTIB[2]; - MonitorElement* mePullyMatchedTIB[2]; - //TOB - MonitorElement* meNstpRphiTOB[6]; - MonitorElement* meAdcRphiTOB[6]; - MonitorElement* mePosxRphiTOB[6]; - MonitorElement* meErrxLFRphiTOB[6]; - MonitorElement* meResLFRphiTOB[6]; - MonitorElement* mePullLFRphiTOB[6]; - MonitorElement* meErrxMFRphiTOB[6]; - MonitorElement* meResMFRphiTOB[6]; - MonitorElement* mePullMFRphiTOB[6]; - MonitorElement* meTrackangleRphiTOB[6]; - MonitorElement* meTrackanglebetaRphiTOB[6]; - MonitorElement* mePullTrackangleProfileRphiTOB[6]; - MonitorElement* meTrackwidthRphiTOB[6]; - MonitorElement* meExpectedwidthRphiTOB[6]; - MonitorElement* meClusterwidthRphiTOB[6]; - MonitorElement* meCategoryRphiTOB[6]; - MonitorElement* mePullTrackwidthProfileRphiTOB[6]; - MonitorElement* mePullTrackwidthProfileCategory1RphiTOB[6]; - MonitorElement* mePullTrackwidthProfileCategory2RphiTOB[6]; - MonitorElement* mePullTrackwidthProfileCategory3RphiTOB[6]; - MonitorElement* mePullTrackwidthProfileCategory4RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileRphiTOB[6]; - - MonitorElement* meErrxMFTrackwidthProfileWclus1RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileWclus2RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileWclus3RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileWclus4RphiTOB[6]; - MonitorElement* meResMFTrackwidthProfileWclus1RphiTOB[6]; - MonitorElement* meResMFTrackwidthProfileWclus2RphiTOB[6]; - MonitorElement* meResMFTrackwidthProfileWclus3RphiTOB[6]; - MonitorElement* meResMFTrackwidthProfileWclus4RphiTOB[6]; - - MonitorElement* meErrxMFTrackwidthProfileCategory1RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileCategory2RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileCategory3RphiTOB[6]; - MonitorElement* meErrxMFTrackwidthProfileCategory4RphiTOB[6]; - MonitorElement* meErrxMFClusterwidthProfileCategory1RphiTOB[6]; - MonitorElement* meErrxMFAngleProfileRphiTOB[6]; - - MonitorElement* meNstpSasTOB[2]; - MonitorElement* meAdcSasTOB[2]; - MonitorElement* mePosxSasTOB[2]; - MonitorElement* meErrxLFSasTOB[2]; - MonitorElement* meResLFSasTOB[2]; - MonitorElement* mePullLFSasTOB[2]; - MonitorElement* meErrxMFSasTOB[2]; - MonitorElement* meResMFSasTOB[2]; - MonitorElement* mePullMFSasTOB[2]; - MonitorElement* meTrackangleSasTOB[2]; - MonitorElement* meTrackanglebetaSasTOB[2]; - MonitorElement* mePullTrackangleProfileSasTOB[2]; - MonitorElement* meTrackwidthSasTOB[2]; - MonitorElement* meExpectedwidthSasTOB[2]; - MonitorElement* meClusterwidthSasTOB[2]; - MonitorElement* meCategorySasTOB[2]; - MonitorElement* mePullTrackwidthProfileSasTOB[2]; - MonitorElement* mePullTrackwidthProfileCategory1SasTOB[2]; - MonitorElement* mePullTrackwidthProfileCategory2SasTOB[2]; - MonitorElement* mePullTrackwidthProfileCategory3SasTOB[2]; - MonitorElement* mePullTrackwidthProfileCategory4SasTOB[2]; - MonitorElement* meErrxMFTrackwidthProfileSasTOB[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory1SasTOB[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory2SasTOB[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory3SasTOB[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory4SasTOB[2]; - MonitorElement* meErrxMFClusterwidthProfileCategory1SasTOB[2]; - MonitorElement* meErrxMFAngleProfileSasTOB[2]; - - MonitorElement* mePosxMatchedTOB[2]; - MonitorElement* mePosyMatchedTOB[2]; - MonitorElement* meErrxMatchedTOB[2]; - MonitorElement* meErryMatchedTOB[2]; - MonitorElement* meResxMatchedTOB[2]; - MonitorElement* meResyMatchedTOB[2]; - MonitorElement* mePullxMatchedTOB[2]; - MonitorElement* mePullyMatchedTOB[2]; - //TID - MonitorElement* meNstpRphiTID[3]; - MonitorElement* meAdcRphiTID[3]; - MonitorElement* mePosxRphiTID[3]; - MonitorElement* meErrxLFRphiTID[3]; - MonitorElement* meResLFRphiTID[3]; - MonitorElement* mePullLFRphiTID[3]; - MonitorElement* meErrxMFRphiTID[3]; - MonitorElement* meResMFRphiTID[3]; - MonitorElement* mePullMFRphiTID[3]; - MonitorElement* meTrackangleRphiTID[3]; - MonitorElement* meTrackanglebetaRphiTID[3]; - MonitorElement* mePullTrackangleProfileRphiTID[3]; - MonitorElement* meTrackwidthRphiTID[3]; - MonitorElement* meExpectedwidthRphiTID[3]; - MonitorElement* meClusterwidthRphiTID[3]; - MonitorElement* meCategoryRphiTID[3]; - MonitorElement* mePullTrackwidthProfileRphiTID[3]; - MonitorElement* mePullTrackwidthProfileCategory1RphiTID[3]; - MonitorElement* mePullTrackwidthProfileCategory2RphiTID[3]; - MonitorElement* mePullTrackwidthProfileCategory3RphiTID[3]; - MonitorElement* mePullTrackwidthProfileCategory4RphiTID[3]; - MonitorElement* meErrxMFTrackwidthProfileRphiTID[3]; - MonitorElement* meErrxMFTrackwidthProfileCategory1RphiTID[3]; - MonitorElement* meErrxMFTrackwidthProfileCategory2RphiTID[3]; - MonitorElement* meErrxMFTrackwidthProfileCategory3RphiTID[3]; - MonitorElement* meErrxMFTrackwidthProfileCategory4RphiTID[3]; - MonitorElement* meErrxMFClusterwidthProfileCategory1RphiTID[3]; - MonitorElement* meErrxMFAngleProfileRphiTID[3]; - - MonitorElement* meNstpSasTID[2]; - MonitorElement* meAdcSasTID[2]; - MonitorElement* mePosxSasTID[2]; - MonitorElement* meErrxLFSasTID[2]; - MonitorElement* meResLFSasTID[2]; - MonitorElement* mePullLFSasTID[2]; - MonitorElement* meErrxMFSasTID[2]; - MonitorElement* meResMFSasTID[2]; - MonitorElement* mePullMFSasTID[2]; - MonitorElement* meTrackangleSasTID[2]; - MonitorElement* meTrackanglebetaSasTID[2]; - MonitorElement* mePullTrackangleProfileSasTID[2]; - MonitorElement* meTrackwidthSasTID[2]; - MonitorElement* meExpectedwidthSasTID[2]; - MonitorElement* meClusterwidthSasTID[2]; - MonitorElement* meCategorySasTID[2]; - MonitorElement* mePullTrackwidthProfileSasTID[2]; - MonitorElement* mePullTrackwidthProfileCategory1SasTID[2]; - MonitorElement* mePullTrackwidthProfileCategory2SasTID[2]; - MonitorElement* mePullTrackwidthProfileCategory3SasTID[2]; - MonitorElement* mePullTrackwidthProfileCategory4SasTID[2]; - MonitorElement* meErrxMFTrackwidthProfileSasTID[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory1SasTID[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory2SasTID[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory3SasTID[2]; - MonitorElement* meErrxMFTrackwidthProfileCategory4SasTID[2]; - MonitorElement* meErrxMFClusterwidthProfileCategory1SasTID[2]; - MonitorElement* meErrxMFAngleProfileSasTID[2]; - - MonitorElement* mePosxMatchedTID[2]; - MonitorElement* mePosyMatchedTID[2]; - MonitorElement* meErrxMatchedTID[2]; - MonitorElement* meErryMatchedTID[2]; - MonitorElement* meResxMatchedTID[2]; - MonitorElement* meResyMatchedTID[2]; - MonitorElement* mePullxMatchedTID[2]; - MonitorElement* mePullyMatchedTID[2]; - //TEC - MonitorElement* meNstpRphiTEC[7]; - MonitorElement* meAdcRphiTEC[7]; - MonitorElement* mePosxRphiTEC[7]; - MonitorElement* meErrxLFRphiTEC[7]; - MonitorElement* meResLFRphiTEC[7]; - MonitorElement* mePullLFRphiTEC[7]; - MonitorElement* meErrxMFRphiTEC[7]; - MonitorElement* meResMFRphiTEC[7]; - MonitorElement* mePullMFRphiTEC[7]; - MonitorElement* meTrackangleRphiTEC[7]; - MonitorElement* meTrackanglebetaRphiTEC[7]; - MonitorElement* mePullTrackangleProfileRphiTEC[7]; - MonitorElement* meTrackwidthRphiTEC[7]; - MonitorElement* meExpectedwidthRphiTEC[7]; - MonitorElement* meClusterwidthRphiTEC[7]; - MonitorElement* meCategoryRphiTEC[7]; - MonitorElement* mePullTrackwidthProfileRphiTEC[7]; - MonitorElement* mePullTrackwidthProfileCategory1RphiTEC[7]; - MonitorElement* mePullTrackwidthProfileCategory2RphiTEC[7]; - MonitorElement* mePullTrackwidthProfileCategory3RphiTEC[7]; - MonitorElement* mePullTrackwidthProfileCategory4RphiTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileSasTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory1SasTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory2SasTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory3SasTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory4SasTEC[7]; - MonitorElement* meErrxMFClusterwidthProfileCategory1SasTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileRphiTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory1RphiTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory2RphiTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory3RphiTEC[7]; - MonitorElement* meErrxMFTrackwidthProfileCategory4RphiTEC[7]; - MonitorElement* meErrxMFClusterwidthProfileCategory1RphiTEC[7]; - MonitorElement* meErrxMFAngleProfileRphiTEC[7]; - - MonitorElement* meNstpSasTEC[5]; - MonitorElement* meAdcSasTEC[5]; - MonitorElement* mePosxSasTEC[5]; - MonitorElement* meErrxLFSasTEC[5]; - MonitorElement* meResLFSasTEC[5]; - MonitorElement* mePullLFSasTEC[5]; - MonitorElement* meErrxMFSasTEC[5]; - MonitorElement* meResMFSasTEC[5]; - MonitorElement* mePullMFSasTEC[5]; - MonitorElement* meTrackangleSasTEC[5]; - MonitorElement* meTrackanglebetaSasTEC[5]; - MonitorElement* mePullTrackangleProfileSasTEC[5]; - MonitorElement* meTrackwidthSasTEC[5]; - MonitorElement* meExpectedwidthSasTEC[5]; - MonitorElement* meClusterwidthSasTEC[5]; - MonitorElement* meCategorySasTEC[5]; - MonitorElement* mePullTrackwidthProfileSasTEC[5]; - MonitorElement* mePullTrackwidthProfileCategory1SasTEC[5]; - MonitorElement* mePullTrackwidthProfileCategory2SasTEC[5]; - MonitorElement* mePullTrackwidthProfileCategory3SasTEC[5]; - MonitorElement* mePullTrackwidthProfileCategory4SasTEC[5]; - MonitorElement* meErrxMFAngleProfileSasTEC[5]; - - MonitorElement* mePosxMatchedTEC[5]; - MonitorElement* mePosyMatchedTEC[5]; - MonitorElement* meErrxMatchedTEC[5]; - MonitorElement* meErryMatchedTEC[5]; - MonitorElement* meResxMatchedTEC[5]; - MonitorElement* meResyMatchedTEC[5]; - MonitorElement* mePullxMatchedTEC[5]; - MonitorElement* mePullyMatchedTEC[5]; - - const StripTopology* topol; - - float rechitrphix; - float rechitrphierrx; - float rechitrphierrxLF; - float rechitrphierrxMF; - float rechitrphiy; - float rechitrphiz; - float rechitrphiphi; - float rechitrphires; - float rechitrphiresLF; - float rechitrphiresMF; - float rechitrphipull; - float rechitrphipullLF; - float rechitrphipullMF; - float rechitrphitrackangle; - float rechitrphitrackanglebeta; - float rechitrphitrackangle2; - float rechitrphitrackwidth; - int rechitrphiexpectedwidth; - int rechitrphicategory; - int clusizrphi; - float cluchgrphi; - float rechitsasx; - float rechitsaserrx; - float rechitsaserrxLF; - float rechitsaserrxMF; - float rechitsasy; - float rechitsasz; - float rechitsasphi; - float rechitsasres; - float rechitsasresLF; - float rechitsasresMF; - float rechitsaspull; - float rechitsaspullLF; - float rechitsaspullMF; - float rechitsastrackangle; - float rechitsastrackanglebeta; - float rechitsastrackwidth; - int rechitsasexpectedwidth; - int rechitsascategory; - float rechitrphithickness; - float rechitsasthickness; - - int clusizsas; - float cluchgsas; - float rechitmatchedx; - float rechitmatchedy; - float rechitmatchedz; - float rechitmatchederrxx; - float rechitmatchederrxy; - float rechitmatchederryy; - float rechitmatchedphi; - float rechitmatchedresx; - float rechitmatchedresy; - float rechitmatchedpullx; - float rechitmatchedpully; - float rechitmatchedtrackangle; - - protected: - const MagneticField * magfield2_ ; + float track_rapidity; + //edm::InputTag trajectoryInput_; + edm::EDGetTokenT > trajectoryInputToken_; }; diff --git a/Validation/RecoTrack/plugins/BuildFile.xml b/Validation/RecoTrack/plugins/BuildFile.xml index 48d0d7273398e..c19e17ccd85ab 100644 --- a/Validation/RecoTrack/plugins/BuildFile.xml +++ b/Validation/RecoTrack/plugins/BuildFile.xml @@ -24,6 +24,9 @@ + + + diff --git a/Validation/RecoTrack/plugins/SiStripTrackingRecHitsValid.cc b/Validation/RecoTrack/plugins/SiStripTrackingRecHitsValid.cc deleted file mode 100644 index d4dae9ab37081..0000000000000 --- a/Validation/RecoTrack/plugins/SiStripTrackingRecHitsValid.cc +++ /dev/null @@ -1,3026 +0,0 @@ -// File: SiStripTrackingRecHitsValid.cc -// // Author: Arnaud Gay. -// Creation Date: July 2006. -// -//-------------------------------------------- - -#include -#include -#include -#include -#include "Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h" - -#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "DataFormats/GeometryVector/interface/GlobalVector.h" - -#include "DataFormats/GeometryVector/interface/LocalVector.h" - -#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" -#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" -#include "TrackingTools/Records/interface/TransientRecHitRecord.h" -#include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h" - -#include "DataFormats/TrackReco/interface/Track.h" -#include "DataFormats/TrackReco/interface/TrackExtra.h" -#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h" -#include "DataFormats/DetId/interface/DetId.h" -#include "DataFormats/SiStripDetId/interface/StripSubdetector.h" -#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" -#include "Geometry/Records/interface/IdealGeometryRecord.h" - -#include "DataFormats/GeometryVector/interface/LocalPoint.h" -#include "DataFormats/GeometryVector/interface/GlobalPoint.h" - -#include "RecoLocalTracker/SiStripRecHitConverter/interface/StripCPE.h" - -// ROOT -#include "TROOT.h" -#include "TFile.h" -#include "TTree.h" -#include "TBranch.h" -#include "TH1.h" -#include "TH2.h" -class TFile; - -SiStripTrackingRecHitsValid::SiStripTrackingRecHitsValid(const edm::ParameterSet& ps):dbe_(0) -{ - - conf_ = ps; - - // slices - - //Read config file - //MTCCtrack_ = ps.getParameter("MTCCtrack"); - outputFile_ = ps.getUntrackedParameter("outputFile", "striptrackingrechitshisto.root"); - //src_ = ps.getUntrackedParameter( "src" ); - //builderName_ = ps.getParameter("TTRHBuilder"); - v_TrajectoryToken_ = consumes< std::vector >( edm::InputTag( ps.getParameter( "trajectoryInput" ) ) ); - - // Book histograms - dbe_ = edm::Service().operator->(); - // dbe_->showDirStructure(); - - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/ALL"); - - Char_t histo[200]; - - sprintf(histo,"Errx_LF"); - meErrxLF = dbe_->book1D(histo,"RecHit err(x) Local Frame coord.",100,0,0.005); - // const float Entries1 = meErrxLF->getEntries(); - - sprintf(histo,"Errx_MF"); - meErrxMF = dbe_->book1D(histo,"RecHit err(x) Meas. Frame coord.",100,0,0.5); - - sprintf(histo,"Res_LF"); - meResLF = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - - sprintf(histo,"Res_MF"); - meResMF = dbe_->book1D(histo,"RecHit Residual",100,-2,+2); - - sprintf(histo,"Pull_LF"); - mePullLF = dbe_->book1D(histo,"Pull",100,-5.,5.); - - sprintf(histo,"Pull_MF"); - mePullMF = dbe_->book1D(histo,"Pull",100,-5.,5.); - - sprintf(histo,"Category"); - meCategory = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"Trackwidth"); - meTrackwidth = dbe_->book1D(histo,"Track width",100,0.,4.); - - sprintf(histo,"Expectedwidth"); - meExpectedwidth = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth"); - meClusterwidth = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Trackanglealpha"); - meTrackanglealpha = dbe_->book1D(histo,"Track angle alpha",100,-100.,100.); - - sprintf(histo,"Trackanglebeta"); - meTrackanglebeta = dbe_->book1D(histo,"Track angle beta",100,-100.,100.); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus1"); - meErrxMFTrackwidthProfileWClus1 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus2"); - meErrxMFTrackwidthProfileWClus2 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,""); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus3"); - meErrxMFTrackwidthProfileWClus3 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus4"); - meErrxMFTrackwidthProfileWClus4 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus1"); - meResMFTrackwidthProfileWClus1 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus2"); - meResMFTrackwidthProfileWClus2 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,""); - sprintf(histo,"ResMFTrackwidthProfile_WClus21"); - meResMFTrackwidthProfileWClus21 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -2.,2.,""); - sprintf(histo,"ResMFTrackwidthProfile_WClus22"); - meResMFTrackwidthProfileWClus22 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -5.,5.,""); - sprintf(histo,"ResMFTrackwidthProfile_WClus23"); - meResMFTrackwidthProfileWClus23 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -0.5,0.5,""); - //sprintf(histo,"ResMFTrackwidthProfile_WClus2"); - //meResMFTrackwidthProfileWClus22 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4., 0.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus3"); - meResMFTrackwidthProfileWClus3 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus4"); - meResMFTrackwidthProfileWClus4 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile"); - meErrxMFTrackwidthProfile = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1"); - meErrxMFTrackwidthProfileCategory1 = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12, 0., 4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2"); - meErrxMFTrackwidthProfileCategory2 = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category3"); - meErrxMFTrackwidthProfileCategory3 = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category4"); - meErrxMFTrackwidthProfileCategory4 = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1"); - meErrxMFClusterwidthProfileCategory1= dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile"); - meErrxMFAngleProfile = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 60.,100, 0.,2.,"s"); - - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TIB"); - //one histo per Layer rphi hits - for(int i = 0 ;i<4 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtib",i+1); - meNstpRphiTIB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_rphi_layer%dtib",i+1); - meAdcRphiTIB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtib",i+1); - mePosxRphiTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - - sprintf(histo,"Errx_LF_rphi_layer%dtib",i+1); - meErrxLFRphiTIB[i] = dbe_->book1D(histo,"RecHit err(x) Local Frame coord.",100,0,0.005); - sprintf(histo,"Errx_MF_rphi_layer%dtib",i+1); - meErrxMFRphiTIB[i] = dbe_->book1D(histo,"RecHit err(x) Meas. Frame coord.",100,0,0.5); - - sprintf(histo,"Res_LF_rphi_layer%dtib",i+1); - meResLFRphiTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Res_MF_rphi_layer%dtib",i+1); - meResMFRphiTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,+2); - - sprintf(histo,"Pull_LF_rphi_layer%dtib",i+1); - mePullLFRphiTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtib",i+1); - mePullMFRphiTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - - sprintf(histo,"Trackangle_rphi_layer%dtib",i+1); - meTrackangleRphiTIB[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.); - - sprintf(histo,"Trackanglebeta_rphi_layer%dtib",i+1); - meTrackanglebetaRphiTIB[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.); - - sprintf(histo,"Trackangle2_rphi_layer%dtib",i+1); - meTrackangle2RphiTIB[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.); - - sprintf(histo,"PullTrackangleProfile_rphi_layer%dtib",i+1); - mePullTrackangleProfileRphiTIB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100, -2.,2.,"s"); - - sprintf(histo,"Trackwidth_rphi_layer%dtib",i+1); - meTrackwidthRphiTIB[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_rphi_layer%dtib",i+1); - meExpectedwidthRphiTIB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_rphi_layer%dtib",i+1); - meClusterwidthRphiTIB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_rphi_layer%dtib",i+1); - meCategoryRphiTIB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtib",i+1); - mePullTrackwidthProfileRphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtib",i+1); - mePullTrackwidthProfileCategory1RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtib",i+1); - mePullTrackwidthProfileCategory2RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtib",i+1); - mePullTrackwidthProfileCategory3RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtib",i+1); - mePullTrackwidthProfileCategory4RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileRphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -2.,2.,"s"); - - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus1_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileWclus1RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus2_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileWclus2RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus3_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileWclus3RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus4_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileWclus4RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus1_rphi_layer%dtib",i+1); - meResMFTrackwidthProfileWclus1RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - sprintf(histo,"ResMFTrackwidthProfile_WClus2_rphi_layer%dtib",i+1); - meResMFTrackwidthProfileWclus2RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus3_rphi_layer%dtib",i+1); - meResMFTrackwidthProfileWclus3RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus4_rphi_layer%dtib",i+1); - meResMFTrackwidthProfileWclus4RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory1RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory2RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory3RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory4RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtib",i+1); - meErrxMFAngleProfileRphiTIB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtib",i+1); - meErrxMFClusterwidthProfileCategory1RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - } - - //one histo per Layer stereo and matched hits - for(int i = 0 ;i<2 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtib",i+1); - meNstpSasTIB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_sas_layer%dtib",i+1); - meAdcSasTIB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtib",i+1); - mePosxSasTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - - sprintf(histo,"Errx_LF_sas_layer%dtib",i+1); - meErrxLFSasTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.005); - sprintf(histo,"Errx_MF_sas_layer%dtib",i+1); - meErrxMFSasTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - - sprintf(histo,"Res_LF_sas_layer%dtib",i+1); - meResLFSasTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Res_MF_sas_layer%dtib",i+1); - meResMFSasTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,+2); - - sprintf(histo,"Pull_LF_sas_layer%dtib",i+1); - mePullLFSasTIB[i] = dbe_->book1D(histo,"Pull",100,-4.,4.); - sprintf(histo,"Pull_MF_sas_layer%dtib",i+1); - mePullMFSasTIB[i] = dbe_->book1D(histo,"Pull",100,-4.,4.); - - sprintf(histo,"Trackangle_sas_layer%dtib",i+1); - meTrackangleSasTIB[i] = dbe_->book1D(histo,"Track angle",100,-40.,40.); - - sprintf(histo,"Trackanglebeta_sas_layer%dtib",i+1); - meTrackanglebetaSasTIB[i] = dbe_->book1D(histo,"Track angle beta",100,-40.,40.); - - sprintf(histo,"PullTrackangleProfile_sas_layer%dtib",i+1); - mePullTrackangleProfileSasTIB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -40., 40.,100,-4.,4.,"s"); - - sprintf(histo,"Trackwidth_sas_layer%dtib",i+1); - meTrackwidthSasTIB[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_sas_layer%dtib",i+1); - meExpectedwidthSasTIB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_sas_layer%dtib",i+1); - meClusterwidthSasTIB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_sas_layer%dtib",i+1); - meCategorySasTIB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_sas_layer%dtib",i+1); - mePullTrackwidthProfileSasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtib",i+1); - mePullTrackwidthProfileCategory1SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtib",i+1); - mePullTrackwidthProfileCategory2SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtib",i+1); - mePullTrackwidthProfileCategory3SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtib",i+1); - mePullTrackwidthProfileCategory4SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtib",i+1); - meErrxMFTrackwidthProfileSasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory1SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory2SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory3SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtib",i+1); - meErrxMFTrackwidthProfileCategory4SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtib",i+1); - meErrxMFAngleProfileSasTIB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtib",i+1); - meErrxMFClusterwidthProfileCategory1SasTIB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - - - sprintf(histo,"Posx_matched_layer%dtib",i+1); - mePosxMatchedTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtib",i+1); - mePosyMatchedTIB[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0); - sprintf(histo,"Errx_matched_layer%dtib",i+1); - meErrxMatchedTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.05); - sprintf(histo,"Erry_matched_layer%dtib",i+1); - meErryMatchedTIB[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.05); - sprintf(histo,"Resx_matched_layer%dtib",i+1); - meResxMatchedTIB[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.02, +0.02); - sprintf(histo,"Resy_matched_layer%dtib",i+1); - meResyMatchedTIB[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Pullx_matched_layer%dtib",i+1); - mePullxMatchedTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pully_matched_layer%dtib",i+1); - mePullyMatchedTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - } - - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TOB"); - //one histo per Layer rphi hits - for(int i = 0 ;i<6 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtob",i+1); - meNstpRphiTOB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_rphi_layer%dtob",i+1); - meAdcRphiTOB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtob",i+1); - mePosxRphiTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - - sprintf(histo,"Errx_LF_rphi_layer%dtob",i+1); - meErrxLFRphiTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.01); - sprintf(histo,"Errx_MF_rphi_layer%dtob",i+1); - meErrxMFRphiTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - - sprintf(histo,"Res_LF_rphi_layer%dtob",i+1); - meResLFRphiTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Res_MF_rphi_layer%dtob",i+1); - meResMFRphiTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2); - - sprintf(histo,"Pull_LF_rphi_layer%dtob",i+1); - mePullLFRphiTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtob",i+1); - mePullMFRphiTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - - sprintf(histo,"Trackangle_rphi_layer%dtob",i+1); - meTrackangleRphiTOB[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.); - - sprintf(histo,"Trackanglebeta_rphi_layer%dtob",i+1); - meTrackanglebetaRphiTOB[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.); - - sprintf(histo,"PullTrackangleProfile_rphi_layer%dtob",i+1); - mePullTrackangleProfileRphiTOB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100,-5.,5.,"s"); - - sprintf(histo,"Trackwidth_rphi_layer%dtob",i+1); - meTrackwidthRphiTOB[i] = dbe_->book1D(histo,"Track width",100,0.,4.); - - sprintf(histo,"Expectedwidth_rphi_layer%dtob",i+1); - meExpectedwidthRphiTOB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_rphi_layer%dtob",i+1); - meClusterwidthRphiTOB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_rphi_layer%dtob",i+1); - meCategoryRphiTOB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtob",i+1); - mePullTrackwidthProfileRphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtob",i+1); - mePullTrackwidthProfileCategory1RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtob",i+1); - mePullTrackwidthProfileCategory2RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtob",i+1); - mePullTrackwidthProfileCategory3RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtob",i+1); - mePullTrackwidthProfileCategory4RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileRphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus1_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileWclus1RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus2_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileWclus2RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus3_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileWclus3RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_WClus4_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileWclus4RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus1_rphi_layer%dtob",i+1); - meResMFTrackwidthProfileWclus1RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - sprintf(histo,"ResMFTrackwidthProfile_WClus2_rphi_layer%dtob",i+1); - meResMFTrackwidthProfileWclus2RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus3_rphi_layer%dtob",i+1); - meResMFTrackwidthProfileWclus3RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - sprintf(histo,"ResMFTrackwidthProfile_WClus4_rphi_layer%dtob",i+1); - meResMFTrackwidthProfileWclus4RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s"); - - - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory1RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory2RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory3RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory4RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtob",i+1); - meErrxMFAngleProfileRphiTOB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtob",i+1); - meErrxMFClusterwidthProfileCategory1RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - } - - //one histo per Layer stereo and matched hits - for(int i = 0 ;i<2 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtob",i+1); - meNstpSasTOB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_sas_layer%dtob",i+1); - meAdcSasTOB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtob",i+1); - mePosxSasTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - - sprintf(histo,"Errx_LF_sas_layer%dtob",i+1); - meErrxLFSasTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.01); - sprintf(histo,"Errx_MF_sas_layer%dtob",i+1); - meErrxMFSasTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - - sprintf(histo,"Res_LF_sas_layer%dtob",i+1); - meResLFSasTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Res_MF_sas_layer%dtob",i+1); - meResMFSasTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2); - - sprintf(histo,"Pull_LF_sas_layer%dtob",i+1); - mePullLFSasTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_sas_layer%dtob",i+1); - mePullMFSasTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - - sprintf(histo,"Trackangle_sas_layer%dtob",i+1); - meTrackangleSasTOB[i] = dbe_->book1D(histo,"Track angle",100,-25.,25.); - - sprintf(histo,"Trackanglebeta_sas_layer%dtob",i+1); - meTrackanglebetaSasTOB[i] = dbe_->book1D(histo,"Track angle beta",100,-25.,25.); - - sprintf(histo,"PullTrackangleProfile_sas_layer%dtob",i+1); - mePullTrackangleProfileSasTOB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -25., 25. ,100 , -5., 5.,"s"); - - sprintf(histo,"Trackwidth_sas_layer%dtob",i+1); - meTrackwidthSasTOB[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_sas_layer%dtob",i+1); - meExpectedwidthSasTOB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_sas_layer%dtob",i+1); - meClusterwidthSasTOB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_sas_layer%dtob",i+1); - meCategorySasTOB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_sas_layer%dtob",i+1); - mePullTrackwidthProfileSasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtob",i+1); - mePullTrackwidthProfileCategory1SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtob",i+1); - mePullTrackwidthProfileCategory2SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtob",i+1); - mePullTrackwidthProfileCategory3SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtob",i+1); - mePullTrackwidthProfileCategory4SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtob",i+1); - meErrxMFTrackwidthProfileSasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory1SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory2SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory3SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtob",i+1); - meErrxMFTrackwidthProfileCategory4SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtob",i+1); - meErrxMFAngleProfileSasTOB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtob",i+1); - meErrxMFClusterwidthProfileCategory1SasTOB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - sprintf(histo,"Posx_matched_layer%dtob",i+1); - mePosxMatchedTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtob",i+1); - mePosyMatchedTOB[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0); - sprintf(histo,"Errx_matched_layer%dtob",i+1); - meErrxMatchedTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.05); - sprintf(histo,"Erry_matched_layer%dtob",i+1); - meErryMatchedTOB[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.05); - sprintf(histo,"Resx_matched_layer%dtob",i+1); - meResxMatchedTOB[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.02, +0.02); - sprintf(histo,"Resy_matched_layer%dtob",i+1); - meResyMatchedTOB[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Pullx_matched_layer%dtob",i+1); - mePullxMatchedTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pully_matched_layer%dtob",i+1); - mePullyMatchedTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - } - - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TID"); - //one histo per Ring rphi hits: 3 rings, 6 disks, 2 inner rings are glued - for(int i = 0 ;i<3 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtid",i+1); - meNstpRphiTID[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_rphi_layer%dtid",i+1); - meAdcRphiTID[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtid",i+1); - mePosxRphiTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_LF_rphi_layer%dtid",i+1); - meErrxLFRphiTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - sprintf(histo,"Errx_MF_rphi_layer%dtid",i+1); - meErrxMFRphiTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - sprintf(histo,"Res_LF_rphi_layer%dtid",i+1); - meResLFRphiTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Res_MF_rphi_layer%dtid",i+1); - meResMFRphiTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2); - sprintf(histo,"Pull_LF_rphi_layer%dtid",i+1); - mePullLFRphiTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtid",i+1); - mePullMFRphiTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Trackangle_rphi_layer%dtid",i+1); - meTrackangleRphiTID[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.); - - sprintf(histo,"Trackanglebeta_rphi_layer%dtid",i+1); - meTrackanglebetaRphiTID[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.); - - sprintf(histo,"PullTrackangleProfile_rphi_layer%dtid",i+1); - mePullTrackangleProfileRphiTID[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100, -5., 5.,"s"); - - sprintf(histo,"Trackwidth_rphi_layer%dtid",i+1); - meTrackwidthRphiTID[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_rphi_layer%dtid",i+1); - meExpectedwidthRphiTID[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_rphi_layer%dtid",i+1); - meClusterwidthRphiTID[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_rphi_layer%dtid",i+1); - meCategoryRphiTID[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtid",i+1); - mePullTrackwidthProfileRphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtid",i+1); - mePullTrackwidthProfileCategory1RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtid",i+1); - mePullTrackwidthProfileCategory2RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtid",i+1); - mePullTrackwidthProfileCategory3RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtid",i+1); - mePullTrackwidthProfileCategory4RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtid",i+1); - meErrxMFTrackwidthProfileRphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory1RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory2RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory3RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory4RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtid",i+1); - meErrxMFAngleProfileRphiTID[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtid",i+1); - meErrxMFClusterwidthProfileCategory1RphiTID[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - } - - //one histo per Ring stereo and matched hits - for(int i = 0 ;i<2 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtid",i+1); - meNstpSasTID[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_sas_layer%dtid",i+1); - meAdcSasTID[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtid",i+1); - mePosxSasTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_LF_sas_layer%dtid",i+1); - meErrxLFSasTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - sprintf(histo,"Errx_MF_sas_layer%dtid",i+1); - meErrxMFSasTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - sprintf(histo,"Res_LF_sas_layer%dtid",i+1); - meResLFSasTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Res_MF_sas_layer%dtid",i+1); - meResMFSasTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2); - sprintf(histo,"Pull_LF_sas_layer%dtid",i+1); - mePullLFSasTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_sas_layer%dtid",i+1); - mePullMFSasTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Trackangle_sas_layer%dtid",i+1); - meTrackangleSasTID[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.); - sprintf(histo,"Trackanglebeta_sas_layer%dtid",i+1); - meTrackanglebetaSasTID[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.); - - sprintf(histo,"PullTrackangleProfile_sas_layer%dtid",i+1); - mePullTrackangleProfileSasTID[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100, -5., 5.,"s"); - - sprintf(histo,"Trackwidth_sas_layer%dtid",i+1); - meTrackwidthSasTID[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_sas_layer%dtid",i+1); - meExpectedwidthSasTID[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_sas_layer%dtid",i+1); - meClusterwidthSasTID[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_sas_layer%dtid",i+1); - meCategorySasTID[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_sas_layer%dtid",i+1); - mePullTrackwidthProfileSasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtid",i+1); - mePullTrackwidthProfileCategory1SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtid",i+1); - mePullTrackwidthProfileCategory2SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtid",i+1); - mePullTrackwidthProfileCategory3SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtid",i+1); - mePullTrackwidthProfileCategory4SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtid",i+1); - meErrxMFTrackwidthProfileSasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory1SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory2SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory3SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtid",i+1); - meErrxMFTrackwidthProfileCategory4SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtid",i+1); - meErrxMFAngleProfileSasTID[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtid",i+1); - meErrxMFClusterwidthProfileCategory1SasTID[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - sprintf(histo,"Posx_matched_layer%dtid",i+1); - mePosxMatchedTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtid",i+1); - mePosyMatchedTID[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0); - sprintf(histo,"Errx_matched_layer%dtid",i+1); - meErrxMatchedTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.02); - sprintf(histo,"Erry_matched_layer%dtid",i+1); - meErryMatchedTID[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1); - sprintf(histo,"Resx_matched_layer%dtid",i+1); - meResxMatchedTID[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.2, +0.2); - sprintf(histo,"Resy_matched_layer%dtid",i+1); - meResyMatchedTID[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Pullx_matched_layer%dtid",i+1); - mePullxMatchedTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pully_matched_layer%dtid",i+1); - mePullyMatchedTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - } - - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TEC"); - //one histo per Ring rphi hits: 7 rings, 18 disks. Innermost 3 rings are same as TID above. - for(int i = 0 ;i<7 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtec",i+1); - meNstpRphiTEC[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_rphi_layer%dtec",i+1); - meAdcRphiTEC[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtec",i+1); - mePosxRphiTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - - sprintf(histo,"Errx_LF_rphi_layer%dtec",i+1); - meErrxLFRphiTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - sprintf(histo,"Errx_MF_rphi_layer%dtec",i+1); - meErrxMFRphiTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - - sprintf(histo,"Res_LF_rphi_layer%dtec",i+1); - meResLFRphiTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Res_MF_rphi_layer%dtec",i+1); - meResMFRphiTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2); - - sprintf(histo,"Pull_LF_rphi_layer%dtec",i+1); - mePullLFRphiTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtec",i+1); - mePullMFRphiTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - - sprintf(histo,"Trackangle_rphi_layer%dtec",i+1); - meTrackangleRphiTEC[i] = dbe_->book1D(histo,"Track angle",100,-10.,10.); - - sprintf(histo,"Trackanglebeta_rphi_layer%dtec",i+1); - meTrackanglebetaRphiTEC[i] = dbe_->book1D(histo,"Track angle beta",100,-10.,10.); - - sprintf(histo,"PullTrackangleProfile_rphi_layer%dtec",i+1); - mePullTrackangleProfileRphiTEC[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -10., 10.,100, -5., 5.,"s"); - - sprintf(histo,"Trackwidth_rphi_layer%dtec",i+1); - meTrackwidthRphiTEC[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_rphi_layer%dtec",i+1); - meExpectedwidthRphiTEC[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_rphi_layer%dtec",i+1); - meClusterwidthRphiTEC[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_rphi_layer%dtec",i+1); - meCategoryRphiTEC[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtec",i+1); - mePullTrackwidthProfileRphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtec",i+1); - mePullTrackwidthProfileCategory1RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtec",i+1); - mePullTrackwidthProfileCategory2RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtec",i+1); - mePullTrackwidthProfileCategory3RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtec",i+1); - mePullTrackwidthProfileCategory4RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtec",i+1); - meErrxMFTrackwidthProfileRphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory1RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory2RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory3RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory4RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtec",i+1); - meErrxMFAngleProfileRphiTEC[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtec",i+1); - meErrxMFClusterwidthProfileCategory1RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - } - - //one histo per Layer stereo and matched hits: rings 1,2,5 are double sided - for(int i = 0 ;i<5 ; i++) { - if(i == 0 || i == 1 || i == 4) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtec",i+1); - meNstpSasTEC[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5); - sprintf(histo,"Adc_sas_layer%dtec",i+1); - meAdcSasTEC[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtec",i+1); - mePosxSasTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_LF_sas_layer%dtec",i+1); - meErrxLFSasTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - sprintf(histo,"Errx_MF_sas_layer%dtec",i+1); - meErrxMFSasTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - sprintf(histo,"Res_LF_sas_layer%dtec",i+1); - meResLFSasTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Res_MF_sas_layer%dtec",i+1); - meResMFSasTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,+2); - sprintf(histo,"Pull_LF_sas_layer%dtec",i+1); - mePullLFSasTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_sas_layer%dtec",i+1); - mePullMFSasTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Trackangle_sas_layer%dtec",i+1); - meTrackangleSasTEC[i] = dbe_->book1D(histo,"Track angle",100,-10.,10.); - sprintf(histo,"Trackanglebeta_sas_layer%dtec",i+1); - meTrackanglebetaSasTEC[i] = dbe_->book1D(histo,"Track angle beta",100,-10.,10.); - - sprintf(histo,"PullTrackangleProfile_sas_layer%dtec",i+1); - mePullTrackangleProfileSasTEC[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -10., 10.,100, -5., 5.,"s"); - - sprintf(histo,"Trackwidth_sas_layer%dtec",i+1); - meTrackwidthSasTEC[i] = dbe_->book1D(histo,"Track width",100,0.,1.); - - sprintf(histo,"Expectedwidth_sas_layer%dtec",i+1); - meExpectedwidthSasTEC[i] = dbe_->book1D(histo,"Expected width",10,0.,10.); - - sprintf(histo,"Clusterwidth_sas_layer%dtec",i+1); - meClusterwidthSasTEC[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.); - - sprintf(histo,"Category_sas_layer%dtec",i+1); - meCategorySasTEC[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.); - - sprintf(histo,"PullTrackwidthProfile_sas_layer%dtec",i+1); - mePullTrackwidthProfileSasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtec",i+1); - mePullTrackwidthProfileCategory1SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtec",i+1); - mePullTrackwidthProfileCategory2SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtec",i+1); - mePullTrackwidthProfileCategory3SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtec",i+1); - mePullTrackwidthProfileCategory4SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtec",i+1); - meErrxMFTrackwidthProfileSasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory1SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory2SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory3SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s"); - sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtec",i+1); - meErrxMFTrackwidthProfileCategory4SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtec",i+1); - meErrxMFAngleProfileSasTEC[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s"); - - sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtec",i+1); - meErrxMFClusterwidthProfileCategory1SasTEC[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s"); - - sprintf(histo,"Posx_matched_layer%dtec",i+1); - mePosxMatchedTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtec",i+1); - mePosyMatchedTEC[i] = dbe_->book1D(histo,"RecHit y coord.",100,-8.0, +8.0); - sprintf(histo,"Errx_matched_layer%dtec",i+1); - meErrxMatchedTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.02); - sprintf(histo,"Erry_matched_layer%dtec",i+1); - meErryMatchedTEC[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1); - sprintf(histo,"Resx_matched_layer%dtec",i+1); - meResxMatchedTEC[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.2, +0.2); - sprintf(histo,"Resy_matched_layer%dtec",i+1); - meResyMatchedTEC[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Pullx_matched_layer%dtec",i+1); - mePullxMatchedTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pully_matched_layer%dtec",i+1); - mePullyMatchedTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - } - } - - -} - -void SiStripTrackingRecHitsValid::endJob() { - - /* - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/ALL"); - - PullvsTrackwidth->FitSlicesY(); - ErrxMFvsTrackwidth->FitSlicesY(); - PullvsExpectedwidth->FitSlicesY(); - PullvsClusterwidth->FitSlicesY(); - PullvsTrackangle->FitSlicesY(); - PullvsTrackanglebeta->FitSlicesY(); - - PullvsTrackwidthTIB->FitSlicesY(); - PullvsExpectedwidthTIB->FitSlicesY(); - PullvsClusterwidthTIB->FitSlicesY(); - PullvsTrackangleTIB->FitSlicesY(); - PullvsTrackanglebetaTIB->FitSlicesY(); - - PullvsTrackwidthTOB->FitSlicesY(); - PullvsExpectedwidthTOB->FitSlicesY(); - PullvsClusterwidthTOB->FitSlicesY(); - PullvsTrackangleTOB->FitSlicesY(); - PullvsTrackanglebetaTOB->FitSlicesY(); - - PullvsTrackwidthTID->FitSlicesY(); - PullvsExpectedwidthTID->FitSlicesY(); - PullvsClusterwidthTID->FitSlicesY(); - PullvsTrackangleTID->FitSlicesY(); - PullvsTrackanglebetaTID->FitSlicesY(); - - PullvsTrackwidthTEC->FitSlicesY(); - PullvsExpectedwidthTEC->FitSlicesY(); - PullvsClusterwidthTEC->FitSlicesY(); - PullvsTrackangleTEC->FitSlicesY(); - PullvsTrackanglebetaTEC->FitSlicesY(); - - //int aaa = Pullvstrackwidth_1->GetEntries();ErrxMFvsTrackwidth - - TH1D *PullvsTrackwidth_2 = (TH1D*)gDirectory->Get("PullvsTrackwidth_2"); - TH1D *PullvsExpectedwidth_2 = (TH1D*)gDirectory->Get("PullvsExpectedwidth_2"); - TH1D *PullvsClusterwidth_2 = (TH1D*)gDirectory->Get("PullvsClusterwidth_2"); - TH1D *PullvsTrackangle_2 = (TH1D*)gDirectory->Get("PullvsTrackangle_2"); - TH1D *PullvsTrackanglebeta_2 = (TH1D*)gDirectory->Get("PullvsTrackanglebeta_2"); - - TH1D *PullvsTrackwidthTIB_2 = (TH1D*)gDirectory->Get("PullvsTrackwidthTIB_2"); - TH1D *PullvsExpectedwidthTIB_2 = (TH1D*)gDirectory->Get("PullvsExpectedwidthTIB_2"); - TH1D *PullvsClusterwidthTIB_2 = (TH1D*)gDirectory->Get("PullvsClusterwidthTIB_2"); - TH1D *PullvsTrackangleTIB_2 = (TH1D*)gDirectory->Get("PullvsTrackangleTIB_2"); - TH1D *PullvsTrackanglebetaTIB_2 = (TH1D*)gDirectory->Get("PullvsTrackanglebetaTIB_2"); - - TH1D *PullvsTrackwidthTOB_2 = (TH1D*)gDirectory->Get("PullvsTrackwidthTOB_2"); - TH1D *PullvsExpectedwidthTOB_2 = (TH1D*)gDirectory->Get("PullvsExpectedwidthTOB_2"); - TH1D *PullvsClusterwidthTOB_2 = (TH1D*)gDirectory->Get("PullvsClusterwidthTOB_2"); - TH1D *PullvsTrackangleTOB_2 = (TH1D*)gDirectory->Get("PullvsTrackangleTOB_2"); - TH1D *PullvsTrackanglebetaTOB_2 = (TH1D*)gDirectory->Get("PullvsTrackanglebetaTOB_2"); - - TH1D *PullvsTrackwidthTID_2 = (TH1D*)gDirectory->Get("PullvsTrackwidthTID_2"); - TH1D *PullvsExpectedwidthTID_2 = (TH1D*)gDirectory->Get("PullvsExpectedwidthTID_2"); - TH1D *PullvsClusterwidthTID_2 = (TH1D*)gDirectory->Get("PullvsClusterwidthTID_2"); - TH1D *PullvsTrackangleTID_2 = (TH1D*)gDirectory->Get("PullvsTrackangleTID_2"); - TH1D *PullvsTrackanglebetaTID_2 = (TH1D*)gDirectory->Get("PullvsTrackanglebetaTID_2"); - - TH1D *PullvsTrackwidthTEC_2 = (TH1D*)gDirectory->Get("PullvsTrackwidthTEC_2"); - TH1D *PullvsExpectedwidthTEC_2 = (TH1D*)gDirectory->Get("PullvsExpectedwidthTEC_2"); - TH1D *PullvsClusterwidthTEC_2 = (TH1D*)gDirectory->Get("PullvsClusterwidthTEC_2"); - TH1D *PullvsTrackangleTEC_2 = (TH1D*)gDirectory->Get("PullvsTrackangleTEC_2"); - TH1D *PullvsTrackanglebetaTEC_2 = (TH1D*)gDirectory->Get("PullvsTrackanglebetaTEC_2"); - - //cout<<"h2_1->GetEntries() = "<GetEntries()<GetNbinsX(); - unsigned int NBINSPullvsClusterwidth = PullvsClusterwidth_2->GetNbinsX(); - unsigned int NBINSPullvsExpectedwidth = PullvsExpectedwidth_2->GetNbinsX(); - //cout<<"ddbb2"<GetNbinsX(); - unsigned int NBINSPullvsTrackanglebeta = PullvsTrackanglebeta_2->GetNbinsX(); - //cout<<"ddbb3"<book1D("PullRMSvsTrackwidth", "PullRMSvsTrackwidth",NBINSPullvsTrackwidth ,0.,4.); - PullRMSvsClusterwidth = dbe_->book1D("PullRMSvsClusterwidth", "PullRMSvsClusterwidth",NBINSPullvsClusterwidth ,0.5,8.5); - PullRMSvsExpectedwidth = dbe_->book1D("PullRMSvsExpectedwidth", "PullRMSvsExpectedwidth",NBINSPullvsExpectedwidth ,0.5,4.5); - PullRMSvsTrackangle = dbe_->book1D("PullRMSvsTrackangle", "PullRMSvsTrackangle",NBINSPullvsTrackangle ,0.,90.); - PullRMSvsTrackanglebeta = dbe_->book1D("PullRMSvsTrackanglebeta", "PullRMSvsTrackanglebeta",NBINSPullvsTrackanglebeta ,0.,90.); - - PullRMSvsTrackwidthTIB = dbe_->book1D("PullRMSvsTrackwidthTIB", "PullRMSvsTrackwidthTIB",NBINSPullvsTrackwidth ,0.,4.); - PullRMSvsClusterwidthTIB = dbe_->book1D("PullRMSvsClusterwidthTIB", "PullRMSvsClusterwidthTIB",NBINSPullvsClusterwidth ,0.5,8.5); - PullRMSvsExpectedwidthTIB = dbe_->book1D("PullRMSvsExpectedwidthTIB", "PullRMSvsExpectedwidthTIB",NBINSPullvsExpectedwidth ,0.5,4.5); - PullRMSvsTrackangleTIB = dbe_->book1D("PullRMSvsTrackangleTIB", "PullRMSvsTrackangleTIB",NBINSPullvsTrackangle ,0.,90.); - PullRMSvsTrackanglebetaTIB = dbe_->book1D("PullRMSvsTrackanglebetaTIB", "PullRMSvsTrackanglebetaTIB",NBINSPullvsTrackanglebeta ,0.,90.); - - PullRMSvsTrackwidthTOB = dbe_->book1D("PullRMSvsTrackwidthTOB", "PullRMSvsTrackwidthTOB",NBINSPullvsTrackwidth ,0.,4.); - PullRMSvsClusterwidthTOB = dbe_->book1D("PullRMSvsClusterwidthTOB", "PullRMSvsClusterwidthTOB",NBINSPullvsClusterwidth ,0.5,8.5); - PullRMSvsExpectedwidthTOB = dbe_->book1D("PullRMSvsExpectedwidthTOB", "PullRMSvsExpectedwidthTOB",NBINSPullvsExpectedwidth ,0.5,4.5); - PullRMSvsTrackangleTOB = dbe_->book1D("PullRMSvsTrackangleTOB", "PullRMSvsTrackangleTOB",NBINSPullvsTrackangle ,0.,90.); - PullRMSvsTrackanglebetaTOB = dbe_->book1D("PullRMSvsTrackanglebetaTOB", "PullRMSvsTrackanglebetaTOB",NBINSPullvsTrackanglebeta ,0.,90.); - - PullRMSvsTrackwidthTID = dbe_->book1D("PullRMSvsTrackwidthTID", "PullRMSvsTrackwidthTID",NBINSPullvsTrackwidth ,0.,4.); - PullRMSvsClusterwidthTID = dbe_->book1D("PullRMSvsClusterwidthTID", "PullRMSvsClusterwidthTID",NBINSPullvsClusterwidth ,0.5,8.5); - PullRMSvsExpectedwidthTID = dbe_->book1D("PullRMSvsExpectedwidthTID", "PullRMSvsExpectedwidthTID",NBINSPullvsExpectedwidth ,0.5,4.5); - PullRMSvsTrackangleTID = dbe_->book1D("PullRMSvsTrackangleTID", "PullRMSvsTrackangleTID",NBINSPullvsTrackangle ,0.,90.); - PullRMSvsTrackanglebetaTID = dbe_->book1D("PullRMSvsTrackanglebetaTID", "PullRMSvsTrackanglebetaTID",NBINSPullvsTrackanglebeta ,0.,90.); - - PullRMSvsTrackwidthTEC = dbe_->book1D("PullRMSvsTrackwidthTEC", "PullRMSvsTrackwidthTEC",NBINSPullvsTrackwidth ,0.,4.); - PullRMSvsClusterwidthTEC = dbe_->book1D("PullRMSvsClusterwidthTEC", "PullRMSvsClusterwidthTEC",NBINSPullvsClusterwidth ,0.5,8.5); - PullRMSvsExpectedwidthTEC = dbe_->book1D("PullRMSvsExpectedwidthTEC", "PullRMSvsExpectedwidthTEC",NBINSPullvsExpectedwidth ,0.5,4.5); - PullRMSvsTrackangleTEC = dbe_->book1D("PullRMSvsTrackangleTEC", "PullRMSvsTrackangleTEC",NBINSPullvsTrackangle ,0.,90.); - PullRMSvsTrackanglebetaTEC = dbe_->book1D("PullRMSvsTrackanglebetaTEC", "PullRMSvsTrackanglebetaTEC",NBINSPullvsTrackanglebeta ,0.,90.); - - //cout<<"ddbb5"<setBinContent(i,PullvsTrackwidth_2 ->GetBinContent(i)); - PullRMSvsTrackwidth->setBinError(i,PullvsTrackwidth_2 ->GetBinError(i)); - PullRMSvsTrackwidthTIB->setBinContent(i,PullvsTrackwidthTIB_2 ->GetBinContent(i)); - PullRMSvsTrackwidthTIB->setBinError(i,PullvsTrackwidthTIB_2 ->GetBinError(i)); - PullRMSvsTrackwidthTOB->setBinContent(i,PullvsTrackwidthTOB_2 ->GetBinContent(i)); - PullRMSvsTrackwidthTOB->setBinError(i,PullvsTrackwidthTOB_2 ->GetBinError(i)); - PullRMSvsTrackwidthTID->setBinContent(i,PullvsTrackwidthTID_2 ->GetBinContent(i)); - PullRMSvsTrackwidthTID->setBinError(i,PullvsTrackwidthTID_2 ->GetBinError(i)); - PullRMSvsTrackwidthTEC->setBinContent(i,PullvsTrackwidthTEC_2 ->GetBinContent(i)); - PullRMSvsTrackwidthTEC->setBinError(i,PullvsTrackwidthTEC_2 ->GetBinError(i)); - } - //cout<<"ddbb6"<setBinContent(i,PullvsClusterwidth_2 ->GetBinContent(i)); - PullRMSvsClusterwidth->setBinError(i,PullvsClusterwidth_2 ->GetBinError(i)); - PullRMSvsClusterwidthTIB->setBinContent(i,PullvsClusterwidthTIB_2 ->GetBinContent(i)); - PullRMSvsClusterwidthTIB->setBinError(i,PullvsClusterwidthTIB_2 ->GetBinError(i)); - PullRMSvsClusterwidthTOB->setBinContent(i,PullvsClusterwidthTOB_2 ->GetBinContent(i)); - PullRMSvsClusterwidthTOB->setBinError(i,PullvsClusterwidthTOB_2 ->GetBinError(i)); - PullRMSvsClusterwidthTID->setBinContent(i,PullvsClusterwidthTID_2 ->GetBinContent(i)); - PullRMSvsClusterwidthTID->setBinError(i,PullvsClusterwidthTID_2 ->GetBinError(i)); - PullRMSvsClusterwidthTEC->setBinContent(i,PullvsClusterwidthTEC_2 ->GetBinContent(i)); - PullRMSvsClusterwidthTEC->setBinError(i,PullvsClusterwidthTEC_2 ->GetBinError(i)); - } - //cout<<"ddbb7"<setBinContent(i,PullvsExpectedwidth_2 ->GetBinContent(i)); - PullRMSvsExpectedwidth->setBinError(i,PullvsExpectedwidth_2 ->GetBinError(i)); - PullRMSvsExpectedwidthTIB->setBinContent(i,PullvsExpectedwidthTIB_2 ->GetBinContent(i)); - PullRMSvsExpectedwidthTIB->setBinError(i,PullvsExpectedwidthTIB_2 ->GetBinError(i)); - PullRMSvsExpectedwidthTOB->setBinContent(i,PullvsExpectedwidthTOB_2 ->GetBinContent(i)); - PullRMSvsExpectedwidthTOB->setBinError(i,PullvsExpectedwidthTOB_2 ->GetBinError(i)); - PullRMSvsExpectedwidthTID->setBinContent(i,PullvsExpectedwidthTID_2 ->GetBinContent(i)); - PullRMSvsExpectedwidthTID->setBinError(i,PullvsExpectedwidthTID_2 ->GetBinError(i)); - PullRMSvsExpectedwidthTEC->setBinContent(i,PullvsExpectedwidthTEC_2 ->GetBinContent(i)); - PullRMSvsExpectedwidthTEC->setBinError(i,PullvsExpectedwidthTEC_2 ->GetBinError(i)); - } - //cout<<"ddbb8"<setBinContent(i,PullvsTrackangle_2 ->GetBinContent(i)); - PullRMSvsTrackangle->setBinError(i,PullvsTrackangle_2 ->GetBinError(i)); - PullRMSvsTrackangleTIB->setBinContent(i,PullvsTrackangleTIB_2 ->GetBinContent(i)); - PullRMSvsTrackangleTIB->setBinError(i,PullvsTrackangleTIB_2 ->GetBinError(i)); - PullRMSvsTrackangleTOB->setBinContent(i,PullvsTrackangleTOB_2 ->GetBinContent(i)); - PullRMSvsTrackangleTOB->setBinError(i,PullvsTrackangleTOB_2 ->GetBinError(i)); - PullRMSvsTrackangleTID->setBinContent(i,PullvsTrackangleTID_2 ->GetBinContent(i)); - PullRMSvsTrackangleTID->setBinError(i,PullvsTrackangleTID_2 ->GetBinError(i)); - PullRMSvsTrackangleTEC->setBinContent(i,PullvsTrackangleTEC_2 ->GetBinContent(i)); - PullRMSvsTrackangleTEC->setBinError(i,PullvsTrackangleTEC_2 ->GetBinError(i)); - } - //cout<<"ddbb9"<setBinContent(i,PullvsTrackanglebeta_2 ->GetBinContent(i)); - PullRMSvsTrackanglebeta->setBinError(i,PullvsTrackanglebeta_2 ->GetBinError(i)); - PullRMSvsTrackanglebetaTIB->setBinContent(i,PullvsTrackanglebetaTIB_2 ->GetBinContent(i)); - PullRMSvsTrackanglebetaTIB->setBinError(i,PullvsTrackanglebetaTIB_2 ->GetBinError(i)); - PullRMSvsTrackanglebetaTOB->setBinContent(i,PullvsTrackanglebetaTOB_2 ->GetBinContent(i)); - PullRMSvsTrackanglebetaTOB->setBinError(i,PullvsTrackanglebetaTOB_2 ->GetBinError(i)); - PullRMSvsTrackanglebetaTID->setBinContent(i,PullvsTrackanglebetaTID_2 ->GetBinContent(i)); - PullRMSvsTrackanglebetaTID->setBinError(i,PullvsTrackanglebetaTID_2 ->GetBinError(i)); - PullRMSvsTrackanglebetaTEC->setBinContent(i,PullvsTrackanglebetaTEC_2 ->GetBinContent(i)); - PullRMSvsTrackanglebetaTEC->setBinError(i,PullvsTrackanglebetaTEC_2 ->GetBinError(i)); - } -*/ - - - - /* - dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/ALL"); - unsigned int NBINS = meErrxMFTrackwidthProfile->getNbinsX(); - float Entries = meErrxMFTrackwidthProfile->getEntries(); - cout<<"Entries = "<getBinError(i)<setBinContent(i,meErrxMFTrackwidthProfile ->getBinError(i)); - } - */ - - /* - myFile->cd(); - - PositionSHx->Write(); - Diff->Write(); - SecondStrip->Write(); - ErrxMF->Write(); - ErrxMFvsTrackwidth->Write(); - ResMFvsTrackwidth->Write(); - ResMFvsTrackwidthWClus1->Write(); - ResMFvsTrackwidthWClus1Wexp1->Write(); - ResMFvsTrackwidthWClus1Wexp2->Write(); - ResMFvsTrackwidthWClus1Wexp3->Write(); - ResMFvsTrackwidthWClus1Wexp4->Write(); - ResMFvsTrackwidthWClus2->Write(); - ResMFvsTrackwidthWClus2Wexp1->Write(); - ResMFvsTrackwidthWClus2Wexp2->Write(); - ResMFvsTrackwidthWClus2Wexp3->Write(); - ResMFvsTrackwidthWClus2Wexp4->Write(); - ResMFvsTrackwidthWClus3->Write(); - ResMFvsTrackwidthWClus3Wexp1->Write(); - ResMFvsTrackwidthWClus3Wexp2->Write(); - ResMFvsTrackwidthWClus3Wexp3->Write(); - ResMFvsTrackwidthWClus3Wexp4->Write(); - ResMFvsTrackwidthWClus4->Write(); - ResMFvsTrackwidthWClus4Wexp1->Write(); - ResMFvsTrackwidthWClus4Wexp2->Write(); - ResMFvsTrackwidthWClus4Wexp3->Write(); - ResMFvsTrackwidthWClus4Wexp4->Write(); - ErrxMFvsTrackwidthWClus1->Write(); - ErrxMFvsTrackwidthWClus2->Write(); - ErrxMFvsTrackwidthWClus3->Write(); - ErrxMFvsTrackwidthWClus4->Write(); - - ResMFvsTrackwidthCategory2->Write(); - ResMFvsTrackwidthCategory3->Write(); - ResMFvsTrackwidthCategory4->Write(); - - ErrxMFvsTrackwidthCategory2->Write(); - ErrxMFvsTrackwidthCategory3->Write(); - ErrxMFvsTrackwidthCategory4->Write(); - - // ErrxMFvsTrackwidth_1->Write(); - //ErrxMFvsTrackwidth_2->Write(); - - PullvsTrackwidth->Write(); - //PullvsTrackwidth_1 ->Write(); - //PullvsTrackwidth_2 ->Write(); - PullvsExpectedwidth->Write(); - PullvsExpectedwidth_1 ->Write(); - PullvsExpectedwidth_2 ->Write(); - PullvsClusterwidth->Write(); - PullvsClusterwidth_1 ->Write(); - PullvsClusterwidth_2 ->Write(); - PullvsTrackangle->Write(); - PullvsTrackangle_1 ->Write(); - PullvsTrackangle_2 ->Write(); - PullvsTrackanglebeta->Write(); - PullvsTrackanglebeta_1 ->Write(); - PullvsTrackanglebeta_2 ->Write(); - myFile->Close(); - */ - - - if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); -} - -// Virtual destructor needed. -SiStripTrackingRecHitsValid::~SiStripTrackingRecHitsValid() { - -} - -// Functions that gets called by framework every event -void SiStripTrackingRecHitsValid::analyze(const edm::Event& e, const edm::EventSetup& es) -{ - //Retrieve tracker topology from geometry - edm::ESHandle tTopo; - es.get().get(tTopo); - - - - // EventID e.id() ; - - // float diff=0; - //float positionshx = 0; - //int secondstrip = 0; - - int isrechitrphi = 0; - int isrechitsas = 0; - int isrechitmatched = 0; - - float anglealpha=0; - float anglebeta=0; - float Wtrack; - int Wexp; - int clusterWidth; - DetId detid; - uint32_t myid; - - LocalPoint position; - LocalError error; - MeasurementPoint Mposition; - MeasurementError Merror; - - int clusiz=0; - int totcharge=0; - - - float mindist = 999999; - float dist; - std::vector matched; - - TrackerHitAssociator associate(e, conf_); - PSimHit closest; - - - - edm::ESHandle pDD; - es.get ().get (pDD); - const TrackerGeometry &tracker(*pDD); - - const TrackerGeometry * tracker2; - edm::ESHandle estracker; - es.get().get(estracker); - tracker2=&(* estracker); - - edm::ESHandle magfield; - //iRecord.getRecord().get(magfield ); - es.get().get(magfield ); - // magfield_ = magfield; - //const magfield_ - const MagneticField & magfield_ (*magfield); - magfield2_ = &magfield_; - - - edm::ESHandle stripcpe; - es.get().get("SimpleStripCPE",stripcpe); - - // - - - // Mangano's - - edm::Handle > trajCollectionHandle; - e.getByToken( v_TrajectoryToken_, trajCollectionHandle ); - - edm::LogVerbatim("TrajectoryAnalyzer") << "trajColl->size(): " << trajCollectionHandle->size() ; - - //cout<<"trajColl->size() = "<size()<::const_iterator it = trajCollectionHandle->begin(); it!=trajCollectionHandle->end();it++){ - - edm::LogVerbatim("TrajectoryAnalyzer") << "this traj has " << it->foundHits() << " valid hits" << " , " - << "isValid: " << it->isValid() ; - - std::vector tmColl = it->measurements(); - for(std::vector::const_iterator itTraj = tmColl.begin(); itTraj!=tmColl.end(); itTraj++){ - if(! itTraj->updatedState().isValid()) continue; - -// edm::LogVerbatim("TrajectoryAnalyzer") << "tm number: " << (itTraj - tmColl.begin()) + 1<< " , " -// << "tm.backwardState.pt: " << itTraj->backwardPredictedState().globalMomentum().perp() << " , " -// << "tm.forwardState.pt: " << itTraj->forwardPredictedState().globalMomentum().perp() << " , " -// << "tm.updatedState.pt: " << itTraj->updatedState().globalMomentum().perp() << " , " -// << "tm.globalPos.perp: " << itTraj->updatedState().globalPosition().perp() ; - - if ( itTraj->updatedState().globalMomentum().perp() < 1.) continue; - - TrajectoryStateOnSurface tsos=itTraj->updatedState(); - LocalVector trackdirection=tsos.localDirection(); - - DetId detid2 = itTraj->recHit()->geographicalId(); - - const TransientTrackingRecHit::ConstRecHitPointer thit2=itTraj->recHit(); - const SiStripMatchedRecHit2D* matchedhit=dynamic_cast((*thit2).hit()); - const SiStripRecHit2D* hit2d=dynamic_cast((*thit2).hit()); - const SiStripRecHit1D* hit1d=dynamic_cast((*thit2).hit()); - //if(matchedhit) cout<<"manganomatchedhit"<geographicalId(); - myid=((thit)->geographicalId()).rawId(); - - StripSubdetector StripSubdet = (StripSubdetector) detid; - - isrechitmatched = 0; - - if(matchedhit){ - - isrechitmatched = 1; - - position = (thit)->localPosition(); - // Mposition = topol.measurementPosition(position); - error = (thit)->localPositionError(); - // Merror = topol.measurementError(position,error); - rechitmatchedx = position.x(); - rechitmatchedy = position.y(); - rechitmatchedz = position.z(); - rechitmatchederrxx = error.xx(); - rechitmatchederrxy = error.xy(); - rechitmatchederryy = error.yy(); - - //Association of the rechit to the simhit - mindist = 999999; - float distx, disty; - std::pair closestPair; - matched.clear(); - matched = associate.associateHit(*matchedhit); - if(!matched.empty()){ - //project simhit; - const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(matchedhit->geographicalId()); - const StripGeomDetUnit* partnerstripdet =(StripGeomDetUnit*) gluedDet->stereoDet(); - std::pair hitPair; - for(std::vector::const_iterator m=matched.begin(); msurface()); - distx = fabs(rechitmatchedx - hitPair.first.x()); - disty = fabs(rechitmatchedy - hitPair.first.y()); - dist = distx*distx+disty*disty; - if(sqrt(dist)localPosition().x() - (closestPair.first.x()))/sqrt(error.xx()); - rechitmatchedpully = ((thit)->localPosition().y() - (closestPair.first.y()))/sqrt(error.yy()); - } - } - - //Filling Histograms for Matched hits - - if(isrechitmatched){ - - if (detid.subdetId() == int(StripSubdetector::TIB)){ - - int Tibisrechitmatched = isrechitmatched; - int ilay = tTopo->tibLayer(myid) - 1; //for histogram filling - if(Tibisrechitmatched>0){ - mePosxMatchedTIB[ilay]->Fill(rechitmatchedx); - meErrxMatchedTIB[ilay]->Fill(sqrt(rechitmatchederrxx)); - meErryMatchedTIB[ilay]->Fill(sqrt(rechitmatchederryy)); - meResxMatchedTIB[ilay]->Fill(rechitmatchedresx); - meResyMatchedTIB[ilay]->Fill(rechitmatchedresy); - mePullxMatchedTIB[ilay]->Fill(rechitmatchedpullx); - mePullyMatchedTIB[ilay]->Fill(rechitmatchedpully); - - } - } - - if (detid.subdetId() == int(StripSubdetector::TOB)){ - - int Tobisrechitmatched = isrechitmatched; - int ilay = tTopo->tobLayer(myid) - 1; //for histogram filling - if(Tobisrechitmatched>0){ - mePosxMatchedTOB[ilay]->Fill(rechitmatchedx); - mePosyMatchedTOB[ilay]->Fill(rechitmatchedy); - meErrxMatchedTOB[ilay]->Fill(sqrt(rechitmatchederrxx)); - meErryMatchedTOB[ilay]->Fill(sqrt(rechitmatchederryy)); - meResxMatchedTOB[ilay]->Fill(rechitmatchedresx); - meResyMatchedTOB[ilay]->Fill(rechitmatchedresy); - mePullxMatchedTOB[ilay]->Fill(rechitmatchedpullx); - mePullyMatchedTOB[ilay]->Fill(rechitmatchedpully); - } - } - if (detid.subdetId() == int(StripSubdetector::TID)){ - - int Tidisrechitmatched = isrechitmatched; - int ilay = tTopo->tidRing(myid) - 1; //for histogram filling - if(Tidisrechitmatched>0){ - mePosxMatchedTID[ilay]->Fill(rechitmatchedx); - mePosyMatchedTID[ilay]->Fill(rechitmatchedy); - meErrxMatchedTID[ilay]->Fill(sqrt(rechitmatchederrxx)); - meErryMatchedTID[ilay]->Fill(sqrt(rechitmatchederryy)); - meResxMatchedTID[ilay]->Fill(rechitmatchedresx); - meResyMatchedTID[ilay]->Fill(rechitmatchedresy); - mePullxMatchedTID[ilay]->Fill(rechitmatchedpullx); - mePullyMatchedTID[ilay]->Fill(rechitmatchedpully); - } - } - if (detid.subdetId() == int(StripSubdetector::TEC)){ - - int Tecisrechitmatched = isrechitmatched; - int ilay = tTopo->tecRing(myid) - 1; //for histogram filling - if(Tecisrechitmatched>0){ - mePosxMatchedTEC[ilay]->Fill(rechitmatchedx); - mePosyMatchedTEC[ilay]->Fill(rechitmatchedy); - meErrxMatchedTEC[ilay]->Fill(sqrt(rechitmatchederrxx)); - meErryMatchedTEC[ilay]->Fill(sqrt(rechitmatchederryy)); - meResxMatchedTEC[ilay]->Fill(rechitmatchedresx); - meResyMatchedTEC[ilay]->Fill(rechitmatchedresy); - mePullxMatchedTEC[ilay]->Fill(rechitmatchedpullx); - mePullyMatchedTEC[ilay]->Fill(rechitmatchedpully); - } - } - - } - - - /////////////////////////////////////////////////////// - // simple hits from matched hits - /////////////////////////////////////////////////////// - // Reset variables - - isrechitrphi = 0; - isrechitsas = 0; - rechitrphix =0; - rechitrphierrxLF =0; - rechitrphierrxMF =0; - rechitrphiy =0; - rechitrphiz =0; - rechitsasx =0; - rechitsaserrxLF =0; - rechitsaserrxMF =0; - rechitsasy =0; - rechitsasz =0; - clusizrphi =0; - clusizsas =0; - cluchgrphi =0; - cluchgsas =0; - rechitrphiresLF=-999.; - rechitrphiresMF=-999.; - rechitrphipullLF=-999.; - rechitrphipullMF=-999.; - rechitrphitrackangle =0; - rechitrphitrackanglebeta =0; - rechitrphitrackangle2 =0; - rechitrphitrackwidth =0; - rechitrphiexpectedwidth =0; - rechitrphicategory =0; - rechitrphithickness = 0.; - rechitsasresLF=-999.; - rechitsasresMF=-999.; - rechitsaspullLF=-999.; - rechitsaspullMF=-999.; - rechitsastrackangle =0; - rechitsastrackanglebeta =0; - rechitsasthickness = 0; - - GluedGeomDet * gdet; - const GeomDetUnit * monodet; - const SiStripRecHit2D *monohit; - const StripGeomDetUnit * stripdet; - - if (matchedhit) - { - auto hm =matchedhit->monoHit(); - monohit=&hm; - // const GeomDetUnit * monodet=gdet->monoDet(); - gdet=(GluedGeomDet *)tracker2->idToDet(matchedhit->geographicalId()); - monodet=gdet->monoDet(); - GlobalVector gtrkdir=gdet->toGlobal(trackdirection); - LocalVector monotkdir=monodet->toLocal(gtrkdir); - // const GeomDetUnit * det = tracker.idToDetUnit(detid); - //stripdet=(const StripGeomDetUnit*)(gdet); - stripdet=(const StripGeomDetUnit*)(monodet); - // const StripTopology &topol2=(const StripTopology&)stripdet->topology(); - - if(monotkdir.z()!=0){ - anglealpha = atan(monotkdir.x()/monotkdir.z())*180/TMath::Pi(); - anglebeta = atan(monotkdir.y()/monotkdir.z())*180/TMath::Pi(); - } - - if(monohit){ - - const StripTopology &topol=(const StripTopology&)stripdet->topology(); - - position = monohit->localPosition(); - error = monohit->localPositionError(); - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - - LocalVector drift = stripcpe->driftDirection(stripdet); - float thickness=stripdet->surface().bounds().thickness(); - rechitrphithickness = thickness; - - //cout<<"thickness = "<, SiStripCluster, edm::refhelper::FindForDetSetVector > cluster=hit->cluster(); - SiStripRecHit2D::ClusterRef cluster=monohit->cluster(); - //SiStripRecHit1D::ClusterRef cluster=monohit->cluster(); - clusiz=0; - totcharge=0; - clusiz = cluster->amplitudes().size(); - // cout<<"clusiz = "< amplitudes=cluster->amplitudes(); - for(size_t ia=0; ia::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); - if(distcluster(); - - // const GeomDetUnit * det = tracker.idToDetUnit(detid2); - const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(stereodet); - const StripTopology &topol=(const StripTopology&)stripdet->topology(); - - position = stereohit->localPosition(); - // Mposition = topol.measurementPosition(position); - error = stereohit->localPositionError(); - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - - //LocalVector drift= driftDirection(stripdet); - LocalVector drift = stripcpe->driftDirection(stripdet); - float thickness=stripdet->surface().bounds().thickness(); - rechitsasthickness = thickness; - //cout<<"thickness = "<::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); - if(dist Wexp + 2) { - iopt = 1; - } else if (Wexp == 1) { - iopt = 2; - } else if (clusterWidth <= Wexp) { - iopt = 3; - } else { - iopt = 4; - } - rechitsascategory = iopt; - } - } - - - // A VIRER !!!!!!!!!!!!!!!!!!!! - - // isrechitrphi = 0; - //isrechitsas = 0; - - - if(hit1d){ - // simple hits are mono or stereo - // cout<<"simple hit"<topology(); - - float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi(); - float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi(); - - //SiStripRecHit2D::ClusterRef cluster=hit->cluster(); - SiStripRecHit1D::ClusterRef cluster=hit1d->cluster(); - - position = thit->localPosition(); - error = thit->localPositionError(); - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - - LocalVector drift = stripcpe->driftDirection(stripdet); - float thickness=stripdet->surface().bounds().thickness(); - rechitrphithickness = thickness; - //cout<<"Valid:thickness = "<firstStrip() = "<firstStrip()< amplitudes=cluster->amplitudes(); - for(size_t ia=0; ia::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); - if(distlocalPosition().x() - (closest).localPosition().x())/sqrt(error.xx()); - rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF); - } - } - rechitrphitrackangle = anglealpha; - rechitrphitrackanglebeta = anglebeta; - rechitrphitrackwidth = Wtrack; - rechitrphiexpectedwidth = Wexp; - - clusterWidth = clusiz; - unsigned int iopt; - if (clusterWidth > Wexp + 2) { - iopt = 1; - } else if (Wexp == 1) { - iopt = 2; - } else if (clusterWidth <= Wexp) { - iopt = 3; - } else { - iopt = 4; - } - rechitrphicategory = iopt; - -// if (rechitrphiexpectedwidth == 1 && clusterWidth == 3) { -// //if ( clusterWidth == 3) { -// cout<<"TRUE"< 0.5) { -// if (lastStrip > int(positionshx)) secondstrip = 1; -// if (lastStrip = int(positionshx)) secondstrip = -1; -// } -// if ((positionshx - int(positionshx)) < 0.5) { -// if (lastStrip > int(positionshx)) secondstrip = -1; -// if (lastStrip = int(positionshx)) secondstrip = 1; -// } - -// } - - //} - -// cout<<"int() = "<topology(); - - float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi(); - float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi(); - - //SiStripRecHit2D::ClusterRef cluster=hit->cluster(); - SiStripRecHit1D::ClusterRef cluster=hit1d->cluster(); - - - position = thit->localPosition(); - error = thit->localPositionError(); - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - - // LocalVector drift= driftDirection(stripdet); - LocalVector drift = stripcpe->driftDirection(stripdet); - float thickness=stripdet->surface().bounds().thickness(); - rechitsasthickness = thickness; - //cout<<"thickness = "<::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); - if(distlocalPosition().x() - (closest).localPosition().x())/sqrt(error.xx()); - rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF); - - } - } - rechitsastrackangle = anglealpha; - rechitsastrackanglebeta = anglebeta; - rechitsastrackwidth = Wtrack; - rechitsasexpectedwidth = Wexp; - - clusterWidth = clusiz; - unsigned int iopt; - if (clusterWidth > Wexp + 2) { - iopt = 1; - } else if (Wexp == 1) { - iopt = 2; - } else if (clusterWidth <= Wexp) { - iopt = 3; - } else { - iopt = 4; - } - rechitsascategory = iopt; - } - //isrechitsas = 0; - } - - - if(hit2d){ - // simple hits are mono or stereo - // cout<<"simple hit"<topology(); - - float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi(); - float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi(); - - SiStripRecHit2D::ClusterRef cluster=hit2d->cluster(); - - position = thit->localPosition(); - error = thit->localPositionError(); - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - - LocalVector drift = stripcpe->driftDirection(stripdet); - float thickness=stripdet->surface().bounds().thickness(); - rechitrphithickness = thickness; - //cout<<"Valid:thickness = "<firstStrip() = "<firstStrip()< amplitudes=cluster->amplitudes(); - for(size_t ia=0; ia::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); - if(distlocalPosition().x() - (closest).localPosition().x())/sqrt(error.xx()); - rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF); - } - } - rechitrphitrackangle = anglealpha; - rechitrphitrackanglebeta = anglebeta; - rechitrphitrackwidth = Wtrack; - rechitrphiexpectedwidth = Wexp; - - clusterWidth = clusiz; - unsigned int iopt; - if (clusterWidth > Wexp + 2) { - iopt = 1; - } else if (Wexp == 1) { - iopt = 2; - } else if (clusterWidth <= Wexp) { - iopt = 3; - } else { - iopt = 4; - } - rechitrphicategory = iopt; - -// if (rechitrphiexpectedwidth == 1 && clusterWidth == 3) { -// //if ( clusterWidth == 3) { -// cout<<"TRUE"< 0.5) { -// if (lastStrip > int(positionshx)) secondstrip = 1; -// if (lastStrip = int(positionshx)) secondstrip = -1; -// } -// if ((positionshx - int(positionshx)) < 0.5) { -// if (lastStrip > int(positionshx)) secondstrip = -1; -// if (lastStrip = int(positionshx)) secondstrip = 1; -// } - -// } - - //} - -// cout<<"int() = "<topology(); - - float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi(); - float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi(); - - SiStripRecHit2D::ClusterRef cluster=hit2d->cluster(); - - - position = thit->localPosition(); - error = thit->localPositionError(); - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - - // LocalVector drift= driftDirection(stripdet); - LocalVector drift = stripcpe->driftDirection(stripdet); - float thickness=stripdet->surface().bounds().thickness(); - rechitsasthickness = thickness; - //cout<<"thickness = "<::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); - if(distlocalPosition().x() - (closest).localPosition().x())/sqrt(error.xx()); - rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF); - - } - } - rechitsastrackangle = anglealpha; - rechitsastrackanglebeta = anglebeta; - rechitsastrackwidth = Wtrack; - rechitsasexpectedwidth = Wexp; - - clusterWidth = clusiz; - unsigned int iopt; - if (clusterWidth > Wexp + 2) { - iopt = 1; - } else if (Wexp == 1) { - iopt = 2; - } else if (clusterWidth <= Wexp) { - iopt = 3; - } else { - iopt = 4; - } - rechitsascategory = iopt; - } - //isrechitsas = 0; - - } - - //Filling Histograms for simple hits - //cout<<"isrechitrphi,isrechitsas = "<0 || isrechitsas>0){ - - - if (isrechitrphi>0) { - - //cout<<"rechitrphitrackwidth,rechitrphipullMF = "< CutThickness) - { - PullvsTrackwidth->Fill(rechitrphitrackwidth,rechitrphipullMF); - - if (clusizrphi ==2 && rechitrphiexpectedwidth == 1 && rechitrphitrackwidth<0.1) { - //Diff->Fill(-diff); - - // if ((detid.subdetId() == int(StripSubdetector::TID)) || (detid.subdetId() == int(StripSubdetector::TEC))) { - //SecondStrip->Fill(secondstrip); - // } - } - // Diff->Fill(-diff); - - //PositionSHx->Fill(positionshx); - - // ErrxMF->Fill(sqrt(rechitrphierrxMF)); - //cout<<"ICI1:rechitrphitrackwidth = "<Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - ResMFvsTrackwidth->Fill(rechitrphitrackwidth,rechitrphiresMF); - - PullvsClusterwidth->Fill(clusizrphi,rechitrphipullMF); - PullvsExpectedwidth->Fill(rechitrphiexpectedwidth,rechitrphipullMF); - PullvsTrackangle->Fill(rechitrphitrackangle,rechitrphipullMF); - PullvsTrackanglebeta->Fill(rechitrphitrackanglebeta,rechitrphipullMF); - - } - */ - - meCategory->Fill(rechitrphicategory); - meTrackwidth->Fill(rechitrphitrackwidth); - meExpectedwidth->Fill(rechitrphiexpectedwidth); - meClusterwidth->Fill(clusizrphi); - meTrackanglealpha->Fill(rechitrphitrackangle); - meTrackanglebeta->Fill(rechitrphitrackanglebeta); - - meErrxMFAngleProfile->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF)); - meErrxMFTrackwidthProfile->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - - if (clusizrphi == 1) { - meErrxMFTrackwidthProfileWClus1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWClus1->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphithickness > CutThickness) - { - //if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - /* - ResMFvsTrackwidthWClus1->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==1) ResMFvsTrackwidthWClus1Wexp1->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==2) ResMFvsTrackwidthWClus1Wexp2->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==3) ResMFvsTrackwidthWClus1Wexp3->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==4) ResMFvsTrackwidthWClus1Wexp4->Fill(rechitrphitrackwidth,rechitrphiresMF); - ErrxMFvsTrackwidthWClus1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - */ - //} - } - } - if (clusizrphi == 2) { - meErrxMFTrackwidthProfileWClus2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWClus2->Fill(rechitrphitrackwidth,rechitrphiresMF); - meResMFTrackwidthProfileWClus21->Fill(rechitrphitrackwidth,rechitrphiresMF); - meResMFTrackwidthProfileWClus22->Fill(rechitrphitrackwidth,rechitrphiresMF); - meResMFTrackwidthProfileWClus23->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphithickness > CutThickness) - { - // if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - if ((detid.subdetId() == int(StripSubdetector::TID)) || (detid.subdetId() == int(StripSubdetector::TEC))){ - /* ResMFvsTrackwidthWClus2->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==1) ResMFvsTrackwidthWClus2Wexp1->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==2) ResMFvsTrackwidthWClus2Wexp2->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==3) ResMFvsTrackwidthWClus2Wexp3->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==4) ResMFvsTrackwidthWClus2Wexp4->Fill(rechitrphitrackwidth,rechitrphiresMF);*/ - } - // meResMFTrackwidthProfileWClus22->Fill(rechitrphitrackwidth,rechitrphiresMF); - //cout<<"ICI2:rechitrphitrackwidth = "<Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - // } - } - } - if (clusizrphi == 3) { - meErrxMFTrackwidthProfileWClus3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWClus3->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphithickness > CutThickness) - { - //if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - /* - ResMFvsTrackwidthWClus3->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==1) ResMFvsTrackwidthWClus3Wexp1->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==2) ResMFvsTrackwidthWClus3Wexp2->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==3) ResMFvsTrackwidthWClus3Wexp3->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==4) ResMFvsTrackwidthWClus3Wexp4->Fill(rechitrphitrackwidth,rechitrphiresMF); - ErrxMFvsTrackwidthWClus3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - */ - // } - } - } - if (clusizrphi == 4) { - meErrxMFTrackwidthProfileWClus4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWClus4->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphithickness > CutThickness) - { - //if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - /* ResMFvsTrackwidthWClus4->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==1) ResMFvsTrackwidthWClus4Wexp1->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==2) ResMFvsTrackwidthWClus4Wexp2->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==3) ResMFvsTrackwidthWClus4Wexp3->Fill(rechitrphitrackwidth,rechitrphiresMF); - if (rechitrphiexpectedwidth==4) ResMFvsTrackwidthWClus4Wexp4->Fill(rechitrphitrackwidth,rechitrphiresMF); - ErrxMFvsTrackwidthWClus4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));*/ - //} - } - } - - if (rechitrphicategory == 1) { - meErrxMFTrackwidthProfileCategory1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFClusterwidthProfileCategory1->Fill(clusizrphi,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 2) { - meErrxMFTrackwidthProfileCategory2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - //ResMFvsTrackwidthCategory2->Fill(rechitrphitrackwidth,rechitrphiresMF); - // ErrxMFvsTrackwidthCategory2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 3) { - meErrxMFTrackwidthProfileCategory3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - //ResMFvsTrackwidthCategory3->Fill(rechitrphitrackwidth,rechitrphiresMF); - //ErrxMFvsTrackwidthCategory3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 4) { - meErrxMFTrackwidthProfileCategory4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - //ResMFvsTrackwidthCategory4->Fill(rechitrphitrackwidth,rechitrphiresMF); - //ErrxMFvsTrackwidthCategory4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - //const unsigned int NBINS = meErrxMFTrackwidthProfile->getNbinsX(); - //cout<<"NBINS2 = "<Fill(sqrt(rechitrphierrxMF)); - //const unsigned int NBINS3 = meErrxMF->getNbinsX(); - //cout<<"NBINS3 = "<Fill(sqrt(rechitrphierrxLF)); - meResMF->Fill(rechitrphiresMF); - meResLF->Fill(rechitrphiresLF); - mePullMF->Fill(rechitrphipullMF); - mePullLF->Fill(rechitrphipullLF); - - } - - if (isrechitsas>0) { - - if (rechitsasthickness > CutThickness) - { - /* - PullvsTrackwidth->Fill(rechitsastrackwidth,rechitsaspullMF); - //cout<<"rechitsaserrxMF"<Fill(sqrt(rechitsaserrxMF)); - ErrxMFvsTrackwidth->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - ResMFvsTrackwidth->Fill(rechitsastrackwidth,rechitsasresMF); - - - PullvsClusterwidth->Fill(clusizsas,rechitsaspullMF); - PullvsExpectedwidth->Fill(rechitsasexpectedwidth,rechitsaspullMF); - PullvsTrackangle->Fill(rechitsastrackangle,rechitsaspullMF); - PullvsTrackanglebeta->Fill(rechitsastrackanglebeta,rechitsaspullMF); - */ - } - - - meCategory->Fill(rechitsascategory); - meTrackwidth->Fill(rechitsastrackwidth); - meExpectedwidth->Fill(rechitsasexpectedwidth); - meClusterwidth->Fill(clusizsas); - meTrackanglealpha->Fill(rechitsastrackangle); - meTrackanglebeta->Fill(rechitsastrackanglebeta); - - meErrxMFAngleProfile->Fill(rechitsastrackangle,sqrt(rechitsaserrxMF)); - meErrxMFTrackwidthProfile->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - - if (clusizsas == 1) { - meErrxMFTrackwidthProfileWClus1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meResMFTrackwidthProfileWClus1->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasthickness > CutThickness) - { - //if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - /* - ResMFvsTrackwidthWClus1->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==1) ResMFvsTrackwidthWClus1Wexp1->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==2) ResMFvsTrackwidthWClus1Wexp2->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==3) ResMFvsTrackwidthWClus1Wexp3->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==4) ResMFvsTrackwidthWClus1Wexp4->Fill(rechitsastrackwidth,rechitsasresMF); - ErrxMFvsTrackwidthWClus1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - */ - //} - } - } - - if (clusizsas == 2) { - meErrxMFTrackwidthProfileWClus2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meResMFTrackwidthProfileWClus2->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasthickness > CutThickness) - { - // if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - /* - ResMFvsTrackwidthWClus2->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==1) ResMFvsTrackwidthWClus2Wexp1->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==2) ResMFvsTrackwidthWClus2Wexp2->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==3) ResMFvsTrackwidthWClus2Wexp3->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==4) ResMFvsTrackwidthWClus2Wexp4->Fill(rechitsastrackwidth,rechitsasresMF); - ErrxMFvsTrackwidthWClus2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - */ - //} - } - } - if (clusizsas == 3) { - meErrxMFTrackwidthProfileWClus3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meResMFTrackwidthProfileWClus3->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasthickness > CutThickness) - { - //if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - // { - /* - ResMFvsTrackwidthWClus3->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==1) ResMFvsTrackwidthWClus3Wexp1->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==2) ResMFvsTrackwidthWClus3Wexp2->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==3) ResMFvsTrackwidthWClus3Wexp3->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==4) ResMFvsTrackwidthWClus3Wexp4->Fill(rechitsastrackwidth,rechitsasresMF); - ErrxMFvsTrackwidthWClus3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - */ - //} - } - } - if (clusizsas == 4) { - meErrxMFTrackwidthProfileWClus4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meResMFTrackwidthProfileWClus4->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasthickness > CutThickness) - { - //if ((detid.subdetId() == int(StripSubdetector::TIB)) || (detid.subdetId() == int(StripSubdetector::TOB))) - //{ - /* - ResMFvsTrackwidthWClus4->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==1) ResMFvsTrackwidthWClus4Wexp1->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==2) ResMFvsTrackwidthWClus4Wexp2->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==3) ResMFvsTrackwidthWClus4Wexp3->Fill(rechitsastrackwidth,rechitsasresMF); - if (rechitsasexpectedwidth==4) ResMFvsTrackwidthWClus4Wexp4->Fill(rechitsastrackwidth,rechitsasresMF); - ErrxMFvsTrackwidthWClus4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - */ - // } - } - } - if (rechitsascategory == 1) { - meErrxMFTrackwidthProfileCategory1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFClusterwidthProfileCategory1->Fill(clusizsas,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 2) { - meErrxMFTrackwidthProfileCategory2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - //ResMFvsTrackwidthCategory2->Fill(rechitsastrackwidth,rechitsasresMF); - //ErrxMFvsTrackwidthCategory2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 3) { - meErrxMFTrackwidthProfileCategory3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - //ResMFvsTrackwidthCategory3->Fill(rechitsastrackwidth,rechitsasresMF); - //ErrxMFvsTrackwidthCategory3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 4) { - meErrxMFTrackwidthProfileCategory4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - //ResMFvsTrackwidthCategory4->Fill(rechitsastrackwidth,rechitsasresMF); - //ErrxMFvsTrackwidthCategory4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - - meErrxMF->Fill(sqrt(rechitsaserrxMF)); - meErrxLF->Fill(sqrt(rechitsaserrxLF)); - meResMF->Fill(rechitsasresMF); - meResLF->Fill(rechitsasresLF); - mePullMF->Fill(rechitsaspullMF); - mePullLF->Fill(rechitsaspullLF); - - } - - - if (detid.subdetId() == int(StripSubdetector::TIB)){ - - int Tibisrechitrphi = isrechitrphi; - int Tibisrechitsas = isrechitsas; - //cout<<"Tibisrechitrphi,Tibisrechitsas = "<tibLayer(myid) - 1; //for histogram filling - //cout<<"ilay1 = "< CutThickness) - { - /*PullvsTrackwidthTIB->Fill(rechitrphitrackwidth,rechitrphipullMF); - PullvsClusterwidthTIB->Fill(clusizrphi,rechitrphipullMF); - PullvsExpectedwidthTIB->Fill(rechitrphiexpectedwidth,rechitrphipullMF); - PullvsTrackangleTIB->Fill(rechitrphitrackangle,rechitrphipullMF); - PullvsTrackanglebetaTIB->Fill(rechitrphitrackanglebeta,rechitrphipullMF);*/ - } - //cout<<"TIB:rechitrphitrackwidth,rechitrphipullMF = "<Fill(clusizrphi); - meAdcRphiTIB[ilay]->Fill(cluchgrphi); - mePosxRphiTIB[ilay]->Fill(rechitrphix); - meErrxLFRphiTIB[ilay]->Fill(sqrt(rechitrphierrxLF)); - meErrxMFRphiTIB[ilay]->Fill(sqrt(rechitrphierrxMF)); - meResLFRphiTIB[ilay]->Fill(rechitrphiresLF); - meResMFRphiTIB[ilay]->Fill(rechitrphiresMF); - mePullLFRphiTIB[ilay]->Fill(rechitrphipullLF); - mePullMFRphiTIB[ilay]->Fill(rechitrphipullMF); - meTrackangleRphiTIB[ilay]->Fill(rechitrphitrackangle); - mePullTrackangleProfileRphiTIB[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF); - mePullTrackwidthProfileRphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - if (clusizrphi == 1) { - meErrxMFTrackwidthProfileWclus1RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus1RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - if (clusizrphi == 2) { - meErrxMFTrackwidthProfileWclus2RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus2RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - if (clusizrphi == 3) { - meErrxMFTrackwidthProfileWclus3RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus3RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - if (clusizrphi == 4) { - meErrxMFTrackwidthProfileWclus4RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus4RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - - - if (rechitrphicategory == 1) { - mePullTrackwidthProfileCategory1RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory1RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFClusterwidthProfileCategory1RphiTIB[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 2) { - mePullTrackwidthProfileCategory2RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory2RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 3) { - mePullTrackwidthProfileCategory3RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory3RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 4) { - mePullTrackwidthProfileCategory4RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory4RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - meTrackwidthRphiTIB[ilay]->Fill(rechitrphitrackwidth); - meExpectedwidthRphiTIB[ilay]->Fill(rechitrphiexpectedwidth); - meClusterwidthRphiTIB[ilay]->Fill(clusizrphi); - meCategoryRphiTIB[ilay]->Fill(rechitrphicategory); - meErrxMFTrackwidthProfileRphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFAngleProfileRphiTIB[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF)); - } - if(Tibisrechitsas!=0){ - if (rechitsasthickness > CutThickness) - { - /* PullvsTrackwidthTIB->Fill(rechitsastrackwidth,rechitsaspullMF); - PullvsClusterwidthTIB->Fill(clusizsas,rechitsaspullMF); - PullvsExpectedwidthTIB->Fill(rechitsasexpectedwidth,rechitsaspullMF); - PullvsTrackangleTIB->Fill(rechitsastrackangle,rechitsaspullMF); - PullvsTrackanglebetaTIB->Fill(rechitsastrackanglebeta,rechitsaspullMF);*/ - } - meNstpSasTIB[ilay]->Fill(clusizsas); - meAdcSasTIB[ilay]->Fill(cluchgsas); - mePosxSasTIB[ilay]->Fill(rechitsasx); - meErrxLFSasTIB[ilay]->Fill(sqrt(rechitsaserrxLF)); - meResLFSasTIB[ilay]->Fill(rechitsasresLF); - mePullLFSasTIB[ilay]->Fill(rechitsaspullLF); - meErrxMFSasTIB[ilay]->Fill(sqrt(rechitsaserrxMF)); - meResMFSasTIB[ilay]->Fill(rechitsasresMF); - mePullMFSasTIB[ilay]->Fill(rechitsaspullMF); - meTrackangleSasTIB[ilay]->Fill(rechitsastrackangle); - mePullTrackangleProfileSasTIB[ilay]->Fill(rechitsastrackangle,rechitsaspullMF); - mePullTrackwidthProfileSasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - if (rechitsascategory == 1) { - mePullTrackwidthProfileCategory1SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory1SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFClusterwidthProfileCategory1SasTIB[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 2) { - mePullTrackwidthProfileCategory2SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory2SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 3) { - mePullTrackwidthProfileCategory3SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory3SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 4) { - mePullTrackwidthProfileCategory4SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory4SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - meTrackwidthSasTIB[ilay]->Fill(rechitsastrackwidth); - meExpectedwidthSasTIB[ilay]->Fill(rechitsasexpectedwidth); - meClusterwidthSasTIB[ilay]->Fill(clusizsas); - meCategorySasTIB[ilay]->Fill(rechitsascategory); - meErrxMFTrackwidthProfileSasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFAngleProfileSasTIB[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF); - } - } - - if (detid.subdetId() == int(StripSubdetector::TOB)){ - - int Tobisrechitrphi = isrechitrphi; - int Tobisrechitsas = isrechitsas; - int ilay = tTopo->tobLayer(myid) - 1; //for histogram filling - if(Tobisrechitrphi!=0){ - if (rechitrphithickness > CutThickness) - { - /*PullvsTrackwidthTOB->Fill(rechitrphitrackwidth,rechitrphipullMF); - PullvsClusterwidthTOB->Fill(clusizrphi,rechitrphipullMF); - PullvsExpectedwidthTOB->Fill(rechitrphiexpectedwidth,rechitrphipullMF); - PullvsTrackangleTOB->Fill(rechitrphitrackangle,rechitrphipullMF); - PullvsTrackanglebetaTOB->Fill(rechitrphitrackanglebeta,rechitrphipullMF);*/ - } - //cout<<"TOB:rechitrphitrackwidth,rechitrphipullMF = "<Fill(clusizrphi); - meAdcRphiTOB[ilay]->Fill(cluchgrphi); - mePosxRphiTOB[ilay]->Fill(rechitrphix); - meErrxLFRphiTOB[ilay]->Fill(sqrt(rechitrphierrxLF)); - meResLFRphiTOB[ilay]->Fill(rechitrphiresLF); - mePullLFRphiTOB[ilay]->Fill(rechitrphipullLF); - meErrxMFRphiTOB[ilay]->Fill(sqrt(rechitrphierrxMF)); - meResMFRphiTOB[ilay]->Fill(rechitrphiresMF); - mePullMFRphiTOB[ilay]->Fill(rechitrphipullMF); - meTrackangleRphiTOB[ilay]->Fill(rechitrphitrackangle); - mePullTrackangleProfileRphiTOB[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF); - mePullTrackwidthProfileRphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - - if (clusizrphi == 1) { - meErrxMFTrackwidthProfileWclus1RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus1RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - if (clusizrphi == 2) { - meErrxMFTrackwidthProfileWclus2RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus2RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - if (clusizrphi == 3) { - meErrxMFTrackwidthProfileWclus3RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus3RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - if (clusizrphi == 4) { - meErrxMFTrackwidthProfileWclus4RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meResMFTrackwidthProfileWclus4RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF); - } - - - if (rechitrphicategory == 1) { - mePullTrackwidthProfileCategory1RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory1RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFClusterwidthProfileCategory1RphiTOB[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 2) { - mePullTrackwidthProfileCategory2RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory2RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 3) { - mePullTrackwidthProfileCategory3RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory3RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 4) { - mePullTrackwidthProfileCategory4RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory4RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - meTrackwidthRphiTOB[ilay]->Fill(rechitrphitrackwidth); - meExpectedwidthRphiTOB[ilay]->Fill(rechitrphiexpectedwidth); - meClusterwidthRphiTOB[ilay]->Fill(clusizrphi); - meCategoryRphiTOB[ilay]->Fill(rechitrphicategory); - meErrxMFTrackwidthProfileRphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFAngleProfileRphiTOB[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF)); - } - if(Tobisrechitsas!=0){ - if (rechitsasthickness > CutThickness) - {/* - PullvsTrackwidthTOB->Fill(rechitsastrackwidth,rechitsaspullMF); - PullvsClusterwidthTOB->Fill(clusizsas,rechitsaspullMF); - PullvsExpectedwidthTOB->Fill(rechitsasexpectedwidth,rechitsaspullMF); - PullvsTrackangleTOB->Fill(rechitsastrackangle,rechitsaspullMF); - PullvsTrackanglebetaTOB->Fill(rechitsastrackanglebeta,rechitsaspullMF); - */ - } - meNstpSasTOB[ilay]->Fill(clusizsas); - meAdcSasTOB[ilay]->Fill(cluchgsas); - mePosxSasTOB[ilay]->Fill(rechitsasx); - meErrxLFSasTOB[ilay]->Fill(sqrt(rechitsaserrxLF)); - meResLFSasTOB[ilay]->Fill(rechitsasresLF); - mePullLFSasTOB[ilay]->Fill(rechitsaspullLF); - meErrxMFSasTOB[ilay]->Fill(sqrt(rechitsaserrxMF)); - meResMFSasTOB[ilay]->Fill(rechitsasresMF); - mePullMFSasTOB[ilay]->Fill(rechitsaspullMF); - meTrackangleSasTOB[ilay]->Fill(rechitsastrackangle); - mePullTrackangleProfileSasTOB[ilay]->Fill(rechitsastrackangle,rechitsaspullMF); - mePullTrackwidthProfileSasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - if (rechitsascategory == 1) { - mePullTrackwidthProfileCategory1SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory1SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFClusterwidthProfileCategory1SasTOB[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 2) { - mePullTrackwidthProfileCategory2SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory2SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 3) { - mePullTrackwidthProfileCategory3SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory3SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 4) { - mePullTrackwidthProfileCategory4SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory4SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - meTrackwidthSasTOB[ilay]->Fill(rechitsastrackwidth); - meExpectedwidthSasTOB[ilay]->Fill(rechitsasexpectedwidth); - meClusterwidthSasTOB[ilay]->Fill(clusizsas); - meCategorySasTOB[ilay]->Fill(rechitsascategory); - meErrxMFTrackwidthProfileSasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFAngleProfileSasTOB[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF); - } - } - - if (detid.subdetId() == int(StripSubdetector::TID)){ - - int Tidisrechitrphi = isrechitrphi; - int Tidisrechitsas = isrechitsas; - int ilay = tTopo->tidRing(myid) - 1; //for histogram filling - if(Tidisrechitrphi!=0){ - if (rechitrphithickness > CutThickness) - { - /*PullvsTrackwidthTID->Fill(rechitrphitrackwidth,rechitrphipullMF); - PullvsClusterwidthTID->Fill(clusizrphi,rechitrphipullMF); - PullvsExpectedwidthTID->Fill(rechitrphiexpectedwidth,rechitrphipullMF); - PullvsTrackangleTID->Fill(rechitrphitrackangle,rechitrphipullMF); - PullvsTrackanglebetaTID->Fill(rechitrphitrackanglebeta,rechitrphipullMF);*/ - } - //cout<<"TID:rechitrphitrackwidth,rechitrphipullMF = "<Fill(clusizrphi); - meAdcRphiTID[ilay]->Fill(cluchgrphi); - mePosxRphiTID[ilay]->Fill(rechitrphix); - meErrxLFRphiTID[ilay]->Fill(sqrt(rechitrphierrxLF)); - meResLFRphiTID[ilay]->Fill(rechitrphiresLF); - mePullLFRphiTID[ilay]->Fill(rechitrphipullLF); - meErrxMFRphiTID[ilay]->Fill(sqrt(rechitrphierrxMF)); - meResMFRphiTID[ilay]->Fill(rechitrphiresMF); - mePullMFRphiTID[ilay]->Fill(rechitrphipullMF); - meTrackangleRphiTID[ilay]->Fill(rechitrphitrackangle); - mePullTrackangleProfileRphiTID[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF); - mePullTrackwidthProfileRphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - if (rechitrphicategory == 1) { - mePullTrackwidthProfileCategory1RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory1RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFClusterwidthProfileCategory1RphiTID[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 2) { - mePullTrackwidthProfileCategory2RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory2RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 3) { - mePullTrackwidthProfileCategory3RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory3RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 4) { - mePullTrackwidthProfileCategory4RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory4RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - meTrackwidthRphiTID[ilay]->Fill(rechitrphitrackwidth); - meExpectedwidthRphiTID[ilay]->Fill(rechitrphiexpectedwidth); - meClusterwidthRphiTID[ilay]->Fill(clusizrphi); - meCategoryRphiTID[ilay]->Fill(rechitrphicategory); - meErrxMFTrackwidthProfileRphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFAngleProfileRphiTID[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF)); - } - if(Tidisrechitsas!=0){ - if (rechitsasthickness > CutThickness) - { - /*PullvsTrackwidthTID->Fill(rechitsastrackwidth,rechitsaspullMF); - PullvsClusterwidthTID->Fill(clusizsas,rechitsaspullMF); - PullvsExpectedwidthTID->Fill(rechitsasexpectedwidth,rechitsaspullMF); - PullvsTrackangleTID->Fill(rechitsastrackangle,rechitsaspullMF); - PullvsTrackanglebetaTID->Fill(rechitsastrackanglebeta,rechitsaspullMF);*/ - } - meNstpSasTID[ilay]->Fill(clusizsas); - meAdcSasTID[ilay]->Fill(cluchgsas); - mePosxSasTID[ilay]->Fill(rechitsasx); - meErrxLFSasTID[ilay]->Fill(sqrt(rechitsaserrxLF)); - meResLFSasTID[ilay]->Fill(rechitsasresLF); - mePullLFSasTID[ilay]->Fill(rechitsaspullLF); - meErrxMFSasTID[ilay]->Fill(sqrt(rechitsaserrxMF)); - meResMFSasTID[ilay]->Fill(rechitsasresMF); - mePullMFSasTID[ilay]->Fill(rechitsaspullMF); - meTrackangleSasTID[ilay]->Fill(rechitsastrackangle); - mePullTrackangleProfileSasTID[ilay]->Fill(rechitsastrackangle,rechitsaspullMF); - mePullTrackwidthProfileSasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - if (rechitsascategory == 1) { - mePullTrackwidthProfileCategory1SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory1SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFClusterwidthProfileCategory1SasTID[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 2) { - mePullTrackwidthProfileCategory2SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory2SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 3) { - mePullTrackwidthProfileCategory3SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory3SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 4) { - mePullTrackwidthProfileCategory4SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory4SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - meTrackwidthSasTID[ilay]->Fill(rechitsastrackwidth); - meExpectedwidthSasTID[ilay]->Fill(rechitsasexpectedwidth); - meClusterwidthSasTID[ilay]->Fill(clusizsas); - meCategorySasTID[ilay]->Fill(rechitsascategory); - meErrxMFTrackwidthProfileSasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFAngleProfileSasTID[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF); - } - } - - if (detid.subdetId() == int(StripSubdetector::TEC)){ - - int Tecisrechitrphi = isrechitrphi; - int Tecisrechitsas = isrechitsas; - int ilay = tTopo->tecRing(myid) - 1; //for histogram filling - if(Tecisrechitrphi!=0){ - if (rechitrphithickness > CutThickness) - { - /*PullvsTrackwidthTEC->Fill(rechitrphitrackwidth,rechitrphipullMF); - PullvsClusterwidthTEC->Fill(clusizrphi,rechitrphipullMF); - PullvsExpectedwidthTEC->Fill(rechitrphiexpectedwidth,rechitrphipullMF); - PullvsTrackangleTEC->Fill(rechitrphitrackangle,rechitrphipullMF); - PullvsTrackanglebetaTEC->Fill(rechitrphitrackanglebeta,rechitrphipullMF);*/ - } - //cout<<"TEC:rechitrphitrackwidth,rechitrphipullMF = "<Fill(clusizrphi); - meAdcRphiTEC[ilay]->Fill(cluchgrphi); - mePosxRphiTEC[ilay]->Fill(rechitrphix); - meErrxLFRphiTEC[ilay]->Fill(sqrt(rechitrphierrxLF)); - meResLFRphiTEC[ilay]->Fill(rechitrphiresLF); - mePullLFRphiTEC[ilay]->Fill(rechitrphipullLF); - meErrxMFRphiTEC[ilay]->Fill(sqrt(rechitrphierrxMF)); - meResMFRphiTEC[ilay]->Fill(rechitrphiresMF); - mePullMFRphiTEC[ilay]->Fill(rechitrphipullMF); - meTrackangleRphiTEC[ilay]->Fill(rechitrphitrackangle); - mePullTrackangleProfileRphiTEC[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF); - mePullTrackwidthProfileRphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - if (rechitrphicategory == 1) { - mePullTrackwidthProfileCategory1RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory1RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFClusterwidthProfileCategory1RphiTEC[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 2) { - mePullTrackwidthProfileCategory2RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory2RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 3) { - mePullTrackwidthProfileCategory3RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory3RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - if (rechitrphicategory == 4) { - mePullTrackwidthProfileCategory4RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF); - meErrxMFTrackwidthProfileCategory4RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - } - meTrackwidthRphiTEC[ilay]->Fill(rechitrphitrackwidth); - meExpectedwidthRphiTEC[ilay]->Fill(rechitrphiexpectedwidth); - meClusterwidthRphiTEC[ilay]->Fill(clusizrphi); - meCategoryRphiTEC[ilay]->Fill(rechitrphicategory); - meErrxMFTrackwidthProfileRphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF)); - meErrxMFAngleProfileRphiTEC[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF)); - } - if(Tecisrechitsas!=0){ - if (rechitsasthickness > CutThickness) - { - /*PullvsTrackwidthTEC->Fill(rechitsastrackwidth,rechitsaspullMF); - PullvsClusterwidthTEC->Fill(clusizsas,rechitsaspullMF); - PullvsExpectedwidthTEC->Fill(rechitsasexpectedwidth,rechitsaspullMF); - PullvsTrackangleTEC->Fill(rechitsastrackangle,rechitsaspullMF); - PullvsTrackanglebetaTEC->Fill(rechitsastrackanglebeta,rechitsaspullMF);*/ - } - meNstpSasTEC[ilay]->Fill(clusizsas); - meAdcSasTEC[ilay]->Fill(cluchgsas); - mePosxSasTEC[ilay]->Fill(rechitsasx); - meErrxLFSasTEC[ilay]->Fill(sqrt(rechitsaserrxLF)); - meResLFSasTEC[ilay]->Fill(rechitsasresLF); - mePullLFSasTEC[ilay]->Fill(rechitsaspullLF); - meErrxMFSasTEC[ilay]->Fill(sqrt(rechitsaserrxMF)); - meResMFSasTEC[ilay]->Fill(rechitsasresMF); - mePullMFSasTEC[ilay]->Fill(rechitsaspullMF); - meTrackangleSasTEC[ilay]->Fill(rechitsastrackangle); - mePullTrackangleProfileSasTEC[ilay]->Fill(rechitsastrackangle,rechitsaspullMF); - mePullTrackwidthProfileSasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - if (rechitsascategory == 1) { - mePullTrackwidthProfileCategory1SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory1SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFClusterwidthProfileCategory1SasTEC[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 2) { - mePullTrackwidthProfileCategory2SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory2SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 3) { - mePullTrackwidthProfileCategory3SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory3SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - if (rechitsascategory == 4) { - mePullTrackwidthProfileCategory4SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF); - meErrxMFTrackwidthProfileCategory4SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - } - meTrackwidthSasTEC[ilay]->Fill(rechitsastrackwidth); - meExpectedwidthSasTEC[ilay]->Fill(rechitsasexpectedwidth); - meClusterwidthSasTEC[ilay]->Fill(clusizsas); - meCategorySasTEC[ilay]->Fill(rechitsascategory); - meErrxMFTrackwidthProfileSasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF)); - meErrxMFAngleProfileSasTEC[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF); - } - - } - - } //simplehits - //cout<<"DebugLine301"< SiStripTrackingRecHitsValid::projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet, const BoundPlane& plane) -{ - // const StripGeomDetUnit* stripDet = dynamic_cast(hit.det()); - //if (stripDet == 0) throw MeasurementDetException("HitMatcher hit is not on StripGeomDetUnit"); - - const StripTopology& topol = stripDet->specificTopology(); - GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition()); - LocalPoint localHit = plane.toLocal(globalpos); - //track direction - LocalVector locdir=hit.localDirection(); - //rotate track in new frame - - GlobalVector globaldir= stripDet->surface().toGlobal(locdir); - LocalVector dir=plane.toLocal(globaldir); - float scale = -localHit.z() / dir.z(); - - LocalPoint projectedPos = localHit + scale*dir; - - // std::cout << "projectedPos " << projectedPos << std::endl; - - float selfAngle = topol.stripAngle( topol.strip( hit.localPosition())); - - LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame - - LocalVector localStripDir( plane.toLocal(stripDet->surface().toGlobal( stripDir))); - - return std::pair( projectedPos, localStripDir); -} diff --git a/Validation/RecoTrack/python/SiStripTrackingRecHitsValid_cfi.py b/Validation/RecoTrack/python/SiStripTrackingRecHitsValid_cfi.py index 1de1ea341fc6f..52b51bc6eccaa 100644 --- a/Validation/RecoTrack/python/SiStripTrackingRecHitsValid_cfi.py +++ b/Validation/RecoTrack/python/SiStripTrackingRecHitsValid_cfi.py @@ -1,7 +1,985 @@ import FWCore.ParameterSet.Config as cms StripTrackingRecHitsValid = cms.EDAnalyzer("SiStripTrackingRecHitsValid", - outputFile = cms.untracked.string(''), + outputFile = cms.string('striptrackingrechitshisto.root'), + OutputMEsInRootFile = cms.bool(True), + TopFolderName = cms.string('SiStrip/RecHitsValidation/TrackingRecHits'), + + TH1Resolx_LF = cms.PSet( + Nbinx = cms.int32(1000), + xmin = cms.double(0.), + xmax = cms.double(0.05), + layerswitchon = cms.bool(False) + ), + + TH1Resolx_MF = cms.PSet( + Nbinx = cms.int32(1000), + xmin = cms.double(0.), + xmax = cms.double(5), + layerswitchon = cms.bool(True) + ), + + TH1Res_LF = cms.PSet( + Nbinx = cms.int32(1000), + xmin = cms.double(-0.2), + xmax = cms.double(+0.2), + layerswitchon = cms.bool(False) + ), + + TH1Res_MF = cms.PSet( + Nbinx = cms.int32(1000), + xmin = cms.double(-20.0), + xmax = cms.double(+20.0), + layerswitchon = cms.bool(True) + ), + + TH1Pull_LF = cms.PSet( + Nbinx = cms.int32(1000), + xmin = cms.double(-50.0), + xmax = cms.double(+50.0), + layerswitchon = cms.bool(False) + ), + + TH1Pull_MF = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-50.0), + xmax = cms.double(+50.0), + layerswitchon = cms.bool(True) + ), + + TH1Category = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.0), + layerswitchon = cms.bool(False) + ), + + TH1Trackwidth = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10.0), + layerswitchon = cms.bool(True) + ), + + TH1Expectedwidth = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.0), + layerswitchon = cms.bool(True) + ), + + TH1Clusterwidth= cms.PSet( + Nbinx = cms.int32(15), + xmin = cms.double(0.), + xmax = cms.double(15.0), + layerswitchon = cms.bool(True) + ), + + TH1Trackanglealpha = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-100.0), + xmax = cms.double(+100.0), + layerswitchon = cms.bool(True) + ), + + TH1Trackanglebeta = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-100.0), + xmax = cms.double(+100.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfile_WClus1 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfile_WClus2 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfile_WClus3 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfile_WClus4 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TProfResMFTrackwidthProfile_WClus1 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfile_WClus2 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfile_WClus21 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfile_WClus22 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-5.0), + ymax = cms.double(+5.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfile_WClus23 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-0.5), + ymax = cms.double(+0.5), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfile_WClus3 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfile_WClus4 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfile = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(10.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfile_Category1 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfile_Category2 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfile_Category3 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfile_Category4 = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(10.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFClusterwidthProfile_Category1 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10.), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFAngleProfile = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-1.), + xmax = cms.double(60.0), + ymin = cms.double(0.), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TH1WclusRphi = cms.PSet( + Nbinx = cms.int32(20), + xmin = cms.double(0.5), + xmax = cms.double(20.5), + layerswitchon = cms.bool(True) + ), + + TH1AdcRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(300.), + layerswitchon = cms.bool(True) + ), + + TH1ResolxLFRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.005), + layerswitchon = cms.bool(False) + ), + + TH1ResolxMFRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TH1ResolxMFRphiwclus1 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TH1ResolxMFRphiwclus2 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TH1ResolxMFRphiwclus3 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TH1ResolxMFRphiwclus4 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(2.0), + layerswitchon = cms.bool(True) + ), + + TH1ResLFRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-0.02), + xmax = cms.double(+0.02), + layerswitchon = cms.bool(False) + ), + + TH1ResMFRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TH1ResMFRphiwclus1 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1ResMFRphiwclus2 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1ResMFRphiwclus3 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1ResMFRphiwclus4 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1PullLFRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-5.0), + xmax = cms.double(+5.0), + layerswitchon = cms.bool(False) + ), + + TH1PullMFRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-5.0), + xmax = cms.double(+5.0), + layerswitchon = cms.bool(True) + ), + + TH1PullMFRphiwclus1 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1PullMFRphiwclus2 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1PullMFRphiwclus3 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1PullMFRphiwclus4 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.0), + xmax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1TrackangleRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-20.0), + xmax = cms.double(+20.0), + layerswitchon = cms.bool(False) + ), + + TH1TrackanglebetaRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-20.0), + xmax = cms.double(+20.0), + layerswitchon = cms.bool(False) + ), + + TH1Trackangle2Rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-20.0), + xmax = cms.double(+20.0), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackangleProfileRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-20.0), + xmax = cms.double(+20.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TH1PullTrackangle2DRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.0), + layerswitchon = cms.bool(False) + ), + + TH1TrackwidthRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.0), + layerswitchon = cms.bool(False) + ), + + TH1ExpectedwidthRphi = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.), + layerswitchon = cms.bool(False) + ), + + TH1ClusterwidthRphi = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.), + layerswitchon = cms.bool(False) + ), + + TH1CategoryRphi = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfPullTrackwidthProfileRphiwclus1 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfPullTrackwidthProfileRphiwclus2 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfPullTrackwidthProfileRphiwclus3 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfPullTrackwidthProfileRphiwclus4 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfPullTrackwidthProfileCategory1Rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileCategory2Rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileCategory3Rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileCategory4Rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileRphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(8.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfileWclus1Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfileWclus2Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfileWclus3Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfileWclus4Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(True) + ), + + TProfResMFTrackwidthProfileWclus1Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfileWclus2Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfileWclus3Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResMFTrackwidthProfileWclus4Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory1Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory2Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory3Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory4Rphi = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFAngleProfileRphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.0), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFClusterwidthProfileCategory1Rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10.), + ymin = cms.double(-2.0), + ymax = cms.double(+2.0), + layerswitchon = cms.bool(False) + ), + + TProfrapidityResProfilewclus1 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.5), + xmax = cms.double(+2.5), + ymin = cms.double(0.0), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfrapidityResProfilewclus2 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.5), + xmax = cms.double(+2.5), + ymin = cms.double(0.0), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfrapidityResProfilewclus3 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.5), + xmax = cms.double(+2.5), + ymin = cms.double(0.0), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TProfrapidityResProfilewclus4 = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.5), + xmax = cms.double(+2.5), + ymin = cms.double(0.0), + ymax = cms.double(2.0), + layerswitchon = cms.bool(False) + ), + + TH1WclusSas = cms.PSet( + Nbinx = cms.int32(20), + xmin = cms.double(0.5), + xmax = cms.double(20.5), + layerswitchon = cms.bool(True) + ), + + TH1AdcSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(300.), + layerswitchon = cms.bool(True) + ), + + TH1ResolxLFSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.005), + layerswitchon = cms.bool(False) + ), + + TH1ResolxMFSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.5), + layerswitchon = cms.bool(True) + ), + + TH1ResLFSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-0.02), + xmax = cms.double(+0.02), + layerswitchon = cms.bool(False) + ), + + TH1ResMFSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-2.), + xmax = cms.double(+2.), + layerswitchon = cms.bool(True) + ), + + TH1PullLFSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-4.), + xmax = cms.double(+4.), + layerswitchon = cms.bool(False) + ), + + TH1PullMFSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-4.), + xmax = cms.double(+4.), + layerswitchon = cms.bool(True) + ), + + TH1TrackangleSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-40.), + xmax = cms.double(+40.), + layerswitchon = cms.bool(False) + ), + + TH1TrackanglebetaSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-40.), + xmax = cms.double(+40.), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackangleProfileSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-40.), + xmax = cms.double(+40.), + ymin = cms.double(-4.), + ymax = cms.double(+4.), + layerswitchon = cms.bool(False) + ), + + TH1TrackwidthSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + layerswitchon = cms.bool(False) + ), + + TH1ExpectedwidthSas = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.), + layerswitchon = cms.bool(False) + ), + + TH1ClusterwidthSas = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.), + layerswitchon = cms.bool(False) + ), + + TH1CategorySas = cms.PSet( + Nbinx = cms.int32(10), + xmin = cms.double(0.), + xmax = cms.double(10.), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(True) + ), + + TProfPullTrackwidthProfileCategory1Sas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileCategory2Sas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileCategory3Sas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfPullTrackwidthProfileCategory4Sas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileSas = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(True) + ), + + TProfResolxMFTrackwidthProfileCategory1Sas = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory2Sas = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory3Sas = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFTrackwidthProfileCategory4Sas = cms.PSet( + Nbinx = cms.int32(12), + xmin = cms.double(0.), + xmax = cms.double(4.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFAngleProfileSas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TProfResolxMFClusterwidthProfileCategory1Sas = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10.), + ymin = cms.double(-2.), + ymax = cms.double(+2.), + layerswitchon = cms.bool(False) + ), + + TH1PosxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-6.0), + xmax = cms.double(+6.0), + layerswitchon = cms.bool(False) + ), + + TH1PosyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-6.0), + xmax = cms.double(+6.0), + layerswitchon = cms.bool(False) + ), + + TH1ResolxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.05), + layerswitchon = cms.bool(False) + ), + + TH1ResolyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.05), + layerswitchon = cms.bool(False) + ), + + TH1ResxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-0.02), + xmax = cms.double(+0.02), + layerswitchon = cms.bool(False) + ), + + TH1ResyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-1.), + xmax = cms.double(+1.), + layerswitchon = cms.bool(False) + ), + + TH1PullxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-5.), + xmax = cms.double(+5.), + layerswitchon = cms.bool(False) + ), + + TH1PullyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-5.), + xmax = cms.double(+5.), + layerswitchon = cms.bool(False) + ), + + trajectoryInput = cms.InputTag("generalTracks"), associatePixel = cms.bool(False), ROUList = cms.vstring('g4SimHitsTrackerHitsTIBLowTof', 'g4SimHitsTrackerHitsTIBHighTof', @@ -11,7 +989,6 @@ 'g4SimHitsTrackerHitsTOBHighTof', 'g4SimHitsTrackerHitsTECLowTof', 'g4SimHitsTrackerHitsTECHighTof'), - trajectoryInput = cms.string('generalTracks'), associateRecoTracks = cms.bool(False), # string trajectoryInput = "rsWithMaterialTracks" associateStrip = cms.bool(True) diff --git a/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc b/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc new file mode 100644 index 0000000000000..febe5e736085b --- /dev/null +++ b/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc @@ -0,0 +1,2159 @@ +#include +#include +#include +#include +#include "Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h" + +#include "FWCore/Framework/interface/ESHandle.h" + +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "TrackingTools/Records/interface/TransientRecHitRecord.h" +#include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h" + +#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h" +#include "DataFormats/DetId/interface/DetId.h" +#include "DataFormats/SiStripDetId/interface/StripSubdetector.h" +#include "DataFormats/SiStripDetId/interface/TECDetId.h" +#include "DataFormats/SiStripDetId/interface/TIBDetId.h" +#include "DataFormats/SiStripDetId/interface/TIDDetId.h" +#include "DataFormats/SiStripDetId/interface/TOBDetId.h" + +#include "DataFormats/GeometryVector/interface/LocalPoint.h" +#include "DataFormats/GeometryVector/interface/GlobalPoint.h" + +#include "RecoLocalTracker/SiStripRecHitConverter/interface/StripCPE.h" +#include "DQM/SiStripCommon/interface/SiStripHistoId.h" +#include "CalibTracker/Records/interface/SiStripDetCablingRcd.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h" +#include "DataFormats/SiStripDetId/interface/SiStripSubStructure.h" +#include "DQM/SiStripCommon/interface/SiStripFolderOrganizer.h" + +using namespace std; +using namespace edm; + +// ROOT +#include "TROOT.h" +#include "TFile.h" +#include "TTree.h" +#include "TBranch.h" +#include "TH1.h" +#include "TH2.h" +class TFile; + +//Constructor +SiStripTrackingRecHitsValid::SiStripTrackingRecHitsValid(const edm::ParameterSet& ps) : + dbe_(edm::Service().operator->()), + conf_(ps), + m_cacheID_(0) + // trajectoryInput_( ps.getParameter("trajectoryInput") ) +{ + topFolderName_ = conf_.getParameter("TopFolderName"); + + trajectoryInputToken_ = consumes >( conf_.getParameter("trajectoryInput") ); + + edm::ParameterSet ParametersResolx_LF = conf_.getParameter("TH1Resolx_LF"); + layerswitchResolx_LF = ParametersResolx_LF.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolx_MF = conf_.getParameter("TH1Resolx_MF"); + layerswitchResolx_MF = ParametersResolx_MF.getParameter("layerswitchon"); + + edm::ParameterSet ParametersRes_LF = conf_.getParameter("TH1Res_LF"); + layerswitchRes_LF = ParametersRes_LF.getParameter("layerswitchon"); + + edm::ParameterSet ParametersRes_MF = conf_.getParameter("TH1Res_MF"); + layerswitchRes_MF = ParametersRes_MF.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPull_LF = conf_.getParameter("TH1Pull_LF"); + layerswitchPull_LF = ParametersPull_LF.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPull_MF = conf_.getParameter("TH1Pull_MF"); + layerswitchPull_MF = ParametersPull_MF.getParameter("layerswitchon"); + + edm::ParameterSet ParametersCategory = conf_.getParameter("TH1Category"); + layerswitchCategory = ParametersCategory.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackwidth = conf_.getParameter("TH1Trackwidth"); + layerswitchTrackwidth = ParametersTrackwidth.getParameter("layerswitchon"); + + edm::ParameterSet ParametersExpectedwidth = conf_.getParameter("TH1Expectedwidth"); + layerswitchExpectedwidth = ParametersExpectedwidth.getParameter("layerswitchon"); + + edm::ParameterSet ParametersClusterwidth = conf_.getParameter("TH1Clusterwidth"); + layerswitchClusterwidth = ParametersClusterwidth.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackanglealpha = conf_.getParameter("TH1Trackanglealpha"); + layerswitchTrackanglealpha = ParametersTrackanglealpha.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackanglebeta = conf_.getParameter("TH1Trackanglebeta"); + layerswitchTrackanglebeta = ParametersTrackanglebeta.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus1 = conf_.getParameter("TProfResolxMFTrackwidthProfile_WClus1"); + layerswitchResolxMFTrackwidthProfile_WClus1 = ParametersResolxMFTrackwidthProfile_WClus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus2 = conf_.getParameter("TProfResolxMFTrackwidthProfile_WClus2"); + layerswitchResolxMFTrackwidthProfile_WClus2 = ParametersResolxMFTrackwidthProfile_WClus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus3 = conf_.getParameter("TProfResolxMFTrackwidthProfile_WClus3"); + layerswitchResolxMFTrackwidthProfile_WClus3 = ParametersResolxMFTrackwidthProfile_WClus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus4 = conf_.getParameter("TProfResolxMFTrackwidthProfile_WClus4"); + layerswitchResolxMFTrackwidthProfile_WClus4 = ParametersResolxMFTrackwidthProfile_WClus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus1 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus1"); + layerswitchResMFTrackwidthProfile_WClus1 = ParametersResMFTrackwidthProfile_WClus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus2 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus2"); + layerswitchResMFTrackwidthProfile_WClus2 = ParametersResMFTrackwidthProfile_WClus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus21 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus21"); + layerswitchResMFTrackwidthProfile_WClus21 = ParametersResMFTrackwidthProfile_WClus21.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus22 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus22"); + layerswitchResMFTrackwidthProfile_WClus22 = ParametersResMFTrackwidthProfile_WClus22.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus23 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus23"); + layerswitchResMFTrackwidthProfile_WClus23 = ParametersResMFTrackwidthProfile_WClus23.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus3 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus3"); + layerswitchResMFTrackwidthProfile_WClus3 = ParametersResMFTrackwidthProfile_WClus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfile_WClus4 = conf_.getParameter("TProfResMFTrackwidthProfile_WClus4"); + layerswitchResMFTrackwidthProfile_WClus4 = ParametersResMFTrackwidthProfile_WClus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile = conf_.getParameter("TProfResolxMFTrackwidthProfile"); + layerswitchResolxMFTrackwidthProfile = ParametersResolxMFTrackwidthProfile.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category1 = conf_.getParameter("TProfResolxMFTrackwidthProfile_Category1"); + layerswitchResolxMFTrackwidthProfile_Category1 = ParametersResolxMFTrackwidthProfile_Category1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category2 = conf_.getParameter("TProfResolxMFTrackwidthProfile_Category2"); + layerswitchResolxMFTrackwidthProfile_Category2 = ParametersResolxMFTrackwidthProfile_Category2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category3 = conf_.getParameter("TProfResolxMFTrackwidthProfile_Category3"); + layerswitchResolxMFTrackwidthProfile_Category3 = ParametersResolxMFTrackwidthProfile_Category3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category4 = conf_.getParameter("TProfResolxMFTrackwidthProfile_Category4"); + layerswitchResolxMFTrackwidthProfile_Category4 = ParametersResolxMFTrackwidthProfile_Category4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFClusterwidthProfile_Category1 = conf_.getParameter("TProfResolxMFClusterwidthProfile_Category1"); + layerswitchResolxMFClusterwidthProfile_Category1 = ParametersResolxMFClusterwidthProfile_Category1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFAngleProfile = conf_.getParameter("TProfResolxMFAngleProfile"); + layerswitchResolxMFAngleProfile = ParametersResolxMFAngleProfile.getParameter("layerswitchon"); + + edm::ParameterSet ParametersWclusRphi = conf_.getParameter("TH1WclusRphi"); + layerswitchWclusRphi = ParametersWclusRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersAdcRphi = conf_.getParameter("TH1AdcRphi"); + layerswitchAdcRphi = ParametersAdcRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxLFRphi = conf_.getParameter("TH1ResolxLFRphi"); + layerswitchResolxLFRphi = ParametersResolxLFRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFRphi = conf_.getParameter("TH1ResolxMFRphi"); + layerswitchResolxMFRphi = ParametersResolxMFRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFRphiwclus1 = conf_.getParameter("TH1ResolxMFRphiwclus1"); + layerswitchResolxMFRphiwclus1 = ParametersResolxMFRphiwclus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFRphiwclus2 = conf_.getParameter("TH1ResolxMFRphiwclus2"); + layerswitchResolxMFRphiwclus2 = ParametersResolxMFRphiwclus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFRphiwclus3 = conf_.getParameter("TH1ResolxMFRphiwclus3"); + layerswitchResolxMFRphiwclus3 = ParametersResolxMFRphiwclus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFRphiwclus4 = conf_.getParameter("TH1ResolxMFRphiwclus4"); + layerswitchResolxMFRphiwclus4 = ParametersResolxMFRphiwclus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResLFRphi = conf_.getParameter("TH1ResLFRphi"); + layerswitchResLFRphi = ParametersResLFRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFRphi = conf_.getParameter("TH1ResMFRphi"); + layerswitchResMFRphi = ParametersResMFRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFRphiwclus1 = conf_.getParameter("TH1ResMFRphiwclus1"); + layerswitchResMFRphiwclus1 = ParametersResMFRphiwclus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFRphiwclus2 = conf_.getParameter("TH1ResMFRphiwclus2"); + layerswitchResMFRphiwclus2 = ParametersResMFRphiwclus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFRphiwclus3 = conf_.getParameter("TH1ResMFRphiwclus3"); + layerswitchResMFRphiwclus3 = ParametersResMFRphiwclus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFRphiwclus4 = conf_.getParameter("TH1ResMFRphiwclus4"); + layerswitchResMFRphiwclus4 = ParametersResMFRphiwclus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullLFRphi = conf_.getParameter("TH1PullLFRphi"); + layerswitchPullLFRphi = ParametersPullLFRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullMFRphi = conf_.getParameter("TH1PullMFRphi"); + layerswitchPullMFRphi = ParametersPullMFRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullMFRphiwclus1 = conf_.getParameter("TH1PullMFRphiwclus1"); + layerswitchPullMFRphiwclus1 = ParametersPullMFRphiwclus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullMFRphiwclus2 = conf_.getParameter("TH1PullMFRphiwclus2"); + layerswitchPullMFRphiwclus2 = ParametersPullMFRphiwclus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullMFRphiwclus3 = conf_.getParameter("TH1PullMFRphiwclus3"); + layerswitchPullMFRphiwclus3 = ParametersPullMFRphiwclus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullMFRphiwclus4 = conf_.getParameter("TH1PullMFRphiwclus4"); + layerswitchPullMFRphiwclus4 = ParametersPullMFRphiwclus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackangleRphi = conf_.getParameter("TH1TrackangleRphi"); + layerswitchTrackangleRphi = ParametersTrackangleRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackanglebetaRphi = conf_.getParameter("TH1TrackanglebetaRphi"); + layerswitchTrackanglebetaRphi = ParametersTrackanglebetaRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackangle2Rphi = conf_.getParameter("TH1Trackangle2Rphi"); + layerswitchTrackangle2Rphi = ParametersTrackangle2Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackangleProfileRphi = conf_.getParameter("TProfPullTrackangleProfileRphi"); + layerswitchPullTrackangleProfileRphi = ParametersPullTrackangleProfileRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackangle2DRphi = conf_.getParameter("TH1PullTrackangle2DRphi"); + layerswitchPullTrackangle2DRphi = ParametersPullTrackangle2DRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackwidthRphi = conf_.getParameter("TH1TrackwidthRphi"); + layerswitchTrackwidthRphi = ParametersTrackwidthRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersExpectedwidthRphi = conf_.getParameter("TH1ExpectedwidthRphi"); + layerswitchExpectedwidthRphi = ParametersExpectedwidthRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersClusterwidthRphi = conf_.getParameter("TH1ClusterwidthRphi"); + layerswitchClusterwidthRphi = ParametersClusterwidthRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersCategoryRphi = conf_.getParameter("TH1CategoryRphi"); + layerswitchCategoryRphi = ParametersCategoryRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileRphi = conf_.getParameter("TProfPullTrackwidthProfileRphi"); + layerswitchPullTrackwidthProfileRphi = ParametersPullTrackwidthProfileRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus1 = conf_.getParameter("TProfPullTrackwidthProfileRphiwclus1"); + layerswitchPullTrackwidthProfileRphiwclus1 = ParametersPullTrackwidthProfileRphiwclus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus2 = conf_.getParameter("TProfPullTrackwidthProfileRphiwclus2"); + layerswitchPullTrackwidthProfileRphiwclus2 = ParametersPullTrackwidthProfileRphiwclus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus3 = conf_.getParameter("TProfPullTrackwidthProfileRphiwclus3"); + layerswitchPullTrackwidthProfileRphiwclus3 = ParametersPullTrackwidthProfileRphiwclus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus4 = conf_.getParameter("TProfPullTrackwidthProfileRphiwclus4"); + layerswitchPullTrackwidthProfileRphiwclus4 = ParametersPullTrackwidthProfileRphiwclus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory1Rphi = conf_.getParameter("TProfPullTrackwidthProfileCategory1Rphi"); + layerswitchPullTrackwidthProfileCategory1Rphi = ParametersPullTrackwidthProfileCategory1Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory2Rphi = conf_.getParameter("TProfPullTrackwidthProfileCategory2Rphi"); + layerswitchPullTrackwidthProfileCategory2Rphi = ParametersPullTrackwidthProfileCategory2Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory3Rphi = conf_.getParameter("TProfPullTrackwidthProfileCategory3Rphi"); + layerswitchPullTrackwidthProfileCategory3Rphi = ParametersPullTrackwidthProfileCategory3Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory4Rphi = conf_.getParameter("TProfPullTrackwidthProfileCategory4Rphi"); + layerswitchPullTrackwidthProfileCategory4Rphi = ParametersPullTrackwidthProfileCategory4Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileRphi = conf_.getParameter("TProfResolxMFTrackwidthProfileRphi"); + layerswitchResolxMFTrackwidthProfileRphi = ParametersResolxMFTrackwidthProfileRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus1Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileWclus1Rphi"); + layerswitchResolxMFTrackwidthProfileWclus1Rphi = ParametersResolxMFTrackwidthProfileWclus1Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus2Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileWclus2Rphi"); + layerswitchResolxMFTrackwidthProfileWclus2Rphi = ParametersResolxMFTrackwidthProfileWclus2Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus3Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileWclus3Rphi"); + layerswitchResolxMFTrackwidthProfileWclus3Rphi = ParametersResolxMFTrackwidthProfileWclus3Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus4Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileWclus4Rphi"); + layerswitchResolxMFTrackwidthProfileWclus4Rphi = ParametersResolxMFTrackwidthProfileWclus4Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfileWclus1Rphi = conf_.getParameter("TProfResMFTrackwidthProfileWclus1Rphi"); + layerswitchResMFTrackwidthProfileWclus1Rphi = ParametersResMFTrackwidthProfileWclus1Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfileWclus2Rphi = conf_.getParameter("TProfResMFTrackwidthProfileWclus2Rphi"); + layerswitchResMFTrackwidthProfileWclus2Rphi = ParametersResMFTrackwidthProfileWclus2Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfileWclus3Rphi = conf_.getParameter("TProfResMFTrackwidthProfileWclus3Rphi"); + layerswitchResMFTrackwidthProfileWclus3Rphi = ParametersResMFTrackwidthProfileWclus3Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFTrackwidthProfileWclus4Rphi = conf_.getParameter("TProfResMFTrackwidthProfileWclus4Rphi"); + layerswitchResMFTrackwidthProfileWclus4Rphi = ParametersResMFTrackwidthProfileWclus4Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory1Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory1Rphi"); + layerswitchResolxMFTrackwidthProfileCategory1Rphi = ParametersResolxMFTrackwidthProfileCategory1Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory2Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory2Rphi"); + layerswitchResolxMFTrackwidthProfileCategory2Rphi = ParametersResolxMFTrackwidthProfileCategory2Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory3Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory3Rphi"); + layerswitchResolxMFTrackwidthProfileCategory3Rphi = ParametersResolxMFTrackwidthProfileCategory3Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory4Rphi = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory4Rphi"); + layerswitchResolxMFTrackwidthProfileCategory4Rphi = ParametersResolxMFTrackwidthProfileCategory4Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFAngleProfileRphi = conf_.getParameter("TProfResolxMFAngleProfileRphi"); + layerswitchResolxMFAngleProfileRphi = ParametersResolxMFAngleProfileRphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFClusterwidthProfileCategory1Rphi = conf_.getParameter("TProfResolxMFClusterwidthProfileCategory1Rphi"); + layerswitchResolxMFClusterwidthProfileCategory1Rphi = ParametersResolxMFClusterwidthProfileCategory1Rphi.getParameter("layerswitchon"); + + edm::ParameterSet ParametersrapidityResProfilewclus1 = conf_.getParameter("TProfrapidityResProfilewclus1"); + layerswitchrapidityResProfilewclus1 = ParametersrapidityResProfilewclus1.getParameter("layerswitchon"); + + edm::ParameterSet ParametersrapidityResProfilewclus2 = conf_.getParameter("TProfrapidityResProfilewclus2"); + layerswitchrapidityResProfilewclus2 = ParametersrapidityResProfilewclus2.getParameter("layerswitchon"); + + edm::ParameterSet ParametersrapidityResProfilewclus3 = conf_.getParameter("TProfrapidityResProfilewclus3"); + layerswitchrapidityResProfilewclus3 = ParametersrapidityResProfilewclus3.getParameter("layerswitchon"); + + edm::ParameterSet ParametersrapidityResProfilewclus4 = conf_.getParameter("TProfrapidityResProfilewclus4"); + layerswitchrapidityResProfilewclus4 = ParametersrapidityResProfilewclus4.getParameter("layerswitchon"); + + edm::ParameterSet ParametersWclusSas = conf_.getParameter("TH1WclusSas"); + layerswitchWclusSas = ParametersWclusSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersAdcSas = conf_.getParameter("TH1AdcSas"); + layerswitchAdcSas = ParametersAdcSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxLFSas = conf_.getParameter("TH1ResolxLFSas"); + layerswitchResolxLFSas = ParametersResolxLFSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFSas = conf_.getParameter("TH1ResolxMFSas"); + layerswitchResolxMFSas = ParametersResolxMFSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResLFSas = conf_.getParameter("TH1ResLFSas"); + layerswitchResLFSas = ParametersResLFSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResMFSas = conf_.getParameter("TH1ResMFSas"); + layerswitchResMFSas = ParametersResMFSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullLFSas = conf_.getParameter("TH1PullLFSas"); + layerswitchPullLFSas = ParametersPullLFSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullMFSas = conf_.getParameter("TH1PullMFSas"); + layerswitchPullMFSas = ParametersPullMFSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackangleSas = conf_.getParameter("TH1TrackangleSas"); + layerswitchTrackangleSas = ParametersTrackangleSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackanglebetaSas = conf_.getParameter("TH1TrackanglebetaSas"); + layerswitchTrackanglebetaSas = ParametersTrackanglebetaSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackangleProfileSas = conf_.getParameter("TProfPullTrackangleProfileSas"); + layerswitchPullTrackangleProfileSas = ParametersPullTrackangleProfileSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersTrackwidthSas = conf_.getParameter("TH1TrackwidthSas"); + layerswitchTrackwidthSas = ParametersTrackwidthSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersExpectedwidthSas = conf_.getParameter("TH1ExpectedwidthSas"); + layerswitchExpectedwidthSas = ParametersExpectedwidthSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersClusterwidthSas = conf_.getParameter("TH1ClusterwidthSas"); + layerswitchClusterwidthSas = ParametersClusterwidthSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersCategorySas = conf_.getParameter("TH1CategorySas"); + layerswitchCategorySas = ParametersCategorySas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileSas = conf_.getParameter("TProfPullTrackwidthProfileSas"); + layerswitchPullTrackwidthProfileSas = ParametersPullTrackwidthProfileSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory1Sas = conf_.getParameter("TProfPullTrackwidthProfileCategory1Sas"); + layerswitchPullTrackwidthProfileCategory1Sas = ParametersPullTrackwidthProfileCategory1Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory2Sas = conf_.getParameter("TProfPullTrackwidthProfileCategory2Sas"); + layerswitchPullTrackwidthProfileCategory2Sas = ParametersPullTrackwidthProfileCategory2Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory3Sas = conf_.getParameter("TProfPullTrackwidthProfileCategory3Sas"); + layerswitchPullTrackwidthProfileCategory3Sas = ParametersPullTrackwidthProfileCategory3Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullTrackwidthProfileCategory4Sas = conf_.getParameter("TProfPullTrackwidthProfileCategory4Sas"); + layerswitchPullTrackwidthProfileCategory4Sas = ParametersPullTrackwidthProfileCategory4Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileSas = conf_.getParameter("TProfResolxMFTrackwidthProfileSas"); + layerswitchResolxMFTrackwidthProfileSas = ParametersResolxMFTrackwidthProfileSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory1Sas = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory1Sas"); + layerswitchResolxMFTrackwidthProfileCategory1Sas = ParametersResolxMFTrackwidthProfileCategory1Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory2Sas = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory2Sas"); + layerswitchResolxMFTrackwidthProfileCategory2Sas = ParametersResolxMFTrackwidthProfileCategory2Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory3Sas = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory3Sas"); + layerswitchResolxMFTrackwidthProfileCategory3Sas = ParametersResolxMFTrackwidthProfileCategory3Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory4Sas = conf_.getParameter("TProfResolxMFTrackwidthProfileCategory4Sas"); + layerswitchResolxMFTrackwidthProfileCategory4Sas = ParametersResolxMFTrackwidthProfileCategory4Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFAngleProfileSas = conf_.getParameter("TProfResolxMFAngleProfileSas"); + layerswitchResolxMFAngleProfileSas = ParametersResolxMFAngleProfileSas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMFClusterwidthProfileCategory1Sas = conf_.getParameter("TProfResolxMFClusterwidthProfileCategory1Sas"); + layerswitchResolxMFClusterwidthProfileCategory1Sas = ParametersResolxMFClusterwidthProfileCategory1Sas.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPosxMatched = conf_.getParameter("TH1PosxMatched"); + layerswitchPosxMatched = ParametersPosxMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPosyMatched = conf_.getParameter("TH1PosyMatched"); + layerswitchPosyMatched = ParametersPosyMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolxMatched = conf_.getParameter("TH1ResolxMatched"); + layerswitchResolxMatched = ParametersResolxMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResolyMatched = conf_.getParameter("TH1ResolyMatched"); + layerswitchResolyMatched = ParametersResolyMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResxMatched = conf_.getParameter("TH1ResxMatched"); + layerswitchResxMatched = ParametersResxMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersResyMatched = conf_.getParameter("TH1ResyMatched"); + layerswitchResyMatched = ParametersResyMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullxMatched = conf_.getParameter("TH1PullxMatched"); + layerswitchPullxMatched = ParametersPullxMatched.getParameter("layerswitchon"); + + edm::ParameterSet ParametersPullyMatched = conf_.getParameter("TH1PullyMatched"); + layerswitchPullyMatched = ParametersPullyMatched.getParameter("layerswitchon"); + +} + +//Destructor +SiStripTrackingRecHitsValid::~SiStripTrackingRecHitsValid() +{ + // if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); +} +//-------------------------------------------------------------------------------------------- +void SiStripTrackingRecHitsValid::beginRun(const edm::Run& run, const edm::EventSetup& es){ + + unsigned long long cacheID = es.get().cacheIdentifier(); + if (m_cacheID_ != cacheID) { + m_cacheID_ = cacheID; + edm::LogInfo("SiStripRecHitsValid") <<"SiStripRecHitsValid::beginRun: " + << " Creating MEs for new Cabling "; + + createMEs(es); + } +} + + +void SiStripTrackingRecHitsValid::beginJob(const edm::EventSetup& es){ + +} + +void SiStripTrackingRecHitsValid::endJob() { + + bool outputMEsInRootFile = conf_.getParameter("OutputMEsInRootFile"); + std::string outputFileName = conf_.getParameter("outputFile"); + + // save histos in a file + if(outputMEsInRootFile) dbe_->save(outputFileName); + +} + +// Functions that gets called by framework every event +void SiStripTrackingRecHitsValid::analyze(const edm::Event & e, const edm::EventSetup & es) +{ + + LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event(); + //cout << " Run = " << e.id().run() << " Event = " << e.id().event() << endl; + + int isrechitrphi = 0; + int isrechitsas = 0; + int isrechitmatched = 0; + + DetId detid; + uint32_t myid; + + TrackerHitAssociator associate(e, conf_); + PSimHit closest; + + //Retrieve tracker topology from geometry + edm::ESHandle tTopoHandle; + es.get().get(tTopoHandle); + const TrackerTopology* const tTopo = tTopoHandle.product(); + + edm::ESHandle < TrackerGeometry > pDD; + es.get < TrackerDigiGeometryRecord > ().get(pDD); + const TrackerGeometry & tracker(*pDD); + + const TrackerGeometry *tracker2; + edm::ESHandle < TrackerGeometry > estracker; + es.get < TrackerDigiGeometryRecord > ().get(estracker); + tracker2 = &(*estracker); + + edm::ESHandle < MagneticField > magfield; + es.get < IdealMagneticFieldRecord > ().get(magfield); + + const MagneticField & magfield_(*magfield); + magfield2_ = &magfield_; + + edm::ESHandle < StripClusterParameterEstimator > stripcpe; + es.get < TkStripCPERecord > ().get("SimpleStripCPE", stripcpe); + + // Mangano's + + edm::Handle < std::vector > trajCollectionHandle; + // e.getByLabel(trajectoryInput_, trajCollectionHandle); + e.getByToken(trajectoryInputToken_, trajCollectionHandle); + + edm::LogVerbatim("TrajectoryAnalyzer") << "trajColl->size(): " << trajCollectionHandle->size(); + //cout<<"trajColl->size() = "<size()<::const_iterator it = trajCollectionHandle->begin(); it != trajCollectionHandle->end(); it++) { + + edm::LogVerbatim("TrajectoryAnalyzer") << "this traj has " << it->foundHits() << " valid hits" << " , " << "isValid: " << it->isValid(); + + vector < TrajectoryMeasurement > tmColl = it->measurements(); + for (vector < TrajectoryMeasurement >::const_iterator itTraj = tmColl.begin(); itTraj != tmColl.end(); itTraj++) { + if (!itTraj->updatedState().isValid()) continue; + + rechitrphi.clear(); + rechitstereo.clear(); + rechitmatched.clear(); + + //edm::LogVerbatim("TrajectoryAnalyzer") << "tm number: " << + // (itTraj - tmColl.begin()) + 1<< " , " << "tm.backwardState.pt: " << + // itTraj->backwardPredictedState().globalMomentum().perp() << " , " << + // "tm.forwardState.pt: " << itTraj->forwardPredictedState().globalMomentum().perp() << + // " , " << "tm.updatedState.pt: " << itTraj->updatedState().globalMomentum().perp() << + // " , " << "tm.globalPos.perp: " << itTraj->updatedState().globalPosition().perp(); + + if (itTraj->updatedState().globalMomentum().perp() < 0.5) continue; + + TrajectoryStateOnSurface tsos = itTraj->updatedState(); + + DetId detid2 = itTraj->recHit()->geographicalId(); + + const TransientTrackingRecHit::ConstRecHitPointer thit2 = itTraj->recHit(); + const SiStripMatchedRecHit2D *matchedhit = dynamic_cast < const SiStripMatchedRecHit2D * >((*thit2).hit()); + const SiStripRecHit2D *hit2d = dynamic_cast < const SiStripRecHit2D * >((*thit2).hit()); + const SiStripRecHit1D *hit1d = dynamic_cast < const SiStripRecHit1D * >((*thit2).hit()); + //if(matchedhit) cout<<"manganomatchedhit"<geographicalId(); + myid = ((thit)->geographicalId()).rawId(); + //Here due to the fact that the SiStripHistoId::getSubdetid complains when + //a subdet of 1 or 2 appears we add an if statement. + if(detid.subdetId()==1 ||detid.subdetId()==2 ){ + continue; + } + SiStripHistoId hidmanager; + std::string label = hidmanager.getSubdetid(myid,tTopo,true); + // std::cout<< "label " << label << " and id " << detid.subdetId() << std::endl; + + StripSubdetector StripSubdet = (StripSubdetector) detid; + //Variable to define the case we are dealing with + std::string matchedmonorstereo; + + isrechitmatched = 0; + + if (matchedhit) { + + isrechitmatched = 1; + const GluedGeomDet *gluedDet = (const GluedGeomDet *) tracker.idToDet(matchedhit->geographicalId()); + //Analysis + matchedmonorstereo = "matched"; + rechitanalysis_matched(tsos, thit2, gluedDet, associate, stripcpe, matchedmonorstereo ); + // rechitmatched.push_back(rechitpro); + + } + + std::map::iterator iStereoAndMatchedME = StereoAndMatchedMEsMap.find(label); + + //Filling Histograms for Matched hits + + if (isrechitmatched) { + + if(iStereoAndMatchedME != StereoAndMatchedMEsMap.end()){ + fillME(iStereoAndMatchedME->second.mePosxMatched,rechitpro.x); + fillME(iStereoAndMatchedME->second.mePosyMatched,rechitpro.y); + fillME(iStereoAndMatchedME->second.meResolxMatched,sqrt(rechitpro.resolxx)); + fillME(iStereoAndMatchedME->second.meResolyMatched,sqrt(rechitpro.resolyy)); + fillME(iStereoAndMatchedME->second.meResxMatched,rechitpro.resx); + fillME(iStereoAndMatchedME->second.meResyMatched,rechitpro.resy); + fillME(iStereoAndMatchedME->second.mePullxMatched,rechitpro.pullx); + fillME(iStereoAndMatchedME->second.mePullyMatched,rechitpro.pully); + } + + } + + //Reset Variables here for the current event + isrechitrphi = 0; + isrechitsas = 0; + + /////////////////////////////////////////////////////// + // simple hits from matched hits + /////////////////////////////////////////////////////// + + if (tsos.globalDirection().transverse() != 0) { + track_rapidity = tsos.globalDirection().eta(); + } else { + track_rapidity = -999.0; + } + + GluedGeomDet *gdet; + const SiStripRecHit2D *monohit; + + if (matchedhit) { + auto hm = matchedhit->monoHit(); + monohit = &hm; + // const GeomDetUnit * monodet=gdet->monoDet(); + gdet = (GluedGeomDet *) tracker2->idToDet(matchedhit->geographicalId()); + + if (monohit) { + + isrechitrphi = 1; + + //Analysis + matchedmonorstereo = "monoHit"; + rechitanalysis_matched(tsos, thit2, gdet, associate, stripcpe, matchedmonorstereo ); + + } + + auto s = matchedhit->stereoHit(); + const SiStripRecHit2D *stereohit = &s; + + if (stereohit) { + + isrechitsas = 1; + + //Analysis + matchedmonorstereo = "stereoHit"; + rechitanalysis_matched(tsos, thit2, gdet, associate, stripcpe, matchedmonorstereo ); + } + } + + if (hit1d) { + // simple hits are mono or stereo + // cout<<"simple hit"<::iterator iLayerME = LayerMEsMap.find(label); + + if (isrechitrphi > 0 || isrechitsas > 0) { + + + + if (isrechitrphi > 0) { + + fillME(simplehitsMEs.meCategory,rechitpro.category); + fillME(simplehitsMEs.meTrackwidth,rechitpro.trackwidth); + fillME(simplehitsMEs.meExpectedwidth,rechitpro.expectedwidth); + fillME(simplehitsMEs.meClusterwidth,rechitpro.clusiz); + fillME(simplehitsMEs.meTrackanglealpha,rechitpro.trackangle); + fillME(simplehitsMEs.meTrackanglebeta,rechitpro.trackanglebeta); + + fillME(simplehitsMEs.meResolxMFAngleProfile,rechitpro.trackangle, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResolxMFTrackwidthProfile,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + + if (rechitpro.clusiz == 1) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus1,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus1,rechitpro.trackwidth, fabs(rechitpro.resxMF)); + } + if (rechitpro.clusiz == 2) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus2,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus2,rechitpro.trackwidth, fabs(rechitpro.resxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus21,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus22,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus23,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + } + if (rechitpro.clusiz == 3) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus3,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus3,rechitpro.trackwidth, fabs(rechitpro.resxMF)); + } + if (rechitpro.clusiz == 4) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus4,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus4,rechitpro.trackwidth, fabs(rechitpro.resxMF)); + } + + if (rechitpro.category == 1) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory1,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResolxMFClusterwidthProfileCategory1,rechitpro.clusiz, sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 2) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory2,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 3) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory3,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 4) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory4,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + + fillME(simplehitsMEs.meResolxMF,sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResolxLF,sqrt(rechitpro.resolxx)); + fillME(simplehitsMEs.meResMF,rechitpro.resxMF); + fillME(simplehitsMEs.meResLF,rechitpro.resx); + fillME(simplehitsMEs.mePullMF,rechitpro.pullxMF); + fillME(simplehitsMEs.mePullLF,rechitpro.pullx); + + } + + if (isrechitsas > 0) { + + fillME(simplehitsMEs.meCategory,rechitpro.category); + fillME(simplehitsMEs.meTrackwidth,rechitpro.trackwidth); + fillME(simplehitsMEs.meExpectedwidth,rechitpro.expectedwidth); + fillME(simplehitsMEs.meClusterwidth,rechitpro.clusiz); + fillME(simplehitsMEs.meTrackanglealpha,rechitpro.trackangle); + fillME(simplehitsMEs.meTrackanglebeta,rechitpro.trackanglebeta); + + fillME(simplehitsMEs.meResolxMFAngleProfile,rechitpro.trackangle, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResolxMFTrackwidthProfile,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + + if (rechitpro.clusiz == 1) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus1,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus1,rechitpro.trackwidth, rechitpro.resxMF); + } + + if (rechitpro.clusiz == 2) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus2,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus2,rechitpro.trackwidth, rechitpro.resxMF); + } + if (rechitpro.clusiz == 3) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus3,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus3,rechitpro.trackwidth, rechitpro.resxMF); + } + if (rechitpro.clusiz == 4) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileWClus4,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResMFTrackwidthProfileWClus4,rechitpro.trackwidth, rechitpro.resxMF); + } + if (rechitpro.category == 1) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory1,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResolxMFClusterwidthProfileCategory1,rechitpro.clusiz, sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 2) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory2,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 3) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory3,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 4) { + fillME(simplehitsMEs.meResolxMFTrackwidthProfileCategory4,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + + fillME(simplehitsMEs.meResolxMF,sqrt(rechitpro.resolxxMF)); + fillME(simplehitsMEs.meResolxLF,sqrt(rechitpro.resolxx)); + fillME(simplehitsMEs.meResMF,rechitpro.resxMF); + fillME(simplehitsMEs.meResLF,rechitpro.resx); + fillME(simplehitsMEs.mePullMF,rechitpro.pullxMF); + fillME(simplehitsMEs.mePullLF,rechitpro.pullx); + + } + + + + if(iLayerME != LayerMEsMap.end()){ + + if (isrechitrphi > 0) { + + fillME(iLayerME->second.meWclusRphi,rechitpro.clusiz); + fillME(iLayerME->second.meAdcRphi,rechitpro.cluchg); + fillME(iLayerME->second.meResolxLFRphi,sqrt(rechitpro.resolxx)); + fillME(iLayerME->second.meResolxMFRphi,sqrt(rechitpro.resolxxMF)); + + if( (min(rechitpro.clusiz, 4) - 1) == 1 ){fillME(iLayerME->second.meResolxMFRphiwclus1,sqrt(rechitpro.resolxxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 2 ){fillME(iLayerME->second.meResolxMFRphiwclus2,sqrt(rechitpro.resolxxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 3 ){fillME(iLayerME->second.meResolxMFRphiwclus3,sqrt(rechitpro.resolxxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 4 ){fillME(iLayerME->second.meResolxMFRphiwclus4,sqrt(rechitpro.resolxxMF));} + + fillME(iLayerME->second.meResLFRphi,rechitpro.resx); + fillME(iLayerME->second.meResMFRphi,rechitpro.resxMF); + + if( (min(rechitpro.clusiz, 4) - 1) == 1 ){fillME(iLayerME->second.merapidityResProfilewclus1,track_rapidity, fabs(rechitpro.resxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 2 ){fillME(iLayerME->second.merapidityResProfilewclus2,track_rapidity, fabs(rechitpro.resxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 3 ){fillME(iLayerME->second.merapidityResProfilewclus3,track_rapidity, fabs(rechitpro.resxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 4 ){fillME(iLayerME->second.merapidityResProfilewclus4,track_rapidity, fabs(rechitpro.resxMF));} + + if( (min(rechitpro.clusiz, 4) - 1) == 1 ){fillME(iLayerME->second.meResMFRphiwclus1,rechitpro.resxMF);} + if( (min(rechitpro.clusiz, 4) - 1) == 2 ){fillME(iLayerME->second.meResMFRphiwclus2,rechitpro.resxMF);} + if( (min(rechitpro.clusiz, 4) - 1) == 3 ){fillME(iLayerME->second.meResMFRphiwclus3,rechitpro.resxMF);} + if( (min(rechitpro.clusiz, 4) - 1) == 4 ){fillME(iLayerME->second.meResMFRphiwclus4,rechitpro.resxMF);} + + fillME(iLayerME->second.mePullLFRphi,rechitpro.pullx); + fillME(iLayerME->second.mePullMFRphi,rechitpro.pullxMF); + + if( (min(rechitpro.clusiz, 4) - 1) == 1 ){fillME(iLayerME->second.mePullMFRphiwclus1,rechitpro.pullxMF);} + if( (min(rechitpro.clusiz, 4) - 1) == 2 ){fillME(iLayerME->second.mePullMFRphiwclus2,rechitpro.pullxMF);} + if( (min(rechitpro.clusiz, 4) - 1) == 3 ){fillME(iLayerME->second.mePullMFRphiwclus3,rechitpro.pullxMF);} + if( (min(rechitpro.clusiz, 4) - 1) == 4 ){fillME(iLayerME->second.mePullMFRphiwclus4,rechitpro.pullxMF);} + + + fillME(iLayerME->second.meTrackangleRphi,rechitpro.trackangle); + fillME(iLayerME->second.mePullTrackangleProfileRphi,rechitpro.trackangle,fabs(rechitpro.pullxMF)); + + if( (min(rechitpro.clusiz, 4) - 1) == 1 ){fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus1,rechitpro.trackwidth, fabs(rechitpro.pullxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 2 ){fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus2,rechitpro.trackwidth, fabs(rechitpro.pullxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 3 ){fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus3,rechitpro.trackwidth, fabs(rechitpro.pullxMF));} + if( (min(rechitpro.clusiz, 4) - 1) == 4 ){fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus4,rechitpro.trackwidth, fabs(rechitpro.pullxMF));} + + + if (rechitpro.clusiz == 1) { + fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus1Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iLayerME->second.meResMFTrackwidthProfileWclus1Rphi,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + } + if (rechitpro.clusiz == 2) { + fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus2Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iLayerME->second.meResMFTrackwidthProfileWclus2Rphi,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + } + if (rechitpro.clusiz == 3) { + fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus3Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iLayerME->second.meResMFTrackwidthProfileWclus3Rphi,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + } + if (rechitpro.clusiz == 4) { + fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus4Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iLayerME->second.meResMFTrackwidthProfileWclus4Rphi,rechitpro.trackwidth,fabs(rechitpro.resxMF)); + } + + + if (rechitpro.category == 1) { + fillME(iLayerME->second.mePullTrackwidthProfileCategory1Rphi,rechitpro.trackwidth,fabs(rechitpro.pullxMF)); + fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory1Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iLayerME->second.meResolxMFClusterwidthProfileCategory1Rphi,rechitpro.clusiz,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 2) { + fillME(iLayerME->second.mePullTrackwidthProfileCategory2Rphi,rechitpro.trackwidth,fabs(rechitpro.pullxMF)); + fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory2Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 3) { + fillME(iLayerME->second.mePullTrackwidthProfileCategory3Rphi,rechitpro.trackwidth,fabs(rechitpro.pullxMF)); + fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory3Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 4) { + fillME(iLayerME->second.mePullTrackwidthProfileCategory4Rphi,rechitpro.trackwidth,fabs(rechitpro.pullxMF)); + fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory4Rphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + + fillME(iLayerME->second.meTrackwidthRphi,rechitpro.trackwidth); + fillME(iLayerME->second.meExpectedwidthRphi,rechitpro.expectedwidth); + fillME(iLayerME->second.meClusterwidthRphi,rechitpro.clusiz); + fillME(iLayerME->second.meCategoryRphi,rechitpro.category); + fillME(iLayerME->second.meResolxMFTrackwidthProfileRphi,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iLayerME->second.meResolxMFAngleProfileRphi,rechitpro.trackangle,sqrt(rechitpro.resolxxMF)); + } + + } + + if(iStereoAndMatchedME != StereoAndMatchedMEsMap.end()){ + + if (isrechitsas > 0) { + + fillME(iStereoAndMatchedME->second.meWclusSas,rechitpro.clusiz); + fillME(iStereoAndMatchedME->second.meAdcSas,rechitpro.cluchg); + fillME(iStereoAndMatchedME->second.meResolxLFSas,sqrt(rechitpro.resolxx)); + fillME(iStereoAndMatchedME->second.meResLFSas,rechitpro.resx); + fillME(iStereoAndMatchedME->second.mePullLFSas,rechitpro.pullx); + fillME(iStereoAndMatchedME->second.meResolxMFSas,sqrt(rechitpro.resolxxMF)); + fillME(iStereoAndMatchedME->second.meResMFSas,rechitpro.resxMF); + fillME(iStereoAndMatchedME->second.mePullMFSas,rechitpro.pullxMF); + fillME(iStereoAndMatchedME->second.meTrackangleSas,rechitpro.trackangle); + fillME(iStereoAndMatchedME->second.mePullTrackangleProfileSas,rechitpro.trackangle, rechitpro.pullxMF); + fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileSas,rechitpro.trackwidth, rechitpro.pullxMF); + if (rechitpro.category == 1) { + fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory1Sas,rechitpro.trackwidth,rechitpro.pullxMF); + fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory1Sas,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iStereoAndMatchedME->second.meResolxMFClusterwidthProfileCategory1Sas,rechitpro.clusiz,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 2) { + fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory2Sas,rechitpro.trackwidth,rechitpro.pullxMF); + fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory2Sas,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 3) { + fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory3Sas,rechitpro.trackwidth,rechitpro.pullxMF); + fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory3Sas,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + if (rechitpro.category == 4) { + fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory4Sas,rechitpro.trackwidth,rechitpro.pullxMF); + fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory4Sas,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + } + fillME(iStereoAndMatchedME->second.meTrackwidthSas,rechitpro.trackwidth); + fillME(iStereoAndMatchedME->second.meExpectedwidthSas,rechitpro.expectedwidth); + fillME(iStereoAndMatchedME->second.meClusterwidthSas,rechitpro.clusiz); + fillME(iStereoAndMatchedME->second.meCategorySas,rechitpro.category); + fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileSas,rechitpro.trackwidth,sqrt(rechitpro.resolxxMF)); + fillME(iStereoAndMatchedME->second.meResolxMFAngleProfileSas,rechitpro.trackangle, rechitpro.resolxxMF); + } + + } + + + } //simplehits + //cout<<"DebugLine301"< SiStripTrackingRecHitsValid::projectHit(const PSimHit & hit, + const StripGeomDetUnit + * stripDet, + const BoundPlane & + plane) +{ + // const StripGeomDetUnit* stripDet = dynamic_cast(hit.det()); + //if (stripDet == 0) throw MeasurementDetException("HitMatcher hit is not on StripGeomDetUnit"); + + const StripTopology & topol = stripDet->specificTopology(); + GlobalPoint globalpos = stripDet->surface().toGlobal(hit.localPosition()); + LocalPoint localHit = plane.toLocal(globalpos); + //track direction + LocalVector locdir = hit.localDirection(); + //rotate track in new frame + + GlobalVector globaldir = stripDet->surface().toGlobal(locdir); + LocalVector dir = plane.toLocal(globaldir); + float scale = -localHit.z() / dir.z(); + + LocalPoint projectedPos = localHit + scale * dir; + + // std::cout << "projectedPos " << projectedPos << std::endl; + + float selfAngle = topol.stripAngle(topol.strip(hit.localPosition())); + + LocalVector stripDir(sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame + + LocalVector localStripDir(plane.toLocal(stripDet->surface().toGlobal(stripDir))); + + return std::pair < LocalPoint, LocalVector > (projectedPos, localStripDir); +} +//-------------------------------------------------------------------------------------------- +void SiStripTrackingRecHitsValid::rechitanalysis_matched(TrajectoryStateOnSurface tsos, const TransientTrackingRecHit::ConstRecHitPointer thit, const GluedGeomDet* gluedDet, TrackerHitAssociator& associate, edm::ESHandle stripcpe, std::string matchedmonorstereo){ + + rechitpro.x = -999999.; rechitpro.y = -999999.; rechitpro.z = -999999.; rechitpro.resolxx = -999999.; rechitpro.resolxy = -999999.; rechitpro.resolyy = -999999.; + rechitpro.resolxxMF = -999999.; rechitpro.phi = -999999.;rechitpro.resx = -999999.; rechitpro.resy = -999999.; rechitpro.resxMF = -999999.; + rechitpro.pullx = -999999.; rechitpro.pully = -999999.; rechitpro.pullxMF = -999999.; rechitpro.trackangle = -999999.; rechitpro.trackanglebeta = -999999.; + rechitpro.trackangle2 = -999999.; rechitpro.trackwidth = -999999.; rechitpro.expectedwidth = -999999.; rechitpro.category = -999999.; rechitpro.thickness = -999999.; + rechitpro.clusiz = -999999.; rechitpro.cluchg = -999999.; + + const GeomDetUnit *monodet = gluedDet->monoDet(); + const GeomDetUnit *stereodet = gluedDet->stereoDet(); + //We initialized it to monoHit case because it complains that it may be uninitialized + //and it will change value in the stereoHit case. The matched case do not use this + const StripGeomDetUnit *stripdet = (const StripGeomDetUnit *) (monodet) ; + + const SiStripMatchedRecHit2D *matchedhit = dynamic_cast < const SiStripMatchedRecHit2D * >((*thit).hit()); + const SiStripRecHit2D *monohit; + const SiStripRecHit2D *stereohit; + + if (matchedmonorstereo == "monoHit"){ + auto hm = matchedhit->monoHit(); + monohit = &hm; + stripdet = (const StripGeomDetUnit *) (monodet); + } + if (matchedmonorstereo == "stereoHit"){ + auto s = matchedhit->stereoHit(); + stereohit = &s; + stripdet = (const StripGeomDetUnit *) (stereodet); + } + //if(matchedhit) cout<<"manganomatchedhit"<topology(); + const TrackingRecHit *rechit = (*thit).hit(); + + LocalPoint position; + LocalError error; + MeasurementPoint Mposition; + MeasurementError Merror; + + if (matchedmonorstereo == "matched"){ + position=rechit->localPosition(); + error=rechit->localPositionError(); + } + if(matchedmonorstereo == "monoHit"){ + position = monohit->localPosition(); + error = monohit->localPositionError(); + Mposition = topol.measurementPosition(position); + Merror = topol.measurementError(position, error); + } + if (matchedmonorstereo == "stereoHit"){ + position = stereohit->localPosition(); + error = stereohit->localPositionError(); + Mposition = topol.measurementPosition(position); + Merror = topol.measurementError(position, error); + } + + LocalVector trackdirection = tsos.localDirection(); + + GlobalVector gtrkdir = gluedDet->toGlobal(trackdirection); + LocalVector monotkdir = monodet->toLocal(gtrkdir); + LocalVector stereotkdir = stereodet->toLocal(gtrkdir); + + if(matchedmonorstereo == "monoHit"){ + if (monotkdir.z() != 0) { + rechitpro.trackangle = atan(monotkdir.x() / monotkdir.z()) * TMath::RadToDeg(); + rechitpro.trackanglebeta = atan(monotkdir.y() / monotkdir.z()) * TMath::RadToDeg(); + } + } + if (matchedmonorstereo == "stereoHit"){ + if (stereotkdir.z() != 0) { + rechitpro.trackangle = atan(stereotkdir.x() / stereotkdir.z()) * TMath::RadToDeg(); + rechitpro.trackanglebeta = atan(stereotkdir.y() / stereotkdir.z()) * TMath::RadToDeg(); + } + } + + LocalVector drift = stripcpe->driftDirection(stripdet); + rechitpro.thickness = stripdet->surface().bounds().thickness(); + float pitch = topol.localPitch(position); + float tanalpha = tan(rechitpro.trackangle * TMath::DegToRad()); + float tanalphaL = drift.x() / drift.z(); + rechitpro.trackwidth = fabs((rechitpro.thickness / pitch) * tanalpha - (rechitpro.thickness / pitch) * tanalphaL); + float SLorentz = 0.5 * (rechitpro.thickness / pitch) * tanalphaL; + int Sp = int (position.x() / pitch + SLorentz + 0.5 * rechitpro.trackwidth); + int Sm = int (position.x() / pitch + SLorentz - 0.5 * rechitpro.trackwidth); + rechitpro.expectedwidth = 1 + Sp - Sm; + + SiStripRecHit2D::ClusterRef clust; + if(matchedmonorstereo == "monoHit"){clust = monohit->cluster();} + if(matchedmonorstereo == "stereoHit"){clust = stereohit->cluster();} + + int clusiz=0; + int totcharge=0; + clusiz = clust->amplitudes().size(); + const std::vector amplitudes=clust->amplitudes(); + for(size_t ia=0; ia rechitpro.expectedwidth + 2) { + iopt = 1; + } else if (rechitpro.expectedwidth == 1) { + iopt = 2; + } else if (rechitpro.clusiz <= rechitpro.expectedwidth) { + iopt = 3; + } else { + iopt = 4; + } + rechitpro.category = iopt; + + if(matchedmonorstereo == "matched"){matched.clear();matched = associate.associateHit(*matchedhit);} + if(matchedmonorstereo == "monoHit"){matched.clear();matched = associate.associateHit(*monohit);} + if(matchedmonorstereo == "stereoHit"){matched.clear();matched = associate.associateHit(*stereohit);} + + double mindist = 999999; + double dist = 999999; + double distx = 999999; + double disty = 999999; + std::pair closestPair; + PSimHit closest; + + if(!matched.empty()){ + + const StripGeomDetUnit* partnerstripdet =(StripGeomDetUnit*) gluedDet->stereoDet(); + std::pair hitPair; + + for(vector::const_iterator m=matched.begin(); msurface()); + distx = fabs(rechitpro.x - hitPair.first.x()); + disty = fabs(rechitpro.y - hitPair.first.y()); + dist = sqrt(distx*distx+disty*disty); + } + if(matchedmonorstereo == "monoHit"){dist = abs((monohit)->localPosition().x() - (*m).localPosition().x());} + if(matchedmonorstereo == "stereoHit"){dist = abs((stereohit)->localPosition().x() - (*m).localPosition().x());} + + // std::cout << " Simhit position x = " << hitPair.first.x() + // << " y = " << hitPair.first.y() << " dist = " << dist << std::endl; + if(distlocalPosition().x() - (closestPair.first.x())) / sqrt(error.xx()); + rechitpro.pully = ((rechit)->localPosition().y() - (closestPair.first.y())) / sqrt(error.yy()); + } + + if( (matchedmonorstereo == "monoHit") || (matchedmonorstereo == "stereoHit") ){ + rechitpro.resx = rechitpro.x - closest.localPosition().x(); + rechitpro.resxMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x(); + rechitpro.pullx = (rechit->localPosition().x() - (closest).localPosition().x()) / sqrt(error.xx()); + rechitpro.pullxMF = (rechitpro.resxMF)/sqrt(Merror.uu()); + } + + } +} +//-------------------------------------------------------------------------------------------- +void SiStripTrackingRecHitsValid::rechitanalysis(TrajectoryStateOnSurface tsos, const TransientTrackingRecHit::ConstRecHitPointer thit, const StripGeomDetUnit *stripdet,edm::ESHandle stripcpe, TrackerHitAssociator& associate, bool simplehit1or2D){ + + rechitpro.x = -999999.; rechitpro.y = -999999.; rechitpro.z = -999999.; rechitpro.resolxx = -999999.; rechitpro.resolxy = -999999.; rechitpro.resolyy = -999999.; + rechitpro.resolxxMF = -999999.; rechitpro.phi = -999999.;rechitpro.resx = -999999.; rechitpro.resy = -999999.; rechitpro.resxMF = -999999.; + rechitpro.pullx = -999999.; rechitpro.pully = -999999.; rechitpro.pullxMF = -999999.; rechitpro.trackangle = -999999.; rechitpro.trackanglebeta = -999999.; + rechitpro.trackangle2 = -999999.; rechitpro.trackwidth = -999999.; rechitpro.expectedwidth = -999999.; rechitpro.category = -999999.; rechitpro.thickness = -999999.; + rechitpro.clusiz = -999999.; rechitpro.cluchg = -999999.; + + //If simplehit1or2D is true we are dealing with hit1d, false is for hit2d + const SiStripRecHit2D *hit2d = dynamic_cast < const SiStripRecHit2D * >((*thit).hit());; + const SiStripRecHit1D *hit1d = dynamic_cast < const SiStripRecHit1D * >((*thit).hit());; + + const StripTopology & topol = (const StripTopology &) stripdet->topology(); + const TrackingRecHit *rechit = (*thit).hit(); + + LocalPoint position = rechit->localPosition(); + LocalError error = rechit->localPositionError(); + MeasurementPoint Mposition = topol.measurementPosition(position); + MeasurementError Merror = topol.measurementError(position,error); + + LocalVector trackdirection = tsos.localDirection(); + rechitpro.trackangle = atan(trackdirection.x() / trackdirection.z()) * TMath::RadToDeg(); + rechitpro.trackanglebeta = atan(trackdirection.y() / trackdirection.z()) * TMath::RadToDeg(); + + LocalVector drift = stripcpe->driftDirection(stripdet); + rechitpro.thickness = stripdet->surface().bounds().thickness(); + float pitch = topol.localPitch(position); + float tanalpha = tan(rechitpro.trackangle * TMath::DegToRad()); + float tanalphaL = drift.x() / drift.z(); + rechitpro.trackwidth = fabs((rechitpro.thickness / pitch) * tanalpha - (rechitpro.thickness / pitch) * tanalphaL); + float SLorentz = 0.5 * (rechitpro.thickness / pitch) * tanalphaL; + int Sp = int (position.x() / pitch + SLorentz + 0.5 * rechitpro.trackwidth); + int Sm = int (position.x() / pitch + SLorentz - 0.5 * rechitpro.trackwidth); + rechitpro.expectedwidth = 1 + Sp - Sm; + + SiStripRecHit1D::ClusterRef clust1d; + SiStripRecHit2D::ClusterRef clust2d; + int clusiz=0; + int totcharge=0; + + if(!simplehit1or2D){ + clust2d = hit2d->cluster(); + clusiz = clust2d->amplitudes().size(); + const std::vector amplitudes2d = clust2d->amplitudes(); + for(size_t ia=0; iacluster(); + clusiz = clust1d->amplitudes().size(); + const std::vector amplitudes1d = clust1d->amplitudes(); + for(size_t ia=0; ia rechitpro.expectedwidth + 2) { + iopt = 1; + } else if (rechitpro.expectedwidth == 1) { + iopt = 2; + } else if (rechitpro.clusiz <= rechitpro.expectedwidth) { + iopt = 3; + } else { + iopt = 4; + } + rechitpro.category = iopt; + + + matched.clear(); + if(!simplehit1or2D){ + matched = associate.associateHit(*hit2d); + } else { + matched = associate.associateHit(*hit1d); + } + + double mindist = 999999; + double dist = 999999; + PSimHit closest; + + if(!matched.empty()){ + + for(vector::const_iterator m=matched.begin(); mlocalPosition().x() - (*m).localPosition().x()); + } else { + dist = abs((hit1d)->localPosition().x() - (*m).localPosition().x()); + } + + if(distlocalPosition().x() - (closest).localPosition().x()) / sqrt(error.xx()); + rechitpro.pullxMF = (rechitpro.resxMF)/sqrt(Merror.uu()); + + } + +} +//-------------------------------------------------------------------------------------------- +void SiStripTrackingRecHitsValid::createMEs(const edm::EventSetup& es){ + + //Retrieve tracker topology from geometry + edm::ESHandle tTopoHandle; + es.get().get(tTopoHandle); + const TrackerTopology* const tTopo = tTopoHandle.product(); + + // take from eventSetup the SiStripDetCabling object - here will use SiStripDetControl later on + es.get().get(SiStripDetCabling_); + + // get list of active detectors from SiStripDetCabling + std::vector activeDets; + SiStripDetCabling_->addActiveDetectorsRawIds(activeDets); + + SiStripSubStructure substructure; + + SiStripFolderOrganizer folder_organizer; + // folder_organizer.setSiStripFolderName(topFolderName_); + std::string curfold = topFolderName_; + folder_organizer.setSiStripFolderName(curfold); + folder_organizer.setSiStripFolder(); + + // std::cout << "curfold " << curfold << std::endl; + + createSimpleHitsMEs(); + + // loop over detectors and book MEs + edm::LogInfo("SiStripTrackingRecHitsValid|SiStripTrackingRecHitsValid")<<"nr. of activeDets: "<::iterator detid_iterator = activeDets.begin(); detid_iterator!=activeDets.end(); detid_iterator++){ + uint32_t detid = (*detid_iterator); + // remove any eventual zero elements - there should be none, but just in case + if(detid == 0) { + activeDets.erase(detid_iterator); + continue; + } + + // Create Layer Level MEs + std::pair det_layer_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,true); + SiStripHistoId hidmanager; + std::string label = hidmanager.getSubdetid(detid,tTopo,true); + // std::cout << "label " << label << endl; + + std::map::iterator iLayerME = LayerMEsMap.find(label); + if(iLayerME==LayerMEsMap.end()) { + + // get detids for the layer + // Keep in mind that when we are on the TID or TEC we deal with rings not wheel + int32_t lnumber = det_layer_pair.second; + std::vector layerDetIds; + if (det_layer_pair.first == "TIB") { + substructure.getTIBDetectors(activeDets,layerDetIds,lnumber,0,0,0); + } else if (det_layer_pair.first == "TOB") { + substructure.getTOBDetectors(activeDets,layerDetIds,lnumber,0,0); + } else if (det_layer_pair.first == "TID" && lnumber > 0) { + substructure.getTIDDetectors(activeDets,layerDetIds,2,0,abs(lnumber),0); + } else if (det_layer_pair.first == "TID" && lnumber < 0) { + substructure.getTIDDetectors(activeDets,layerDetIds,1,0,abs(lnumber),0); + } else if (det_layer_pair.first == "TEC" && lnumber > 0) { + substructure.getTECDetectors(activeDets,layerDetIds,2,0,0,0,abs(lnumber),0); + } else if (det_layer_pair.first == "TEC" && lnumber < 0) { + substructure.getTECDetectors(activeDets,layerDetIds,1,0,0,0,abs(lnumber),0); + } + LayerDetMap[label] = layerDetIds; + + // book Layer MEs + folder_organizer.setLayerFolder(detid,tTopo,det_layer_pair.second,true); + // std::stringstream ss; + // folder_organizer.getLayerFolderName(ss, detid, tTopo, true); + // std::cout << "Folder Name " << ss.str().c_str() << std::endl; + // folder_organizer.setLayerFolder(detid,det_layer_pair.second,true); + createLayerMEs(label); + } + //Create StereoAndMatchedMEs + std::map::iterator iStereoAndMatchedME = StereoAndMatchedMEsMap.find(label); + if(iStereoAndMatchedME==StereoAndMatchedMEsMap.end()) { + + // get detids for the stereo and matched layer. We are going to need a bool for these layers + bool isStereo = false; + // Keep in mind that when we are on the TID or TEC we deal with rings not wheel + int32_t stereolnumber = det_layer_pair.second; + std::vector stereoandmatchedDetIds; + if ( (det_layer_pair.first == "TIB") && (TIBDetId(detid).stereo()== 1) ) { + substructure.getTIBDetectors(activeDets,stereoandmatchedDetIds,stereolnumber,0,0,0); + isStereo = true; + } else if ( (det_layer_pair.first == "TOB") && (TOBDetId(detid).stereo()== 1) ) { + substructure.getTOBDetectors(activeDets,stereoandmatchedDetIds,stereolnumber,0,0); + isStereo = true; + } else if ( (det_layer_pair.first == "TID") && (stereolnumber > 0) && (TIDDetId(detid).stereo()== 1) ) { + substructure.getTIDDetectors(activeDets,stereoandmatchedDetIds,2,0,abs(stereolnumber),1); + isStereo = true; + } else if ( (det_layer_pair.first == "TID") && (stereolnumber < 0) && (TIDDetId(detid).stereo()== 1) ) { + substructure.getTIDDetectors(activeDets,stereoandmatchedDetIds,1,0,abs(stereolnumber),1); + isStereo = true; + } else if ( (det_layer_pair.first == "TEC") && (stereolnumber > 0) && (TECDetId(detid).stereo()== 1) ) { + substructure.getTECDetectors(activeDets,stereoandmatchedDetIds,2,0,0,0,abs(stereolnumber),1); + isStereo = true; + } else if ( (det_layer_pair.first == "TEC") && (stereolnumber < 0) && (TECDetId(detid).stereo()== 1) ) { + substructure.getTECDetectors(activeDets,stereoandmatchedDetIds,1,0,0,0,abs(stereolnumber),1); + isStereo = true; + } + StereoAndMatchedDetMap[label] = stereoandmatchedDetIds; + + // book StereoAndMatched MEs + if(isStereo){ + folder_organizer.setLayerFolder(detid,tTopo,det_layer_pair.second,true); + // std::stringstream ss1; + // folder_organizer.getLayerFolderName(ss1, detid, tTopo, true); + // std::cout << "Folder Name stereo " << ss1.str().c_str() << std::endl; + //Create the Monitor Elements only when we have a stereo module + createStereoAndMatchedMEs(label); + } + } + + + }//end of loop over detectors +} +//------------------------------------------------------------------------------------------ +void SiStripTrackingRecHitsValid::createSimpleHitsMEs() +{ + simplehitsMEs.meCategory = 0; + simplehitsMEs.meTrackwidth = 0; + simplehitsMEs.meExpectedwidth = 0; + simplehitsMEs.meClusterwidth = 0; + simplehitsMEs.meTrackanglealpha = 0; + simplehitsMEs.meTrackanglebeta = 0; + simplehitsMEs.meResolxMFTrackwidthProfile = 0; + simplehitsMEs.meResolxMFTrackwidthProfileWClus1 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileWClus2 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileWClus3 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileWClus4 = 0; + simplehitsMEs.meResMFTrackwidthProfileWClus1 = 0; + + simplehitsMEs.meResMFTrackwidthProfileWClus2 = 0; + simplehitsMEs.meResMFTrackwidthProfileWClus21 = 0; + simplehitsMEs.meResMFTrackwidthProfileWClus22 = 0; + simplehitsMEs.meResMFTrackwidthProfileWClus23 = 0; + + simplehitsMEs.meResMFTrackwidthProfileWClus3 = 0; + simplehitsMEs.meResMFTrackwidthProfileWClus4 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileCategory1 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileCategory2 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileCategory3 = 0; + simplehitsMEs.meResolxMFTrackwidthProfileCategory4 = 0; + simplehitsMEs.meResolxMFClusterwidthProfileCategory1 = 0; + simplehitsMEs.meResolxMFAngleProfile = 0; + simplehitsMEs.meResolxLF = 0; + simplehitsMEs.meResLF = 0; + simplehitsMEs.mePullLF = 0; + simplehitsMEs.meResolxMF = 0; + simplehitsMEs.meResMF = 0; + simplehitsMEs.mePullMF = 0; + + + if(layerswitchResolx_LF) { + simplehitsMEs.meResolxLF = bookME1D("TH1Resolx_LF", "TH1Resolx_LF" ,"RecHit resol(x) coord. (local frame)"); + simplehitsMEs.meResolxLF->setAxisTitle("resol(x) RecHit coord. (local frame)"); + } + if(layerswitchResolx_MF) { + simplehitsMEs.meResolxMF = bookME1D("TH1Resolx_MF", "TH1Resolx_MF" ,"RecHit resol(x) coord. (measurement frame)"); + simplehitsMEs.meResolxMF->setAxisTitle("resol(x) RecHit coord. (measurement frame)"); + } + if(layerswitchRes_LF) { + simplehitsMEs.meResLF = bookME1D("TH1Res_LF", "TH1Res_LF" ,"Residual of the hit x coordinate (local frame)"); + simplehitsMEs.meResLF->setAxisTitle("Hit Res(x) (local frame)"); + } + if(layerswitchRes_MF) { + simplehitsMEs.meResMF = bookME1D("TH1Res_MF", "TH1Res_MF" ,"Residual of the hit x coordinate (measurement frame)"); + simplehitsMEs.meResMF->setAxisTitle("Hit Res(x) (measurement frame)"); + } + if(layerswitchPull_LF) { + simplehitsMEs.mePullLF = bookME1D("TH1Pull_LF", "TH1Pull_LF" ,"Pull distribution (local frame)"); + simplehitsMEs.mePullLF->setAxisTitle("Pull distribution (local frame)"); + } + if(layerswitchPull_MF) { + simplehitsMEs.mePullMF = bookME1D("TH1Pull_MF", "TH1Pull_MF" ,"Pull distribution (measurement frame)"); + simplehitsMEs.mePullMF->setAxisTitle("Pull distribution (measurement frame)"); + } + if(layerswitchCategory) { + simplehitsMEs.meCategory = bookME1D("TH1Category", "TH1Category" ,"Category"); + simplehitsMEs.meCategory->setAxisTitle("Category"); + } + if(layerswitchTrackwidth) { + simplehitsMEs.meTrackwidth = bookME1D("TH1Trackwidth", "TH1Trackwidth" ,"Track width"); + simplehitsMEs.meTrackwidth->setAxisTitle("Track width"); + } + if(layerswitchExpectedwidth) { + simplehitsMEs.meExpectedwidth = bookME1D("TH1Expectedwidth", "TH1Expectedwidth" ,"Expected width"); + simplehitsMEs.meExpectedwidth->setAxisTitle("Expected width"); + } + if(layerswitchClusterwidth) { + simplehitsMEs.meClusterwidth = bookME1D("TH1Clusterwidth", "TH1Clusterwidth" ,"Cluster width"); + simplehitsMEs.meClusterwidth->setAxisTitle("Cluster width"); + } + if(layerswitchTrackanglealpha) { + simplehitsMEs.meTrackanglealpha = bookME1D("TH1Trackanglealpha", "TH1Trackanglealpha" ,"Track angle alpha"); + simplehitsMEs.meTrackanglealpha->setAxisTitle("Track angle alpha"); + } + if(layerswitchTrackanglebeta) { + simplehitsMEs.meTrackanglebeta = bookME1D("TH1Trackanglebeta", "TH1Trackanglebeta" ,"Track angle beta"); + simplehitsMEs.meTrackanglebeta->setAxisTitle("Track angle beta"); + } + if(layerswitchResolxMFTrackwidthProfile_WClus1) { + simplehitsMEs.meResolxMFTrackwidthProfileWClus1 = bookMEProfile("TProfResolxMFTrackwidthProfile_WClus1","TProfResolxMFTrackwidthProfile_WClus1","Profile of Resolution in MF vs track width for w=1"); + simplehitsMEs.meResolxMFTrackwidthProfileWClus1->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileWClus1->setAxisTitle("Resolution (measurement frame) w=1",2); + } + if(layerswitchResolxMFTrackwidthProfile_WClus2) { + simplehitsMEs.meResolxMFTrackwidthProfileWClus2 = bookMEProfile("TProfResolxMFTrackwidthProfile_WClus2","TProfResolxMFTrackwidthProfile_WClus2","Profile of Resolution in MF vs track width for w=2"); + simplehitsMEs.meResolxMFTrackwidthProfileWClus2->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileWClus2->setAxisTitle("Resolution (measurement frame) w=2",2); + + } + if(layerswitchResolxMFTrackwidthProfile_WClus3) { + simplehitsMEs.meResolxMFTrackwidthProfileWClus3 = bookMEProfile("TProfResolxMFTrackwidthProfile_WClus3","TProfResolxMFTrackwidthProfile_WClus3","Profile of Resolution in MF vs track width for w=3"); + simplehitsMEs.meResolxMFTrackwidthProfileWClus3->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileWClus3->setAxisTitle("Resolution (measurement frame) w=3",2); + } + if(layerswitchResolxMFTrackwidthProfile_WClus4) { + simplehitsMEs.meResolxMFTrackwidthProfileWClus4 = bookMEProfile("TProfResolxMFTrackwidthProfile_WClus4","TProfResolxMFTrackwidthProfile_WClus4","Profile of Resolution in MF vs track width for w=4"); + simplehitsMEs.meResolxMFTrackwidthProfileWClus4->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileWClus4->setAxisTitle("Resolution (measurement frame) w=3",2); + } + if(layerswitchResMFTrackwidthProfile_WClus1) { + simplehitsMEs.meResMFTrackwidthProfileWClus1 = bookMEProfile("TProfResMFTrackwidthProfile_WClus1","TProfResMFTrackwidthProfile_WClus1","Profile of Residuals(x) in MF vs track width for w=1"); + simplehitsMEs.meResMFTrackwidthProfileWClus1->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus1->setAxisTitle("Residuals(x) (measurement frame) w=1",2); + } + if(layerswitchResMFTrackwidthProfile_WClus2) { + simplehitsMEs.meResMFTrackwidthProfileWClus2 = bookMEProfile("TProfResMFTrackwidthProfile_WClus2","TProfResMFTrackwidthProfile_WClus2","Profile of Residuals(x) in MF vs track width for w=2"); + simplehitsMEs.meResMFTrackwidthProfileWClus2->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus2->setAxisTitle("Residuals(x) (measurement frame) w=2",2); + } + if(layerswitchResMFTrackwidthProfile_WClus21) { + simplehitsMEs.meResMFTrackwidthProfileWClus21 = bookMEProfile("TProfResMFTrackwidthProfile_WClus21","TProfResMFTrackwidthProfile_WClus21","Profile of Residuals(x) in MF vs track width for w=2"); + simplehitsMEs.meResMFTrackwidthProfileWClus21->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus21->setAxisTitle("Residuals(x) (measurement frame) w=2",2); + } + if(layerswitchResMFTrackwidthProfile_WClus22) { + simplehitsMEs.meResMFTrackwidthProfileWClus22 = bookMEProfile("TProfResMFTrackwidthProfile_WClus22","TProfResMFTrackwidthProfile_WClus22","Profile of Residuals(x) in MF vs track width for w=2"); + simplehitsMEs.meResMFTrackwidthProfileWClus22->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus22->setAxisTitle("Residuals(x) (measurement frame) w=2",2); + + } + if(layerswitchResMFTrackwidthProfile_WClus23) { + simplehitsMEs.meResMFTrackwidthProfileWClus23 = bookMEProfile("TProfResMFTrackwidthProfile_WClus23","TProfResMFTrackwidthProfile_WClus23","Profile of Residuals(x) in MF vs track width for w=2"); + simplehitsMEs.meResMFTrackwidthProfileWClus23->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus23->setAxisTitle("Residuals(x) (measurement frame) w=2",2); + } + if(layerswitchResMFTrackwidthProfile_WClus3) { + simplehitsMEs.meResMFTrackwidthProfileWClus3 = bookMEProfile("TProfResMFTrackwidthProfile_WClus3","TProfResMFTrackwidthProfile_WClus3","Profile of Residuals(x) in MF vs track width for w=3"); + simplehitsMEs.meResMFTrackwidthProfileWClus3->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus3->setAxisTitle("Residuals(x) (measurement frame) w=3",2); + } + if(layerswitchResMFTrackwidthProfile_WClus4) { + simplehitsMEs.meResMFTrackwidthProfileWClus4 = bookMEProfile("TProfResMFTrackwidthProfile_WClus4","TProfResMFTrackwidthProfile_WClus4","Profile of Residuals(x) in MF vs track width for w=4"); + simplehitsMEs.meResMFTrackwidthProfileWClus4->setAxisTitle("Track width",1); + simplehitsMEs.meResMFTrackwidthProfileWClus4->setAxisTitle("Residuals(x) (measurement frame) w=4",2); + } + if(layerswitchResolxMFTrackwidthProfile) { + simplehitsMEs.meResolxMFTrackwidthProfile = bookMEProfile("TProfResolxMFTrackwidthProfile","TProfResolxMFTrackwidthProfile","Profile of Resolution in MF vs track width"); + simplehitsMEs.meResolxMFTrackwidthProfile->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfile->setAxisTitle("Resolution (measurement frame)",2); + } + if(layerswitchResolxMFTrackwidthProfile_Category1) { + simplehitsMEs.meResolxMFTrackwidthProfileCategory1 = bookMEProfile("TProfResolxMFTrackwidthProfile_Category1","TProfResolxMFTrackwidthProfile_Category1","Profile of Resolution in MF vs track width (Category 1)"); + simplehitsMEs.meResolxMFTrackwidthProfileCategory1->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileCategory1->setAxisTitle("Resolution (measurement frame) Category 1",2); + } + if(layerswitchResolxMFTrackwidthProfile_Category2) { + simplehitsMEs.meResolxMFTrackwidthProfileCategory2 = bookMEProfile("TProfResolxMFTrackwidthProfile_Category2","TProfResolxMFTrackwidthProfile_Category2","Profile of Resolution in MF vs track width (Category 2)"); + simplehitsMEs.meResolxMFTrackwidthProfileCategory2->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileCategory2->setAxisTitle("Resolution (measurement frame) Category 2",2); + } + if(layerswitchResolxMFTrackwidthProfile_Category3) { + simplehitsMEs.meResolxMFTrackwidthProfileCategory3 = bookMEProfile("TProfResolxMFTrackwidthProfile_Category3","TProfResolxMFTrackwidthProfile_Category3","Profile of Resolution in MF vs track width (Category 3)"); + simplehitsMEs.meResolxMFTrackwidthProfileCategory3->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileCategory3->setAxisTitle("Resolution (measurement frame) Category 3",2); + } + if(layerswitchResolxMFTrackwidthProfile_Category4) { + simplehitsMEs.meResolxMFTrackwidthProfileCategory4 = bookMEProfile("TProfResolxMFTrackwidthProfile_Category4","TProfResolxMFTrackwidthProfile_Category4","Profile of Resolution in MF vs track width (Category 4)"); + simplehitsMEs.meResolxMFTrackwidthProfileCategory4->setAxisTitle("Track width",1); + simplehitsMEs.meResolxMFTrackwidthProfileCategory4->setAxisTitle("Resolution (measurement frame) Category 4",2); + } + if(layerswitchResolxMFClusterwidthProfile_Category1) { + simplehitsMEs.meResolxMFClusterwidthProfileCategory1 = bookMEProfile("TProfResolxMFClusterwidthProfile_Category1","TProfResolxMFClusterwidthProfile_Category1","Profile of Resolution in MF vs cluster width (Category 1)"); + simplehitsMEs.meResolxMFClusterwidthProfileCategory1->setAxisTitle("Cluster width",1); + simplehitsMEs.meResolxMFClusterwidthProfileCategory1->setAxisTitle("Resolution (measurement frame) Category 1",2); + } + if(layerswitchResolxMFAngleProfile) { + simplehitsMEs.meResolxMFAngleProfile = bookMEProfile("TProfResolxMFAngleProfile","TProfResolxMFAngleProfile","Profile of Resolution in MF vs Track angle alpha"); + simplehitsMEs.meResolxMFAngleProfile->setAxisTitle("Track angle alpha",1); + simplehitsMEs.meResolxMFAngleProfile->setAxisTitle("Resolution (measurement frame)",2); + } + + +} +//------------------------------------------------------------------------------------------ +void SiStripTrackingRecHitsValid::createLayerMEs(std::string label) +{ + SiStripHistoId hidmanager; + LayerMEs layerMEs; + + layerMEs.meWclusRphi = 0; + layerMEs.meAdcRphi = 0; + layerMEs.meResolxLFRphi = 0; + layerMEs.meResolxMFRphi = 0; + layerMEs.meResolxMFRphiwclus1 = 0; + layerMEs.meResolxMFRphiwclus2 = 0; + layerMEs.meResolxMFRphiwclus3 = 0; + layerMEs.meResolxMFRphiwclus4 = 0; + layerMEs.meResLFRphi = 0; + layerMEs.meResMFRphi = 0; + layerMEs.meResMFRphiwclus1 = 0; + layerMEs.meResMFRphiwclus2 = 0; + layerMEs.meResMFRphiwclus3 = 0; + layerMEs.meResMFRphiwclus4 = 0; + layerMEs.mePullLFRphi = 0; + layerMEs.mePullMFRphi = 0; + layerMEs.mePullMFRphiwclus1 = 0; + layerMEs.mePullMFRphiwclus2 = 0; + layerMEs.mePullMFRphiwclus3 = 0; + layerMEs.mePullMFRphiwclus4 = 0; + layerMEs.meTrackangleRphi = 0; + layerMEs.meTrackanglebetaRphi = 0; + layerMEs.meTrackangle2Rphi = 0; + layerMEs.mePullTrackangleProfileRphi = 0; + layerMEs.mePullTrackangle2DRphi = 0; + layerMEs.meTrackwidthRphi = 0; + layerMEs.meExpectedwidthRphi = 0; + layerMEs.meClusterwidthRphi = 0; + layerMEs.meCategoryRphi = 0; + layerMEs.mePullTrackwidthProfileRphi = 0; + layerMEs.mePullTrackwidthProfileRphiwclus1 = 0; + layerMEs.mePullTrackwidthProfileRphiwclus2 = 0; + layerMEs.mePullTrackwidthProfileRphiwclus3 = 0; + layerMEs.mePullTrackwidthProfileRphiwclus4 = 0; + layerMEs.mePullTrackwidthProfileCategory1Rphi = 0; + layerMEs.mePullTrackwidthProfileCategory2Rphi = 0; + layerMEs.mePullTrackwidthProfileCategory3Rphi = 0; + layerMEs.mePullTrackwidthProfileCategory4Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileRphi = 0; + + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi = 0; + layerMEs.meResMFTrackwidthProfileWclus1Rphi = 0; + layerMEs.meResMFTrackwidthProfileWclus2Rphi = 0; + layerMEs.meResMFTrackwidthProfileWclus3Rphi = 0; + layerMEs.meResMFTrackwidthProfileWclus4Rphi = 0; + + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi = 0; + layerMEs.meResolxMFTrackwidthProfileCategory4Rphi = 0; + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi = 0; + layerMEs.meResolxMFAngleProfileRphi = 0; + layerMEs.merapidityResProfilewclus1 = 0; + layerMEs.merapidityResProfilewclus2 = 0; + layerMEs.merapidityResProfilewclus3 = 0; + layerMEs.merapidityResProfilewclus4 = 0; + + + //WclusRphi + if(layerswitchWclusRphi) { + layerMEs.meWclusRphi = bookME1D("TH1WclusRphi", hidmanager.createHistoLayer("Wclus_rphi","layer",label,"").c_str() ,"Cluster Width - Number of strips that belong to the RecHit cluster"); + layerMEs.meWclusRphi->setAxisTitle(("Cluster Width [nr strips] in "+ label).c_str()); + } + //AdcRphi + if(layerswitchAdcRphi) { + layerMEs.meAdcRphi = bookME1D("TH1AdcRphi", hidmanager.createHistoLayer("Adc_rphi","layer",label,"").c_str() ,"RecHit Cluster Charge"); + layerMEs.meAdcRphi->setAxisTitle(("cluster charge [ADC] in " + label).c_str()); + } + //ResolxLFRphi + if(layerswitchResolxLFRphi) { + layerMEs.meResolxLFRphi = bookME1D("TH1ResolxLFRphi", hidmanager.createHistoLayer("Resolx_LF_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord."); //~20micron + layerMEs.meResolxLFRphi->setAxisTitle(("resol(x) RecHit coord. (local frame) in " + label).c_str()); + } + //ResolxMFRphi + if(layerswitchResolxMFRphi) { + layerMEs.meResolxMFRphi = bookME1D("TH1ResolxMFRphi", hidmanager.createHistoLayer("Resolx_MF_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord."); //~20micron + layerMEs.meResolxMFRphi->setAxisTitle(("resol(x) RecHit coord. (measurement frame) in " + label).c_str()); + } + //ResolxMFRphiwclus1 + if(layerswitchResolxMFRphiwclus1) { + layerMEs.meResolxMFRphiwclus1 = bookME1D("TH1ResolxMFRphiwclus1", hidmanager.createHistoLayer("Resolx_MF_wclus1_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=1 "); //~20micron + layerMEs.meResolxMFRphiwclus1->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=1 in " + label).c_str()); + } + //ResolxMFRphiwclus2 + if(layerswitchResolxMFRphiwclus2) { + layerMEs.meResolxMFRphiwclus2 = bookME1D("TH1ResolxMFRphiwclus2", hidmanager.createHistoLayer("Resolx_MF_wclus2_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=2 "); //~20micron + layerMEs.meResolxMFRphiwclus2->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=2 in " + label).c_str()); + } + //ResolxMFRphiwclus3 + if(layerswitchResolxMFRphiwclus3) { + layerMEs.meResolxMFRphiwclus3 = bookME1D("TH1ResolxMFRphiwclus3", hidmanager.createHistoLayer("Resolx_MF_wclus3_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=3 "); //~20micron + layerMEs.meResolxMFRphiwclus3->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=3 in " + label).c_str()); + } + //ResolxMFRphiwclus4 + if(layerswitchResolxMFRphiwclus4) { + layerMEs.meResolxMFRphiwclus4 = bookME1D("TH1ResolxMFRphiwclus4", hidmanager.createHistoLayer("Resolx_MF_wclus4_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=4 "); //~20micron + layerMEs.meResolxMFRphiwclus4->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=4 in " + label).c_str()); + } + //ResLFRphi + if(layerswitchResLFRphi) { + layerMEs.meResLFRphi = bookME1D("TH1ResLFRphi", hidmanager.createHistoLayer("Res_LF_rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate"); + layerMEs.meResLFRphi->setAxisTitle(("Hit Residuals(x) (local frame) in " + label).c_str()); + } + //ResMFRphi + if(layerswitchResMFRphi) { + layerMEs.meResMFRphi = bookME1D("TH1ResMFRphi",hidmanager.createHistoLayer("Res_MF_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate"); + layerMEs.meResMFRphi->setAxisTitle(("Hit Residuals(x) (measurement frame) in "+ label).c_str()); + } + //ResMFRphiwclus1 + if(layerswitchResMFRphiwclus1) { + layerMEs.meResMFRphiwclus1 = bookME1D("TH1ResMFRphiwclus1",hidmanager.createHistoLayer("Res_MF_wclus1_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=1"); + layerMEs.meResMFRphiwclus1->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=1 in "+ label).c_str()); + } + //ResMFRphiwclus2 + if(layerswitchResMFRphiwclus2) { + layerMEs.meResMFRphiwclus2 = bookME1D("TH1ResMFRphiwclus2",hidmanager.createHistoLayer("Res_MF_wclus2_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=2"); + layerMEs.meResMFRphiwclus2->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=2 in "+ label).c_str()); + } + //ResMFRphiwclus3 + if(layerswitchResMFRphiwclus3) { + layerMEs.meResMFRphiwclus3 = bookME1D("TH1ResMFRphiwclus3",hidmanager.createHistoLayer("Res_MF_wclus3_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=3"); + layerMEs.meResMFRphiwclus3->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=3 in "+ label).c_str()); + } + //ResMFRphiwclus4 + if(layerswitchResMFRphiwclus4) { + layerMEs.meResMFRphiwclus4 = bookME1D("TH1ResMFRphiwclus4",hidmanager.createHistoLayer("Res_MF_wclus4_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=4"); + layerMEs.meResMFRphiwclus4->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=4 in "+ label).c_str()); + } + //PullLFRphi + if(layerswitchPullLFRphi) { + layerMEs.mePullLFRphi = bookME1D("TH1PullLFRphi", hidmanager.createHistoLayer("Pull_LF_rphi","layer",label,"").c_str() ,"Pull distribution"); + layerMEs.mePullLFRphi->setAxisTitle(("Pull distribution (local frame) in " + label).c_str()); + } + //PullMFRphi + if(layerswitchPullMFRphi) { + layerMEs.mePullMFRphi = bookME1D("TH1PullMFRphi", hidmanager.createHistoLayer("Pull_MF_rphi","layer",label,"").c_str() ,"Pull distribution"); + layerMEs.mePullMFRphi->setAxisTitle(("Pull distribution (measurement frame) in " + label).c_str()); + } + //PullMFRphiwclus1 + if(layerswitchPullMFRphiwclus1) { + layerMEs.mePullMFRphiwclus1 = bookME1D("TH1PullMFRphiwclus1", hidmanager.createHistoLayer("Pull_MF_wclus1_rphi","layer",label,"").c_str() ,"Pull distribution w=1"); + layerMEs.mePullMFRphiwclus1->setAxisTitle(("Pull distribution (measurement frame) for w=1 in " + label).c_str()); + } + //PullMFRphiwclus2 + if(layerswitchPullMFRphiwclus2) { + layerMEs.mePullMFRphiwclus2 = bookME1D("TH1PullMFRphiwclus2", hidmanager.createHistoLayer("Pull_MF_wclus2_rphi","layer",label,"").c_str() ,"Pull distribution w=2"); + layerMEs.mePullMFRphiwclus2->setAxisTitle(("Pull distribution (measurement frame) for w=2 in " + label).c_str()); + } + //PullMFRphiwclus3 + if(layerswitchPullMFRphiwclus3) { + layerMEs.mePullMFRphiwclus3 = bookME1D("TH1PullMFRphiwclus3", hidmanager.createHistoLayer("Pull_MF_wclus3_rphi","layer",label,"").c_str() ,"Pull distribution w=3"); + layerMEs.mePullMFRphiwclus3->setAxisTitle(("Pull distribution (measurement frame) for w=3 in " + label).c_str()); + } + //PullMFRphiwclus4 + if(layerswitchPullMFRphiwclus4) { + layerMEs.mePullMFRphiwclus4 = bookME1D("TH1PullMFRphiwclus4", hidmanager.createHistoLayer("Pull_MF_wclus4_rphi","layer",label,"").c_str() ,"Pull distribution w=4"); + layerMEs.mePullMFRphiwclus4->setAxisTitle(("Pull distribution (measurement frame) for w=4 in " + label).c_str()); + } + + if(layerswitchTrackangleRphi) { + layerMEs.meTrackangleRphi = bookME1D("TH1TrackangleRphi",hidmanager.createHistoLayer("Track_angle_Rphi","layer",label,"").c_str() ,"Track angle alpha"); + layerMEs.meTrackangleRphi->setAxisTitle(("Track angle in "+ label).c_str()); + } + if(layerswitchTrackanglebetaRphi) { + layerMEs.meTrackanglebetaRphi = bookME1D("TH1TrackanglebetaRphi",hidmanager.createHistoLayer("Track_angle_beta_Rphi","layer",label,"").c_str() ,"Track angle beta"); + layerMEs.meTrackanglebetaRphi->setAxisTitle((""+ label).c_str()); + } + if(layerswitchTrackangle2Rphi) { + layerMEs.meTrackangle2Rphi = bookME1D("TH1Trackangle2Rphi",hidmanager.createHistoLayer("Track_angle2_Rphi","layer",label,"").c_str() ,""); + layerMEs.meTrackangle2Rphi->setAxisTitle((""+ label).c_str()); + } + if(layerswitchPullTrackangleProfileRphi) { + layerMEs.mePullTrackangleProfileRphi = bookMEProfile("TProfPullTrackangleProfileRphi",hidmanager.createHistoLayer("Pull_Trackangle_Profile_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track angle alpha"); + layerMEs.mePullTrackangleProfileRphi->setAxisTitle(("Track angle alpha in "+ label).c_str(),1); + layerMEs.mePullTrackangleProfileRphi->setAxisTitle(("Pull (MF) in "+ label).c_str(),2); + } + if(layerswitchPullTrackangle2DRphi) { + layerMEs.mePullTrackangle2DRphi = bookME1D("TH1PullTrackangle2DRphi",hidmanager.createHistoLayer("Pull_Trackangle_2D_Rphi","layer",label,"").c_str() ,""); + layerMEs.mePullTrackangle2DRphi->setAxisTitle((""+ label).c_str()); + } + if(layerswitchTrackwidthRphi) { + layerMEs.meTrackwidthRphi = bookME1D("TH1TrackwidthRphi",hidmanager.createHistoLayer("Track_width_Rphi","layer",label,"").c_str() ,"Track width"); + layerMEs.meTrackwidthRphi->setAxisTitle(("Track width in "+ label).c_str()); + } + if(layerswitchExpectedwidthRphi) { + layerMEs.meExpectedwidthRphi = bookME1D("TH1ExpectedwidthRphi",hidmanager.createHistoLayer("Expected_width_Rphi","layer",label,"").c_str() ,"Expected width"); + layerMEs.meExpectedwidthRphi->setAxisTitle(("Expected width in "+ label).c_str()); + } + if(layerswitchClusterwidthRphi) { + layerMEs.meClusterwidthRphi = bookME1D("TH1ClusterwidthRphi",hidmanager.createHistoLayer("Cluster_width_Rphi","layer",label,"").c_str() ,"Cluster width"); + layerMEs.meClusterwidthRphi->setAxisTitle(("Cluster width in "+ label).c_str()); + } + if(layerswitchCategoryRphi) { + layerMEs.meCategoryRphi = bookME1D("TH1CategoryRphi",hidmanager.createHistoLayer("Category_Rphi","layer",label,"").c_str() ,"Category"); + layerMEs.meCategoryRphi->setAxisTitle(("Category in "+ label).c_str()); + } + if(layerswitchPullTrackwidthProfileRphi) { + layerMEs.mePullTrackwidthProfileRphi = bookMEProfile("TProfPullTrackwidthProfileRphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width"); + layerMEs.mePullTrackwidthProfileRphi->setAxisTitle(("track width in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileRphi->setAxisTitle(("Pull (MF) in "+ label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileRphiwclus1) { + layerMEs.mePullTrackwidthProfileRphiwclus1 = bookMEProfile("TProfPullTrackwidthProfileRphiwclus1",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus1","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=1"); + layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle(("track width for w=1 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle(("Pull (MF) for w=1 in "+ label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileRphiwclus2) { + layerMEs.mePullTrackwidthProfileRphiwclus2 = bookMEProfile("TProfPullTrackwidthProfileRphiwclus2",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus2","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=2"); + layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle(("track width for w=2 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle(("Pull (MF) for w=2 in "+ label).c_str(),2); + + } + if(layerswitchPullTrackwidthProfileRphiwclus3) { + layerMEs.mePullTrackwidthProfileRphiwclus3 = bookMEProfile("TProfPullTrackwidthProfileRphiwclus3",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus3","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=3"); + layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle(("track width for w=3 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle(("Pull (MF) for w=3 in "+ label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileRphiwclus4) { + layerMEs.mePullTrackwidthProfileRphiwclus4 = bookMEProfile("TProfPullTrackwidthProfileRphiwclus4",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus4","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=4"); + layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle(("track width for w=4 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle(("Pull (MF) for w=4 in "+ label).c_str(),2); + + } + if(layerswitchPullTrackwidthProfileCategory1Rphi) { + layerMEs.mePullTrackwidthProfileCategory1Rphi = bookMEProfile("TProfPullTrackwidthProfileCategory1Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category1_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 1"); + layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle(("track width for Category 1 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle(("Pull (MF) for Category 1 in "+ label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory2Rphi) { + layerMEs.mePullTrackwidthProfileCategory2Rphi = bookMEProfile("TProfPullTrackwidthProfileCategory2Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category2_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 2"); + layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle(("track width for Category 2 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle(("Pull (MF) for Category 2 in "+ label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory3Rphi) { + layerMEs.mePullTrackwidthProfileCategory3Rphi = bookMEProfile("TProfPullTrackwidthProfileCategory3Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category3_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 3"); + layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle(("track width for Category 3 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle(("Pull (MF) for Category 3 in "+ label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory4Rphi) { + layerMEs.mePullTrackwidthProfileCategory4Rphi = bookMEProfile("TProfPullTrackwidthProfileCategory4Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category4_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 4"); + layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle(("track width for Category 4 in "+ label).c_str(),1); + layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle(("Pull (MF) for Category 4 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileRphi) { + layerMEs.meResolxMFTrackwidthProfileRphi = bookMEProfile("TProfResolxMFTrackwidthProfileRphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width"); + layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle(("track width in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle(("Resolution in MF in "+ label).c_str(),2); + } + + if(layerswitchResolxMFTrackwidthProfileWclus1Rphi) { + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileWclus1Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus1_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=1"); + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle(("track width for w=1 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle(("Resolution in MF for w=1 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileWclus2Rphi) { + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileWclus2Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus2_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=2"); + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle(("track width for w=2 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle(("Resolution in MF for w=2 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileWclus3Rphi) { + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileWclus3Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus3_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=3"); + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle(("track width for w=3 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle(("Resolution in MF for w=3 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileWclus4Rphi) { + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileWclus4Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus4_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=4"); + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle(("track width for w=4 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle(("Resolution in MF for w=4 in "+ label).c_str(),2); + } + if(layerswitchResMFTrackwidthProfileWclus1Rphi) { + layerMEs.meResMFTrackwidthProfileWclus1Rphi = bookMEProfile("TProfResMFTrackwidthProfileWclus1Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus1_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=1"); + layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle(("track width for w=1 in "+ label).c_str(),1); + layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle(("Residuals(x) in MF for w=1 in "+ label).c_str(),2); + } + if(layerswitchResMFTrackwidthProfileWclus2Rphi) { + layerMEs.meResMFTrackwidthProfileWclus2Rphi = bookMEProfile("TProfResMFTrackwidthProfileWclus2Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus2_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=2"); + layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle(("track width for w=2 in "+ label).c_str(),1); + layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle(("Residuals(x) in MF for w=2 in "+ label).c_str(),2); + } + if(layerswitchResMFTrackwidthProfileWclus3Rphi) { + layerMEs.meResMFTrackwidthProfileWclus3Rphi = bookMEProfile("TProfResMFTrackwidthProfileWclus3Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus3_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=3"); + layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle(("track width for w=3 in "+ label).c_str(),1); + layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle(("Residuals(x) in MF for w=3 in "+ label).c_str(),2); + } + if(layerswitchResMFTrackwidthProfileWclus4Rphi) { + layerMEs.meResMFTrackwidthProfileWclus4Rphi = bookMEProfile("TProfResMFTrackwidthProfileWclus4Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus4_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=4"); + layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle(("track width for w=4 in "+ label).c_str(),1); + layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle(("Residuals(x) in MF for w=4 in "+ label).c_str(),2); + } + + if(layerswitchResolxMFTrackwidthProfileCategory1Rphi) { + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileCategory1Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category1_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 1"); + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle(("track width for Category 1 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle(("Resolution in MF for Category 1 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory2Rphi) { + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileCategory2Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category2_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 2"); + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle(("track width for Category 2 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle(("Resolution in MF for Category 2 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory3Rphi) { + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileCategory3Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 3"); + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle(("track width for Category 3 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle(("Resolution in MF for Category 3 in "+ label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory4Rphi) { + layerMEs.meResolxMFTrackwidthProfileCategory4Rphi = bookMEProfile("TProfResolxMFTrackwidthProfileCategory4Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 4"); + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle(("track width for Category 4 in "+ label).c_str(),1); + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle(("Resolution in MF for Category 4 in "+ label).c_str(),2); + } + if(layerswitchResolxMFClusterwidthProfileCategory1Rphi) { + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi = bookMEProfile("TProfResolxMFClusterwidthProfileCategory1Rphi",hidmanager.createHistoLayer("ResolxMF_Cluster_width_Profile_Category1_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs cluster width for Category 1"); + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle(("cluster width for Category 1 in "+ label).c_str(),1); + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle(("Resolution in MF for Category 1 in "+ label).c_str(),2); + } + if(layerswitchResolxMFAngleProfileRphi) { + layerMEs.meResolxMFAngleProfileRphi = bookMEProfile("TProfResolxMFAngleProfileRphi",hidmanager.createHistoLayer("ResolxMF_Angle_Profile_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track angle alpha"); + layerMEs.meResolxMFAngleProfileRphi->setAxisTitle(("track angle alpha in "+ label).c_str(),1); + layerMEs.meResolxMFAngleProfileRphi->setAxisTitle(("Resolution in MF in "+ label).c_str(),2); + } + if(layerswitchrapidityResProfilewclus1) { + layerMEs.merapidityResProfilewclus1 = bookMEProfile("TProfrapidityResProfilewclus1",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus1","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=1"); + layerMEs.merapidityResProfilewclus1->setAxisTitle(("Res for w=1 in "+ label).c_str(),1); + layerMEs.merapidityResProfilewclus1->setAxisTitle(("rapidity for w=1 in "+ label).c_str(),2); + } + if(layerswitchrapidityResProfilewclus2) { + layerMEs.merapidityResProfilewclus2 = bookMEProfile("TProfrapidityResProfilewclus2",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus2","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=2"); + layerMEs.merapidityResProfilewclus2->setAxisTitle(("Res for w=2 in "+ label).c_str(),1); + layerMEs.merapidityResProfilewclus2->setAxisTitle(("rapidity for w=2 in "+ label).c_str(),2); + } + if(layerswitchrapidityResProfilewclus3) { + layerMEs.merapidityResProfilewclus3 = bookMEProfile("TProfrapidityResProfilewclus3",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus3","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=3"); + layerMEs.merapidityResProfilewclus3->setAxisTitle(("Res for w=3 in "+ label).c_str(),1); + layerMEs.merapidityResProfilewclus3->setAxisTitle(("rapidity for w=3 in "+ label).c_str(),2); + } + if(layerswitchrapidityResProfilewclus4) { + layerMEs.merapidityResProfilewclus4 = bookMEProfile("TProfrapidityResProfilewclus4",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus4","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=4"); + layerMEs.merapidityResProfilewclus4->setAxisTitle(("Res for w=4 in "+ label).c_str(),1); + layerMEs.merapidityResProfilewclus4->setAxisTitle(("rapidity for w=4 in "+ label).c_str(),2); + } + + + LayerMEsMap[label]=layerMEs; + +} +//------------------------------------------------------------------------------------------ +void SiStripTrackingRecHitsValid::createStereoAndMatchedMEs(std::string label) +{ + SiStripHistoId hidmanager; + StereoAndMatchedMEs stereoandmatchedMEs; + + stereoandmatchedMEs.meWclusSas = 0; + stereoandmatchedMEs.meAdcSas = 0; + stereoandmatchedMEs.meResolxLFSas = 0; + stereoandmatchedMEs.meResolxMFSas = 0; + stereoandmatchedMEs.meResLFSas = 0; + stereoandmatchedMEs.meResMFSas = 0; + stereoandmatchedMEs.mePullLFSas = 0; + stereoandmatchedMEs.mePullMFSas = 0; + stereoandmatchedMEs.meTrackangleSas = 0; + stereoandmatchedMEs.meTrackanglebetaSas = 0; + stereoandmatchedMEs.mePullTrackangleProfileSas = 0; + stereoandmatchedMEs.meTrackwidthSas = 0; + stereoandmatchedMEs.meExpectedwidthSas = 0; + stereoandmatchedMEs.meClusterwidthSas = 0; + stereoandmatchedMEs.meCategorySas = 0; + stereoandmatchedMEs.mePullTrackwidthProfileSas = 0; + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas = 0; + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas = 0; + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas = 0; + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas = 0; + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas = 0; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas = 0; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas = 0; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas = 0; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas = 0; + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas = 0; + stereoandmatchedMEs.meResolxMFAngleProfileSas = 0; + + stereoandmatchedMEs.mePosxMatched = 0; + stereoandmatchedMEs.mePosyMatched = 0; + stereoandmatchedMEs.meResolxMatched = 0; + stereoandmatchedMEs.meResolyMatched = 0; + stereoandmatchedMEs.meResxMatched = 0; + stereoandmatchedMEs.meResyMatched = 0; + stereoandmatchedMEs.mePullxMatched = 0; + stereoandmatchedMEs.mePullyMatched = 0; + + //WclusSas + if(layerswitchWclusSas) { + stereoandmatchedMEs.meWclusSas = bookME1D("TH1WclusSas", hidmanager.createHistoLayer("Wclus_sas","layer",label,"").c_str() ,"Cluster Width - Number of strips that belong to the RecHit cluster"); + stereoandmatchedMEs.meWclusSas->setAxisTitle(("Cluster Width [nr strips] (stereo) in "+ label).c_str()); + } + //AdcSas + if(layerswitchAdcSas) { + stereoandmatchedMEs.meAdcSas = bookME1D("TH1AdcSas", hidmanager.createHistoLayer("Adc_sas","layer",label,"").c_str() ,"RecHit Cluster Charge"); + stereoandmatchedMEs.meAdcSas->setAxisTitle(("cluster charge [ADC] (stereo) in " + label).c_str()); + } + //ResolxLFSas + if(layerswitchResolxLFSas) { + stereoandmatchedMEs.meResolxLFSas = bookME1D("TH1ResolxLFSas", hidmanager.createHistoLayer("Resolx_LF_sas","layer",label,"").c_str() ,"RecHit resol(x) coord."); + stereoandmatchedMEs.meResolxLFSas->setAxisTitle(("resol(x) RecHit coord. (local frame) (stereo) in " + label).c_str()); + } + //ResolxMFSas + if(layerswitchResolxMFSas) { + stereoandmatchedMEs.meResolxMFSas = bookME1D("TH1ResolxMFSas", hidmanager.createHistoLayer("Resolx_MF_sas","layer",label,"").c_str() ,"RecHit resol(x) coord."); + stereoandmatchedMEs.meResolxMFSas->setAxisTitle(("resol(x) RecHit coord. (measurement frame) (stereo) in " + label).c_str()); + } + //ResLFSas + if(layerswitchResLFSas) { + stereoandmatchedMEs.meResLFSas = bookME1D("TH1ResLFSas", hidmanager.createHistoLayer("Res_LF_sas","layer",label,"").c_str() ,"Residual of the hit x coordinate"); + stereoandmatchedMEs.meResLFSas->setAxisTitle(("Hit Residuals(x) (local frame) (stereo) in " + label).c_str()); + } + //ResMFSas + if(layerswitchResMFSas) { + stereoandmatchedMEs.meResMFSas = bookME1D("TH1ResMFSas", hidmanager.createHistoLayer("Res_MF_sas","layer",label,"").c_str() ,"Residual of the hit x coordinate"); + stereoandmatchedMEs.meResMFSas->setAxisTitle(("Hit Residuals(x) (stereo) in " + label).c_str()); + } + //PullLFSas + if(layerswitchPullLFSas) { + stereoandmatchedMEs.mePullLFSas = bookME1D("TH1PullLFSas", hidmanager.createHistoLayer("Pull_LF_sas","layer",label,"").c_str() ,"Pull distribution"); + stereoandmatchedMEs.mePullLFSas->setAxisTitle(("Pull distribution (local frame) (stereo) in " + label).c_str()); + } + //PullMFSas + if(layerswitchPullMFSas) { + stereoandmatchedMEs.mePullMFSas = bookME1D("TH1PullMFSas", hidmanager.createHistoLayer("Pull_MF_sas","layer",label,"").c_str() ,"Pull distribution"); + stereoandmatchedMEs.mePullMFSas->setAxisTitle(("Pull distribution (measurement frame) (stereo) in " + label).c_str()); + } + + if(layerswitchTrackangleSas) { + stereoandmatchedMEs.meTrackangleSas = bookME1D("TH1TrackangleSas",hidmanager.createHistoLayer("Track_angle_Sas","layer",label,"").c_str() ,"Track angle"); + stereoandmatchedMEs.meTrackangleSas->setAxisTitle(("Track angle (stereo) in " + label).c_str()); + } + if(layerswitchTrackanglebetaSas) { + stereoandmatchedMEs.meTrackanglebetaSas = bookME1D("TH1TrackanglebetaSas",hidmanager.createHistoLayer("Track_angle_beta_Sas","layer",label,"").c_str() ,"Track angle beta"); + stereoandmatchedMEs.meTrackanglebetaSas->setAxisTitle(("Track angle beta (stereo) in " + label).c_str()); + } + if(layerswitchPullTrackangleProfileSas) { + stereoandmatchedMEs.mePullTrackangleProfileSas = bookMEProfile("TProfPullTrackangleProfileSas",hidmanager.createHistoLayer("Pull_Track_angle_Profile_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track angle (stereo)"); + stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle(("track angle (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle(("Pull in MF (stereo) in " + label).c_str(),2); + } + if(layerswitchTrackwidthSas) { + stereoandmatchedMEs.meTrackwidthSas = bookME1D("TH1TrackwidthSas",hidmanager.createHistoLayer("Track_width_Sas","layer",label,"").c_str() ,"Track width"); + stereoandmatchedMEs.meTrackwidthSas->setAxisTitle(("Track width (stereo) in " + label).c_str()); + } + if(layerswitchExpectedwidthSas) { + stereoandmatchedMEs.meExpectedwidthSas = bookME1D("TH1ExpectedwidthSas",hidmanager.createHistoLayer("Expected_width_Sas","layer",label,"").c_str() ,"Expected width"); + stereoandmatchedMEs.meExpectedwidthSas->setAxisTitle(("Expected width (stereo) in " + label).c_str()); + } + if(layerswitchClusterwidthSas) { + stereoandmatchedMEs.meClusterwidthSas = bookME1D("TH1ClusterwidthSas",hidmanager.createHistoLayer("Cluster_width_Sas","layer",label,"").c_str() ,"Cluster width"); + stereoandmatchedMEs.meClusterwidthSas->setAxisTitle(("Cluster width (stereo) in " + label).c_str()); + } + if(layerswitchCategorySas) { + stereoandmatchedMEs.meCategorySas = bookME1D("TH1CategorySas",hidmanager.createHistoLayer("Category_Sas","layer",label,"").c_str() ,"Category"); + stereoandmatchedMEs.meCategorySas->setAxisTitle(("Category (stereo) in " + label).c_str()); + } + if(layerswitchPullTrackwidthProfileSas) { + stereoandmatchedMEs.mePullTrackwidthProfileSas = bookMEProfile("TProfPullTrackwidthProfileSas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (stereo)"); + stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle(("track width (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle(("Pull in MF (stereo) in " + label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory1Sas) { + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas = bookMEProfile("TProfPullTrackwidthProfileCategory1Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category1_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 1) (stereo)"); + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas->setAxisTitle(("track width (Category 1) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas->setAxisTitle(("Pull in MF (Category 1) (stereo) in " + label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory2Sas) { + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas = bookMEProfile("TProfPullTrackwidthProfileCategory2Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category2_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 2) (stereo)"); + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas->setAxisTitle(("track width (Category 2) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas->setAxisTitle(("Pull in MF (Category 2) (stereo) in " + label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory3Sas) { + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas = bookMEProfile("TProfPullTrackwidthProfileCategory3Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category3_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 3) (stereo)"); + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas->setAxisTitle(("track width (Category 3) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas->setAxisTitle(("Pull in MF (Category 3) (stereo) in " + label).c_str(),2); + } + if(layerswitchPullTrackwidthProfileCategory4Sas) { + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas = bookMEProfile("TProfPullTrackwidthProfileCategory4Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category4_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 4) (stereo)"); + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas->setAxisTitle(("track width (Category 4) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas->setAxisTitle(("Pull in MF (Category 4) (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileSas) { + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas = bookMEProfile("TProfResolxMFTrackwidthProfileSas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (stereo)"); + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle(("track width (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle(("Resolution in MF (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory1Sas) { + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas = bookMEProfile("TProfResolxMFTrackwidthProfileCategory1Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category1_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 1) (stereo)"); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas->setAxisTitle((" track width (Category 1) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas->setAxisTitle((" Resolution in MF (Category 1) (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory2Sas) { + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas = bookMEProfile("TProfResolxMFTrackwidthProfileCategory2Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category2_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 2) (stereo)"); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas->setAxisTitle((" track width (Category 2) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas->setAxisTitle((" Resolution in MF (Category 2) (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory3Sas) { + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas = bookMEProfile("TProfResolxMFTrackwidthProfileCategory3Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 3) (stereo)"); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas->setAxisTitle((" track width (Category 3) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas->setAxisTitle((" Resolution in MF (Category 3) (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFTrackwidthProfileCategory4Sas) { + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas = bookMEProfile("TProfResolxMFTrackwidthProfileCategory4Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category4_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 4) (stereo)"); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas->setAxisTitle((" track width (Category 4) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas->setAxisTitle((" Resolution in MF (Category 4) (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFClusterwidthProfileCategory1Sas) { + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas = bookMEProfile("TProfResolxMFClusterwidthProfileCategory1Sas",hidmanager.createHistoLayer("ResolxMF_Cluster_width_Profile_Category1_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs cluster width (Category 1) (stereo)"); + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas->setAxisTitle(("cluster width (Category 1) (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas->setAxisTitle((" Resolution in MF (Category 1) (stereo) in " + label).c_str(),2); + } + if(layerswitchResolxMFAngleProfileSas) { + stereoandmatchedMEs.meResolxMFAngleProfileSas = bookMEProfile("TProfResolxMFAngleProfileSas",hidmanager.createHistoLayer("ResolxMF_Angle_Profile_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track angle (stereo)"); + stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle(("track angle (stereo) in " + label).c_str(),1); + stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle(("Resolution in MF (stereo) in " + label).c_str(),2); + } + //PosxMatched + if(layerswitchPosxMatched) { + stereoandmatchedMEs.mePosxMatched = bookME1D("TH1PosxMatched", hidmanager.createHistoLayer("Posx_matched","layer",label,"").c_str() ,"RecHit x coord."); + stereoandmatchedMEs.mePosxMatched->setAxisTitle(("x coord. matched RecHit (local frame) in " + label).c_str()); + } + //PosyMatched + if(layerswitchPosyMatched) { + stereoandmatchedMEs.mePosyMatched = bookME1D("TH1PosyMatched", hidmanager.createHistoLayer("Posy_matched","layer",label,"").c_str() ,"RecHit y coord."); + stereoandmatchedMEs.mePosyMatched->setAxisTitle(("y coord. matched RecHit (local frame) in " + label).c_str()); + } + //ResolxMatched + if(layerswitchResolxMatched) { + stereoandmatchedMEs.meResolxMatched = bookME1D("TH1ResolxMatched", hidmanager.createHistoLayer("Resolx_matched","layer",label,"").c_str() ,"RecHit resol(x) coord."); + stereoandmatchedMEs.meResolxMatched->setAxisTitle(("resol(x) coord. matched RecHit (local frame) in " + label).c_str()); + } + //ResolyMatched + if(layerswitchResolyMatched) { + stereoandmatchedMEs.meResolyMatched = bookME1D("TH1ResolyMatched", hidmanager.createHistoLayer("Resoly_matched","layer",label,"").c_str() ,"RecHit resol(y) coord."); + stereoandmatchedMEs.meResolyMatched->setAxisTitle(("resol(y) coord. matched RecHit (local frame) in " + label).c_str()); + } + //ResxMatched + if(layerswitchResxMatched) { + stereoandmatchedMEs.meResxMatched = bookME1D("TH1ResxMatched", hidmanager.createHistoLayer("Resx_matched","layer",label,"").c_str() ,"Residual of the hit x coord."); + stereoandmatchedMEs.meResxMatched->setAxisTitle(("Residuals(x) in matched RecHit in " + label).c_str()); + } + //ResyMatched + if(layerswitchResyMatched) { + stereoandmatchedMEs.meResyMatched = bookME1D("TH1ResyMatched", hidmanager.createHistoLayer("Resy_matched","layer",label,"").c_str() ,"Residual of the hit x coord."); + stereoandmatchedMEs.meResyMatched->setAxisTitle(("Res(y) in matched RecHit in " + label).c_str()); + } + + StereoAndMatchedMEsMap[label]=stereoandmatchedMEs; + +} +//------------------------------------------------------------------------------------------ +MonitorElement* SiStripTrackingRecHitsValid::bookME1D(const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle) +{ + Parameters = conf_.getParameter(ParameterSetLabel); + return dbe_->book1D(HistoName,HistoTitle, + Parameters.getParameter("Nbinx"), + Parameters.getParameter("xmin"), + Parameters.getParameter("xmax") + ); +} +//------------------------------------------------------------------------------------------ +MonitorElement* SiStripTrackingRecHitsValid::bookMEProfile(const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle) +{ + Parameters = conf_.getParameter(ParameterSetLabel); + //The number of channels in Y is disregarded in a profile plot. + return dbe_->bookProfile(HistoName,HistoTitle, + Parameters.getParameter("Nbinx"), + Parameters.getParameter("xmin"), + Parameters.getParameter("xmax"), + Parameters.getParameter("ymin"), + Parameters.getParameter("ymax"), + "" + ); +} + +// DEFINE_FWK_MODULE(SiStripTrackingRecHitsValid); diff --git a/Validation/RecoVertex/bin/BSvsPVPlots.cc b/Validation/RecoVertex/bin/BSvsPVPlots.cc new file mode 100644 index 0000000000000..25a5a7cacc67e --- /dev/null +++ b/Validation/RecoVertex/bin/BSvsPVPlots.cc @@ -0,0 +1,479 @@ +#include "BSvsPVPlots.h" +#include +#include +#include +#include +#include +#include "TPad.h" +#include "TH1D.h" +#include "TFile.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TF1.h" +#include "TProfile.h" +#include "TProfile2D.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TCanvas.h" +#include "TSystem.h" +#include "TStyle.h" +#include "TText.h" +#include "TLegend.h" + +void BSvsPVPlots(const char* fullname,const char* module, const char* label, const char* postfix, const char* shortname, const char* outtrunk) { + + char modfull[300]; + sprintf(modfull,"%s%s",module,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + char dirname[400]; + sprintf(dirname,"%s",shortname); + + // char fullname[300]; + // if(strlen(family)==0) { sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);} + // else { sprintf(fullname,"rootfiles/%s.root",dirname); } + + + + std::string workdir = outtrunk ; + workdir += dirname; + gSystem->cd(workdir.c_str()); + gSystem->MakeDirectory(labfull); + // gSystem->cd("/afs/cern.ch/cms/tracking/output"); + + + TFile ff(fullname); + + gStyle->SetOptStat(111111); + // Colliding events + + + CommonAnalyzer castat(&ff,"",modfull); + { + TH1F* deltax = (TH1F*)castat.getObject("deltax"); + if (deltax && deltax->GetEntries()>0) { + deltax->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltax_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + gPad->SetLogy(0); + delete deltax; + } + TH1F* deltay = (TH1F*)castat.getObject("deltay"); + if (deltay && deltay->GetEntries()>0) { + deltay->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltay_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + gPad->SetLogy(0); + delete deltay; + } + TH1F* deltaz = (TH1F*)castat.getObject("deltaz"); + if (deltaz && deltaz->GetEntries()>0) { + deltaz->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + gPad->SetLogy(0); + delete deltaz; + } + gStyle->SetOptStat(111); + gStyle->SetOptFit(111); + TProfile* deltaxvsz = (TProfile*)castat.getObject("deltaxvsz"); + if (deltaxvsz && deltaxvsz->GetEntries()>0) { + // deltaxvsz->Draw(); + deltaxvsz->Fit("pol1","","",-10.,10.); + if(deltaxvsz->GetFunction("pol1")) { + deltaxvsz->GetFunction("pol1")->SetLineColor(kRed); + deltaxvsz->GetFunction("pol1")->SetLineWidth(1); + } + deltaxvsz->GetYaxis()->SetRangeUser(-0.001,0.001); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaxvsz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltaxvsz; + } + TProfile* deltayvsz = (TProfile*)castat.getObject("deltayvsz"); + if (deltayvsz && deltayvsz->GetEntries()>0) { + // deltayvsz->Draw(); + deltayvsz->Fit("pol1","","",-10.,10.); + if(deltayvsz->GetFunction("pol1")) { + deltayvsz->GetFunction("pol1")->SetLineColor(kRed); + deltayvsz->GetFunction("pol1")->SetLineWidth(1); + } + deltayvsz->GetYaxis()->SetRangeUser(-0.001,0.001); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltayvsz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltayvsz; + } + } + gStyle->SetOptStat(111111); + gStyle->SetOptFit(1111); + + // Define fitting functions + TF1* fdoubleg = new TF1("doubleg","[1]*exp(-0.5*((x-[0])/[2])**2)+[3]*exp(-0.5*((x-[0])/[4])**2)+[5]*exp(sqrt((x-[0])**2)*[6])",-.2,.2); + fdoubleg->SetLineColor(kRed); + fdoubleg->SetLineWidth(1); + /* + fdoubleg->SetParLimits(1,0.,1e9); + fdoubleg->SetParLimits(3,0.,1e9); + fdoubleg->SetParLimits(5,0.,1e9); + */ + + gStyle->SetOptFit(1111); + + // Summary histograms + TH1D* deltaxsum = new TH1D("deltaxsum","(PV-BS) Fitted X position vs run",10,0.,10.); + deltaxsum->SetBit(TH1::kCanRebin); + TH1D* deltaysum = new TH1D("deltaysum","(PV-BS) Fitted Y position vs run",10,0.,10.); + deltaysum->SetBit(TH1::kCanRebin); + + TH1D* deltaxmeansum = new TH1D("deltaxmeansum","(PV-BS) Mean X position vs run",10,0.,10.); + deltaxmeansum->SetBit(TH1::kCanRebin); + TH1D* deltaymeansum = new TH1D("deltaymeansum","(PV-BS) Mean Y position vs run",10,0.,10.); + deltaymeansum->SetBit(TH1::kCanRebin); + + TH1D* deltazmeansum = new TH1D("deltazmeansum","(PV-BS) Mean Z position vs run",10,0.,10.); + deltazmeansum->SetBit(TH1::kCanRebin); + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + + std::cout << "Found " << runs.size() << " runs" << std::endl; + + for(unsigned int i=0;iGetEntries()>0) { + // deltax->Draw(); + fdoubleg->SetParameter(0,deltax->GetMean()); + fdoubleg->SetParameter(2,deltax->GetRMS()); + fdoubleg->SetParameter(4,deltax->GetRMS()); + fdoubleg->SetParameter(1,deltax->GetMaximum()); + fdoubleg->SetParameter(3,0.1*deltax->GetMaximum()); + fdoubleg->SetParameter(5,0.1*deltax->GetMaximum()); + const int result = deltax->Fit(fdoubleg,"b","",-.05,.05); + gPad->SetLogy(1); + char tresult[100]; + sprintf(tresult,"%d",result); + TText res; res.SetTextColor(kRed); + if(result!=0) res.DrawTextNDC(.2,.8,tresult); + + int bin = deltaxsum->Fill(runlabel,fdoubleg->GetParameter(0)); + deltaxsum->SetBinError(bin,fdoubleg->GetParError(0)); + + bin = deltaxmeansum->Fill(runlabel,deltax->GetMean()); + deltaxmeansum->SetBinError(bin,deltax->GetMeanError()); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaxrun_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + gPad->SetLogy(0); + delete deltax; + } + TH1F* deltay = (TH1F*)castat.getObject("deltayrun"); + if (deltay && deltay->GetEntries()>0) { + deltay->Draw(); + fdoubleg->SetParameter(0,deltay->GetMean()); + fdoubleg->SetParameter(2,deltay->GetRMS()); + fdoubleg->SetParameter(4,deltay->GetRMS()); + fdoubleg->SetParameter(1,deltay->GetMaximum()); + fdoubleg->SetParameter(3,0.1*deltay->GetMaximum()); + fdoubleg->SetParameter(5,0.1*deltay->GetMaximum()); + const int result = deltay->Fit(fdoubleg,"b","",-.05,.05); + gPad->SetLogy(1); + char tresult[100]; + sprintf(tresult,"%d",result); + TText res; res.SetTextColor(kRed); + if(result!=0) res.DrawTextNDC(.2,.8,tresult); + + int bin = deltaysum->Fill(runlabel,fdoubleg->GetParameter(0)); + deltaysum->SetBinError(bin,fdoubleg->GetParError(0)); + + bin = deltaymeansum->Fill(runlabel,deltay->GetMean()); + deltaymeansum->SetBinError(bin,deltay->GetMeanError()); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltayrun_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + gPad->SetLogy(0); + delete deltay; + } + TH1F* deltaz = (TH1F*)castat.getObject("deltazrun"); + if (deltaz && deltaz->GetEntries()>0) { + deltaz->Draw(); + gPad->SetLogy(1); + + int bin = deltazmeansum->Fill(runlabel,deltaz->GetMean()); + deltazmeansum->SetBinError(bin,deltaz->GetMeanError()); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltazrun_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + gPad->SetLogy(0); + delete deltaz; + } + + TProfile* deltaxvsz = (TProfile*)castat.getObject("deltaxvszrun"); + if (deltaxvsz && deltaxvsz->GetEntries()>0) { + deltaxvsz->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaxvszrun_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltaxvsz; + } + + TProfile* deltayvsz = (TProfile*)castat.getObject("deltayvszrun"); + if (deltayvsz && deltayvsz->GetEntries()>0) { + deltayvsz->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltayvszrun_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltayvsz; + } + + + TH1F* deltaxvsorb = (TH1F*)castat.getObject("deltaxvsorbrun"); + if (deltaxvsorb && deltaxvsorb->GetEntries()>0) { + deltaxvsorb->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaxvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltaxvsorb; + } + TH1F* deltayvsorb = (TH1F*)castat.getObject("deltayvsorbrun"); + if (deltayvsorb && deltayvsorb->GetEntries()>0) { + deltayvsorb->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltayvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltayvsorb; + } + TH1F* deltazvsorb = (TH1F*)castat.getObject("deltazvsorbrun"); + if (deltazvsorb && deltazvsorb->GetEntries()>0) { + deltazvsorb->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltazvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete deltazvsorb; + } + } + } + + gStyle->SetOptStat(1111); + gStyle->SetOptFit(0); + + if(runs.size()) { + std::string plotfilename; + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaxsum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidedeltax = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + deltaxsum->SetLineColor(kRed); deltaxsum->SetMarkerColor(kRed); + deltaxsum->GetYaxis()->SetRangeUser(-.002,.002); + deltaxsum->GetYaxis()->SetTitle("#Delta x (cm)"); + deltaxsum->Draw(); + deltaxmeansum->Draw("esame"); + TLegend deltaxleg(.7,.8,.85,.9,"#Delta(x)"); + deltaxleg.AddEntry(deltaxsum,"fitted mean","l"); + deltaxleg.AddEntry(deltaxmeansum,"aritm. mean","l"); + deltaxleg.Draw(); + gPad->Print(plotfilename.c_str()); + delete cwidedeltax; + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltaysum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidedeltay = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + deltaysum->SetLineColor(kRed); deltaysum->SetMarkerColor(kRed); + deltaysum->GetYaxis()->SetRangeUser(-.002,.002); + deltaysum->GetYaxis()->SetTitle("#Delta y (cm)"); + deltaysum->Draw(); + deltaymeansum->Draw("esame"); + TLegend deltayleg(.7,.8,.85,.9,"#Delta(y)"); + deltayleg.AddEntry(deltaysum,"fitted mean","l"); + deltayleg.AddEntry(deltaymeansum,"aritm. mean","l"); + deltayleg.Draw(); + gPad->Print(plotfilename.c_str()); + delete cwidedeltay; + + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/deltazsum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidedeltaz = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + deltazmeansum->GetYaxis()->SetRangeUser(-2.,2.); + deltazmeansum->GetYaxis()->SetTitle("#Delta z (cm)"); + deltazmeansum->Draw(); + gPad->Print(plotfilename.c_str()); + delete cwidedeltaz; + } + delete deltaxsum; + delete deltaysum; + delete deltaxmeansum; + delete deltaymeansum; + delete deltazmeansum; + + + ff.Close(); + delete fdoubleg; +} + diff --git a/Validation/RecoVertex/bin/BSvsPVPlots.h b/Validation/RecoVertex/bin/BSvsPVPlots.h new file mode 100644 index 0000000000000..89620620e00ad --- /dev/null +++ b/Validation/RecoVertex/bin/BSvsPVPlots.h @@ -0,0 +1,7 @@ +#ifndef Validation_RecoVertex_BSvsPVPlots_h +#define Validation_RecoVertex_BSvsPVPlots_h + +void BSvsPVPlots(const char* fullname,const char* module, const char* label, const char* postfix, const char* shortname, const char* outtrunk); + +#endif // Validation_RecoVertex_BSvsPVPlots_h + diff --git a/Validation/RecoVertex/bin/BuildFile.xml b/Validation/RecoVertex/bin/BuildFile.xml new file mode 100644 index 0000000000000..2f1ea75895860 --- /dev/null +++ b/Validation/RecoVertex/bin/BuildFile.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Validation/RecoVertex/bin/PrimaryVertexPlots.cc b/Validation/RecoVertex/bin/PrimaryVertexPlots.cc new file mode 100644 index 0000000000000..75231320168b5 --- /dev/null +++ b/Validation/RecoVertex/bin/PrimaryVertexPlots.cc @@ -0,0 +1,834 @@ +#include "PrimaryVertexPlots.h" +#include +#include +#include +#include +#include +#include "TPad.h" +#include "TH1D.h" +#include "TFile.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TF1.h" +#include "TH1D.h" +#include "TProfile.h" +#include "TProfile2D.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TCanvas.h" +#include "TSystem.h" +#include "TStyle.h" +#include "TCanvas.h" +#include "TGraphErrors.h" + +void PrimaryVertexPlots(const char* fullname,const char* module, const char* postfix, const char* label, const char* shortname, const char* outtrunk) { + + std::cout << shortname << module << postfix << label << std::endl; + + char modfull[300]; + sprintf(modfull,"%s%s",module,postfix); + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + char dirname[400]; + sprintf(dirname,"%s",shortname); + + // char fullname[300]; + // if(strlen(family)==0) { sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);} + // else { sprintf(fullname,"rootfiles/%s.root",dirname); } + + + + std::string workdir = outtrunk ; + workdir += dirname; + gSystem->cd(workdir.c_str()); + gSystem->MakeDirectory(labfull); + // gSystem->cd("/afs/cern.ch/cms/tracking/output"); + + + TFile ff(fullname); + + // Colliding events + + + CommonAnalyzer castat(&ff,"",modfull); + + char bsmodule[300]; + sprintf(bsmodule,"beamspotanalyzer%s",postfix); + CommonAnalyzer cabs(&ff,"",bsmodule); + sprintf(bsmodule,"onlinebsanalyzer%s",postfix); + CommonAnalyzer cabsonl(&ff,"",bsmodule); + sprintf(bsmodule,"testbsanalyzer%s",postfix); + CommonAnalyzer cabstest(&ff,"",bsmodule); + + + std::cout << "ready" << std::endl; + + TH1F* ntrvtx = (TH1F*)castat.getObject("ntruevtx"); + if(ntrvtx) { + ntrvtx->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ntrvtx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete ntrvtx; + gPad->SetLogy(0); + } + + gStyle->SetOptStat(111); + gStyle->SetOptFit(111); + TProfile* ntrvtxvslumi = (TProfile*)castat.getObject("ntruevtxvslumi"); + if(ntrvtxvslumi && ntrvtxvslumi->GetEntries()>0 ) { + // ntrvtxvslumi->Draw(); + ntrvtxvslumi->Fit("pol2","","",0.5,3.0); + if(ntrvtxvslumi->GetFunction("pol2")) { + ntrvtxvslumi->GetFunction("pol2")->SetLineColor(kBlack); + ntrvtxvslumi->GetFunction("pol2")->SetLineWidth(1); + } + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ntrvtxvslumi_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + } + + gStyle->SetOptStat(1111); + + TH2D* ntrvtxvslumi2D = (TH2D*)castat.getObject("ntruevtxvslumi2D"); + if(ntrvtxvslumi2D && ntrvtxvslumi2D->GetEntries()>0 ) { + ntrvtxvslumi2D->Draw("colz"); + if(ntrvtxvslumi) { + ntrvtxvslumi->SetMarkerStyle(20); + ntrvtxvslumi->SetMarkerSize(.3); + ntrvtxvslumi->Draw("same"); + } + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ntrvtxvslumi2D_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->SetLogz(1); + gPad->Print(plotfilename.c_str()); + gPad->SetLogz(0); + delete ntrvtxvslumi2D; + } + delete ntrvtxvslumi; + + std::cout << "ready2" << std::endl; + + TH1F* ndofvtx = (TH1F*)castat.getObject("ndof"); + if(ndofvtx) { + ndofvtx->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ndofvtx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete ndofvtx; + } + + TH1F* ntracksvtx = (TH1F*)castat.getObject("ntracks"); + if(ntracksvtx) { + ntracksvtx->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ntracksvtx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete ntracksvtx; + } + + TH1F* aveweight = (TH1F*)castat.getObject("aveweight"); + if(aveweight) { + aveweight->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/aveweight_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete aveweight; + } + + TProfile* aveweightvsvtxz = (TProfile*)castat.getObject("aveweightvsvtxz"); + if(aveweightvsvtxz) { + aveweightvsvtxz->Draw(); + aveweightvsvtxz->GetYaxis()->SetRangeUser(0.75,1.05); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/aveweightvsvtxz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete aveweightvsvtxz; + } + + TProfile* ndofvsvtxz = (TProfile*)castat.getObject("ndofvsvtxz"); + if(ndofvsvtxz) { + ndofvsvtxz->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ndofvsvtxz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete ndofvsvtxz; + } + + TProfile* ntracksvsvtxz = (TProfile*)castat.getObject("ntracksvsvtxz"); + if(ntracksvsvtxz) { + ntracksvsvtxz->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ntracksvsvtxz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete ntracksvsvtxz; + } + + std::cout << "ready3" << std::endl; + + TH2F* ndofvsntrks = (TH2F*)castat.getObject("ndofvstracks"); + if(ndofvsntrks) { + ndofvsntrks->Draw("colz"); + gPad->SetLogz(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/ndofvsntrks_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete ndofvsntrks; + gPad->SetLogz(0); + } + std::cout << "ready4" << std::endl; + + TH1F* trkweights = (TH1F*)castat.getObject("weights"); + if(trkweights) { + trkweights->Draw(); + gPad->SetLogy(1); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/trkweights_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete trkweights; + gPad->SetLogy(0); + } + + { + TH1F* vtxx = (TH1F*)castat.getObject("vtxx"); + if (vtxx) { + vtxx->Draw(); + gPad->SetLogy(1); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxx; + gPad->SetLogy(0); + } + + TH1F* vtxy = (TH1F*)castat.getObject("vtxy"); + if (vtxy) { + vtxy->Draw(); + gPad->SetLogy(1); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxy_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxy; + gPad->SetLogy(0); + } + + TH1F* vtxz = (TH1F*)castat.getObject("vtxz"); + if (vtxz) { + vtxz->Draw(); + gPad->SetLogy(1); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxz; + gPad->SetLogy(0); + } + } + + std::cout << "ready4" << std::endl; + + + // Summary histograms + /* + TH1D* vtxxsum = new TH1D("vtxxsum","(BS-PV) Fitted X position vs run",10,0.,10.); + vtxxsum->SetBit(TH1::kCanRebin); + TH1D* vtxysum = new TH1D("vtxysum","(BS-PV) Fitted Y position vs run",10,0.,10.); + vtxysum->SetBit(TH1::kCanRebin); + TH1D* vtxzsum = new TH1D("vtxzsum","(BS-PV) Fitted Y position vs run",10,0.,10.); + vtxzsum->SetBit(TH1::kCanRebin); + */ + + TH1D* vtxxmeansum = new TH1D("vtxxmeansum","PV mean X position vs run",10,0.,10.); + vtxxmeansum->SetBit(TH1::kCanRebin); + TH1D* vtxymeansum = new TH1D("vtxymeansum","PV mean Y position vs run",10,0.,10.); + vtxymeansum->SetBit(TH1::kCanRebin); + TH1D* vtxzmeansum = new TH1D("vtxzmeansum","PV mean Z position vs run",10,0.,10.); + vtxzmeansum->SetBit(TH1::kCanRebin); + TH1D* vtxzsigmasum = new TH1D("vtxzsigmasum","PV sigma Z position vs run",10,0.,10.); + vtxzsigmasum->SetBit(TH1::kCanRebin); + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + + std::cout << "Found " << runs.size() << " runs" << std::endl; + + for(unsigned int i=0;iGetEntries()>0) { + vtxx->Draw(); + gPad->SetLogy(1); + + + int bin = vtxxmeansum->Fill(runlabel,vtxx->GetMean()); + vtxxmeansum->SetBinError(bin,vtxx->GetMeanError()); + + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxx; + } + gPad->SetLogy(0); + TH1F* vtxy = (TH1F*)castat.getObject("vtxyrun"); + if (vtxy && vtxy->GetEntries()>0) { + vtxy->Draw(); + gPad->SetLogy(1); + + int bin = vtxymeansum->Fill(runlabel,vtxy->GetMean()); + vtxymeansum->SetBinError(bin,vtxy->GetMeanError()); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxy_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxy; + } + gPad->SetLogy(0); + double vtxsigmazrunvalue = -1.; double vtxsigmazrunerror = -1.; + double vtxsigmazrunfitvalue = -1.; double vtxsigmazrunfiterror = -1.; + TH1F* vtxz = (TH1F*)castat.getObject("vtxzrun"); + if (vtxz && vtxz->GetEntries()>0) { + vtxz->Fit("gaus","","",-3.*vtxz->GetRMS(),3.*vtxz->GetRMS()); + // vtxz->Draw(); + if(vtxz->GetFunction("gaus")) { + vtxz->GetFunction("gaus")->SetLineColor(kRed); + vtxz->GetFunction("gaus")->SetLineWidth(1); + vtxsigmazrunfitvalue = vtxz->GetFunction("gaus")->GetParameter(2); + vtxsigmazrunfiterror = vtxz->GetFunction("gaus")->GetParError(2); + } + gPad->SetLogy(1); + + int bin = vtxzmeansum->Fill(runlabel,vtxz->GetMean()); + vtxzmeansum->SetBinError(bin,vtxz->GetMeanError()); + + bin = vtxzsigmasum->Fill(runlabel,vtxz->GetRMS()); + vtxzsigmasum->SetBinError(bin,vtxz->GetRMSError()); + + vtxsigmazrunvalue = vtxz->GetRMS(); + vtxsigmazrunerror = vtxz->GetRMSError(); + + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxz_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxz; + } + gPad->SetLogy(0); + + + TH1F* vtxxvsorb = (TH1F*)castat.getObject("vtxxvsorbrun"); + TH1F* bsxvsorb = (TH1F*)cabs.getObject("bsxvsorbrun"); + TH1F* onlbsxvsorb = (TH1F*)cabsonl.getObject("bsxvsorbrun"); + TH1F* testbsxvsorb = (TH1F*)cabstest.getObject("bsxvsorbrun"); + if (vtxxvsorb && vtxxvsorb->GetEntries()>0) { + // vtxxvsorb->GetYaxis()->SetRangeUser(0.0650,0.07); + vtxxvsorb->Draw(); + if(bsxvsorb) { + bsxvsorb->SetMarkerColor(kGreen); bsxvsorb->SetLineColor(kGreen); bsxvsorb->SetLineWidth(2); + bsxvsorb->Draw("esame"); + } + if(onlbsxvsorb) { + onlbsxvsorb->SetMarkerColor(kRed); onlbsxvsorb->SetLineColor(kRed); + onlbsxvsorb->Draw("esame"); + } + if(testbsxvsorb) { + testbsxvsorb->SetMarkerColor(kBlue); testbsxvsorb->SetLineColor(kBlue); + testbsxvsorb->Draw("esame"); + } + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxxvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxxvsorb; delete bsxvsorb; delete onlbsxvsorb; delete testbsxvsorb; + } + TH1F* vtxyvsorb = (TH1F*)castat.getObject("vtxyvsorbrun"); + TH1F* bsyvsorb = (TH1F*)cabs.getObject("bsyvsorbrun"); + TH1F* onlbsyvsorb = (TH1F*)cabsonl.getObject("bsyvsorbrun"); + TH1F* testbsyvsorb = (TH1F*)cabstest.getObject("bsyvsorbrun"); + if (vtxyvsorb && vtxyvsorb->GetEntries()>0) { + // vtxyvsorb->GetYaxis()->SetRangeUser(0.0620,0.0670); + vtxyvsorb->Draw(); + if(bsyvsorb) { + bsyvsorb->SetMarkerColor(kGreen); bsyvsorb->SetLineColor(kGreen); bsyvsorb->SetLineWidth(2); + bsyvsorb->Draw("esame"); + } + if(onlbsyvsorb) { + onlbsyvsorb->SetMarkerColor(kRed); onlbsyvsorb->SetLineColor(kRed); + onlbsyvsorb->Draw("esame"); + } + if(testbsyvsorb) { + testbsyvsorb->SetMarkerColor(kCyan); testbsyvsorb->SetLineColor(kCyan); + testbsyvsorb->Draw("esame"); + } + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxyvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxyvsorb; delete bsyvsorb; delete onlbsyvsorb; delete testbsyvsorb; + } + TH1F* vtxzvsorb = (TH1F*)castat.getObject("vtxzvsorbrun"); + TH1F* bszvsorb = (TH1F*)cabs.getObject("bszvsorbrun"); + TH1F* onlbszvsorb = (TH1F*)cabsonl.getObject("bszvsorbrun"); + TH1F* testbszvsorb = (TH1F*)cabstest.getObject("bszvsorbrun"); + if (vtxzvsorb && vtxzvsorb->GetEntries()>0) { + vtxzvsorb->Draw(); + if(bszvsorb) { + bszvsorb->SetMarkerColor(kGreen); bszvsorb->SetLineColor(kGreen); bszvsorb->SetLineWidth(2); + bszvsorb->Draw("esame"); + } + if(onlbszvsorb) { + onlbszvsorb->SetMarkerColor(kRed); onlbszvsorb->SetLineColor(kRed); + onlbszvsorb->Draw("esame"); + } + if(testbszvsorb) { + testbszvsorb->SetMarkerColor(kCyan); testbszvsorb->SetLineColor(kCyan); + testbszvsorb->Draw("esame"); + } + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxzvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete vtxzvsorb; delete bszvsorb; delete onlbszvsorb; delete testbszvsorb; + } + + TProfile* bssigmazvsorb = (TProfile*)cabs.getObject("bssigmazvsorbrun"); + TProfile* onlbssigmazvsorb = (TProfile*)cabsonl.getObject("bssigmazvsorbrun"); + TProfile* testbssigmazvsorb = (TProfile*)cabstest.getObject("bssigmazvsorbrun"); + TGraphErrors gr;TGraphErrors grfit; + if ( bssigmazvsorb || onlbssigmazvsorb || testbssigmazvsorb) { + if(bssigmazvsorb) { + bssigmazvsorb->SetMarkerColor(kGreen); bssigmazvsorb->SetLineColor(kGreen); bssigmazvsorb->SetLineWidth(2); + bssigmazvsorb->Draw(); + bssigmazvsorb->GetYaxis()->SetRangeUser(0.,7.); + if(vtxsigmazrunvalue >= 0.) { + // look for last filled bin + int lastbin= bssigmazvsorb->GetNbinsX()+1; + int firstbin= 1; + for(int ibin=bssigmazvsorb->GetNbinsX()+1;ibin>0;--ibin) { + if(bssigmazvsorb->GetBinEntries(ibin)!=0) { + lastbin=ibin; + break; + } + } + for(int ibin=1;ibin<=bssigmazvsorb->GetNbinsX()+1;++ibin) { + if(bssigmazvsorb->GetBinEntries(ibin)!=0) { + firstbin=ibin; + break; + } + } + gr.SetMarkerStyle(20); + gr.SetPoint(1,(bssigmazvsorb->GetBinCenter(firstbin)+bssigmazvsorb->GetBinCenter(lastbin))/2.,vtxsigmazrunvalue); + gr.SetPointError(1,(bssigmazvsorb->GetBinCenter(lastbin)-bssigmazvsorb->GetBinCenter(firstbin))/2.,vtxsigmazrunerror); + gr.Draw("p"); + grfit.SetMarkerStyle(24);grfit.SetMarkerColor(kBlue);grfit.SetLineColor(kBlue); + grfit.SetPoint(1,(bssigmazvsorb->GetBinCenter(firstbin)+bssigmazvsorb->GetBinCenter(lastbin))/2.,vtxsigmazrunfitvalue); + grfit.SetPointError(1,(bssigmazvsorb->GetBinCenter(lastbin)-bssigmazvsorb->GetBinCenter(firstbin))/2.,vtxsigmazrunfiterror); + grfit.Draw("p"); + } + } + if(onlbssigmazvsorb) { + onlbssigmazvsorb->SetMarkerColor(kRed); onlbssigmazvsorb->SetLineColor(kRed); + onlbssigmazvsorb->Draw("esame"); + } + if(testbssigmazvsorb) { + testbssigmazvsorb->SetMarkerColor(kCyan); testbssigmazvsorb->SetLineColor(kCyan); + testbssigmazvsorb->Draw("esame"); + } + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/pvtxsigmazvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete bssigmazvsorb; delete onlbssigmazvsorb; delete testbssigmazvsorb; + } + + + + + + + TProfile* nvtxvsorb = (TProfile*)castat.getObject("nvtxvsorbrun"); + if(nvtxvsorb) { + nvtxvsorb->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/nvtxvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete nvtxvsorb; + } + + TProfile* nvtxvsbx = (TProfile*)castat.getObject("nvtxvsbxrun"); + if(nvtxvsbx) { + nvtxvsbx->SetLineColor(kRed); nvtxvsbx->SetMarkerColor(kRed); nvtxvsbx->SetMarkerStyle(20); nvtxvsbx->SetMarkerSize(.5); + nvtxvsbx->Draw(); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/nvtxvsbx_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + delete nvtxvsbx; + } + + TH2D* nvtxvsbxvsorb = (TH2D*)castat.getObject("nvtxvsbxvsorbrun"); + if(nvtxvsbxvsorb) { + + nvtxvsbxvsorb->Draw("colz"); + std::string plotfilename; + plotfilename += outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/nvtxvsbxvsorb_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + + // slicing + std::string cname; + cname = "slice_run_"; + cname += runpath; + new TCanvas(cname.c_str(),cname.c_str()); + bool first=true; + int mcount=20; + int ccount=1; + for(unsigned int bx=1;bx<3564;++bx) { + char hname[300]; + sprintf(hname,"bx_%d",bx); + TH1D* slice = nvtxvsbxvsorb->ProjectionY(hname,bx+1,bx+1); + // std::cout << "slice " << bx << " with pointer " << slice << std::endl; + if(slice) { + if(slice->GetEntries()) { + std::cout << "slice " << bx << " ready " << std::endl; + slice->SetMarkerStyle(mcount); + slice->SetMarkerColor(ccount); + slice->SetLineColor(ccount); + slice->SetMarkerSize(.4); + if(first) {slice->SetMaximum(4.); slice->Draw("e");} + else {slice->Draw("same");} + first=false; + ++mcount; + if(mcount==28) {mcount=20; ++ccount;} + } + } + } + // std::string plotfilename; + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/nvtxvsorbsliced_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += "_"; + plotfilename += runpath; + plotfilename += ".gif"; + gPad->Print(plotfilename.c_str()); + + delete nvtxvsbxvsorb; + } + } + + } + if(runs.size()) { + std::string plotfilename; + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/vtxxsum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidevtxx = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + vtxxmeansum->GetYaxis()->SetRangeUser(.05,.15); + vtxxmeansum->GetYaxis()->SetTitle("x (cm)"); + vtxxmeansum->Draw(); + // vtxxmeansum->SetLineColor(kRed); vtxxmeansum->SetMarkerColor(kRed); + // vtxxmeansum->Draw("esame"); + gPad->Print(plotfilename.c_str()); + delete cwidevtxx; + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/vtxysum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidevtxy = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + vtxymeansum->GetYaxis()->SetRangeUser(-0.05,.05); + vtxymeansum->GetYaxis()->SetTitle("y (cm)"); + vtxymeansum->Draw(); + // vtxymeansum->SetLineColor(kRed); vtxymeansum->SetMarkerColor(kRed); + // vtxymeansum->Draw("esame"); + gPad->Print(plotfilename.c_str()); + delete cwidevtxy; + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/vtxzsum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidevtxz = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + vtxzmeansum->GetYaxis()->SetRangeUser(-2.,2.); + vtxzmeansum->GetYaxis()->SetTitle("z (cm)"); + vtxzmeansum->Draw(); + // vtxzmeansum->SetLineColor(kRed); vtxzmeansum->SetMarkerColor(kRed); + // vtxzmeansum->Draw("esame"); + gPad->Print(plotfilename.c_str()); + delete cwidevtxz; + + plotfilename = outtrunk; + plotfilename += dirname; + plotfilename += "/"; + plotfilename += labfull; + plotfilename += "/vtxsigmazsum_"; + plotfilename += labfull; + plotfilename += "_"; + plotfilename += dirname; + plotfilename += ".gif"; + + TCanvas * cwidevtxsigmaz = new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + vtxzsigmasum->GetYaxis()->SetRangeUser(0.,15.); + vtxzsigmasum->GetYaxis()->SetTitle("z (cm)"); + vtxzsigmasum->Draw(); + // vtxzsigmasum->SetLineColor(kRed); vtxzsigmasum->SetMarkerColor(kRed); + // vtxzsigmasum->Draw("esame"); + gPad->Print(plotfilename.c_str()); + delete cwidevtxsigmaz; + + } + delete vtxxmeansum; + delete vtxymeansum; + delete vtxzmeansum; + delete vtxzsigmasum; +} + diff --git a/Validation/RecoVertex/bin/PrimaryVertexPlots.h b/Validation/RecoVertex/bin/PrimaryVertexPlots.h new file mode 100644 index 0000000000000..881935fe78e59 --- /dev/null +++ b/Validation/RecoVertex/bin/PrimaryVertexPlots.h @@ -0,0 +1,6 @@ +#ifndef Validation_RecoVertex_PrimaryVertexPlots_h +#define Validation_RecoVertex_PrimaryVertexPlots_h + +void PrimaryVertexPlots(const char* fullname,const char* module, const char* postfix, const char* label, const char* shortname, const char* outtrunk); + +#endif // Validation_RecoVertex_PrimaryVertexPlots_h diff --git a/Validation/RecoVertex/bin/ValidationRecoVertexMacrosLinkDef.h b/Validation/RecoVertex/bin/ValidationRecoVertexMacrosLinkDef.h new file mode 100644 index 0000000000000..83b40f3c1a651 --- /dev/null +++ b/Validation/RecoVertex/bin/ValidationRecoVertexMacrosLinkDef.h @@ -0,0 +1,9 @@ +#include "PrimaryVertexPlots.h" +#include "BSvsPVPlots.h" +#include "multibsvspvplots.h" +#ifdef __CINT__ +#pragma link off all functions; +#pragma link C++ function PrimaryVertexPlots; +#pragma link C++ function BSvsPVPlots; +#pragma link C++ function multibsvspvplots; +#endif diff --git a/Validation/RecoVertex/bin/multibsvspvplots.cc b/Validation/RecoVertex/bin/multibsvspvplots.cc new file mode 100644 index 0000000000000..ae5220b6c2953 --- /dev/null +++ b/Validation/RecoVertex/bin/multibsvspvplots.cc @@ -0,0 +1,203 @@ +#include "multibsvspvplots.h" +#include +#include +#include +#include +#include +#include "TPad.h" +#include "TH1D.h" +#include "TFile.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TF1.h" +#include "TProfile.h" +#include "TProfile2D.h" +#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h" +#include "TCanvas.h" +#include "TSystem.h" +#include "TStyle.h" +#include "TText.h" +#include "TLegend.h" + +void multibsvspvplots(const char* module, const char* label, const char* postfix, const char* /* family="" */) { + + TFile* file[5]; + + file[0] = new TFile("rootfiles/Tracking_PFG_Run2012A_prompt_minbias_v1_190456-194076_muon_relumi_v55_fittedV0.root"); + file[1] = new TFile("rootfiles/Tracking_PFG_Run2012B_prompt_minbias_v1_190456-196531_muon_relumi_v55_fittedV0.root"); + file[2] = new TFile("rootfiles/Tracking_PFG_Run2012C_prompt_minbias_v1_190456-199011_muon_relumi_v55_fittedV0.root"); + file[3] = new TFile("rootfiles/Tracking_PFG_Run2012C_prompt_minbias_v2_190456-203002_muon_relumi_v57_fittedV0.root"); + file[4] = new TFile("rootfiles/Tracking_PFG_Run2012D_prompt_minbias_v1_190456-208686_muon_relumi_v57_fittedV0.root"); + + char modfull[300]; + sprintf(modfull,"%s%s",module,postfix); + + char labfull[300]; + sprintf(labfull,"%s%s",label,postfix); + + // Summary histograms + TH1D* deltaxsum = new TH1D("deltaxsum","(PV-BS) Fitted X position vs run",10,0.,10.); + deltaxsum->SetBit(TH1::kCanRebin); + TH1D* deltaysum = new TH1D("deltaysum","(PV-BS) Fitted Y position vs run",10,0.,10.); + deltaysum->SetBit(TH1::kCanRebin); + + TH1D* deltaxmeansum = new TH1D("deltaxmeansum","(PV-BS) Mean X position vs run",10,0.,10.); + deltaxmeansum->SetBit(TH1::kCanRebin); + TH1D* deltaymeansum = new TH1D("deltaymeansum","(PV-BS) Mean Y position vs run",10,0.,10.); + deltaymeansum->SetBit(TH1::kCanRebin); + + TH1D* deltazmeansum = new TH1D("deltazmeansum","(PV-BS) Mean Z position vs run",10,0.,10.); + deltazmeansum->SetBit(TH1::kCanRebin); + + TF1* fdoubleg = new TF1("doubleg","[1]*exp(-0.5*((x-[0])/[2])**2)+[3]*exp(-0.5*((x-[0])/[4])**2)+[5]*exp(sqrt((x-[0])**2)*[6])",-.2,.2); + fdoubleg->SetLineColor(kRed); + fdoubleg->SetLineWidth(1); + + for(unsigned int ifile=0;ifile<5;++ifile) { + + CommonAnalyzer castat(file[ifile],"",modfull); + + std::vector runs = castat.getRunList(); + std::sort(runs.begin(),runs.end()); + + { + + std::cout << "Found " << runs.size() << " runs" << std::endl; + + for(unsigned int i=0;iGetEntries()>0) { + + fdoubleg->SetParameter(0,deltax->GetMean()); + fdoubleg->SetParameter(2,deltax->GetRMS()); + fdoubleg->SetParameter(4,deltax->GetRMS()); + fdoubleg->SetParameter(1,deltax->GetMaximum()); + fdoubleg->SetParameter(3,0.1*deltax->GetMaximum()); + fdoubleg->SetParameter(5,0.1*deltax->GetMaximum()); + /* const int result = */ deltax->Fit(fdoubleg,"q0b","",-.05,.05); + + int bin = deltaxsum->Fill(runlabel,fdoubleg->GetParameter(0)); + deltaxsum->SetBinError(bin,fdoubleg->GetParError(0)); + + bin = deltaxmeansum->Fill(runlabel,deltax->GetMean()); + deltaxmeansum->SetBinError(bin,deltax->GetMeanError()); + + } + TH1F* deltay = (TH1F*)castat.getObject("deltayrun"); + if (deltay && deltay->GetEntries()>0) { + + fdoubleg->SetParameter(0,deltay->GetMean()); + fdoubleg->SetParameter(2,deltay->GetRMS()); + fdoubleg->SetParameter(4,deltay->GetRMS()); + fdoubleg->SetParameter(1,deltay->GetMaximum()); + fdoubleg->SetParameter(3,0.1*deltay->GetMaximum()); + fdoubleg->SetParameter(5,0.1*deltay->GetMaximum()); + /* const int result = */ deltay->Fit(fdoubleg,"q0b","",-.05,.05); + int bin = deltaysum->Fill(runlabel,fdoubleg->GetParameter(0)); + deltaysum->SetBinError(bin,fdoubleg->GetParError(0)); + + bin = deltaymeansum->Fill(runlabel,deltay->GetMean()); + deltaymeansum->SetBinError(bin,deltay->GetMeanError()); + + } + TH1F* deltaz = (TH1F*)castat.getObject("deltazrun"); + if (deltaz && deltaz->GetEntries()>0) { + + int bin = deltazmeansum->Fill(runlabel,deltaz->GetMean()); + deltazmeansum->SetBinError(bin,deltaz->GetMeanError()); + + } + + + + } + + } + } + + std::string plotfilename; + + plotfilename = "/afs/cern.ch/cms/tracking/output/"; + // plotfilename += dirname; + // plotfilename += "/"; + // plotfilename += labfull; + plotfilename += "/deltaxsum_"; + plotfilename += labfull; + // plotfilename += "_"; + // plotfilename += dirname; + plotfilename += ".gif"; + + /* TCanvas * cwidedeltax = */ new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + deltaxsum->SetLineColor(kRed); deltaxsum->SetMarkerColor(kRed); + deltaxsum->GetYaxis()->SetRangeUser(-.002,.002); + deltaxsum->GetYaxis()->SetTitle("#Delta x (cm)"); + deltaxsum->Draw(); + deltaxmeansum->Draw("esame"); + TLegend deltaxleg(.7,.8,.85,.9,"#Delta(x)"); + deltaxleg.AddEntry(deltaxsum,"fitted mean","l"); + deltaxleg.AddEntry(deltaxmeansum,"aritm. mean","l"); + deltaxleg.Draw(); + gPad->Print(plotfilename.c_str()); + // delete cwidedeltax; + + plotfilename = "/afs/cern.ch/cms/tracking/output/"; + // plotfilename += dirname; + // plotfilename += "/"; + // plotfilename += labfull; + plotfilename += "/deltaysum_"; + plotfilename += labfull; + // plotfilename += "_"; + // plotfilename += dirname; + plotfilename += ".gif"; + + /* TCanvas * cwidedeltay = */ new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + deltaysum->SetLineColor(kRed); deltaysum->SetMarkerColor(kRed); + deltaysum->GetYaxis()->SetRangeUser(-.002,.002); + deltaysum->GetYaxis()->SetTitle("#Delta y (cm)"); + deltaysum->Draw(); + deltaymeansum->Draw("esame"); + TLegend deltayleg(.7,.8,.85,.9,"#Delta(y)"); + deltayleg.AddEntry(deltaysum,"fitted mean","l"); + deltayleg.AddEntry(deltaymeansum,"aritm. mean","l"); + deltayleg.Draw(); + gPad->Print(plotfilename.c_str()); + // delete cwidedeltay; + + + plotfilename = "/afs/cern.ch/cms/tracking/output/"; + // plotfilename += dirname; + // plotfilename += "/"; + // plotfilename += labfull; + plotfilename += "/deltazsum_"; + plotfilename += labfull; + // plotfilename += "_"; + // plotfilename += dirname; + plotfilename += ".gif"; + + /* TCanvas * cwidedeltaz = */ new TCanvas(plotfilename.c_str(),plotfilename.c_str(),1500,500); + + deltazmeansum->GetYaxis()->SetRangeUser(-2.,2.); + deltazmeansum->GetYaxis()->SetTitle("#Delta z (cm)"); + deltazmeansum->Draw(); + gPad->Print(plotfilename.c_str()); + // delete cwidedeltaz; + /* + delete deltaxsum; + delete deltaysum; + delete deltaxmeansum; + delete deltaymeansum; + delete deltazmeansum; + */ + delete fdoubleg; + +} diff --git a/Validation/RecoVertex/bin/multibsvspvplots.h b/Validation/RecoVertex/bin/multibsvspvplots.h new file mode 100644 index 0000000000000..f6ff0e4569108 --- /dev/null +++ b/Validation/RecoVertex/bin/multibsvspvplots.h @@ -0,0 +1,6 @@ +#ifndef Validation_RecoVertex_multibsvspvplots_h +#define Validation_RecoVertex_multibsvspvplots_h + +void multibsvspvplots(const char* module, const char* label, const char* postfix, const char* /* family="" */); + +#endif // Validation_RecoVertex_multibsvspvplots_h diff --git a/Validation/RecoVertex/python/pvRecoSequence_cff.py b/Validation/RecoVertex/python/pvRecoSequence_cff.py new file mode 100644 index 0000000000000..3e4b9a2d77a1a --- /dev/null +++ b/Validation/RecoVertex/python/pvRecoSequence_cff.py @@ -0,0 +1,106 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff import * +from Configuration.StandardSequences.Geometry_cff import * +from Configuration.StandardSequences.Reconstruction_cff import * + +#from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import * + +# 2010-like PV reconstruction + +offlinePrimaryVerticesGAP = cms.EDProducer("PrimaryVertexProducer", + verbose = cms.untracked.bool(False), + beamSpotLabel = cms.InputTag("offlineBeamSpot"), + TrackLabel = cms.InputTag("generalTracks"), # label of tracks to be used + TkFilterParameters = cms.PSet( + algorithm=cms.string('filter'), + maxNormalizedChi2 = cms.double(20.0), # + minSiliconLayersWithHits = cms.int32(5), # >= 5 + minPixelLayersWithHits = cms.int32(2), # >= 2 + maxD0Significance = cms.double(100.0), # keep most primary tracks + minPt = cms.double(0.0), # better for softish events + trackQuality = cms.string("any") + ), + # clustering + TkClusParameters = cms.PSet( + algorithm = cms.string('gap'), + TkGapClusParameters = cms.PSet( + zSeparation = cms.double(0.2) + ) + ), + vertexCollections = cms.VPSet( + [cms.PSet(label=cms.string(""), + algorithm = cms.string('AdaptiveVertexFitter'), + minNdof=cms.double(0.0), + useBeamConstraint = cms.bool(False), + maxDistanceToBeam = cms.double(2.0) + )] + ) +) + + + +offlinePrimaryVerticesD0s5 = offlinePrimaryVerticesGAP.clone() +offlinePrimaryVerticesD0s5.TkFilterParameters.maxD0Significance = cms.double(5) + +offlinePrimaryVerticesD0s51mm = offlinePrimaryVerticesGAP.clone() +offlinePrimaryVerticesD0s51mm.TkFilterParameters.maxD0Significance = cms.double(5) +offlinePrimaryVerticesD0s51mm.TkClusParameters.TkGapClusParameters.zSeparation = cms.double(0.1) + + +offlinePrimaryVerticesDA100um = cms.EDProducer("PrimaryVertexProducer", + + verbose = cms.untracked.bool(False), + TrackLabel = cms.InputTag("generalTracks"), + beamSpotLabel = cms.InputTag("offlineBeamSpot"), + + TkFilterParameters = cms.PSet( + algorithm=cms.string('filter'), + maxNormalizedChi2 = cms.double(20.0), + minPixelLayersWithHits=cms.int32(2), + minSiliconLayersWithHits = cms.int32(5), + maxD0Significance = cms.double(5.0), + minPt = cms.double(0.0), + trackQuality = cms.string("any") + ), + + TkClusParameters = cms.PSet( + algorithm = cms.string("DA"), + TkDAClusParameters = cms.PSet( + coolingFactor = cms.double(0.6), # moderate annealing speed + Tmin = cms.double(4.), # end of annealing + vertexSize = cms.double(0.01), # + d0CutOff = cms.double(3.), # downweight high IP tracks + dzCutOff = cms.double(4.) # outlier rejection after freeze-out (T m_hepMCProductToken; TH1F* m_hnvtx; + TH2F* m_hnvtxvsbx; TH1F* m_hlumi; TH2F* m_hnvtxvslumi; TH1F* m_hnvtxweight; @@ -114,6 +115,10 @@ MCVerticesAnalyzer::MCVerticesAnalyzer(const edm::ParameterSet& iConfig) m_hnvtx = tfserv->make("nvtx","Number of pileup vertices",60,-0.5,59.5); m_hnvtx->GetXaxis()->SetTitle("Number of Interactions"); + m_hnvtxvsbx = tfserv->make("nvtxvsbx","Number of pileup vertices vs BX",9,-4.5,4.5,60,-0.5,59.5); + m_hnvtxvsbx->GetXaxis()->SetTitle("BX number"); + m_hnvtxvsbx->GetYaxis()->SetTitle("Number of Interactions"); + m_hlumi = tfserv->make("lumi","BX luminosity*xsect",200,0.,50.); m_hlumi->GetXaxis()->SetTitle("Average Number of Interactions"); @@ -178,6 +183,12 @@ MCVerticesAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // look for the intime PileupSummaryInfo std::vector::const_iterator pileupinfo; + + for(pileupinfo = pileupinfos->begin(); pileupinfo != pileupinfos->end() ; ++pileupinfo) { + m_hnvtxvsbx->Fill(pileupinfo->getBunchCrossing(),pileupinfo->getPU_NumInteractions(),weight); + } + + for(pileupinfo = pileupinfos->begin(); pileupinfo != pileupinfos->end() ; ++pileupinfo) { if(pileupinfo->getBunchCrossing()==0) break; } diff --git a/Validation/RecoVertex/test/crab_mcverticessimpleanalyzer.cfg b/Validation/RecoVertex/test/crab_mcverticessimpleanalyzer.cfg new file mode 100644 index 0000000000000..04b5903c3439e --- /dev/null +++ b/Validation/RecoVertex/test/crab_mcverticessimpleanalyzer.cfg @@ -0,0 +1,123 @@ +[CRAB] + +jobtype = cmssw +#scheduler = glite +scheduler = caf +### NOTE: just setting the name of the server (pi, lnl etc etc ) +### crab will submit the jobs to the server... +#server_name = bari +# +[CMSSW] + +### The data you want to access (to be found on DBS) + +#dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet + +#datasetpath=/RelValSingleMuPt100_UP15/CMSSW_6_2_0_patch1-PU_POSTLS162_V1_TriggerRef25ns-v2/GEN-SIM-RECO +#datasetpath=/RelValSingleMuPt100_UP15/CMSSW_6_2_0_patch1-PU_POSTLS162_V2_TriggerNew25ns-v2/GEN-SIM-RECO +#datasetpath=/RelValSingleMuPt1_UP15/CMSSW_6_2_0_patch1-POSTLS162_V1_30Aug2013-v2/GEN-SIM-RECO +datasetpath= /RelValTTbar/CMSSW_6_2_0-PU_PRE_ST62_V8-v2/GEN-SIM-RECO + +# not sure it works with AOD becuse of the determination of the position of the main vertex MC truth + +pycfg_params= globalTag=POSTLS162_V1::All + +pset=Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py + + +total_number_of_events=1000 +events_per_job = 500 + +### The output files (comma separated list) +#output_file = + +[USER] + +### OUTPUT files Management +## output back into UI +return_data = 1 + +### To use a specific name of UI directory where CRAB will create job to submit (with full path). +### the default directory will be "crab_0_data_time" +ui_working_dir = /afs/cern.ch/work/v/venturia/crab/mcverticessimpleanalyzer_ttbar_pu_pre_st62_v1 + +### To specify the UI directory where to store the CMS executable output +### FULL path is mandatory. Default is /res will be used. +#outputdir= /full/path/yourOutDir + +### To specify the UI directory where to store the stderr, stdout and .BrokerInfo of submitted jobs +### FULL path is mandatory. Default is /res will be used. +#logdir= /full/path/yourLogDir + +### OUTPUT files INTO A SE +copy_data = 0 + +### if you want to copy data in a "official CMS site" +### you have to specify the name as written in +#storage_element = T2_IT_Bari +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = name_directory_you_want + +### if you want to copy your data at CAF +#storage_element = T2_CH_CAF +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = express_2010_132421 + +### if you want to copy your data to your area in castor at cern +### or in a "not official CMS site" you have to specify the complete name of SE +storage_element=srm-cms.cern.ch +### this directory is the mountpoin of SE +#storage_path=/srm/managerv2?SFN=/castor/cern.ch +storage_path=/castor/cern.ch +### directory or tree of directory under the mounpoint +#user_remote_dir = /user/v/venturia/skims/express_2010_132421_132422_3 + + +### To publish produced output in a local istance of DBS set publish_data = 1 +publish_data=0 +### Specify the dataset name. The full path will be //USER +publish_data_name = name_you_prefer +### Specify the URL of DBS istance where CRAB has to publish the output files +#dbs_url_for_publication = https://cmsdbsprod.cern.ch:8443/cms_dbs_caf_analysis_01_writer/servlet/DBSServlet + +### To specify additional files to be put in InputSandBox +### write the full path if the files are not in the current directory +### (wildcard * are allowed): comma separated list +#additional_input_files = file1, file2, /full/path/file3 + +#if server +#thresholdLevel = 100 +#eMail = your@Email.address + +[CAF] + +queue=cmscaf1nd + +[GRID] +# +## RB/WMS management: +rb = CERN + +## Black and White Lists management: +## By Storage +se_black_list = T0,T1 +#se_black_list = T0 +#se_white_list = + +## By ComputingElement +#ce_black_list = +#ce_white_list = + +[CONDORG] + +# Set this to condor to override the batchsystem defined in gridcat. +#batchsystem = condor + +# Specify addition condor_g requirments +# use this requirment to run on a cms dedicated hardare +# globus_rsl = (condor_submit=(requirements 'ClusterName == \"CMS\" && (Arch == \"INTEL\" || Arch == \"X86_64\")')) +# use this requirement to run on the new hardware +#globus_rsl = (condor_submit=(requirements 'regexp(\"cms-*\",Machine)')) + diff --git a/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py index a2e52bc0d5529..4e6376e0d947d 100644 --- a/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py +++ b/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py @@ -65,7 +65,7 @@ process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring(), + fileNames = cms.untracked.vstring(options.inputFiles), # skipBadFiles = cms.untracked.bool(True), inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") diff --git a/Validation/TrackerRecHits/plugins/BuildFile.xml b/Validation/TrackerRecHits/BuildFile.xml similarity index 64% rename from Validation/TrackerRecHits/plugins/BuildFile.xml rename to Validation/TrackerRecHits/BuildFile.xml index d4fcdafc8a136..a8fa2e0a0c5bd 100644 --- a/Validation/TrackerRecHits/plugins/BuildFile.xml +++ b/Validation/TrackerRecHits/BuildFile.xml @@ -2,11 +2,13 @@ + + + + - - - + diff --git a/Validation/TrackerRecHits/interface/SiStripRecHitsValid.h b/Validation/TrackerRecHits/interface/SiStripRecHitsValid.h index d9d8ac9aeaf9e..0591b96f06148 100644 --- a/Validation/TrackerRecHits/interface/SiStripRecHitsValid.h +++ b/Validation/TrackerRecHits/interface/SiStripRecHitsValid.h @@ -1,33 +1,48 @@ #ifndef SiStripRecHitsValid_h #define SiStripRecHitsValid_h -/* \class SiStripRecHitsValid - * - * Analyzer to validate RecHits in the Strip tracker - * - * \author Patrizia Azzi, INFN PD - * - * \version 1st version May 2006 - * - ************************************************************/ - #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Utilities/interface/EDGetToken.h" +//only mine +#include "DataFormats/Common/interface/Handle.h" +#include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +//DQM services for histogram +#include "DQMServices/Core/interface/DQMStore.h" + +#include "FWCore/ServiceRegistry/interface/Service.h" + +//--- for SimHit association +#include "SimDataFormats/TrackingHit/interface/PSimHit.h" +#include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h" -#include "DataFormats/GeometrySurface/interface/Plane.h" -#include "DataFormats/GeometryVector/interface/LocalPoint.h" -#include "DataFormats/GeometryVector/interface/LocalVector.h" -#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h" -#include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h" +#include "Geometry/CommonTopologies/interface/PixelTopology.h" +#include "Geometry/CommonTopologies/interface/StripTopology.h" +#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h" +#include "Geometry/CommonDetUnit/interface/GeomDetType.h" +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetType.h" +#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetType.h" +#include "FWCore/Utilities/interface/InputTag.h" #include -#include +#include "DQMServices/Core/interface/MonitorElement.h" +//For RecHit +#include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h" +#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h" -class DQMStore; -class MonitorElement; -class PSimHit; -class StripGeomDetUnit; +class SiStripDetCabling; +class SiStripDCSStatus; class SiStripRecHitsValid : public edm::EDAnalyzer { @@ -36,173 +51,161 @@ class SiStripRecHitsValid : public edm::EDAnalyzer { SiStripRecHitsValid(const edm::ParameterSet& conf); ~SiStripRecHitsValid(); + + struct TotalMEs{ // MEs for total detector Level + MonitorElement* meNumTotrphi; + MonitorElement* meNumTotStereo; + MonitorElement* meNumTotMatched; + }; + + struct SubDetMEs{ // MEs for Subdetector Level + MonitorElement* meNumrphi; + MonitorElement* meNumStereo; + MonitorElement* meNumMatched; + }; + + struct LayerMEs{ // MEs for Layer Level + MonitorElement* meWclusrphi; + MonitorElement* meAdcrphi; + MonitorElement* mePosxrphi; + MonitorElement* meResolxrphi; + MonitorElement* meResrphi; + MonitorElement* mePullLFrphi; + MonitorElement* mePullMFrphi; + MonitorElement* meChi2rphi; + + }; + + struct StereoAndMatchedMEs{ // MEs for Layer Level + MonitorElement* meWclusStereo; + MonitorElement* meAdcStereo; + MonitorElement* mePosxStereo; + MonitorElement* meResolxStereo; + MonitorElement* meResStereo; + MonitorElement* mePullLFStereo; + MonitorElement* mePullMFStereo; + MonitorElement* meChi2Stereo; + MonitorElement* mePosxMatched; + MonitorElement* mePosyMatched; + MonitorElement* meResolxMatched; + MonitorElement* meResolyMatched; + MonitorElement* meResxMatched; + MonitorElement* meResyMatched; + MonitorElement* meChi2Matched; + + }; + + struct RecHitProperties{ + float x; + float y; + float z; + float resolxx; + float resolxy; + float resolyy; + float resx; + float resy; + float pullMF; + int clusiz; + float cluchg; + float chi2; + }; + protected: virtual void analyze(const edm::Event& e, const edm::EventSetup& c); - void beginJob(); - void beginRun( const edm::Run& r, const edm::EventSetup& c ); + void beginJob(const edm::EventSetup& es); + virtual void beginRun(const edm::Run&, const edm::EventSetup&); void endJob(); - + private: //Back-End Interface - std::pair projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet, - const BoundPlane& plane ); - std::vector matched; - std::string outputFile_; DQMStore* dbe_; - MonitorElement* meNumTotRphi; - MonitorElement* meNumTotSas; - MonitorElement* meNumTotMatched; - MonitorElement* meNumRphiTIB; - MonitorElement* meNumSasTIB; - MonitorElement* meNumMatchedTIB; - MonitorElement* meNumRphiTOB; - MonitorElement* meNumSasTOB; - MonitorElement* meNumMatchedTOB; - MonitorElement* meNumRphiTID; - MonitorElement* meNumSasTID; - MonitorElement* meNumMatchedTID; - MonitorElement* meNumRphiTEC; - MonitorElement* meNumSasTEC; - MonitorElement* meNumMatchedTEC; - - //TIB - MonitorElement* meNstpRphiTIB[4]; - MonitorElement* meAdcRphiTIB[4]; - MonitorElement* mePosxRphiTIB[4]; - MonitorElement* meErrxRphiTIB[4]; - MonitorElement* meResRphiTIB[4]; - MonitorElement* mePullLFRphiTIB[4]; - MonitorElement* mePullMFRphiTIB[4]; - MonitorElement* meChi2RphiTIB[4]; - MonitorElement* meNstpSasTIB[4]; - MonitorElement* meAdcSasTIB[4]; - MonitorElement* mePosxSasTIB[4]; - MonitorElement* meErrxSasTIB[4]; - MonitorElement* meResSasTIB[4]; - MonitorElement* mePullLFSasTIB[4]; - MonitorElement* mePullMFSasTIB[4]; - MonitorElement* meChi2SasTIB[4]; - MonitorElement* mePosxMatchedTIB[2]; - MonitorElement* mePosyMatchedTIB[2]; - MonitorElement* meErrxMatchedTIB[2]; - MonitorElement* meErryMatchedTIB[2]; - MonitorElement* meResxMatchedTIB[2]; - MonitorElement* meResyMatchedTIB[2]; - MonitorElement* meChi2MatchedTIB[2]; - //TOB - MonitorElement* meNstpRphiTOB[6]; - MonitorElement* meAdcRphiTOB[6]; - MonitorElement* mePosxRphiTOB[6]; - MonitorElement* meErrxRphiTOB[6]; - MonitorElement* meResRphiTOB[6]; - MonitorElement* mePullLFRphiTOB[6]; - MonitorElement* mePullMFRphiTOB[6]; - MonitorElement* meChi2RphiTOB[6]; - MonitorElement* meNstpSasTOB[2]; - MonitorElement* meAdcSasTOB[2]; - MonitorElement* mePosxSasTOB[2]; - MonitorElement* meErrxSasTOB[2]; - MonitorElement* meResSasTOB[2]; - MonitorElement* mePullLFSasTOB[2]; - MonitorElement* mePullMFSasTOB[2]; - MonitorElement* meChi2SasTOB[2]; - MonitorElement* mePosxMatchedTOB[2]; - MonitorElement* mePosyMatchedTOB[2]; - MonitorElement* meErrxMatchedTOB[2]; - MonitorElement* meErryMatchedTOB[2]; - MonitorElement* meResxMatchedTOB[2]; - MonitorElement* meResyMatchedTOB[2]; - MonitorElement* meChi2MatchedTOB[2]; - //TID - MonitorElement* meNstpRphiTID[3]; - MonitorElement* meAdcRphiTID[3]; - MonitorElement* mePosxRphiTID[3]; - MonitorElement* meErrxRphiTID[3]; - MonitorElement* meResRphiTID[3]; - MonitorElement* mePullLFRphiTID[3]; - MonitorElement* mePullMFRphiTID[3]; - MonitorElement* meChi2RphiTID[3]; - MonitorElement* meNstpSasTID[2]; - MonitorElement* meAdcSasTID[2]; - MonitorElement* mePosxSasTID[2]; - MonitorElement* meErrxSasTID[2]; - MonitorElement* meResSasTID[2]; - MonitorElement* mePullLFSasTID[2]; - MonitorElement* mePullMFSasTID[2]; - MonitorElement* meChi2SasTID[2]; - - MonitorElement* mePosxMatchedTID[2]; - MonitorElement* mePosyMatchedTID[2]; - MonitorElement* meErrxMatchedTID[2]; - MonitorElement* meErryMatchedTID[2]; - MonitorElement* meResxMatchedTID[2]; - MonitorElement* meResyMatchedTID[2]; - MonitorElement* meChi2MatchedTID[2]; - //TEC - MonitorElement* meNstpRphiTEC[7]; - MonitorElement* meAdcRphiTEC[7]; - MonitorElement* mePosxRphiTEC[7]; - MonitorElement* meErrxRphiTEC[7]; - MonitorElement* meResRphiTEC[7]; - MonitorElement* mePullLFRphiTEC[7]; - MonitorElement* mePullMFRphiTEC[7]; - MonitorElement* meChi2RphiTEC[7]; - MonitorElement* meNstpSasTEC[5]; - MonitorElement* meAdcSasTEC[5]; - MonitorElement* mePosxSasTEC[5]; - MonitorElement* meErrxSasTEC[5]; - MonitorElement* meResSasTEC[5]; - MonitorElement* mePullLFSasTEC[5]; - MonitorElement* mePullMFSasTEC[5]; - MonitorElement* meChi2SasTEC[5]; - MonitorElement* mePosxMatchedTEC[5]; - MonitorElement* mePosyMatchedTEC[5]; - MonitorElement* meErrxMatchedTEC[5]; - MonitorElement* meErryMatchedTEC[5]; - MonitorElement* meResxMatchedTEC[5]; - MonitorElement* meResyMatchedTEC[5]; - MonitorElement* meChi2MatchedTEC[5]; - - static constexpr int MAXHIT = 1000; - float rechitrphix[MAXHIT]; - float rechitrphierrx[MAXHIT]; - float rechitrphiy[MAXHIT]; - float rechitrphiz[MAXHIT]; - float rechitrphiphi[MAXHIT]; - float rechitrphires[MAXHIT]; - float rechitrphipullMF[MAXHIT]; - int clusizrphi[MAXHIT]; - float cluchgrphi[MAXHIT]; - float rechitsasx[MAXHIT]; - float rechitsaserrx[MAXHIT]; - float rechitsasy[MAXHIT]; - float rechitsasz[MAXHIT]; - float rechitsasphi[MAXHIT]; - float rechitsasres[MAXHIT]; - float rechitsaspullMF[MAXHIT]; - int clusizsas[MAXHIT]; - float cluchgsas[MAXHIT]; - float chi2rphi[MAXHIT]; - float chi2sas[MAXHIT]; - float chi2matched[MAXHIT]; - float rechitmatchedx[MAXHIT]; - float rechitmatchedy[MAXHIT]; - float rechitmatchedz[MAXHIT]; - float rechitmatchederrxx[MAXHIT]; - float rechitmatchederrxy[MAXHIT]; - float rechitmatchederryy[MAXHIT]; - float rechitmatchedphi[MAXHIT]; - float rechitmatchedresx[MAXHIT]; - float rechitmatchedresy[MAXHIT]; - float rechitmatchedchi2[MAXHIT]; + std::string outputFile_; + + TotalMEs totalMEs; + + bool switchNumTotrphi; + bool switchNumTotStereo; + bool switchNumTotMatched; + + + bool switchNumrphi; + bool switchNumStereo; + bool switchNumMatched; + + + bool switchWclusrphi; + bool switchAdcrphi; + bool switchPosxrphi; + bool switchResolxrphi; + bool switchResrphi; + bool switchPullLFrphi; + bool switchPullMFrphi; + bool switchChi2rphi; + bool switchWclusStereo; + bool switchAdcStereo; + bool switchPosxStereo; + bool switchResolxStereo; + bool switchResStereo; + bool switchPullLFStereo; + bool switchPullMFStereo; + bool switchChi2Stereo; + bool switchPosxMatched; + bool switchPosyMatched; + bool switchResolxMatched; + bool switchResolyMatched; + bool switchResxMatched; + bool switchResyMatched; + bool switchChi2Matched; + + std::string topFolderName_; + std::vector SubDetList_; + + std::vector matched; + std::map LayerMEsMap; + std::map StereoAndMatchedMEsMap; + std::map SubDetMEsMap; + std::map > LayerDetMap; + std::map > StereoAndMatchedDetMap; + + edm::ESHandle SiStripDetCabling_; + + std::pair projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet, + const BoundPlane& plane); + void createMEs(const edm::EventSetup& es); + void createTotalMEs(); + void createLayerMEs(std::string label); + void createSubDetMEs(std::string label); + void createStereoAndMatchedMEs(std::string label); + + MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle); + + inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);} + inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);} + inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);} + inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);} edm::ParameterSet conf_; + unsigned long long m_cacheID_; + edm::ParameterSet Parameters; //const StripTopology* topol; - edm::EDGetTokenT siStripMatchedRecHit2DCollectionToken_; - edm::EDGetTokenT siStripRecHit2DCollection_rphi_Token_, siStripRecHit2DCollection_stereo_Token_; + /* static const int MAXHIT = 1000; */ + + std::vector rechitrphi; + std::vector rechitstereo; + std::vector rechitmatched; + RecHitProperties rechitpro; + + void rechitanalysis(SiStripRecHit2D const rechit,const StripTopology &topol, TrackerHitAssociator& associate); + void rechitanalysis_matched(SiStripMatchedRecHit2D const rechit, const GluedGeomDet* gluedDet, TrackerHitAssociator& associate); + + //edm::InputTag matchedRecHits_, rphiRecHits_, stereoRecHits_; + edm::EDGetTokenT matchedRecHitsToken_; + edm::EDGetTokenT rphiRecHitsToken_; + edm::EDGetTokenT stereoRecHitsToken_; + }; #endif diff --git a/Validation/TrackerRecHits/plugins/SealModule.cc b/Validation/TrackerRecHits/plugins/SealModule.cc deleted file mode 100644 index 34ea625448739..0000000000000 --- a/Validation/TrackerRecHits/plugins/SealModule.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include "FWCore/PluginManager/interface/ModuleDef.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "Validation/TrackerRecHits/interface/SiStripRecHitsValid.h" -#include "Validation/TrackerRecHits/interface/SiPixelRecHitsValid.h" - - -DEFINE_FWK_MODULE(SiStripRecHitsValid); -DEFINE_FWK_MODULE(SiPixelRecHitsValid); diff --git a/Validation/TrackerRecHits/plugins/SiStripRecHitsValid.cc b/Validation/TrackerRecHits/plugins/SiStripRecHitsValid.cc deleted file mode 100644 index d9e09ab2cd16c..0000000000000 --- a/Validation/TrackerRecHits/plugins/SiStripRecHitsValid.cc +++ /dev/null @@ -1,1012 +0,0 @@ -// File: SiStripRecHitsValid.cc -// Description: see SiStripRecHitsValid.h -// Author: P. Azzi -// Creation Date: PA May 2006 Initial version. -// -//-------------------------------------------- -#include "Validation/TrackerRecHits/interface/SiStripRecHitsValid.h" - -#include "DataFormats/Common/interface/Handle.h" -#include "DataFormats/GeometryVector/interface/GlobalPoint.h" -#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" -#include "DataFormats/SiStripCluster/interface/SiStripClusterCollection.h" -#include "DataFormats/SiStripDetId/interface/StripSubdetector.h" -#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" - -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/MonitorElement.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ServiceRegistry/interface/Service.h" - -#include "Geometry/CommonDetUnit/interface/GeomDetType.h" -#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" -#include "Geometry/CommonTopologies/interface/PixelTopology.h" -#include "Geometry/CommonTopologies/interface/StripTopology.h" -#include "Geometry/Records/interface/IdealGeometryRecord.h" -#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" -#include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h" -#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetType.h" -#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetType.h" -#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h" -#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" -#include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h" - -#include "SimDataFormats/TrackingHit/interface/PSimHit.h" - -#include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h" - -namespace helper { - struct GetDetId { - template - DetId operator()(const X &x) { return DetId(x.detId()); } - }; - - template - std::pair - getRange(const T &detset, const DetId &id) { - typedef std::pair return_type; - typename T::const_iterator match = detset.find(id); - if (match == detset.end()) return return_type(); - typename T::DetSet hits = *match; - return return_type(hits.begin(), hits.end()); - } -} - - - -//Constructor -SiStripRecHitsValid::SiStripRecHitsValid(const edm::ParameterSet& ps) - : outputFile_( ps.getUntrackedParameter( "outputFile", "sistriprechitshisto.root" ) ) - , dbe_(0) - , conf_(ps) - , siStripMatchedRecHit2DCollectionToken_( consumes( ps.getParameter( "matchedRecHits" ) ) ) - , siStripRecHit2DCollection_rphi_Token_( consumes( ps.getParameter( "rphiRecHits" ) ) ) - , siStripRecHit2DCollection_stereo_Token_( consumes( ps.getParameter("stereoRecHits") ) ) { - -} - - -SiStripRecHitsValid::~SiStripRecHitsValid(){ - //if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); -} - -void SiStripRecHitsValid::beginJob(){ - -} - -void SiStripRecHitsValid::beginRun( const edm::Run& r, const edm::EventSetup& c ) { - dbe_ = edm::Service().operator->(); - //dbe_->showDirStructure(); - dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Strip/SISTRIP"); - - meNumTotRphi = dbe_->book1D("NumTotRphi","Num of RecHits rphi",100, 0, 10000); - meNumTotSas = dbe_->book1D("NumTotSas","Num of RecHits sas",100, 0, 10000); - meNumTotMatched = dbe_->book1D("NumTotMatched","Num of RecHits rmatched",100, 0, 10000); - - dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Strip/TIB"); - meNumRphiTIB = dbe_->book1D("NumRphiTIB","Num of RecHits rphi", 100, 0, 1000.); - meNumSasTIB = dbe_->book1D("NumSasTIB","Num of RecHits sas", 100, 0, 1000.); - meNumMatchedTIB = dbe_->book1D("NumMatchedTIB","Num of RecHits matched", 100, 0, 1000.); - - //one histo per Layer rphi hits - for(int i = 0 ;i<4 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtib",i+1); - meNstpRphiTIB[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_rphi_layer%dtib",i+1); - meAdcRphiTIB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtib",i+1); - mePosxRphiTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_rphi_layer%dtib",i+1); - meErrxRphiTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.01); //~20micron - sprintf(histo,"Res_rphi_layer%dtib",i+1); - meResRphiTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Pull_LF_rphi_layer%dtib",i+1); - mePullLFRphiTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtib",i+1); - mePullMFRphiTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_rphi_layer%dtib",i+1); - meChi2RphiTIB[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - //one histo per Layer stereo and matched hits - for(int i = 0 ;i<2 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtib",i+1); - meNstpSasTIB[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_sas_layer%dtib",i+1); - meAdcSasTIB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtib",i+1); - mePosxSasTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_sas_layer%dtib",i+1); - meErrxSasTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.01); - sprintf(histo,"Res_sas_layer%dtib",i+1); - meResSasTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Pull_LF_sas_layer%dtib",i+1); - mePullLFSasTIB[i] = dbe_->book1D(histo,"Pull",100,-4.,4.); - sprintf(histo,"Pull_MF_sas_layer%dtib",i+1); - mePullMFSasTIB[i] = dbe_->book1D(histo,"Pull",100,-4.,4.); - sprintf(histo,"Chi2_sas_layer%dtib",i+1); - meChi2SasTIB[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - - sprintf(histo,"Posx_matched_layer%dtib",i+1); - mePosxMatchedTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtib",i+1); - mePosyMatchedTIB[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0); - sprintf(histo,"Errx_matched_layer%dtib",i+1); - meErrxMatchedTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.01); - sprintf(histo,"Erry_matched_layer%dtib",i+1); - meErryMatchedTIB[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.05); - sprintf(histo,"Resx_matched_layer%dtib",i+1); - meResxMatchedTIB[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.02, +0.02); - sprintf(histo,"Resy_matched_layer%dtib",i+1); - meResyMatchedTIB[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Chi2_matched_layer%dtib",i+1); - meChi2MatchedTIB[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Strip/TOB"); - meNumRphiTOB = dbe_->book1D("NumRphiTOB","Num of RecHits rphi", 100, 0, 1000.); - meNumSasTOB = dbe_->book1D("NumSasTOB","Num of RecHits sas", 100, 0, 1000.); - meNumMatchedTOB = dbe_->book1D("NumMatchedTOB","Num of RecHits matched", 100, 0, 1000.); - //one histo per Layer rphi hits - for(int i = 0 ;i<6 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtob",i+1); - meNstpRphiTOB[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_rphi_layer%dtob",i+1); - meAdcRphiTOB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtob",i+1); - mePosxRphiTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_rphi_layer%dtob",i+1); - meErrxRphiTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.01); - sprintf(histo,"Res_rphi_layer%dtob",i+1); - meResRphiTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Pull_LF_rphi_layer%dtob",i+1); - mePullLFRphiTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtob",i+1); - mePullMFRphiTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_rphi_layer%dtob",i+1); - meChi2RphiTOB[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - //one histo per Layer stereo and matched hits - for(int i = 0 ;i<2 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtob",i+1); - meNstpSasTOB[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_sas_layer%dtob",i+1); - meAdcSasTOB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtob",i+1); - mePosxSasTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_sas_layer%dtob",i+1); - meErrxSasTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.01); - sprintf(histo,"Res_sas_layer%dtob",i+1); - meResSasTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02); - sprintf(histo,"Pull_LF_sas_layer%dtob",i+1); - mePullLFSasTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_sas_layer%dtob",i+1); - mePullMFSasTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_sas_layer%dtob",i+1); - meChi2SasTOB[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - - sprintf(histo,"Posx_matched_layer%dtob",i+1); - mePosxMatchedTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtob",i+1); - mePosyMatchedTOB[i] = dbe_->book1D(histo,"RecHit y coord.",100,-10.0, +10.0); - sprintf(histo,"Errx_matched_layer%dtob",i+1); - meErrxMatchedTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.01); - sprintf(histo,"Erry_matched_layer%dtob",i+1); - meErryMatchedTOB[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1); - sprintf(histo,"Resx_matched_layer%dtob",i+1); - meResxMatchedTOB[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.02, +0.02); - sprintf(histo,"Resy_matched_layer%dtob",i+1); - meResyMatchedTOB[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Chi2_matched_layer%dtob",i+1); - meChi2MatchedTOB[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Strip/TID"); - meNumRphiTID = dbe_->book1D("NumRphiTID","Num of RecHits rphi", 100, 0, 1000.); - meNumSasTID = dbe_->book1D("NumSasTID","Num of RecHits sas", 100, 0, 1000.); - meNumMatchedTID = dbe_->book1D("NumMatchedTID","Num of RecHits matched", 100, 0, 1000.); - - //one histo per Ring rphi hits: 3 rings, 6 disks, 2 inner rings are glued - for(int i = 0 ;i<3 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtid",i+1); - meNstpRphiTID[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_rphi_layer%dtid",i+1); - meAdcRphiTID[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtid",i+1); - mePosxRphiTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_rphi_layer%dtid",i+1); - meErrxRphiTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - sprintf(histo,"Res_rphi_layer%dtid",i+1); - meResRphiTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Pull_LF_rphi_layer%dtid",i+1); - mePullLFRphiTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtid",i+1); - mePullMFRphiTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_rphi_layer%dtid",i+1); - meChi2RphiTID[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - //one histo per Ring stereo and matched hits - for(int i = 0 ;i<2 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtid",i+1); - meNstpSasTID[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_sas_layer%dtid",i+1); - meAdcSasTID[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtid",i+1); - mePosxSasTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_sas_layer%dtid",i+1); - meErrxSasTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - sprintf(histo,"Res_sas_layer%dtid",i+1); - meResSasTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Pull_LF_sas_layer%dtid",i+1); - mePullLFSasTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_sas_layer%dtid",i+1); - mePullMFSasTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_sas_layer%dtid",i+1); - meChi2SasTID[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - - sprintf(histo,"Posx_matched_layer%dtid",i+1); - mePosxMatchedTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtid",i+1); - mePosyMatchedTID[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0); - sprintf(histo,"Errx_matched_layer%dtid",i+1); - meErrxMatchedTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.05); - sprintf(histo,"Erry_matched_layer%dtid",i+1); - meErryMatchedTID[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1); - sprintf(histo,"Resx_matched_layer%dtid",i+1); - meResxMatchedTID[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.2, +0.2); - sprintf(histo,"Resy_matched_layer%dtid",i+1); - meResyMatchedTID[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Chi2_matched_layer%dtid",i+1); - meChi2MatchedTID[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Strip/TEC"); - meNumRphiTEC = dbe_->book1D("NumRphiTEC","Num of RecHits rphi", 100, 0, 1000.); - meNumSasTEC = dbe_->book1D("NumSasTEC","Num of RecHits sas", 100, 0, 1000.); - meNumMatchedTEC = dbe_->book1D("NumMatchedTEC","Num of RecHits matched", 100, 0, 1000.); - - //one histo per Ring rphi hits: 7 rings, 18 disks. Innermost 3 rings are same as TID above. - for(int i = 0 ;i<7 ; i++) { - Char_t histo[200]; - sprintf(histo,"Nstp_rphi_layer%dtec",i+1); - meNstpRphiTEC[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_rphi_layer%dtec",i+1); - meAdcRphiTEC[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_rphi_layer%dtec",i+1); - mePosxRphiTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_rphi_layer%dtec",i+1); - meErrxRphiTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5); - sprintf(histo,"Res_rphi_layer%dtec",i+1); - meResRphiTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Pull_LF_rphi_layer%dtec",i+1); - mePullLFRphiTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_rphi_layer%dtec",i+1); - mePullMFRphiTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_rphi_layer%dtec",i+1); - meChi2RphiTEC[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - - //one histo per Layer stereo and matched hits: rings 1,2,5 are double sided - for(int i = 0 ;i<5 ; i++) { - if(i == 0 || i == 1 || i == 4) { - Char_t histo[200]; - sprintf(histo,"Nstp_sas_layer%dtec",i+1); - meNstpSasTEC[i] = dbe_->book1D(histo,"RecHit Cluster Size",10,0.5,10.5); - sprintf(histo,"Adc_sas_layer%dtec",i+1); - meAdcSasTEC[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.); - sprintf(histo,"Posx_sas_layer%dtec",i+1); - mePosxSasTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0); - sprintf(histo,"Errx_sas_layer%dtec",i+1); - meErrxSasTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5); - sprintf(histo,"Res_sas_layer%dtec",i+1); - meResSasTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5); - sprintf(histo,"Pull_LF_sas_layer%dtec",i+1); - mePullLFSasTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Pull_MF_sas_layer%dtec",i+1); - mePullMFSasTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.); - sprintf(histo,"Chi2_sas_layer%dtec",i+1); - meChi2SasTEC[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - - sprintf(histo,"Posx_matched_layer%dtec",i+1); - mePosxMatchedTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0); - sprintf(histo,"Posy_matched_layer%dtec",i+1); - mePosyMatchedTEC[i] = dbe_->book1D(histo,"RecHit y coord.",100,-8.0, +8.0); - sprintf(histo,"Errx_matched_layer%dtec",i+1); - meErrxMatchedTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.05); - sprintf(histo,"Erry_matched_layer%dtec",i+1); - meErryMatchedTEC[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1); - sprintf(histo,"Resx_matched_layer%dtec",i+1); - meResxMatchedTEC[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.2, +0.2); - sprintf(histo,"Resy_matched_layer%dtec",i+1); - meResyMatchedTEC[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.); - sprintf(histo,"Chi2_matched_layer%dtec",i+1); - meChi2MatchedTEC[i] = dbe_->book1D(histo,"RecHit Chi2 test",100,0., 50); - } - } -} - -void SiStripRecHitsValid::endJob() { - if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); -} - - -void SiStripRecHitsValid::analyze(const edm::Event& e, const edm::EventSetup& es) { - //Retrieve tracker topology from geometry - edm::ESHandle tTopo; - es.get().get(tTopo); - - - - edm::LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event(); - //std::cout << " Run = " << e.id().run() << " Event = " << e.id().event() << std::endl; - - //--- get RecHits - - std::string rechitProducer = "SiStripRecHits2D"; - - // Step A: Get Inputs - edm::Handle rechitsmatched; - edm::Handle rechitsrphi; - edm::Handle rechitsstereo; - e.getByToken( siStripMatchedRecHit2DCollectionToken_, rechitsmatched ); - e.getByToken( siStripRecHit2DCollection_rphi_Token_, rechitsrphi ); - e.getByToken( siStripRecHit2DCollection_stereo_Token_, rechitsstereo ); - - int numrechitrphi =0; - int numrechitsas =0; - int numrechitmatched=0; - - int totTibnumrechitrphi=0; - int totTibnumrechitsas=0; - int totTibnumrechitmatched=0; - int totTobnumrechitrphi=0; - int totTobnumrechitsas=0; - int totTobnumrechitmatched=0; - int totTidnumrechitrphi=0; - int totTidnumrechitsas=0; - int totTidnumrechitmatched=0; - int totTecnumrechitrphi=0; - int totTecnumrechitsas=0; - int totTecnumrechitmatched=0; - int totrechitrphi =0; - int totrechitsas =0; - int totrechitmatched =0; - - TrackerHitAssociator associate(e, conf_); - - edm::ESHandle pDD; - es.get ().get (pDD); - const TrackerGeometry &tracker(*pDD); - // FIXME: this using of vector is suboptimal, but I don't want to re-write the full class now - std::vector IDs; - IDs.reserve(rechitsrphi->size() + rechitsmatched->size() + rechitsstereo->size()); - std::transform(rechitsrphi->begin(), rechitsrphi->end(), std::back_inserter(IDs), helper::GetDetId() ); - std::transform(rechitsstereo->begin(), rechitsstereo->end(), std::back_inserter(IDs), helper::GetDetId() ); - std::transform(rechitsmatched->begin(), rechitsmatched->end(), std::back_inserter(IDs), helper::GetDetId() ); - // loop over detunits - // for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){ - for(std::vector::const_iterator it = IDs.begin(); it != IDs.end(); ++it ){//loop on rphi detector with hits - uint32_t myid=((*it).rawId()); - DetId detid = ((*it)); - - // initialize here - for(int i=0; i rechitrphiRange = helper::getRange(*rechitsrphi, detid); - SiStripRecHit2DCollection::DetSet::const_iterator rechitrphiRangeIteratorBegin = rechitrphiRange.first; - SiStripRecHit2DCollection::DetSet::const_iterator rechitrphiRangeIteratorEnd = rechitrphiRange.second; - SiStripRecHit2DCollection::DetSet::const_iterator iterrphi=rechitrphiRangeIteratorBegin; - - numrechitrphi = rechitrphiRangeIteratorEnd - rechitrphiRangeIteratorBegin; - - - int i=0; - int i2=0; - - if(numrechitrphi > 0 ){ - totrechitrphi+=numrechitrphi; - for(iterrphi=rechitrphiRangeIteratorBegin; iterrphi!=rechitrphiRangeIteratorEnd;++iterrphi){ - const GeomDetUnit * det = tracker.idToDetUnit(detid); - const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det); - const StripTopology &topol=(StripTopology&)stripdet->topology(); - SiStripRecHit2D const rechit=*iterrphi; - LocalPoint position=rechit.localPosition(); - LocalError error=rechit.localPositionError(); - MeasurementPoint Mposition; - MeasurementError Merror; - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - SiStripRecHit2D::ClusterRef clust=rechit.cluster(); - int clusiz=0; - int totcharge=0; - clusiz = clust->amplitudes().size(); - const std::vector amplitudes=clust->amplitudes(); - for(size_t ia=0; ia::const_iterator m=matched.begin(); m rechitsasRange = helper::getRange(*rechitsstereo, detid); - SiStripRecHit2DCollection::DetSet::const_iterator rechitsasRangeIteratorBegin = rechitsasRange.first; - SiStripRecHit2DCollection::DetSet::const_iterator rechitsasRangeIteratorEnd = rechitsasRange.second; - SiStripRecHit2DCollection::DetSet::const_iterator itersas=rechitsasRangeIteratorBegin; - numrechitsas = rechitsasRangeIteratorEnd - rechitsasRangeIteratorBegin; - if(numrechitsas > 0){ - totrechitsas+=numrechitsas; - for(itersas=rechitsasRangeIteratorBegin; itersas!=rechitsasRangeIteratorEnd;++itersas){ - const GeomDetUnit * det = tracker.idToDetUnit(detid); - const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det); - const StripTopology &topol=(StripTopology&)stripdet->topology(); - SiStripRecHit2D const rechit=*itersas; - LocalPoint position=rechit.localPosition(); - LocalError error=rechit.localPositionError(); - MeasurementPoint Mposition; - MeasurementError Merror; - Mposition = topol.measurementPosition(position); - Merror = topol.measurementError(position,error); - SiStripRecHit2D::ClusterRef clust=rechit.cluster(); int clusiz=0; - int totcharge=0; - clusiz = clust->amplitudes().size(); - const std::vector amplitudes=clust->amplitudes(); - for(size_t ia=0; ia::const_iterator m=matched.begin(); m rechitmatchedRange = helper::getRange(*rechitsmatched, detid); - SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorBegin = rechitmatchedRange.first; - SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorEnd = rechitmatchedRange.second; - SiStripMatchedRecHit2DCollection::DetSet::const_iterator itermatched=rechitmatchedRangeIteratorBegin; - numrechitmatched = rechitmatchedRangeIteratorEnd - rechitmatchedRangeIteratorBegin; - if(numrechitmatched > 0){ - totrechitmatched +=numrechitmatched; - - for(itermatched=rechitmatchedRangeIteratorBegin; itermatched!=rechitmatchedRangeIteratorEnd;++itermatched){ - SiStripMatchedRecHit2D const rechit=*itermatched; - LocalPoint position=rechit.localPosition(); - LocalError error=rechit.localPositionError(); - - float mindist = 999999; - float distx = 999999; - float disty = 999999; - float dist = 999999; - std::pair closestPair; - matched.clear(); - // const SiStripRecHit2D *mono = rechit.monoHit(); - // const SiStripRecHit2D *st = rechit.stereoHit(); - // LocalPoint monopos = mono->localPosition(); - // LocalPoint stpos = st->localPosition(); - - rechitmatchedx[k] = position.x(); - rechitmatchedy[k] = position.y(); - rechitmatchedz[k] = position.z(); - rechitmatchederrxx[k] = error.xx(); - rechitmatchederrxy[k] = error.xy(); - rechitmatchederryy[k] = error.yy(); - - // std::cout << " before association " << std::endl; - matched = associate.associateHit(rechit); - //std::cout << " after association size = " << matched.size() << std::endl; - - if(!matched.empty()){ - //project simhit; - const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(rechit.geographicalId()); - const StripGeomDetUnit* partnerstripdet =(StripGeomDetUnit*) gluedDet->stereoDet(); - std::pair hitPair; - - //std::cout << " RECHIT position = " << position << std::endl; - - for(std::vector::const_iterator m=matched.begin(); msurface()); - distx = fabs(rechitmatchedx[k] - hitPair.first.x()); - disty = fabs(rechitmatchedy[k] - hitPair.first.y()); - dist = sqrt(distx*distx+disty*disty); - // std::cout << " Simhit position x = " << hitPair.first.x() - // << " y = " << hitPair.first.y() << " dist = " << dist << std::endl; - if(distspecificTopology(); - GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition()); - LocalPoint localHit = plane.toLocal(globalpos); - //track direction - LocalVector locdir=hit.localDirection(); - //rotate track in new frame - - GlobalVector globaldir= stripDet->surface().toGlobal(locdir); - LocalVector dir=plane.toLocal(globaldir); - float scale = -localHit.z() / dir.z(); - - LocalPoint projectedPos = localHit + scale*dir; - - // std::cout << "projectedPos " << projectedPos << std::endl; - - float selfAngle = topol.stripAngle( topol.strip( hit.localPosition())); - - LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame - - LocalVector localStripDir( plane.toLocal(stripDet->surface().toGlobal( stripDir))); - - return std::pair( projectedPos, localStripDir); -} - - diff --git a/Validation/TrackerRecHits/python/SiStripRecHitsValid_cfi.py b/Validation/TrackerRecHits/python/SiStripRecHitsValid_cfi.py index 796fcd7a26d5a..dbfc5c2fab4a9 100644 --- a/Validation/TrackerRecHits/python/SiStripRecHitsValid_cfi.py +++ b/Validation/TrackerRecHits/python/SiStripRecHitsValid_cfi.py @@ -1,7 +1,219 @@ import FWCore.ParameterSet.Config as cms stripRecHitsValid = cms.EDAnalyzer("SiStripRecHitsValid", - outputFile = cms.untracked.string(''), +# outputFile = cms.untracked.string('sistriprechitshisto.root'), + outputFile = cms.string('striptrackingrechitshisto.root'), + OutputMEsInRootFile = cms.bool(True), + TopFolderName = cms.string('SiStrip/RecHitsValidation/StiffTrackingRecHits'), + + TH1NumTotrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10000.), + switchon = cms.bool(True) + ), + + TH1NumTotStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10000.), + switchon = cms.bool(True) + ), + + TH1NumTotMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(10000.), + switchon = cms.bool(True) + + ), + + TH1Numrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1000.), + switchon = cms.bool(True) + + ), + + TH1NumStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1000.), + switchon = cms.bool(True) + + ), + + TH1NumMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(1000.), + switchon = cms.bool(True) + + ), + + TH1Wclusrphi = cms.PSet( + Nbinx = cms.int32(20), + xmin = cms.double(-0.5), + xmax = cms.double(19.5), + switchon = cms.bool(True) + ), + + TH1Adcrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(500.),#300. + switchon = cms.bool(True) + ), + + TH1Posxrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-6.0),#-6.0 + xmax = cms.double(+6.0),#+6.0 + switchon = cms.bool(True) + ), + + TH1Resolxrphi = cms.PSet( #~20micron + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.10),#0.01 + switchon = cms.bool(True) + ), + + TH1Resrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-0.10),#-0.02 + xmax = cms.double(+0.10),#+0.02 + switchon = cms.bool(True) + ), + + TH1PullLFrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-10.),#-5.0 + xmax = cms.double(+10.),#+5.0 + switchon = cms.bool(True) + ), + + TH1PullMFrphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-10.),#-5.0 + xmax = cms.double(+10.),#+5.0 + switchon = cms.bool(True) + ), + + TH1Chi2rphi = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(50.), + switchon = cms.bool(True) + ), + + TH1WclusStereo = cms.PSet( + Nbinx = cms.int32(20), + xmin = cms.double(-0.5), + xmax = cms.double(19.5), + switchon = cms.bool(True) + ), + + TH1AdcStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(500.),#300 + switchon = cms.bool(True) + ), + + TH1PosxStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-6.0), + xmax = cms.double(+6.0), + switchon = cms.bool(True) + ), + + TH1ResolxStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.1),#0.01 + switchon = cms.bool(True) + ), + + TH1ResStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-0.10),#-0.02 + xmax = cms.double(+0.10),#+0.02 + switchon = cms.bool(True) + ), + + TH1PullLFStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-4.), + xmax = cms.double(+4.), + switchon = cms.bool(True) + ), + + TH1PullMFStereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-10.),#-4.0 + xmax = cms.double(+10.),#+4.0 + switchon = cms.bool(True) + ), + + TH1Chi2Stereo = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(100.),#50 + switchon = cms.bool(True) + ), + + TH1PosxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-10.0),#-6.0 + xmax = cms.double(+10.0),#+6.0 + switchon = cms.bool(True) + ), + + TH1PosyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-10.0),#-6.0 + xmax = cms.double(+10.0),#+6.0 + switchon = cms.bool(True) + ), + + TH1ResolxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.1),#0.01 + switchon = cms.bool(True) + ), + + TH1ResolyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(0.25),#0.05 + switchon = cms.bool(True) + ), + + TH1ResxMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-0.1),#-0.02 + xmax = cms.double(+0.1),#+0.02 + switchon = cms.bool(True) + ), + + TH1ResyMatched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(-10.), #-1 + xmax = cms.double(+10. ), #+1 + switchon = cms.bool(True) + ), + + TH1Chi2Matched = cms.PSet( + Nbinx = cms.int32(100), + xmin = cms.double(0.), + xmax = cms.double(50.), + switchon = cms.bool(True) + ), + + SubDetList = cms.vstring('TIB','TOB','TID','TEC'), associatePixel = cms.bool(False), stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHit"), matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), diff --git a/Validation/TrackerRecHits/plugins/SiPixelRecHitsValid.cc b/Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc similarity index 99% rename from Validation/TrackerRecHits/plugins/SiPixelRecHitsValid.cc rename to Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc index de0099d022a1a..747e8c6ad13b2 100644 --- a/Validation/TrackerRecHits/plugins/SiPixelRecHitsValid.cc +++ b/Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc @@ -621,3 +621,4 @@ void SiPixelRecHitsValid::fillForward(const SiPixelRecHit & recHit, const PSimHi } // end else } // end for } +DEFINE_FWK_MODULE(SiPixelRecHitsValid); diff --git a/Validation/TrackerRecHits/src/SiStripRecHitsValid.cc b/Validation/TrackerRecHits/src/SiStripRecHitsValid.cc new file mode 100644 index 0000000000000..35a02ca44c20c --- /dev/null +++ b/Validation/TrackerRecHits/src/SiStripRecHitsValid.cc @@ -0,0 +1,928 @@ +#include "Validation/TrackerRecHits/interface/SiStripRecHitsValid.h" +#include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h" + +//needed for the geometry: +#include "CalibTracker/Records/interface/SiStripDetCablingRcd.h" +#include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h" +#include "DataFormats/DetId/interface/DetId.h" +#include "DataFormats/SiStripDetId/interface/StripSubdetector.h" +#include "DataFormats/SiStripDetId/interface/SiStripSubStructure.h" +#include "DQM/SiStripCommon/interface/SiStripFolderOrganizer.h" +#include "DataFormats/SiStripDetId/interface/TECDetId.h" +#include "DataFormats/SiStripDetId/interface/TIBDetId.h" +#include "DataFormats/SiStripDetId/interface/TIDDetId.h" +#include "DataFormats/SiStripDetId/interface/TOBDetId.h" +#include "DataFormats/GeometryVector/interface/LocalPoint.h" +#include "DataFormats/GeometryVector/interface/GlobalPoint.h" +#include "DQM/SiStripCommon/interface/SiStripHistoId.h" + + +//--- for RecHit +#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +#include "DataFormats/SiStripCluster/interface/SiStripClusterCollection.h" +#include "DataFormats/Common/interface/OwnVector.h" +#include "DQMServices/Core/interface/DQMStore.h" + +#include "CommonTools/TriggerUtils/interface/GenericTriggerEventFlag.h" + +using namespace std; +using namespace edm; + +namespace helper { + struct GetDetId { + template + DetId operator()(const X &x) { return DetId(x.detId()); } + }; + + template + std::pair + getRange(const T &detset, const DetId &id) { + typedef std::pair return_type; + typename T::const_iterator match = detset.find(id); + if (match == detset.end()) return return_type(); + typename T::DetSet hits = *match; + return return_type(hits.begin(), hits.end()); + } +} + + + +//Constructor +SiStripRecHitsValid::SiStripRecHitsValid(const ParameterSet& ps) : + dbe_(edm::Service().operator->()), + conf_(ps), + m_cacheID_(0) + // matchedRecHits_( ps.getParameter("matchedRecHits") ), + // rphiRecHits_( ps.getParameter("rphiRecHits") ), + // stereoRecHits_( ps.getParameter("stereoRecHits") ) +{ + matchedRecHitsToken_ = consumes( ps.getParameter("matchedRecHits") ); + + rphiRecHitsToken_ = consumes( ps.getParameter("rphiRecHits") ); + + stereoRecHitsToken_ = consumes( ps.getParameter("stereoRecHits") ); + + topFolderName_ = conf_.getParameter("TopFolderName"); + + SubDetList_ = conf_.getParameter >("SubDetList"); + + edm::ParameterSet ParametersNumTotrphi = conf_.getParameter("TH1NumTotrphi"); + switchNumTotrphi = ParametersNumTotrphi.getParameter("switchon"); + + edm::ParameterSet ParametersNumTotStereo = conf_.getParameter("TH1NumTotStereo"); + switchNumTotStereo = ParametersNumTotStereo.getParameter("switchon"); + + edm::ParameterSet ParametersNumTotMatched = conf_.getParameter("TH1NumTotMatched"); + switchNumTotMatched = ParametersNumTotMatched.getParameter("switchon"); + + edm::ParameterSet ParametersNumrphi = conf_.getParameter("TH1Numrphi"); + switchNumrphi = ParametersNumrphi.getParameter("switchon"); + + edm::ParameterSet ParametersNumStereo = conf_.getParameter("TH1NumStereo"); + switchNumStereo = ParametersNumStereo.getParameter("switchon"); + + edm::ParameterSet ParametersNumMatched = conf_.getParameter("TH1NumMatched"); + switchNumMatched = ParametersNumMatched.getParameter("switchon"); + + edm::ParameterSet ParametersWclusrphi = conf_.getParameter("TH1Wclusrphi"); + switchWclusrphi = ParametersWclusrphi.getParameter("switchon"); + + edm::ParameterSet ParametersAdcrphi = conf_.getParameter("TH1Adcrphi"); + switchAdcrphi = ParametersAdcrphi.getParameter("switchon"); + + edm::ParameterSet ParametersPosxrphi = conf_.getParameter("TH1Posxrphi"); + switchPosxrphi = ParametersPosxrphi.getParameter("switchon"); + + edm::ParameterSet ParametersResolxrphi = conf_.getParameter("TH1Resolxrphi"); + switchResolxrphi = ParametersResolxrphi.getParameter("switchon"); + + edm::ParameterSet ParametersResrphi = conf_.getParameter("TH1Resrphi"); + switchResrphi = ParametersResrphi.getParameter("switchon"); + + edm::ParameterSet ParametersPullLFrphi = conf_.getParameter("TH1PullLFrphi"); + switchPullLFrphi = ParametersPullLFrphi.getParameter("switchon"); + + edm::ParameterSet ParametersPullMFrphi = conf_.getParameter("TH1PullMFrphi"); + switchPullMFrphi = ParametersPullMFrphi.getParameter("switchon"); + + edm::ParameterSet ParametersChi2rphi = conf_.getParameter("TH1Chi2rphi"); + switchChi2rphi = ParametersChi2rphi.getParameter("switchon"); + + edm::ParameterSet ParametersWclusStereo = conf_.getParameter("TH1WclusStereo"); + switchWclusStereo = ParametersWclusStereo.getParameter("switchon"); + + edm::ParameterSet ParametersAdcStereo = conf_.getParameter("TH1AdcStereo"); + switchAdcStereo = ParametersAdcStereo.getParameter("switchon"); + + edm::ParameterSet ParametersPosxStereo = conf_.getParameter("TH1PosxStereo"); + switchPosxStereo = ParametersPosxStereo.getParameter("switchon"); + + edm::ParameterSet ParametersResolxStereo = conf_.getParameter("TH1ResolxStereo"); + switchResolxStereo = ParametersResolxStereo.getParameter("switchon"); + + edm::ParameterSet ParametersResStereo = conf_.getParameter("TH1ResStereo"); + switchResStereo = ParametersResStereo.getParameter("switchon"); + + edm::ParameterSet ParametersPullLFStereo = conf_.getParameter("TH1PullLFStereo"); + switchPullLFStereo = ParametersPullLFStereo.getParameter("switchon"); + + edm::ParameterSet ParametersPullMFStereo = conf_.getParameter("TH1PullMFStereo"); + switchPullMFStereo = ParametersPullMFStereo.getParameter("switchon"); + + edm::ParameterSet ParametersChi2Stereo = conf_.getParameter("TH1Chi2Stereo"); + switchChi2Stereo = ParametersChi2Stereo.getParameter("switchon"); + + edm::ParameterSet ParametersPosxMatched = conf_.getParameter("TH1PosxMatched"); + switchPosxMatched = ParametersPosxMatched.getParameter("switchon"); + + edm::ParameterSet ParametersPosyMatched = conf_.getParameter("TH1PosyMatched"); + switchPosyMatched = ParametersPosyMatched.getParameter("switchon"); + + edm::ParameterSet ParametersResolxMatched = conf_.getParameter("TH1ResolxMatched"); + switchResolxMatched = ParametersResolxMatched.getParameter("switchon"); + + edm::ParameterSet ParametersResolyMatched = conf_.getParameter("TH1ResolyMatched"); + switchResolyMatched = ParametersResolyMatched.getParameter("switchon"); + + edm::ParameterSet ParametersResxMatched = conf_.getParameter("TH1ResxMatched"); + switchResxMatched = ParametersResxMatched.getParameter("switchon"); + + edm::ParameterSet ParametersResyMatched = conf_.getParameter("TH1ResyMatched"); + switchResyMatched = ParametersResyMatched.getParameter("switchon"); + + edm::ParameterSet ParametersChi2Matched = conf_.getParameter("TH1Chi2Matched"); + switchChi2Matched = ParametersChi2Matched.getParameter("switchon"); + +} + +SiStripRecHitsValid::~SiStripRecHitsValid(){ + // if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); +} + +//-------------------------------------------------------------------------------------------- +void SiStripRecHitsValid::beginRun(const edm::Run& run, const edm::EventSetup& es){ + + unsigned long long cacheID = es.get().cacheIdentifier(); + if (m_cacheID_ != cacheID) { + m_cacheID_ = cacheID; + edm::LogInfo("SiStripRecHitsValid") <<"SiStripRecHitsValid::beginRun: " + << " Creating MEs for new Cabling "; + + createMEs(es); + } +} + + +void SiStripRecHitsValid::beginJob(const edm::EventSetup& es){ + +} + +void SiStripRecHitsValid::endJob() { + + bool outputMEsInRootFile = conf_.getParameter("OutputMEsInRootFile"); + std::string outputFileName = conf_.getParameter("outputFile"); + + // save histos in a file + if(outputMEsInRootFile) dbe_->save(outputFileName); + +} + + +void SiStripRecHitsValid::analyze(const edm::Event& e, const edm::EventSetup& es) { + + LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event(); + //cout << " Run = " << e.id().run() << " Event = " << e.id().event() << endl; + + //Retrieve tracker topology from geometry + edm::ESHandle tTopoHandle; + es.get().get(tTopoHandle); + const TrackerTopology* const tTopo = tTopoHandle.product(); + + // Step A: Get Inputs + edm::Handle rechitsmatched; + edm::Handle rechitsrphi; + edm::Handle rechitsstereo; + // e.getByLabel(matchedRecHits_, rechitsmatched); + // e.getByLabel(rphiRecHits_, rechitsrphi); + // e.getByLabel(stereoRecHits_, rechitsstereo); + e.getByToken(matchedRecHitsToken_, rechitsmatched); + e.getByToken(rphiRecHitsToken_, rechitsrphi); + e.getByToken(stereoRecHitsToken_, rechitsstereo); + + int numrechitrphi =0; + int numrechitstereo =0; + int numrechitmatched=0; + + //Variables in order to count total num of rechitrphi,rechitstereo, rechitmatched in subdetectors + std::map > totnumrechitrphi; + std::map > totnumrechitstereo; + std::map > totnumrechitmatched; + totnumrechitrphi.clear(); + totnumrechitstereo.clear(); + totnumrechitmatched.clear(); + int totrechitrphi =0; + int totrechitstereo =0; + int totrechitmatched =0; + + TrackerHitAssociator associate(e, conf_); + + edm::ESHandle pDD; + es.get ().get (pDD); + const TrackerGeometry &tracker(*pDD); + // FIXME: this using of vector is suboptimal, but I don't want to re-write the full class now + std::vector IDs; + IDs.reserve(rechitsrphi->size() + rechitsmatched->size() + rechitsstereo->size()); + std::transform(rechitsrphi->begin(), rechitsrphi->end(), std::back_inserter(IDs), helper::GetDetId() ); + std::transform(rechitsstereo->begin(), rechitsstereo->end(), std::back_inserter(IDs), helper::GetDetId() ); + std::transform(rechitsmatched->begin(), rechitsmatched->end(), std::back_inserter(IDs), helper::GetDetId() ); + // loop over DetIds + // for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){ + for(std::vector::const_iterator it = IDs.begin(); it != IDs.end(); ++it ){//loop on detector with hits + uint32_t myid=((*it).rawId()); + DetId detid = ((*it)); + + rechitrphi.clear(); + rechitstereo.clear(); + rechitmatched.clear(); + + numrechitrphi =0; + //loop over rechits-rphi in the same subdetector + std::pair rechitrphiRange = helper::getRange(*rechitsrphi, detid); + SiStripRecHit2DCollection::DetSet::const_iterator rechitrphiRangeIteratorBegin = rechitrphiRange.first; + SiStripRecHit2DCollection::DetSet::const_iterator rechitrphiRangeIteratorEnd = rechitrphiRange.second; + SiStripRecHit2DCollection::DetSet::const_iterator iterrphi=rechitrphiRangeIteratorBegin; + + numrechitrphi = rechitrphiRangeIteratorEnd - rechitrphiRangeIteratorBegin; + + if(numrechitrphi > 0 ){ + totrechitrphi+=numrechitrphi; + for(iterrphi=rechitrphiRangeIteratorBegin; iterrphi!=rechitrphiRangeIteratorEnd;++iterrphi){ + + const GeomDetUnit * det = tracker.idToDetUnit(detid); + const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det); + const StripTopology &topol=(StripTopology&)stripdet->topology(); + SiStripRecHit2D const rechit=*iterrphi; + //analyze RecHits + rechitanalysis(rechit,topol,associate); + rechitrphi.push_back(rechitpro); + } + } + + //loop over rechits-stereo in the same subdetector + numrechitstereo=0; + std::pair rechitstereoRange = helper::getRange(*rechitsstereo, detid); + SiStripRecHit2DCollection::DetSet::const_iterator rechitstereoRangeIteratorBegin = rechitstereoRange.first; + SiStripRecHit2DCollection::DetSet::const_iterator rechitstereoRangeIteratorEnd = rechitstereoRange.second; + SiStripRecHit2DCollection::DetSet::const_iterator iterstereo=rechitstereoRangeIteratorBegin; + numrechitstereo = rechitstereoRangeIteratorEnd - rechitstereoRangeIteratorBegin; + if(numrechitstereo > 0){ + totrechitstereo+=numrechitstereo; + for(iterstereo=rechitstereoRangeIteratorBegin; iterstereo!=rechitstereoRangeIteratorEnd;++iterstereo){ + const GeomDetUnit * det = tracker.idToDetUnit(detid); + const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det); + const StripTopology &topol=(StripTopology&)stripdet->topology(); + SiStripRecHit2D const rechit=*iterstereo; + //analyze RecHits + rechitanalysis(rechit,topol,associate); + rechitstereo.push_back(rechitpro); + } + } + + //now matched hits + //loop over rechits-matched in the same subdetector + numrechitmatched=0; + std::pair rechitmatchedRange = helper::getRange(*rechitsmatched, detid); + SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorBegin = rechitmatchedRange.first; + SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorEnd = rechitmatchedRange.second; + SiStripMatchedRecHit2DCollection::DetSet::const_iterator itermatched=rechitmatchedRangeIteratorBegin; + numrechitmatched = rechitmatchedRangeIteratorEnd - rechitmatchedRangeIteratorBegin; + if(numrechitmatched > 0){ + totrechitmatched +=numrechitmatched; + + for(itermatched=rechitmatchedRangeIteratorBegin; itermatched!=rechitmatchedRangeIteratorEnd;++itermatched){ + SiStripMatchedRecHit2D const rechit=*itermatched; + const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(rechit.geographicalId()); + //analyze RecHits + rechitanalysis_matched(rechit, gluedDet, associate); + rechitmatched.push_back(rechitpro); + } + } + + SiStripHistoId hidmanager; + std::string label = hidmanager.getSubdetid(myid,tTopo,true); + std::map::iterator iLayerME = LayerMEsMap.find(label); + std::map::iterator iStereoAndMatchedME = StereoAndMatchedMEsMap.find(label); + //std::cout << "label " << label << endl; + SiStripFolderOrganizer fold_organ; + std::pair det_lay_pair = fold_organ.GetSubDetAndLayer(myid,tTopo,true); + + if(numrechitrphi>0 || numrechitstereo>0 || numrechitmatched){ + + totnumrechitrphi[det_lay_pair.first].push_back(numrechitrphi); + totnumrechitstereo[det_lay_pair.first].push_back(numrechitstereo); + totnumrechitmatched[det_lay_pair.first].push_back(numrechitmatched); + + for (std::vector::iterator irh=rechitrphi.begin(); irh!=rechitrphi.end(); ++irh) { + if(iLayerME != LayerMEsMap.end()){ + fillME(iLayerME->second.meWclusrphi,(*irh).clusiz); + fillME(iLayerME->second.meAdcrphi,(*irh).cluchg); + fillME(iLayerME->second.mePosxrphi,(*irh).x); + fillME(iLayerME->second.meResolxrphi,(*irh).resolxx); + if ( (*irh).resx != -999999. || (*irh).pullMF != -999999. || (*irh).chi2 != -999999. ){ + fillME(iLayerME->second.meResrphi,(*irh).resx); + fillME(iLayerME->second.mePullLFrphi,(*irh).resx/sqrt((*irh).resolxx)); + fillME(iLayerME->second.mePullMFrphi,(*irh).pullMF); + fillME(iLayerME->second.meChi2rphi,(*irh).chi2); + } + } + } + + + for (std::vector::iterator irh=rechitstereo.begin(); irh!=rechitstereo.end(); ++irh) { + if(iStereoAndMatchedME != StereoAndMatchedMEsMap.end()){ + fillME(iStereoAndMatchedME->second.meWclusStereo,(*irh).clusiz); + fillME(iStereoAndMatchedME->second.meAdcStereo,(*irh).cluchg); + fillME(iStereoAndMatchedME->second.mePosxStereo,(*irh).x); + fillME(iStereoAndMatchedME->second.meResolxStereo,sqrt((*irh).resolxx)); + if ( (*irh).resx != -999999. || (*irh).pullMF != -999999. || (*irh).chi2 != -999999. ){ + fillME(iStereoAndMatchedME->second.meResStereo,(*irh).resx); + fillME(iStereoAndMatchedME->second.mePullLFStereo,(*irh).resx/sqrt((*irh).resolxx)); + fillME(iStereoAndMatchedME->second.mePullMFStereo,(*irh).pullMF); + fillME(iStereoAndMatchedME->second.meChi2Stereo,(*irh).chi2); + } + } + } + + for (std::vector::iterator irh=rechitmatched.begin(); irh!=rechitmatched.end(); ++irh) { + if(iStereoAndMatchedME != StereoAndMatchedMEsMap.end()){ + fillME(iStereoAndMatchedME->second.mePosxMatched,(*irh).x); + fillME(iStereoAndMatchedME->second.mePosyMatched,(*irh).y); + fillME(iStereoAndMatchedME->second.meResolxMatched,sqrt((*irh).resolxx)); + fillME(iStereoAndMatchedME->second.meResolyMatched,sqrt((*irh).resolyy)); + if ( (*irh).resx != -999999. || (*irh).resy != -999999. || (*irh).chi2 != -999999. ){ + fillME(iStereoAndMatchedME->second.meResxMatched,(*irh).resx); + fillME(iStereoAndMatchedME->second.meResyMatched,(*irh).resy); + fillME(iStereoAndMatchedME->second.meChi2Matched,(*irh).chi2); + } + } + } + + } + + }//End of loop over detectors + + + //now fill the cumulative histograms of the hits + std::vector SubDetList_; + for (std::vector::iterator iSubdet = SubDetList_.begin(); iSubdet != SubDetList_.end(); iSubdet++){ + std::map::iterator iSubDetME = SubDetMEsMap.find((*iSubdet)); + fillME(iSubDetME->second.meNumrphi,std::accumulate(totnumrechitrphi[(*iSubdet)].rbegin(), totnumrechitrphi[(*iSubdet)].rend(), 0)); + fillME(iSubDetME->second.meNumStereo,std::accumulate(totnumrechitstereo[(*iSubdet)].rbegin(), totnumrechitstereo[(*iSubdet)].rend(), 0)); + fillME(iSubDetME->second.meNumMatched,std::accumulate(totnumrechitmatched[(*iSubdet)].rbegin(), totnumrechitmatched[(*iSubdet)].rend(), 0)); + } + + fillME(totalMEs.meNumTotrphi,totrechitrphi); + fillME(totalMEs.meNumTotStereo,totrechitstereo); + fillME(totalMEs.meNumTotMatched,totrechitmatched); + +} + + +//needed by to do the residual for matched hits +std::pair SiStripRecHitsValid::projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet, + const BoundPlane& plane) +{ + // const StripGeomDetUnit* stripDet = dynamic_cast(hit.det()); + //if (stripDet == 0) throw MeasurementDetException("HitMatcher hit is not on StripGeomDetUnit"); + + const StripTopology& topol = stripDet->specificTopology(); + GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition()); + LocalPoint localHit = plane.toLocal(globalpos); + //track direction + LocalVector locdir=hit.localDirection(); + //rotate track in new frame + + GlobalVector globaldir= stripDet->surface().toGlobal(locdir); + LocalVector dir=plane.toLocal(globaldir); + double scale = -localHit.z() / dir.z(); + + LocalPoint projectedPos = localHit + scale*dir; + + // std::cout << "projectedPos " << projectedPos << std::endl; + + double selfAngle = topol.stripAngle( topol.strip( hit.localPosition())); + + LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame + + LocalVector localStripDir( plane.toLocal(stripDet->surface().toGlobal( stripDir))); + + return std::pair( projectedPos, localStripDir); +} +//-------------------------------------------------------------------------------------------- +void SiStripRecHitsValid::rechitanalysis(SiStripRecHit2D const rechit,const StripTopology &topol,TrackerHitAssociator& associate){ + + rechitpro.x = -999999.; rechitpro.y = -999999.; rechitpro.z = -999999.; rechitpro.resolxx = -999999.; rechitpro.resolxy = -999999.; + rechitpro.resolyy = -999999.; rechitpro.resx = -999999.; rechitpro.resy = -999999.;rechitpro.pullMF = -999999.; + rechitpro.clusiz = -999999.; rechitpro.cluchg = -999999.; rechitpro.chi2 = -999999.; + + LocalPoint position=rechit.localPosition(); + LocalError error=rechit.localPositionError(); + MeasurementPoint Mposition; + MeasurementError Merror; + Mposition = topol.measurementPosition(position); + Merror = topol.measurementError(position,error); + SiStripRecHit2D::ClusterRef clust=rechit.cluster(); + int clusiz=0; + int totcharge=0; + clusiz = clust->amplitudes().size(); + const std::vector amplitudes=clust->amplitudes(); + for(size_t ia=0; ia::const_iterator m=matched.begin(); m closestPair; + + if(!matched.empty()){ + + const StripGeomDetUnit* partnerstripdet =(StripGeomDetUnit*) gluedDet->stereoDet(); + std::pair hitPair; + + + for(vector::const_iterator m=matched.begin(); msurface()); + distx = fabs(rechitpro.x - hitPair.first.x()); + disty = fabs(rechitpro.y - hitPair.first.y()); + dist = sqrt(distx*distx+disty*disty); + // std::cout << " Simhit position x = " << hitPair.first.x() + // << " y = " << hitPair.first.y() << " dist = " << dist << std::endl; + if(dist tTopoHandle; + es.get().get(tTopoHandle); + const TrackerTopology* const tTopo = tTopoHandle.product(); + + // take from eventSetup the SiStripDetCabling object - here will use SiStripDetControl later on + es.get().get(SiStripDetCabling_); + + // get list of active detectors from SiStripDetCabling + std::vector activeDets; + SiStripDetCabling_->addActiveDetectorsRawIds(activeDets); + + SiStripSubStructure substructure; + + SiStripFolderOrganizer folder_organizer; + // folder_organizer.setSiStripFolderName(topFolderName_); + std::string curfold = topFolderName_; + folder_organizer.setSiStripFolderName(curfold); + folder_organizer.setSiStripFolder(); + + // std::cout << "curfold " << curfold << std::endl; + + createTotalMEs(); + + // loop over detectors and book MEs + edm::LogInfo("SiStripTkRecHits|SiStripRecHitsValid")<<"nr. of activeDets: "<::iterator detid_iterator = activeDets.begin(); detid_iterator!=activeDets.end(); detid_iterator++){ + uint32_t detid = (*detid_iterator); + // remove any eventual zero elements - there should be none, but just in case + if(detid == 0) { + activeDets.erase(detid_iterator); + continue; + } + + // Create Layer Level MEs + std::pair det_layer_pair = folder_organizer.GetSubDetAndLayer(detid,tTopo,true); + SiStripHistoId hidmanager; + std::string label = hidmanager.getSubdetid(detid,tTopo,true); + // std::cout << "label " << label << endl; + + std::map::iterator iLayerME = LayerMEsMap.find(label); + if(iLayerME==LayerMEsMap.end()) { + + // get detids for the layer + // Keep in mind that when we are on the TID or TEC we deal with rings not wheel + int32_t lnumber = det_layer_pair.second; + std::vector layerDetIds; + if (det_layer_pair.first == "TIB") { + substructure.getTIBDetectors(activeDets,layerDetIds,lnumber,0,0,0); + } else if (det_layer_pair.first == "TOB") { + substructure.getTOBDetectors(activeDets,layerDetIds,lnumber,0,0); + } else if (det_layer_pair.first == "TID" && lnumber > 0) { + substructure.getTIDDetectors(activeDets,layerDetIds,2,0,abs(lnumber),0); + } else if (det_layer_pair.first == "TID" && lnumber < 0) { + substructure.getTIDDetectors(activeDets,layerDetIds,1,0,abs(lnumber),0); + } else if (det_layer_pair.first == "TEC" && lnumber > 0) { + substructure.getTECDetectors(activeDets,layerDetIds,2,0,0,0,abs(lnumber),0); + } else if (det_layer_pair.first == "TEC" && lnumber < 0) { + substructure.getTECDetectors(activeDets,layerDetIds,1,0,0,0,abs(lnumber),0); + } + LayerDetMap[label] = layerDetIds; + + // book Layer MEs + folder_organizer.setLayerFolder(detid,tTopo,det_layer_pair.second,true); + // std::stringstream ss; + // folder_organizer.getLayerFolderName(ss, detid, tTopo, true); + // std::cout << "Folder Name " << ss.str().c_str() << std::endl; + createLayerMEs(label); + } + // book sub-detector plots + std::pair sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo); + // std::cout << "sdet_pair " << sdet_pair.first << " " << sdet_pair.second << std::endl; + if (SubDetMEsMap.find(det_layer_pair.first) == SubDetMEsMap.end()){ + dbe_->setCurrentFolder(sdet_pair.first); + createSubDetMEs(det_layer_pair.first); + } + //Create StereoAndMatchedMEs + std::map::iterator iStereoAndMatchedME = StereoAndMatchedMEsMap.find(label); + if(iStereoAndMatchedME==StereoAndMatchedMEsMap.end()) { + + // get detids for the stereo and matched layer. We are going to need a bool for these layers + bool isStereo = false; + // Keep in mind that when we are on the TID or TEC we deal with rings not wheel + int32_t stereolnumber = det_layer_pair.second; + std::vector stereoandmatchedDetIds; + if ( (det_layer_pair.first == "TIB") && (TIBDetId(detid).stereo()== 1) ) { + substructure.getTIBDetectors(activeDets,stereoandmatchedDetIds,stereolnumber,0,0,0); + isStereo = true; + } else if ( (det_layer_pair.first == "TOB") && (TOBDetId(detid).stereo()== 1) ) { + substructure.getTOBDetectors(activeDets,stereoandmatchedDetIds,stereolnumber,0,0); + isStereo = true; + } else if ( (det_layer_pair.first == "TID") && (stereolnumber > 0) && (TIDDetId(detid).stereo()== 1) ) { + substructure.getTIDDetectors(activeDets,stereoandmatchedDetIds,2,0,abs(stereolnumber),1); + isStereo = true; + } else if ( (det_layer_pair.first == "TID") && (stereolnumber < 0) && (TIDDetId(detid).stereo()== 1) ) { + substructure.getTIDDetectors(activeDets,stereoandmatchedDetIds,1,0,abs(stereolnumber),1); + isStereo = true; + } else if ( (det_layer_pair.first == "TEC") && (stereolnumber > 0) && (TECDetId(detid).stereo()== 1) ) { + substructure.getTECDetectors(activeDets,stereoandmatchedDetIds,2,0,0,0,abs(stereolnumber),1); + isStereo = true; + } else if ( (det_layer_pair.first == "TEC") && (stereolnumber < 0) && (TECDetId(detid).stereo()== 1) ) { + substructure.getTECDetectors(activeDets,stereoandmatchedDetIds,1,0,0,0,abs(stereolnumber),1); + isStereo = true; + } + StereoAndMatchedDetMap[label] = stereoandmatchedDetIds; + + if(isStereo){ + //book StereoAndMatched MEs + folder_organizer.setLayerFolder(detid,tTopo,det_layer_pair.second,true); + // std::stringstream ss1; + // folder_organizer.getLayerFolderName(ss1, detid, tTopo, true); + // std::cout << "Folder Name stereo " << ss1.str().c_str() << std::endl; + //Create the Monitor Elements only when we have a stereo module + createStereoAndMatchedMEs(label); + } + } + + + }//end of loop over detectors +} +//------------------------------------------------------------------------------------------ +void SiStripRecHitsValid::createTotalMEs() +{ + totalMEs.meNumTotrphi = 0; + totalMEs.meNumTotStereo = 0; + totalMEs.meNumTotMatched = 0; + + //NumTotrphi + if(switchNumTotrphi) { + totalMEs.meNumTotrphi = bookME1D("TH1NumTotrphi", "TH1NumTotrphi" ,"Num of RecHits"); + totalMEs.meNumTotrphi->setAxisTitle("Total number of RecHits"); + } + //NumTotStereo + if(switchNumTotStereo) { + totalMEs.meNumTotStereo = bookME1D("TH1NumTotStereo", "TH1NumTotStereo","Num of RecHits stereo"); + totalMEs.meNumTotStereo ->setAxisTitle("Total number of RecHits (stereo)"); + } + //NumTotMatched + if(switchNumTotMatched) { + totalMEs.meNumTotMatched = bookME1D("TH1NumTotMatched","TH1NumTotMatched","Num of RecHits rmatched"); + totalMEs.meNumTotMatched->setAxisTitle("Total number of matched RecHits"); + } + +} +//------------------------------------------------------------------------------------------ +void SiStripRecHitsValid::createLayerMEs(std::string label) +{ + SiStripHistoId hidmanager; + LayerMEs layerMEs; + + layerMEs.meWclusrphi = 0; + layerMEs.meAdcrphi = 0; + layerMEs.mePosxrphi = 0; + layerMEs.meResolxrphi = 0; + layerMEs.meResrphi = 0; + layerMEs.mePullLFrphi = 0; + layerMEs.mePullMFrphi = 0; + layerMEs.meChi2rphi = 0; + + //Wclusrphi + if(switchWclusrphi) { + layerMEs.meWclusrphi = bookME1D("TH1Wclusrphi", hidmanager.createHistoLayer("Wclus_rphi","layer",label,"").c_str() ,"Cluster Width - Number of strips that belong to the RecHit cluster"); + layerMEs.meWclusrphi->setAxisTitle(("Cluster Width [nr strips] in "+ label).c_str()); + } + //Adcrphi + if(switchAdcrphi) { + layerMEs.meAdcrphi = bookME1D("TH1Adcrphi", hidmanager.createHistoLayer("Adc_rphi","layer",label,"").c_str() ,"RecHit Cluster Charge"); + layerMEs.meAdcrphi->setAxisTitle(("cluster charge [ADC] in " + label).c_str()); + } + //Posxrphi + if(switchPosxrphi) { + layerMEs.mePosxrphi = bookME1D("TH1Posxrphi", hidmanager.createHistoLayer("Posx_rphi","layer",label,"").c_str() ,"RecHit x coord."); + layerMEs.mePosxrphi->setAxisTitle(("x RecHit coord. (local frame) in " + label).c_str()); + } + //Resolxrphi + if(switchResolxrphi) { + layerMEs.meResolxrphi = bookME1D("TH1Resolxrphi", hidmanager.createHistoLayer("Resolx_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord."); //~20micron + layerMEs.meResolxrphi->setAxisTitle(("resol(x) RecHit coord. (local frame) in " + label).c_str()); + } + //Resrphi + if(switchResrphi) { + layerMEs.meResrphi = bookME1D("TH1Resrphi", hidmanager.createHistoLayer("Res_rphi","layer",label,"").c_str() ,"Residuals of the hit x coordinate"); + layerMEs.meResrphi->setAxisTitle(("RecHit Res(x) in " + label).c_str()); + } + //PullLFrphi + if(switchPullLFrphi) { + layerMEs.mePullLFrphi = bookME1D("TH1PullLFrphi", hidmanager.createHistoLayer("Pull_LF_rphi","layer",label,"").c_str() ,"Pull distribution"); + layerMEs.mePullLFrphi->setAxisTitle(("Pull distribution (local frame) in " + label).c_str()); + } + //PullMFrphi + if(switchPullMFrphi) { + layerMEs.mePullMFrphi = bookME1D("TH1PullMFrphi", hidmanager.createHistoLayer("Pull_MF_rphi","layer",label,"").c_str() ,"Pull distribution"); + layerMEs.mePullMFrphi->setAxisTitle(("Pull distribution (measurement frame) in " + label).c_str()); + } + //Chi2rphi + if(switchChi2rphi) { + layerMEs.meChi2rphi = bookME1D("TH1Chi2rphi", hidmanager.createHistoLayer("Chi2_rphi","layer",label,"").c_str() ,"RecHit Chi2 test"); + layerMEs.meChi2rphi->setAxisTitle(("RecHit Chi2 test in " + label).c_str()); + } + + LayerMEsMap[label]=layerMEs; + +} +//------------------------------------------------------------------------------------------ +void SiStripRecHitsValid::createStereoAndMatchedMEs(std::string label) +{ + SiStripHistoId hidmanager; + StereoAndMatchedMEs stereoandmatchedMEs; + + stereoandmatchedMEs.meWclusStereo = 0; + stereoandmatchedMEs.meAdcStereo = 0; + stereoandmatchedMEs.mePosxStereo = 0; + stereoandmatchedMEs.meResolxStereo = 0; + stereoandmatchedMEs.meResStereo = 0; + stereoandmatchedMEs.mePullLFStereo = 0; + stereoandmatchedMEs.mePullMFStereo = 0; + stereoandmatchedMEs.meChi2Stereo = 0; + stereoandmatchedMEs.mePosxMatched = 0; + stereoandmatchedMEs.mePosyMatched = 0; + stereoandmatchedMEs.meResolxMatched = 0; + stereoandmatchedMEs.meResolyMatched = 0; + stereoandmatchedMEs.meResxMatched = 0; + stereoandmatchedMEs.meResyMatched = 0; + stereoandmatchedMEs.meChi2Matched = 0; + + //WclusStereo + if(switchWclusStereo) { + stereoandmatchedMEs.meWclusStereo = bookME1D("TH1WclusStereo", hidmanager.createHistoLayer("Wclus_stereo","layer",label,"").c_str() ,"Cluster Width - Number of strips that belong to the RecHit cluster"); + stereoandmatchedMEs.meWclusStereo->setAxisTitle(("Cluster Width [nr strips] in stereo modules in "+ label).c_str()); + } + //AdcStereo + if(switchAdcStereo) { + stereoandmatchedMEs.meAdcStereo = bookME1D("TH1AdcStereo", hidmanager.createHistoLayer("Adc_stereo","layer",label,"").c_str() ,"RecHit Cluster Charge"); + stereoandmatchedMEs.meAdcStereo->setAxisTitle(("cluster charge [ADC] in stereo modules in " + label).c_str()); + } + //PosxStereo + if(switchPosxStereo) { + stereoandmatchedMEs.mePosxStereo = bookME1D("TH1PosxStereo", hidmanager.createHistoLayer("Posx_stereo","layer",label,"").c_str() ,"RecHit x coord."); + stereoandmatchedMEs.mePosxStereo->setAxisTitle(("x RecHit coord. (local frame) in stereo modules in " + label).c_str()); + } + //ResolxStereo + if(switchResolxStereo) { + stereoandmatchedMEs.meResolxStereo = bookME1D("TH1ResolxStereo", hidmanager.createHistoLayer("Resolx_stereo","layer",label,"").c_str() ,"RecHit resol(x) coord."); + stereoandmatchedMEs.meResolxStereo->setAxisTitle(("resol(x) RecHit coord. (local frame) in stereo modules in " + label).c_str()); + } + //ResStereo + if(switchResStereo) { + stereoandmatchedMEs.meResStereo = bookME1D("TH1ResStereo", hidmanager.createHistoLayer("Res_stereo","layer",label,"").c_str() ,"Residuals of the hit x coordinate"); + stereoandmatchedMEs.meResStereo->setAxisTitle(("RecHit Res(x) in stereo modules in " + label).c_str()); + } + //PullLFStereo + if(switchPullLFStereo) { + stereoandmatchedMEs.mePullLFStereo = bookME1D("TH1PullLFStereo", hidmanager.createHistoLayer("Pull_LF_stereo","layer",label,"").c_str() ,"Pull distribution"); + stereoandmatchedMEs.mePullLFStereo->setAxisTitle(("Pull distribution (local frame) in stereo modules in " + label).c_str()); + } + //PullMFStereo + if(switchPullMFStereo) { + stereoandmatchedMEs.mePullMFStereo = bookME1D("TH1PullMFStereo", hidmanager.createHistoLayer("Pull_MF_stereo","layer",label,"").c_str() ,"Pull distribution"); + stereoandmatchedMEs.mePullMFStereo->setAxisTitle(("Pull distribution (measurement frame) in stereo modules in " + label).c_str()); + } + //Chi2Stereo + if(switchChi2Stereo) { + stereoandmatchedMEs.meChi2Stereo = bookME1D("TH1Chi2Stereo", hidmanager.createHistoLayer("Chi2_stereo","layer",label,"").c_str() ,"RecHit Chi2 test"); + stereoandmatchedMEs.meChi2Stereo->setAxisTitle(("RecHit Chi2 test in stereo modules in " + label).c_str()); + } + //PosxMatched + if(switchPosxMatched) { + stereoandmatchedMEs.mePosxMatched = bookME1D("TH1PosxMatched", hidmanager.createHistoLayer("Posx_matched","layer",label,"").c_str() ,"RecHit x coord."); + stereoandmatchedMEs.mePosxMatched->setAxisTitle(("x coord. matched RecHit (local frame) in " + label).c_str()); + } + //PosyMatched + if(switchPosyMatched) { + stereoandmatchedMEs.mePosyMatched = bookME1D("TH1PosyMatched", hidmanager.createHistoLayer("Posy_matched","layer",label,"").c_str() ,"RecHit y coord."); + stereoandmatchedMEs.mePosyMatched->setAxisTitle(("y coord. matched RecHit (local frame) in " + label).c_str()); + } + //ResolxMatched + if(switchResolxMatched) { + stereoandmatchedMEs.meResolxMatched = bookME1D("TH1ResolxMatched", hidmanager.createHistoLayer("Resolx_matched","layer",label,"").c_str() ,"RecHit resol(x) coord."); + stereoandmatchedMEs.meResolxMatched->setAxisTitle(("resol(x) coord. matched RecHit (local frame) in " + label).c_str()); + } + //ResolyMatched + if(switchResolyMatched) { + stereoandmatchedMEs.meResolyMatched = bookME1D("TH1ResolyMatched", hidmanager.createHistoLayer("Resoly_matched","layer",label,"").c_str() ,"RecHit resol(y) coord."); + stereoandmatchedMEs.meResolyMatched->setAxisTitle(("resol(y) coord. matched RecHit (local frame) in " + label).c_str()); + } + //ResxMatched + if(switchResxMatched) { + stereoandmatchedMEs.meResxMatched = bookME1D("TH1ResxMatched", hidmanager.createHistoLayer("Resx_matched","layer",label,"").c_str() ,"Residuals of the hit x coord."); + stereoandmatchedMEs.meResxMatched->setAxisTitle(("Res(x) in matched RecHit in " + label).c_str()); + } + //ResyMatched + if(switchResyMatched) { + stereoandmatchedMEs.meResyMatched = bookME1D("TH1ResyMatched", hidmanager.createHistoLayer("Resy_matched","layer",label,"").c_str() ,"Residuals of the hit y coord."); + stereoandmatchedMEs.meResyMatched->setAxisTitle(("Res(y) in matched RecHit in " + label).c_str()); + } + //Chi2Matched + if(switchChi2Matched) { + stereoandmatchedMEs.meChi2Matched = bookME1D("TH1Chi2Matched", hidmanager.createHistoLayer("Chi2_matched","layer",label,"").c_str() ,"RecHit Chi2 test"); + stereoandmatchedMEs.meChi2Matched->setAxisTitle(("Matched RecHit Chi2 test in " + label).c_str()); + } + + StereoAndMatchedMEsMap[label]=stereoandmatchedMEs; + +} +//------------------------------------------------------------------------------------------ +void SiStripRecHitsValid::createSubDetMEs(std::string label) { + + SubDetMEs subdetMEs; + subdetMEs.meNumrphi = 0; + subdetMEs.meNumStereo = 0; + subdetMEs.meNumMatched = 0; + + std::string HistoName; + //Numrphi + if (switchNumrphi){ + HistoName = "TH1Numrphi__" + label; + subdetMEs.meNumrphi = bookME1D("TH1Numrphi",HistoName.c_str(),"Num of RecHits"); + subdetMEs.meNumrphi->setAxisTitle(("Total number of RecHits in "+ label).c_str()); + } + //NumStereo + if (switchNumStereo){ + HistoName = "TH1NumStereo__" + label; + subdetMEs.meNumStereo = bookME1D("TH1NumStereo",HistoName.c_str(),"Num of RecHits in stereo modules"); + subdetMEs.meNumStereo->setAxisTitle(("Total number of RecHits in stereo modules in "+ label).c_str()); + } + //NumMatched + if (switchNumMatched){ + HistoName = "TH1NumMatched__" + label; + subdetMEs.meNumMatched = bookME1D("TH1NumMatched",HistoName.c_str(),"Num of matched RecHits" ); + subdetMEs.meNumMatched->setAxisTitle(("Total number of matched RecHits in "+ label).c_str()); + } + + SubDetMEsMap[label]=subdetMEs; +} +//------------------------------------------------------------------------------------------ +MonitorElement* SiStripRecHitsValid::bookME1D(const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle) +{ + Parameters = conf_.getParameter(ParameterSetLabel); + return dbe_->book1D(HistoName,HistoTitle, + Parameters.getParameter("Nbinx"), + Parameters.getParameter("xmin"), + Parameters.getParameter("xmax") + ); +} + +//define this as a plug-in +DEFINE_FWK_MODULE(SiStripRecHitsValid); +