CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromData Class Reference
Inheritance diagram for SiStripGainFromData:
ConditionDBWriter< SiStripApvGain > edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

class  isEqual
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 SiStripGainFromData (const edm::ParameterSet &)
 
 ~SiStripGainFromData () override
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void algoAnalyze (const edm::Event &, const edm::EventSetup &) override
 
void algoBeginJob (const edm::EventSetup &) override
 
void algoBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void algoEndJob () override
 
double ComputeChargeOverPath (const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
 
std::unique_ptr< SiStripApvGaingetNewObject () override
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
 
bool IsFarFromBorder (TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
 

Private Attributes

std::string AlgoMode
 
bool AllowSaturation
 
TH2F * APV_Charge
 
TH1F * APV_CumulGain
 
TH1F * APV_DetId
 
TH1F * APV_Eta
 
TH1F * APV_Gain
 
TH1F * APV_Id
 
TH2F * APV_Momentum
 
TH1F * APV_MPV
 
TH2F * APV_PathLength
 
TH1F * APV_PathLengthM
 
TH1F * APV_PrevGain
 
TH1F * APV_R
 
TH1F * APV_SubDet
 
TH1F * APV_Thickness
 
std::unordered_map< unsigned
int, stAPVGain * > 
APVsColl
 
std::vector< stAPVGain * > APVsCollOrdered
 
int CalibrationLevel
 
TH1F * Charge_TEC
 
TH1F * Charge_TEC1
 
TH1F * Charge_TEC2
 
TH1F * Charge_TECM
 
TH1F * Charge_TECP
 
TH1F * Charge_TIB
 
TH1F * Charge_TID
 
TH1F * Charge_TIDM
 
TH1F * Charge_TIDP
 
TH1F * Charge_TOB
 
TH2F * Charge_Vs_Alpha
 
TH2F * Charge_Vs_Beta
 
TH2F * Charge_Vs_PathLength
 
TH2F * Charge_Vs_PathLength320
 
TH2F * Charge_Vs_PathLength500
 
TH2F * Charge_Vs_PathTEC
 
TH2F * Charge_Vs_PathTEC1
 
TH2F * Charge_Vs_PathTEC2
 
TH2F * Charge_Vs_PathTIB
 
TH2F * Charge_Vs_PathTID
 
TH2F * Charge_Vs_PathTOB
 
TH2F * Charge_Vs_TransversAngle
 
bool CheckIfFileExist
 
bool CheckLocalAngle
 
DQMStoredqmStore_
 
unsigned int EEvent
 
TH2F * Error_Vs_Entries
 
TH2F * Error_Vs_Eta
 
TH2F * Error_Vs_MPV
 
TH2F * Error_Vs_Phi
 
unsigned int ERun
 
TimeValue_t ETimestamp
 
bool FirstSetOfConstants
 
TH1F * FWHM_Vs_PathLength
 
TH1F * FWHM_Vs_PathLength320
 
TH1F * FWHM_Vs_PathLength500
 
edm::ESGetToken< SiStripGain,
SiStripGainRcd
gainToken_
 
TH1F * HChi2OverNDF
 
TH1F * HFirstStrip
 
TH2F * HitLocalPosition
 
TH2F * HitLocalPositionBefCut
 
TH1F * HTrackChi2OverNDF
 
TH1F * HTrackHits
 
const edm::EventiEvent_
 
const edm::EventSetupiSetup_
 
TH1F * JobInfo
 
double MaxChi2OverNDF
 
double MaxMPVError
 
unsigned int MaxNrStrips
 
double MaxTrackChiOverNdf
 
double MaxTrackEta
 
double MaxTrackMomentum
 
unsigned int MinNrEntries
 
double MinTrackEta
 
unsigned int MinTrackHits
 
double MinTrackMomentum
 
TH1F * MPV_Vs_Alpha
 
TH1F * MPV_Vs_Beta
 
TH2F * MPV_Vs_Eta
 
TH2F * MPV_Vs_EtaTEC
 
TH2F * MPV_Vs_EtaTEC1
 
TH2F * MPV_Vs_EtaTEC2
 
TH2F * MPV_Vs_EtaTIB
 
TH2F * MPV_Vs_EtaTID
 
TH2F * MPV_Vs_EtaTOB
 
TH1F * MPV_Vs_PathLength
 
TH1F * MPV_Vs_PathLength320
 
TH1F * MPV_Vs_PathLength500
 
TH1F * MPV_Vs_PathTEC
 
TH1F * MPV_Vs_PathTEC1
 
TH1F * MPV_Vs_PathTEC2
 
TH1F * MPV_Vs_PathTIB
 
TH1F * MPV_Vs_PathTID
 
TH1F * MPV_Vs_PathTOB
 
TH2F * MPV_Vs_Phi
 
TH2F * MPV_Vs_PhiTEC
 
TH2F * MPV_Vs_PhiTEC1
 
TH2F * MPV_Vs_PhiTEC2
 
TH2F * MPV_Vs_PhiTIB
 
TH2F * MPV_Vs_PhiTID
 
TH2F * MPV_Vs_PhiTOB
 
TH2F * MPV_Vs_R
 
TH1F * MPV_Vs_TransversAngle
 
TH1F * MPVs
 
TH1F * MPVs320
 
TH1F * MPVs500
 
unsigned int NEvent
 
TH1F * NHighStripInCluster
 
TH2F * NoMPV_Vs_EtaPhi
 
TH1F * NSatStripInCluster
 
TH2F * NStrips_Vs_Alpha
 
TH2F * NStrips_Vs_Beta
 
TH2F * NStrips_Vs_TransversAngle
 
TH1F * NumberOfEntriesByAPV
 
std::string OutputGains
 
std::string OutputHistos
 
unsigned int SEvent
 
unsigned int SRun
 
TimeValue_t STimestamp
 
edm::ESGetToken
< TrackerGeometry,
TrackerDigiGeometryRecord
tkGeomToken_
 
MonitorElementtmp
 
TH2F * Tracks_P_Vs_Eta
 
TH2F * Tracks_Pt_Vs_Eta
 
std::string TrajToTrackLabel
 
std::string TrajToTrackProducer
 
edm::ESGetToken
< TrackerTopology,
TrackerTopologyRcd
tTopoToken_
 
bool Validation
 
vector< string > VInputFiles
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from ConditionDBWriter< SiStripApvGain >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 86 of file SiStripGainFromData.cc.

Member Typedef Documentation

Definition at line 89 of file SiStripGainFromData.cc.

Definition at line 88 of file SiStripGainFromData.cc.

Constructor & Destructor Documentation

SiStripGainFromData::SiStripGainFromData ( const edm::ParameterSet iConfig)
explicit

Definition at line 300 of file SiStripGainFromData.cc.

References AlgoMode, AllowSaturation, CalibrationLevel, CheckIfFileExist, CheckLocalAngle, dqmStore_, FirstSetOfConstants, gainToken_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MaxChi2OverNDF, MaxMPVError, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, MinNrEntries, MinTrackEta, MinTrackHits, MinTrackMomentum, Utilities::operator, OutputGains, OutputHistos, AlCaHLTBitMon_QueryRunRegistry::string, tkGeomToken_, TrajToTrackLabel, TrajToTrackProducer, tTopoToken_, Validation, and VInputFiles.

302  AlgoMode = iConfig.getParameter<std::string>("AlgoMode");
303 
304  OutputGains = iConfig.getParameter<std::string>("OutputGains");
305  OutputHistos = iConfig.getParameter<std::string>("OutputHistos");
306 
307  TrajToTrackProducer = iConfig.getParameter<std::string>("TrajToTrackProducer");
308  TrajToTrackLabel = iConfig.getParameter<std::string>("TrajToTrackLabel");
309 
310  CheckLocalAngle = iConfig.getUntrackedParameter<bool>("checkLocalAngle", false);
311  MinNrEntries = iConfig.getUntrackedParameter<unsigned>("minNrEntries", 20);
312  MaxMPVError = iConfig.getUntrackedParameter<double>("maxMPVError", 500.0);
313  MaxChi2OverNDF = iConfig.getUntrackedParameter<double>("maxChi2OverNDF", 5.0);
314  MinTrackMomentum = iConfig.getUntrackedParameter<double>("minTrackMomentum", 3.0);
315  MaxTrackMomentum = iConfig.getUntrackedParameter<double>("maxTrackMomentum", 99999.0);
316  MinTrackEta = iConfig.getUntrackedParameter<double>("minTrackEta", -5.0);
317  MaxTrackEta = iConfig.getUntrackedParameter<double>("maxTrackEta", 5.0);
318  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips", 2);
319  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits", 8);
320  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double>("MaxTrackChiOverNdf", 3);
321  AllowSaturation = iConfig.getUntrackedParameter<bool>("AllowSaturation", false);
322  FirstSetOfConstants = iConfig.getUntrackedParameter<bool>("FirstSetOfConstants", true);
323  Validation = iConfig.getUntrackedParameter<bool>("Validation", false);
324  CheckIfFileExist = iConfig.getUntrackedParameter<bool>("CheckIfFileExist", false);
325 
326  CalibrationLevel = iConfig.getUntrackedParameter<int>("CalibrationLevel", 0);
327 
328  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0)
329  VInputFiles = iConfig.getParameter<vector<string> >("VInputFiles");
330 
332 
333  tTopoToken_ = esConsumes<edm::Transition::BeginRun>();
334  tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
335  gainToken_ = esConsumes<edm::Transition::BeginRun>();
336 
337  //if( OutputHistos!="" )
338  // dqmStore_->open(OutputHistos.c_str(), true);
339 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
vector< string > VInputFiles
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripGainFromData::~SiStripGainFromData ( )
override

Definition at line 341 of file SiStripGainFromData.cc.

341 {}

Member Function Documentation

void SiStripGainFromData::algoAnalyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1161 of file SiStripGainFromData.cc.

References AlgoMode, edm::AssociationMap< Tag >::begin(), Trajectory::chiSquared(), SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), ComputeChargeOverPath(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, EEvent, edm::AssociationMap< Tag >::end(), ERun, reco::TrackBase::eta(), ETimestamp, edm::EventID::event(), Trajectory::foundHits(), edm::Event::getByLabel(), HTrackChi2OverNDF, HTrackHits, edm::EventBase::id(), iEvent, iEvent_, TrajectoryStateOnSurface::isValid(), MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, Trajectory::measurements(), MinTrackEta, MinTrackHits, MinTrackMomentum, SiStripMatchedRecHit2D::monoCluster(), ndof, NEvent, reco::TrackBase::p(), edm::Handle< T >::product(), reco::TrackBase::pt(), Trajectory::recHits(), edm::EventID::run(), SEvent, SRun, SiStripMatchedRecHit2D::stereoCluster(), STimestamp, edm::EventBase::time(), HLT_FULL_cff::track, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, TrajToTrackLabel, TrajToTrackProducer, and edm::Timestamp::value().

1161  {
1162  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0)
1163  return;
1164 
1165  if (NEvent == 0) {
1166  SRun = iEvent.id().run();
1167  SEvent = iEvent.id().event();
1168  STimestamp = iEvent.time().value();
1169  }
1170  ERun = iEvent.id().run();
1171  EEvent = iEvent.id().event();
1172  ETimestamp = iEvent.time().value();
1173  NEvent++;
1174 
1175  iEvent_ = &iEvent;
1176 
1177  Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle;
1178  iEvent.getByLabel(TrajToTrackProducer, TrajToTrackLabel, trajTrackAssociationHandle);
1179  const TrajTrackAssociationCollection TrajToTrackMap = *trajTrackAssociationHandle.product();
1180 
1181  for (TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap.begin(); it != TrajToTrackMap.end(); ++it) {
1182  const Track track = *it->val;
1183  const Trajectory traj = *it->key;
1184 
1185  if (track.p() < MinTrackMomentum || track.p() > MaxTrackMomentum || track.eta() < MinTrackEta ||
1186  track.eta() > MaxTrackEta)
1187  continue;
1188 
1189  Tracks_Pt_Vs_Eta->Fill(fabs(track.eta()), track.pt());
1190  Tracks_P_Vs_Eta->Fill(fabs(track.eta()), track.p());
1191 
1192  //BEGIN TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1193  int ndof = 0;
1194  const Trajectory::RecHitContainer transRecHits = traj.recHits();
1195 
1196  for (Trajectory::RecHitContainer::const_iterator rechit = transRecHits.begin(); rechit != transRecHits.end();
1197  ++rechit)
1198  if ((*rechit)->isValid())
1199  ndof += (*rechit)->dimension();
1200  ndof -= 5;
1201  //END TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1202 
1203  HTrackChi2OverNDF->Fill(traj.chiSquared() / ndof);
1204  if (traj.chiSquared() / ndof > MaxTrackChiOverNdf)
1205  continue;
1206 
1207  vector<TrajectoryMeasurement> measurements = traj.measurements();
1208  HTrackHits->Fill(traj.foundHits());
1209  if (traj.foundHits() < (int)MinTrackHits)
1210  continue;
1211  /*
1212  //BEGIN TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1213  int NMatchedHit = 0;
1214  for(vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin(); measurement_it!=measurements.end(); measurement_it++){
1215  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1216  if( !trajState.isValid() ) continue;
1217  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1218  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1219  if(sistripmatchedhit)NMatchedHit++;
1220 // NMatchedHit++;
1221 
1222  }
1223  //END TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1224 
1225  if(NMatchedHit<2){
1226  printf("NOT ENOUGH MATCHED RECHITS : %i\n",NMatchedHit);
1227  continue;
1228  }
1229 */
1230 
1231  for (vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin();
1232  measurement_it != measurements.end();
1233  measurement_it++) {
1234  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1235  if (!trajState.isValid())
1236  continue;
1237 
1238  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1239  const SiStripRecHit1D* sistripsimple1dhit = dynamic_cast<const SiStripRecHit1D*>(hit);
1240  const SiStripRecHit2D* sistripsimplehit = dynamic_cast<const SiStripRecHit2D*>(hit);
1241  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1242 
1243  if (sistripsimplehit) {
1245  (sistripsimplehit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1246  } else if (sistripmatchedhit) {
1247  ComputeChargeOverPath(&sistripmatchedhit->monoCluster(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1249  &sistripmatchedhit->stereoCluster(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1250  } else if (sistripsimple1dhit) {
1252  (sistripsimple1dhit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1253  } else {
1254  }
1255  }
1256  }
1257 }
RunNumber_t run() const
Definition: EventID.h:38
ClusterRef cluster() const
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
EventNumber_t event() const
Definition: EventID.h:40
int foundHits() const
Definition: Trajectory.h:206
const_iterator end() const
last iterator over the map (read only)
SiStripCluster const & monoCluster() const
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
DataContainer const & measurements() const
Definition: Trajectory.h:178
int iEvent
Definition: GenABIO.cc:224
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
double pt() const
track transverse momentum
Definition: TrackBase.h:637
ClusterRef cluster() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
T const * product() const
Definition: Handle.h:70
double ComputeChargeOverPath(const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
float chiSquared() const
Definition: Trajectory.h:241
SiStripCluster const & stereoCluster() const
edm::EventID id() const
Definition: EventBase.h:59
const_iterator begin() const
first iterator over the map (read only)
TimeValue_t value() const
Definition: Timestamp.h:45
edm::Timestamp time() const
Definition: EventBase.h:60
const edm::Event * iEvent_
void SiStripGainFromData::algoBeginJob ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 343 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_Charge, APV_CumulGain, APV_DetId, APV_Eta, APV_Gain, APV_Id, APV_Momentum, APV_MPV, APV_PathLength, APV_PathLengthM, APV_PrevGain, APV_R, APV_SubDet, APV_Thickness, stAPVGain::APVId, APVsColl, APVsCollOrdered, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), Charge_TEC, Charge_TEC1, Charge_TEC2, Charge_TECM, Charge_TECP, Charge_TIB, Charge_TID, Charge_TIDM, Charge_TIDP, Charge_TOB, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, runTheMatrix::const, stAPVGain::DetId, dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, stAPVGain::Eta, ETimestamp, beamvalidation::exit(), FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, stAPVGain::Gain, gainToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), dqm::legacy::MonitorElement::getTH1F(), dqm::legacy::MonitorElement::getTH2F(), HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, mps_fire::i, stAPVGain::Index, iSetup_, dqmiolumiharvest::j, JobInfo, stAPVGain::MPV, MPV_Vs_Alpha, MPV_Vs_Beta, MPV_Vs_Eta, MPV_Vs_EtaTEC, MPV_Vs_EtaTEC1, MPV_Vs_EtaTEC2, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PathLength, MPV_Vs_PathLength320, MPV_Vs_PathLength500, MPV_Vs_PathTEC, MPV_Vs_PathTEC1, MPV_Vs_PathTEC2, MPV_Vs_PathTIB, MPV_Vs_PathTID, MPV_Vs_PathTOB, MPV_Vs_Phi, MPV_Vs_PhiTEC, MPV_Vs_PhiTEC1, MPV_Vs_PhiTEC2, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPV_Vs_R, MPV_Vs_TransversAngle, MPVs, MPVs320, MPVs500, NEvent, NHighStripInCluster, NoMPV_Vs_EtaPhi, NSatStripInCluster, StripTopology::nstrips(), NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, NumberOfEntriesByAPV, stAPVGain::Phi, colinearityKinematic::Phi, stAPVGain::PreviousGain, gpuVertexFinder::printf(), stAPVGain::R, dttmaxenums::R, DetId::rawId(), SEvent, stAPVGain::Side, SRun, STimestamp, stAPVGain::SubDet, ntupleEnum::SubDet, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecSide(), stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, tkGeomToken_, tmp, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and tTopoToken_.

343  {
344  const TrackerTopology* const tTopo = &iSetup.getData(tTopoToken_);
345 
346  iSetup_ = &iSetup;
347 
348  // TH1::AddDirectory(kTRUE);
349 
350  tmp = dqmStore_->book1D("JobInfo", "JobInfo", 20, 0, 20);
351  JobInfo = tmp->getTH1F();
352 
353  tmp = dqmStore_->book1D("APV_DetId", "APV_DetId", 72785, 0, 72784);
354  APV_DetId = tmp->getTH1F();
355  tmp = dqmStore_->book1D("APV_Id", "APV_Id", 72785, 0, 72784);
356  APV_Id = tmp->getTH1F();
357  tmp = dqmStore_->book1D("APV_Eta", "APV_Eta", 72785, 0, 72784);
358  APV_Eta = tmp->getTH1F();
359  tmp = dqmStore_->book1D("APV_R", "APV_R", 72785, 0, 72784);
360  APV_R = tmp->getTH1F();
361  tmp = dqmStore_->book1D("APV_SubDet", "APV_SubDet", 72785, 0, 72784);
362  APV_SubDet = tmp->getTH1F();
363  tmp = dqmStore_->book2D("APV_Momentum", "APV_Momentum", 72785, 0, 72784, 50, 0, 200);
364  APV_Momentum = tmp->getTH2F();
365  tmp = dqmStore_->book2D("APV_Charge", "APV_Charge", 72785, 0, 72784, 1000, 0, 2000);
366  APV_Charge = tmp->getTH2F();
367  tmp = dqmStore_->book2D("APV_PathLength", "APV_PathLength", 72785, 0, 72784, 100, 0.2, 1.4);
369  tmp = dqmStore_->book1D("APV_PathLengthM", "APV_PathLengthM", 72785, 0, 72784);
371  tmp = dqmStore_->book1D("APV_MPV", "APV_MPV", 72785, 0, 72784);
372  APV_MPV = tmp->getTH1F();
373  tmp = dqmStore_->book1D("APV_Gain", "APV_Gain", 72785, 0, 72784);
374  APV_Gain = tmp->getTH1F();
375  tmp = dqmStore_->book1D("APV_PrevGain", "APV_PrevGain", 72785, 0, 72784);
376  APV_PrevGain = tmp->getTH1F();
377  tmp = dqmStore_->book1D("APV_CumulGain", "APV_CumulGain", 72785, 0, 72784);
379  tmp = dqmStore_->book1D("APV_Thickness", "APV_Thicknes", 72785, 0, 72784);
381 
382  tmp = dqmStore_->book2D("Tracks_P_Vs_Eta", "Tracks_P_Vs_Eta", 30, 0, 3, 50, 0, 200);
384  tmp = dqmStore_->book2D("Tracks_Pt_Vs_Eta", "Tracks_Pt_Vs_Eta", 30, 0, 3, 50, 0, 200);
386 
387  tmp = dqmStore_->book2D("Charge_Vs_PathTIB", "Charge_Vs_PathTIB", 100, 0.2, 1.4, 500, 0, 2000);
389  tmp = dqmStore_->book2D("Charge_Vs_PathTID", "Charge_Vs_PathTID", 100, 0.2, 1.4, 500, 0, 2000);
391  tmp = dqmStore_->book2D("Charge_Vs_PathTOB", "Charge_Vs_PathTOB", 100, 0.2, 1.4, 500, 0, 2000);
393  tmp = dqmStore_->book2D("Charge_Vs_PathTEC", "Charge_Vs_PathTEC", 100, 0.2, 1.4, 500, 0, 2000);
395  tmp = dqmStore_->book2D("Charge_Vs_PathTEC1", "Charge_Vs_PathTEC1", 100, 0.2, 1.4, 500, 0, 2000);
397  tmp = dqmStore_->book2D("Charge_Vs_PathTEC2", "Charge_Vs_PathTEC2", 100, 0.2, 1.4, 500, 0, 2000);
399 
400  tmp = dqmStore_->book1D("Charge_TIB", "Charge_TIB", 1000, 0, 2000);
401  Charge_TIB = tmp->getTH1F();
402  tmp = dqmStore_->book1D("Charge_TID", "Charge_TID", 1000, 0, 2000);
403  Charge_TID = tmp->getTH1F();
404  tmp = dqmStore_->book1D("Charge_TID+", "Charge_TID+", 1000, 0, 2000);
405  Charge_TIDP = tmp->getTH1F();
406  tmp = dqmStore_->book1D("Charge_TID-", "Charge_TID-", 1000, 0, 2000);
407  Charge_TIDM = tmp->getTH1F();
408  tmp = dqmStore_->book1D("Charge_TOB", "Charge_TOB", 1000, 0, 2000);
409  Charge_TOB = tmp->getTH1F();
410  tmp = dqmStore_->book1D("Charge_TEC", "Charge_TEC", 1000, 0, 2000);
411  Charge_TEC = tmp->getTH1F();
412  tmp = dqmStore_->book1D("Charge_TEC1", "Charge_TEC1", 1000, 0, 2000);
413  Charge_TEC1 = tmp->getTH1F();
414  tmp = dqmStore_->book1D("Charge_TEC2", "Charge_TEC2", 1000, 0, 2000);
415  Charge_TEC2 = tmp->getTH1F();
416  tmp = dqmStore_->book1D("Charge_TEC+", "Charge_TEC+", 1000, 0, 2000);
417  Charge_TECP = tmp->getTH1F();
418  tmp = dqmStore_->book1D("Charge_TEC-", "Charge_TEC-", 1000, 0, 2000);
419  Charge_TECM = tmp->getTH1F();
420 
421  /*
422  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS1", "Charge_Vs_PathLength_CS1" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS1 = tmp->getTH2F();
423  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS2", "Charge_Vs_PathLength_CS2" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS2 = tmp->getTH2F();
424  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS3", "Charge_Vs_PathLength_CS3" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS3 = tmp->getTH2F();
425  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS4", "Charge_Vs_PathLength_CS4" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS4 = tmp->getTH2F();
426  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS5", "Charge_Vs_PathLength_CS5" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS5 = tmp->getTH2F();
427 */
428  tmp = dqmStore_->book2D("Charge_Vs_PathLength", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
430  tmp = dqmStore_->book2D("Charge_Vs_PathLength320", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
432  tmp = dqmStore_->book2D("Charge_Vs_PathLength500", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
434 
435  tmp = dqmStore_->book2D("Charge_Vs_TransversAngle", "Charge_Vs_TransversAngle", 220, -20, 200, 500, 0, 2000);
437  tmp = dqmStore_->book2D("Charge_Vs_Alpha", "Charge_Vs_Alpha", 220, -20, 200, 500, 0, 2000);
439  tmp = dqmStore_->book2D("Charge_Vs_Beta", "Charge_Vs_Beta", 220, -20, 200, 500, 0, 2000);
441 
442  tmp = dqmStore_->book2D("NStrips_Vs_TransversAngle", "NStrips_Vs_TransversAngle", 220, -20, 200, 10, 0, 10);
444  tmp = dqmStore_->book2D("NStrips_Vs_Alpha", "NStrips_Vs_Alpha", 220, -20, 200, 10, 0, 10);
446  tmp = dqmStore_->book2D("NStrips_Vs_Beta", "NStrips_Vs_Beta", 220, -20, 200, 10, 0, 10);
448  tmp = dqmStore_->book1D("NHighStripInCluster", "NHighStripInCluster", 15, 0, 14);
450  tmp = dqmStore_->book1D("NSatStripInCluster", "NSatStripInCluster", 50, 0, 50);
452 
453  tmp = dqmStore_->book1D("TrackChi2OverNDF", "TrackChi2OverNDF", 500, 0, 10);
455  tmp = dqmStore_->book1D("TrackHits", "TrackHits", 40, 0, 40);
456  HTrackHits = tmp->getTH1F();
457 
458  tmp = dqmStore_->book1D("FirstStrip", "FirstStrip", 800, 0, 800);
459  HFirstStrip = tmp->getTH1F();
460 
461  if (strcmp(AlgoMode.c_str(), "MultiJob") != 0) {
462  tmp = dqmStore_->book2D("MPV_Vs_EtaTIB", "MPV_Vs_EtaTIB", 50, -3.0, 3.0, 300, 0, 600);
464  tmp = dqmStore_->book2D("MPV_Vs_EtaTID", "MPV_Vs_EtaTID", 50, -3.0, 3.0, 300, 0, 600);
466  tmp = dqmStore_->book2D("MPV_Vs_EtaTOB", "MPV_Vs_EtaTOB", 50, -3.0, 3.0, 300, 0, 600);
468  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC", "MPV_Vs_EtaTEC", 50, -3.0, 3.0, 300, 0, 600);
470  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC1", "MPV_Vs_EtaTEC1", 50, -3.0, 3.0, 300, 0, 600);
472  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC2", "MPV_Vs_EtaTEC2", 50, -3.0, 3.0, 300, 0, 600);
474 
475  tmp = dqmStore_->book2D("MPV_Vs_PhiTIB", "MPV_Vs_PhiTIB", 50, -3.2, 3.2, 300, 0, 600);
477  tmp = dqmStore_->book2D("MPV_Vs_PhiTID", "MPV_Vs_PhiTID", 50, -3.2, 3.2, 300, 0, 600);
479  tmp = dqmStore_->book2D("MPV_Vs_PhiTOB", "MPV_Vs_PhiTOB", 50, -3.2, 3.2, 300, 0, 600);
481  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC", "MPV_Vs_PhiTEC", 50, -3.2, 3.2, 300, 0, 600);
483  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC1", "MPV_Vs_PhiTEC1", 50, -3.2, 3.2, 300, 0, 600);
485  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC2", "MPV_Vs_PhiTEC2", 50, -3.2, 3.2, 300, 0, 600);
487 
488  tmp = dqmStore_->book1D("MPV_Vs_PathTIB", "MPV_Vs_PathTIB", 100, 0.2, 1.4);
490  tmp = dqmStore_->book1D("MPV_Vs_PathTID", "MPV_Vs_PathTID", 100, 0.2, 1.4);
492  tmp = dqmStore_->book1D("MPV_Vs_PathTOB", "MPV_Vs_PathTOB", 100, 0.2, 1.4);
494  tmp = dqmStore_->book1D("MPV_Vs_PathTEC", "MPV_Vs_PathTEC", 100, 0.2, 1.4);
496  tmp = dqmStore_->book1D("MPV_Vs_PathTEC1", "MPV_Vs_PathTEC1", 100, 0.2, 1.4);
498  tmp = dqmStore_->book1D("MPV_Vs_PathTEC2", "MPV_Vs_PathTEC2", 100, 0.2, 1.4);
500 
501  tmp = dqmStore_->book2D("MPV_Vs_Phi", "MPV_Vs_Phi", 50, -3.2, 3.2, 300, 0, 600);
502  MPV_Vs_Phi = tmp->getTH2F();
503  tmp = dqmStore_->book2D("MPV_Vs_Eta", "MPV_Vs_Eta", 50, -3.0, 3.0, 300, 0, 600);
504  MPV_Vs_Eta = tmp->getTH2F();
505  tmp = dqmStore_->book2D("MPV_Vs_R", "MPV_Vs_R", 150, 0.0, 150.0, 300, 0, 600);
506  MPV_Vs_R = tmp->getTH2F();
507  /*
508  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS1" , "MPV_Vs_PathLength_CS1" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS1 = tmp->getTH1F();
509  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS2" , "MPV_Vs_PathLength_CS2" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS2 = tmp->getTH1F();
510  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS3" , "MPV_Vs_PathLength_CS3" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS3 = tmp->getTH1F();
511  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS4" , "MPV_Vs_PathLength_CS4" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS4 = tmp->getTH1F();
512  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS5" , "MPV_Vs_PathLength_CS5" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS5 = tmp->getTH1F();
513 
514  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS1" , "FWHM_Vs_PathLength_CS1", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS1 = tmp->getTH1F();
515  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS2" , "FWHM_Vs_PathLength_CS2", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS2 = tmp->getTH1F();
516  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS3" , "FWHM_Vs_PathLength_CS3", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS3 = tmp->getTH1F();
517  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS4" , "FWHM_Vs_PathLength_CS4", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS4 = tmp->getTH1F();
518  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS5" , "FWHM_Vs_PathLength_CS5", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS5 = tmp->getTH1F();
519 */
520  tmp = dqmStore_->book1D("MPV_Vs_PathLength", "MPV_Vs_PathLength", 100, 0.2, 1.4);
522  tmp = dqmStore_->book1D("MPV_Vs_PathLength320", "MPV_Vs_PathLength", 100, 0.2, 1.4);
524  tmp = dqmStore_->book1D("MPV_Vs_PathLength500", "MPV_Vs_PathLength", 100, 0.2, 1.4);
526 
527  tmp = dqmStore_->book1D("FWHM_Vs_PathLength", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
529  tmp = dqmStore_->book1D("FWHM_Vs_PathLength320", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
531  tmp = dqmStore_->book1D("FWHM_Vs_PathLength500", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
533 
534  tmp = dqmStore_->book1D("MPV_Vs_TransversAngle", "MPV_Vs_TransversAngle", 220, -20, 200);
536  tmp = dqmStore_->book1D("MPV_Vs_Alpha", "MPV_Vs_Alpha", 220, -20, 200);
537  MPV_Vs_Alpha = tmp->getTH1F();
538  tmp = dqmStore_->book1D("MPV_Vs_Beta", "MPV_Vs_Beta", 220, -20, 200);
539  MPV_Vs_Beta = tmp->getTH1F();
540 
541  tmp = dqmStore_->book2D("Error_Vs_MPV", "Error_Vs_MPV", 600, 0, 600, 100, 0, 50);
542  Error_Vs_MPV = tmp->getTH2F();
543  tmp = dqmStore_->book2D("Error_Vs_Entries", "Error_Vs_Entries", 500, 0, 10000, 100, 0, 50);
545  tmp = dqmStore_->book2D("Error_Vs_Eta", "Error_Vs_Eta", 50, -3.0, 3.0, 100, 0, 50);
546  Error_Vs_Eta = tmp->getTH2F();
547  tmp = dqmStore_->book2D("Error_Vs_Phi", "Error_Vs_Phi", 50, -3.2, 3.2, 100, 0, 50);
548  Error_Vs_Phi = tmp->getTH2F();
549 
550  tmp = dqmStore_->book2D("NoMPV_Vs_EtaPhi", "NoMPV_Vs_EtaPhi", 50, -3.0, 3.0, 50, -3.2, 3.2);
552 
553  tmp = dqmStore_->book1D("NumberOfEntriesByAPV", "NumberOfEntriesByAPV", 1000, 0, 10000);
555  tmp = dqmStore_->book1D("Chi2OverNDF", "Chi2OverNDF", 500, 0, 25);
556  HChi2OverNDF = tmp->getTH1F();
557 
558  tmp = dqmStore_->book1D("MPVs", "MPVs", 600, 0, 600);
559  MPVs = tmp->getTH1F();
560  tmp = dqmStore_->book1D("MPVs320", "MPVs320", 600, 0, 600);
561  MPVs320 = tmp->getTH1F();
562  tmp = dqmStore_->book1D("MPVs500", "MPVs500", 600, 0, 600);
563  MPVs500 = tmp->getTH1F();
564 
565  // MPV_vs_10RplusEta tmp = dqmStore_->book2D ("MPV_vs_10RplusEta","MPV_vs_10RplusEta", 48000,0,2400, 800,100,500);
566  }
567 
568  gROOT->cd();
569 
570  auto const& Det = iSetup.getData(tkGeomToken_).dets();
571 
572  // if(strcmp(AlgoMode.c_str(),"MultiJob")!=0 && !FirstSetOfConstants){
573  if (!iSetup.getHandle(gainToken_)) {
574  printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");
575  exit(0);
576  }
577  // }
578 
579  unsigned int Id = 0;
580  for (unsigned int i = 0; i < Det.size(); i++) {
581  DetId Detid = Det[i]->geographicalId();
582  int SubDet = Detid.subdetId();
583 
584  if (SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID || SubDet == StripSubdetector::TOB ||
585  SubDet == StripSubdetector::TEC) {
586  auto DetUnit = dynamic_cast<StripGeomDetUnit const*>(Det[i]);
587  if (!DetUnit)
588  continue;
589 
590  const StripTopology& Topo = DetUnit->specificTopology();
591  unsigned int NAPV = Topo.nstrips() / 128;
592 
593  double Phi = DetUnit->position().basicVector().phi();
594  double Eta = DetUnit->position().basicVector().eta();
595  double R = DetUnit->position().basicVector().transverse();
596  double Thick = DetUnit->surface().bounds().thickness();
597 
598  for (unsigned int j = 0; j < NAPV; j++) {
599  stAPVGain* APV = new stAPVGain;
600  APV->Index = Id;
601  APV->DetId = Detid.rawId();
602  APV->APVId = j;
603  APV->SubDet = SubDet;
604  APV->MPV = -1;
605  APV->Gain = -1;
606  APV->PreviousGain = 1;
607  APV->Eta = Eta;
608  APV->Phi = Phi;
609  APV->R = R;
610  APV->Thickness = Thick;
611  APV->Side = 0;
612 
613  if (SubDet == StripSubdetector::TID) {
614  APV->Side = tTopo->tecSide(Detid);
615  } else if (SubDet == StripSubdetector::TEC) {
616  APV->Side = tTopo->tecSide(Detid);
617  }
618 
619  APVsCollOrdered.push_back(APV);
620  APVsColl[(APV->DetId << 3) | APV->APVId] = APV;
621  Id++;
622 
623  APV_DetId->Fill(Id, APV->DetId);
624  APV_Id->Fill(Id, APV->APVId);
625  APV_Eta->Fill(Id, APV->Eta);
626  APV_R->Fill(Id, APV->R);
627  APV_SubDet->Fill(Id, APV->SubDet);
628  APV_Thickness->Fill(Id, APV->Thickness);
629  }
630  }
631  }
632 
633  NEvent = 0;
634  SRun = 0;
635  SEvent = 0;
636  STimestamp = 0;
637  ERun = 0;
638  EEvent = 0;
639  ETimestamp = 0;
640 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
static constexpr auto TEC
virtual int nstrips() const =0
virtual TH2F * getTH2F() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
tuple SubDet
Definition: ntupleEnum.py:14
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
virtual TH1F * getTH1F() const
float Thickness
Definition: APVGainStruct.h:19
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int DetId
Definition: APVGainStruct.h:10
const edm::EventSetup * iSetup_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
double Gain
Definition: APVGainStruct.h:26
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
unsigned int SubDet
Definition: APVGainStruct.h:12
static constexpr auto TID
unsigned int tecSide(const DetId &id) const
void SiStripGainFromData::algoBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1136 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_PrevGain, stAPVGain::APVId, APVsCollOrdered, stAPVGain::DetId, beamvalidation::exit(), FirstSetOfConstants, gainToken_, edm::EventSetup::getHandle(), stAPVGain::Index, stAPVGain::PreviousGain, gpuVertexFinder::printf(), and Validation.

1136  {
1137  if ((strcmp(AlgoMode.c_str(), "MultiJob") != 0 && !FirstSetOfConstants) || Validation) {
1138  const auto gainHandle = iSetup.getHandle(gainToken_);
1139  if (!gainHandle.isValid()) {
1140  printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");
1141  exit(0);
1142  }
1143 
1144  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1145  stAPVGain* APV = *it;
1146 
1147  if (gainHandle.isValid()) {
1148  SiStripApvGain::Range detGainRange = gainHandle->getRange(APV->DetId);
1149  APV->PreviousGain = *(detGainRange.first + APV->APVId);
1150  // APV_PrevGain->Fill(APV->Index,APV->PreviousGain);
1151  APV_PrevGain->SetBinContent(APV_PrevGain->GetXaxis()->FindBin(APV->Index), APV->PreviousGain);
1152  if (APV->PreviousGain < 0)
1153  APV->PreviousGain = 1;
1154  } else {
1155  printf("GAIN HANDLE IS NOT VALID\n");
1156  }
1157  }
1158  }
1159 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
unsigned int DetId
Definition: APVGainStruct.h:10
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
std::pair< ContainerIterator, ContainerIterator > Range
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
void SiStripGainFromData::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 642 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_Charge, APV_CumulGain, APV_Gain, APV_Momentum, APV_MPV, APV_PathLength, APV_PathLengthM, stAPVGain::APVId, APVsColl, APVsCollOrdered, b, hcaldqm::constants::BAD, newFWLiteAna::bin, CalibrationLevel, dqm::implementation::DQMStore::cd(), Charge_TEC, Charge_TEC1, Charge_TEC2, Charge_TECM, Charge_TECP, Charge_TIB, Charge_TID, Charge_TIDM, Charge_TIDP, Charge_TOB, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, CheckIfFileExist, stAPVGain::DetId, dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, stAPVGain::Eta, validate-o2o-wbm::f, mergeVDriftHistosByStation::file, FirstSetOfConstants, FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, stAPVGain::Gain, getPeakOfLandau(), hcaldqm::constants::GOOD, HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, Exhume::I, stAPVGain::Index, dqmiolumiharvest::j, JobInfo, MaxMPVError, stAPVGain::MPV, MPV_Vs_Alpha, MPV_Vs_Beta, MPV_Vs_Eta, MPV_Vs_EtaTEC, MPV_Vs_EtaTEC1, MPV_Vs_EtaTEC2, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PathLength, MPV_Vs_PathLength320, MPV_Vs_PathLength500, MPV_Vs_PathTEC, MPV_Vs_PathTEC1, MPV_Vs_PathTEC2, MPV_Vs_PathTIB, MPV_Vs_PathTID, MPV_Vs_PathTOB, MPV_Vs_Phi, MPV_Vs_PhiTEC, MPV_Vs_PhiTEC1, MPV_Vs_PhiTEC2, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPV_Vs_R, MPV_Vs_TransversAngle, MPVs, MPVs320, MPVs500, NEvent, NHighStripInCluster, NoMPV_Vs_EtaPhi, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_TransversAngle, NumberOfEntriesByAPV, OutputGains, OutputHistos, stAPVGain::Phi, stAPVGain::PreviousGain, gpuVertexFinder::printf(), stAPVGain::R, dqm::implementation::DQMStore::save(), SEvent, stAPVGain::Side, SRun, stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and VInputFiles.

642  {
643  unsigned int I = 0;
644 
645  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0 || strcmp(AlgoMode.c_str(), "Merge") == 0) {
646  TH1::AddDirectory(kTRUE);
647 
648  TFile* file = nullptr;
649  for (unsigned int f = 0; f < VInputFiles.size(); f++) {
650  printf("Loading New Input File : %s\n", VInputFiles[f].c_str());
651  if (CheckIfFileExist) {
652  FILE* doesFileExist = fopen(VInputFiles[f].c_str(), "r");
653  if (!doesFileExist) {
654  printf("File %s doesn't exist\n", VInputFiles[f].c_str());
655  continue;
656  } else {
657  fclose(doesFileExist);
658  }
659  }
660  file = new TFile(VInputFiles[f].c_str());
661  if (!file || file->IsZombie()) {
662  printf("### Bug With File %s\n### File will be skipped \n", VInputFiles[f].c_str());
663  continue;
664  }
665  APV_Charge->Add((TH1*)file->FindObjectAny("APV_Charge"), 1);
666  APV_Momentum->Add((TH1*)file->FindObjectAny("APV_Momentum"), 1);
667  APV_PathLength->Add((TH1*)file->FindObjectAny("APV_PathLength"), 1);
668 
669  Tracks_P_Vs_Eta->Add((TH1*)file->FindObjectAny("Tracks_P_Vs_Eta"), 1);
670  Tracks_Pt_Vs_Eta->Add((TH1*)file->FindObjectAny("Tracks_Pt_Vs_Eta"), 1);
671 
672  Charge_Vs_PathTIB->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTIB"), 1);
673  Charge_Vs_PathTID->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTID"), 1);
674  Charge_Vs_PathTOB->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTOB"), 1);
675  Charge_Vs_PathTEC->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC"), 1);
676  Charge_Vs_PathTEC1->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC1"), 1);
677  Charge_Vs_PathTEC2->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC2"), 1);
678 
679  HTrackChi2OverNDF->Add((TH1*)file->FindObjectAny("TrackChi2OverNDF"), 1);
680  HTrackHits->Add((TH1*)file->FindObjectAny("TrackHits"), 1);
681 
682  NHighStripInCluster->Add((TH1*)file->FindObjectAny("NHighStripInCluster"), 1);
683  NSatStripInCluster->Add((TH1*)file->FindObjectAny("NSatStripInCluster"), 1);
684  Charge_Vs_PathLength->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength"), 1);
685  Charge_Vs_PathLength320->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength320"), 1);
686  Charge_Vs_PathLength500->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength500"), 1);
687  Charge_Vs_TransversAngle->Add((TH1*)file->FindObjectAny("Charge_Vs_TransversAngle"), 1);
688  NStrips_Vs_TransversAngle->Add((TH1*)file->FindObjectAny("NStrips_Vs_TransversAngle"), 1);
689  Charge_Vs_Alpha->Add((TH1*)file->FindObjectAny("Charge_Vs_Alpha"), 1);
690  NStrips_Vs_Alpha->Add((TH1*)file->FindObjectAny("NStrips_Vs_Alpha"), 1);
691  HFirstStrip->Add((TH1*)file->FindObjectAny("FirstStrip"), 1);
692 
693  TH1F* JobInfo_tmp = (TH1F*)file->FindObjectAny("JobInfo");
694  NEvent += (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(1));
695  unsigned int tmp_SRun = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(3));
696  unsigned int tmp_SEvent = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(4));
697  unsigned int tmp_ERun = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(6));
698  unsigned int tmp_EEvent = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(7));
699 
700  if (SRun == 0)
701  SRun = tmp_SRun;
702 
703  if (tmp_SRun < SRun) {
704  SRun = tmp_SRun;
705  SEvent = tmp_SEvent;
706  } else if (tmp_SRun == SRun && tmp_SEvent < SEvent) {
707  SEvent = tmp_SEvent;
708  }
709 
710  if (tmp_ERun > ERun) {
711  ERun = tmp_ERun;
712  EEvent = tmp_EEvent;
713  } else if (tmp_ERun == ERun && tmp_EEvent > EEvent) {
714  EEvent = tmp_EEvent;
715  }
716 
717  printf("Deleting Current Input File\n");
718  file->Close();
719  delete file;
720  }
721  }
722 
723  JobInfo->Fill(1, NEvent);
724  JobInfo->Fill(3, SRun);
725  JobInfo->Fill(4, SEvent);
726  JobInfo->Fill(6, ERun);
727  JobInfo->Fill(7, EEvent);
728 
729  if (strcmp(AlgoMode.c_str(), "MultiJob") != 0) {
730  TH1D* Proj = nullptr;
731  double FitResults[5];
732  I = 0;
733  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++) {
734  if (I % 3650 == 0)
735  printf("Fitting Histograms \t %6.2f%%\n", (100.0 * I) / APVsColl.size());
736  I++;
737  stAPVGain* APV = it->second;
738 
739  int bin = APV_Charge->GetXaxis()->FindBin(APV->Index);
740  Proj = APV_Charge->ProjectionY(" ", bin, bin, "e");
741  Proj = (TH1D*)Proj->Clone();
742  if (Proj == nullptr)
743  continue;
744 
745  // ADD PROJECTTIONS COMMING FROM THE SECOND APV IN THE PAIR
746  if (CalibrationLevel == 1) {
747  int SecondAPVId = APV->APVId;
748  if (SecondAPVId % 2 == 0) {
749  SecondAPVId = SecondAPVId + 1;
750  } else {
751  SecondAPVId = SecondAPVId - 1;
752  }
753  stAPVGain* APV2 = APVsColl[(APV->DetId << 3) | SecondAPVId];
754 
755  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
756  TH1D* Proj2 = APV_Charge->ProjectionY(" ", bin2, bin2, "e");
757  if (Proj2 != nullptr) {
758  Proj->Add(Proj2, 1);
759  }
760  } else if (CalibrationLevel > 1) {
761  // printf("%8i %i--> %4.0f + %4.0f\n",APV->DetId, APV->APVId, 0.0, Proj->GetEntries());
762  for (auto it2 = APVsColl.begin(); it2 != APVsColl.end(); it2++) {
763  stAPVGain* APV2 = it2->second;
764 
765  if (APV2->DetId != APV->DetId)
766  continue;
767  if (APV2->APVId == APV->APVId)
768  continue;
769 
770  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
771  TH1D* Proj2 = APV_Charge->ProjectionY(" ", bin2, bin2, "e");
772  if (Proj2 != nullptr) {
773  // printf("%8i %i--> %4.0f + %4.0f\n",APV2->DetId, APV2->APVId, Proj->GetEntries(), Proj2->GetEntries());
774  Proj->Add(Proj2, 1);
775  }
776  }
777  // printf("%8i %i--> %4.0f Full\n",APV->DetId, APV->APVId, Proj->GetEntries());
778  }
779 
780  //std::cout << "Proj->GetEntries(): " << Proj->GetEntries() << ", Proj->GetMean(): " << Proj->GetMean() << std::endl;
781 
782  getPeakOfLandau(Proj, FitResults);
783  APV->MPV = FitResults[0];
784  // printf("MPV = %f - %f\n",FitResults[0], FitResults[1]);
785  if (FitResults[0] != -0.5 && FitResults[1] < MaxMPVError) {
786  APV_MPV->Fill(APV->Index, APV->MPV);
787  MPVs->Fill(APV->MPV);
788  if (APV->Thickness < 0.04)
789  MPVs320->Fill(APV->MPV);
790  if (APV->Thickness > 0.04)
791  MPVs500->Fill(APV->MPV);
792 
793  MPV_Vs_R->Fill(APV->R, APV->MPV);
794  MPV_Vs_Eta->Fill(APV->Eta, APV->MPV);
795  if (APV->SubDet == StripSubdetector::TIB)
796  MPV_Vs_EtaTIB->Fill(APV->Eta, APV->MPV);
797  if (APV->SubDet == StripSubdetector::TID)
798  MPV_Vs_EtaTID->Fill(APV->Eta, APV->MPV);
799  if (APV->SubDet == StripSubdetector::TOB)
800  MPV_Vs_EtaTOB->Fill(APV->Eta, APV->MPV);
801  if (APV->SubDet == StripSubdetector::TEC) {
802  MPV_Vs_EtaTEC->Fill(APV->Eta, APV->MPV);
803  if (APV->Thickness < 0.04)
804  MPV_Vs_EtaTEC1->Fill(APV->Eta, APV->MPV);
805  if (APV->Thickness > 0.04)
806  MPV_Vs_EtaTEC2->Fill(APV->Eta, APV->MPV);
807  }
808  MPV_Vs_Phi->Fill(APV->Phi, APV->MPV);
809  if (APV->SubDet == StripSubdetector::TIB)
810  MPV_Vs_PhiTIB->Fill(APV->Phi, APV->MPV);
811  if (APV->SubDet == StripSubdetector::TID)
812  MPV_Vs_PhiTID->Fill(APV->Phi, APV->MPV);
813  if (APV->SubDet == StripSubdetector::TOB)
814  MPV_Vs_PhiTOB->Fill(APV->Phi, APV->MPV);
815  if (APV->SubDet == StripSubdetector::TEC) {
816  MPV_Vs_PhiTEC->Fill(APV->Phi, APV->MPV);
817  if (APV->Thickness < 0.04)
818  MPV_Vs_PhiTEC1->Fill(APV->Phi, APV->MPV);
819  if (APV->Thickness > 0.04)
820  MPV_Vs_PhiTEC2->Fill(APV->Phi, APV->MPV);
821  }
822 
823  if (APV->SubDet == StripSubdetector::TIB)
824  Charge_TIB->Add(Proj, 1);
825  if (APV->SubDet == StripSubdetector::TID) {
826  Charge_TID->Add(Proj, 1);
827  if (APV->Side == 1)
828  Charge_TIDM->Add(Proj, 1);
829  if (APV->Side == 2)
830  Charge_TIDP->Add(Proj, 1);
831  }
832  if (APV->SubDet == StripSubdetector::TOB)
833  Charge_TOB->Add(Proj, 1);
834  if (APV->SubDet == StripSubdetector::TEC) {
835  Charge_TEC->Add(Proj, 1);
836  if (APV->Thickness < 0.04)
837  Charge_TEC1->Add(Proj, 1);
838  if (APV->Thickness > 0.04)
839  Charge_TEC2->Add(Proj, 1);
840  if (APV->Side == 1)
841  Charge_TECM->Add(Proj, 1);
842  if (APV->Side == 2)
843  Charge_TECP->Add(Proj, 1);
844  }
845  }
846 
847  if (APV->SubDet == StripSubdetector::TIB)
848  Charge_TIB->Add(Proj, 1);
849  if (APV->SubDet == StripSubdetector::TID) {
850  Charge_TID->Add(Proj, 1);
851  if (APV->Side == 1)
852  Charge_TIDM->Add(Proj, 1);
853  if (APV->Side == 2)
854  Charge_TIDP->Add(Proj, 1);
855  }
856  if (APV->SubDet == StripSubdetector::TOB)
857  Charge_TOB->Add(Proj, 1);
858  if (APV->SubDet == StripSubdetector::TEC) {
859  Charge_TEC->Add(Proj, 1);
860  if (APV->Thickness < 0.04)
861  Charge_TEC1->Add(Proj, 1);
862  if (APV->Thickness > 0.04)
863  Charge_TEC2->Add(Proj, 1);
864  if (APV->Side == 1)
865  Charge_TECM->Add(Proj, 1);
866  if (APV->Side == 2)
867  Charge_TECP->Add(Proj, 1);
868  }
869 
870  if (FitResults[0] != -0.5) {
871  HChi2OverNDF->Fill(FitResults[4]);
872  Error_Vs_MPV->Fill(FitResults[0], FitResults[1]);
873  Error_Vs_Entries->Fill(Proj->GetEntries(), FitResults[1]);
874  Error_Vs_Eta->Fill(APV->Eta, FitResults[1]);
875  Error_Vs_Phi->Fill(APV->Phi, FitResults[1]);
876  }
877  NumberOfEntriesByAPV->Fill(Proj->GetEntries());
878  delete Proj;
879 
880  Proj = APV_PathLength->ProjectionY(" ", bin, bin, "e");
881  if (Proj == nullptr)
882  continue;
883 
884  APV_PathLengthM->SetBinContent(APV->Index, Proj->GetMean(1));
885  APV_PathLengthM->SetBinError(APV->Index, Proj->GetMeanError(1));
886  // delete Proj;
887  }
888 
889  unsigned int GOOD = 0;
890  unsigned int BAD = 0;
891  double MPVmean = MPVs->GetMean();
892  MPVmean = 300;
893  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++) {
894  stAPVGain* APV = it->second;
895  if (APV->MPV > 0) {
896  APV->Gain = APV->MPV / MPVmean; // APV->MPV;
897  GOOD++;
898  } else {
899  NoMPV_Vs_EtaPhi->Fill(APV->Eta, APV->Phi);
900  APV->Gain = 1;
901  BAD++;
902  }
903  if (APV->Gain <= 0)
904  APV->Gain = 1;
905  APV_Gain->Fill(APV->Index, APV->Gain);
906 
907  if (!FirstSetOfConstants)
908  APV->Gain *= APV->PreviousGain;
909  APV_CumulGain->Fill(APV->Index, APV->Gain);
910  }
911 
912  for (int j = 0; j < Charge_Vs_PathLength->GetXaxis()->GetNbins(); j++) {
913  Proj = Charge_Vs_PathLength->ProjectionY(" ", j, j, "e");
914  getPeakOfLandau(Proj, FitResults);
915  if (FitResults[0] == -0.5)
916  continue;
917  MPV_Vs_PathLength->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
918  MPV_Vs_PathLength->SetBinError(j, FitResults[1] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
919  FWHM_Vs_PathLength->SetBinContent(
920  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)));
921  FWHM_Vs_PathLength->SetBinError(
922  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)));
923  delete Proj;
924  }
925 
926  for (int j = 0; j < Charge_Vs_PathLength320->GetXaxis()->GetNbins(); j++) {
927  Proj = Charge_Vs_PathLength320->ProjectionY(" ", j, j, "e");
928  getPeakOfLandau(Proj, FitResults);
929  if (FitResults[0] == -0.5)
930  continue;
931  MPV_Vs_PathLength320->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
932  MPV_Vs_PathLength320->SetBinError(j, FitResults[1] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
933  FWHM_Vs_PathLength320->SetBinContent(
934  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)));
935  FWHM_Vs_PathLength320->SetBinError(
936  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)));
937  delete Proj;
938  }
939 
940  for (int j = 0; j < Charge_Vs_PathLength500->GetXaxis()->GetNbins(); j++) {
941  Proj = Charge_Vs_PathLength500->ProjectionY(" ", j, j, "e");
942  getPeakOfLandau(Proj, FitResults);
943  if (FitResults[0] == -0.5)
944  continue;
945  MPV_Vs_PathLength500->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
946  MPV_Vs_PathLength500->SetBinError(j, FitResults[1] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
947  FWHM_Vs_PathLength500->SetBinContent(
948  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j)));
949  FWHM_Vs_PathLength500->SetBinError(
950  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j)));
951  delete Proj;
952  }
953  /*
954  for(int j=0;j<Charge_Vs_PathLength_CS1->GetXaxis()->GetNbins();j++){
955  Proj = Charge_Vs_PathLength_CS1->ProjectionY(" ",j,j,"e");
956  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
957  MPV_Vs_PathLength_CS1->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
958  MPV_Vs_PathLength_CS1->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
959  FWHM_Vs_PathLength_CS1->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
960  FWHM_Vs_PathLength_CS1->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
961  delete Proj;
962  }
963 
964  for(int j=0;j<Charge_Vs_PathLength_CS2->GetXaxis()->GetNbins();j++){
965  Proj = Charge_Vs_PathLength_CS2->ProjectionY(" ",j,j,"e");
966  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
967  MPV_Vs_PathLength_CS2->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
968  MPV_Vs_PathLength_CS2->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
969  FWHM_Vs_PathLength_CS2->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
970  FWHM_Vs_PathLength_CS2->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
971  delete Proj;
972  }
973 
974  for(int j=0;j<Charge_Vs_PathLength_CS3->GetXaxis()->GetNbins();j++){
975  Proj = Charge_Vs_PathLength_CS3->ProjectionY(" ",j,j,"e");
976  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
977  MPV_Vs_PathLength_CS3->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
978  MPV_Vs_PathLength_CS3->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
979  FWHM_Vs_PathLength_CS3->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
980  FWHM_Vs_PathLength_CS3->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
981  delete Proj;
982  }
983 
984  for(int j=0;j<Charge_Vs_PathLength_CS4->GetXaxis()->GetNbins();j++){
985  Proj = Charge_Vs_PathLength_CS4->ProjectionY(" ",j,j,"e");
986  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
987  MPV_Vs_PathLength_CS4->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
988  MPV_Vs_PathLength_CS4->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
989  FWHM_Vs_PathLength_CS4->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
990  FWHM_Vs_PathLength_CS4->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
991  delete Proj;
992  }
993 
994  for(int j=0;j<Charge_Vs_PathLength_CS5->GetXaxis()->GetNbins();j++){
995  Proj = Charge_Vs_PathLength_CS5->ProjectionY(" ",j,j,"e");
996  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
997  MPV_Vs_PathLength_CS5->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
998  MPV_Vs_PathLength_CS5->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
999  FWHM_Vs_PathLength_CS5->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
1000  FWHM_Vs_PathLength_CS5->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
1001  delete Proj;
1002  }
1003 */
1004 
1005  for (int j = 0; j < Charge_Vs_PathTIB->GetXaxis()->GetNbins(); j++) {
1006  Proj = Charge_Vs_PathTIB->ProjectionY(" ", j, j, "e");
1007  getPeakOfLandau(Proj, FitResults);
1008  if (FitResults[0] == -0.5)
1009  continue;
1010  MPV_Vs_PathTIB->SetBinContent(j, FitResults[0] / Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
1011  MPV_Vs_PathTIB->SetBinError(j, FitResults[1] / Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
1012  delete Proj;
1013  }
1014 
1015  for (int j = 0; j < Charge_Vs_PathTID->GetXaxis()->GetNbins(); j++) {
1016  Proj = Charge_Vs_PathTID->ProjectionY(" ", j, j, "e");
1017  getPeakOfLandau(Proj, FitResults);
1018  if (FitResults[0] == -0.5)
1019  continue;
1020  MPV_Vs_PathTID->SetBinContent(j, FitResults[0] / Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
1021  MPV_Vs_PathTID->SetBinError(j, FitResults[1] / Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
1022  delete Proj;
1023  }
1024 
1025  for (int j = 0; j < Charge_Vs_PathTOB->GetXaxis()->GetNbins(); j++) {
1026  Proj = Charge_Vs_PathTOB->ProjectionY(" ", j, j, "e");
1027  getPeakOfLandau(Proj, FitResults);
1028  if (FitResults[0] == -0.5)
1029  continue;
1030  MPV_Vs_PathTOB->SetBinContent(j, FitResults[0] / Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
1031  MPV_Vs_PathTOB->SetBinError(j, FitResults[1] / Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
1032  delete Proj;
1033  }
1034 
1035  for (int j = 0; j < Charge_Vs_PathTEC->GetXaxis()->GetNbins(); j++) {
1036  Proj = Charge_Vs_PathTEC->ProjectionY(" ", j, j, "e");
1037  getPeakOfLandau(Proj, FitResults);
1038  if (FitResults[0] == -0.5)
1039  continue;
1040  MPV_Vs_PathTEC->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
1041  MPV_Vs_PathTEC->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
1042  delete Proj;
1043  }
1044 
1045  for (int j = 0; j < Charge_Vs_PathTEC1->GetXaxis()->GetNbins(); j++) {
1046  Proj = Charge_Vs_PathTEC1->ProjectionY(" ", j, j, "e");
1047  getPeakOfLandau(Proj, FitResults);
1048  if (FitResults[0] == -0.5)
1049  continue;
1050  MPV_Vs_PathTEC1->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
1051  MPV_Vs_PathTEC1->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
1052  delete Proj;
1053  }
1054 
1055  for (int j = 0; j < Charge_Vs_PathTEC2->GetXaxis()->GetNbins(); j++) {
1056  Proj = Charge_Vs_PathTEC2->ProjectionY(" ", j, j, "e");
1057  getPeakOfLandau(Proj, FitResults);
1058  if (FitResults[0] == -0.5)
1059  continue;
1060  MPV_Vs_PathTEC2->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
1061  MPV_Vs_PathTEC2->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
1062  delete Proj;
1063  }
1064 
1065  for (int j = 1; j < Charge_Vs_TransversAngle->GetXaxis()->GetNbins(); j++) {
1066  Proj = Charge_Vs_TransversAngle->ProjectionY(" ", j, j, "e");
1067  getPeakOfLandau(Proj, FitResults);
1068  if (FitResults[0] == -0.5)
1069  continue;
1070  MPV_Vs_TransversAngle->SetBinContent(j, FitResults[0]);
1071  MPV_Vs_TransversAngle->SetBinError(j, FitResults[1]);
1072  delete Proj;
1073  }
1074 
1075  for (int j = 1; j < Charge_Vs_Alpha->GetXaxis()->GetNbins(); j++) {
1076  Proj = Charge_Vs_Alpha->ProjectionY(" ", j, j, "e");
1077  getPeakOfLandau(Proj, FitResults);
1078  if (FitResults[0] == -0.5)
1079  continue;
1080  MPV_Vs_Alpha->SetBinContent(j, FitResults[0]);
1081  MPV_Vs_Alpha->SetBinError(j, FitResults[1]);
1082  delete Proj;
1083  }
1084 
1085  for (int j = 1; j < Charge_Vs_Beta->GetXaxis()->GetNbins(); j++) {
1086  Proj = Charge_Vs_Beta->ProjectionY(" ", j, j, "e");
1087  getPeakOfLandau(Proj, FitResults);
1088  if (FitResults[0] == -0.5)
1089  continue;
1090  MPV_Vs_Beta->SetBinContent(j, FitResults[0]);
1091  MPV_Vs_Beta->SetBinError(j, FitResults[1]);
1092  delete Proj;
1093  }
1094 
1095  FILE* Gains = fopen(OutputGains.c_str(), "w");
1096  fprintf(Gains, "NEvents = %i\n", NEvent);
1097  fprintf(Gains, "Number of APVs = %lu\n", static_cast<unsigned long>(APVsColl.size()));
1098  fprintf(Gains, "GoodFits = %i BadFits = %i ratio = %f\n", GOOD, BAD, (100.0 * GOOD) / (GOOD + BAD));
1099  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1100  stAPVGain* APV = *it;
1101  fprintf(Gains,
1102  "%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n",
1103  APV->DetId,
1104  APV->APVId,
1105  APV->PreviousGain,
1106  APV->Gain);
1107  }
1108 
1109  std::vector<int> DetIdOfBuggedAPV;
1110  fprintf(Gains, "----------------------------------------------------------------------\n");
1111  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1112  stAPVGain* APV = *it;
1113  if (APV->MPV > 0 && APV->MPV < 200) {
1114  bool tmpBug = false;
1115  for (unsigned int b = 0; b < DetIdOfBuggedAPV.size() && !tmpBug; b++) {
1116  if (DetIdOfBuggedAPV[b] == APV->DetId)
1117  tmpBug = true;
1118  }
1119  if (!tmpBug) {
1120  fprintf(Gains, "%i,\n", APV->DetId);
1121  DetIdOfBuggedAPV.push_back(APV->DetId);
1122  }
1123  }
1124  }
1125 
1126  fclose(Gains);
1127 
1128  // delete [] FitResults;
1129  // delete Proj;
1130  }
1131 
1132  dqmStore_->cd();
1134 }
static constexpr auto TEC
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
float Thickness
Definition: APVGainStruct.h:19
unsigned int DetId
Definition: APVGainStruct.h:10
vector< string > VInputFiles
double Gain
Definition: APVGainStruct.h:26
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
const std::complex< double > I
Definition: I.h:8
double const GOOD
Definition: Constants.h:13
static constexpr auto TOB
double const BAD
Definition: Constants.h:15
static constexpr auto TIB
double b
Definition: hdecay.h:118
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:784
unsigned int SubDet
Definition: APVGainStruct.h:12
static constexpr auto TID
double SiStripGainFromData::ComputeChargeOverPath ( const SiStripCluster Cluster,
TrajectoryStateOnSurface  trajState,
const edm::EventSetup iSetup,
const Track track,
double  trajChi2OverN 
)
private

Definition at line 1259 of file SiStripGainFromData.cc.

References a, AllowSaturation, alpha, SiStripCluster::amplitudes(), sistrip::APV, APV_Charge, APV_Momentum, APV_PathLength, APVsColl, HLT_FULL_cff::beta, PixelTestBeamValidation_cfi::Charge, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, SiStripCluster::firstStrip(), TrajectoryStateOnSurface::globalMomentum(), HFirstStrip, stAPVGain::Index, IsFarFromBorder(), TrajectoryStateOnSurface::localDirection(), PV3DBase< T, PVType, FrameType >::mag(), MaxNrStrips, NHighStripInCluster, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, fed_dqm_sourceclient-live_cfg::path, funct::pow(), stAPVGain::PreviousGain, mathSSE::sqrt(), stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Validation, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by algoAnalyze().

1263  {
1264  LocalVector trackDirection = trajState.localDirection();
1265  double cosine = trackDirection.z() / trackDirection.mag();
1266  auto const& Ampls = Cluster->amplitudes();
1267  uint32_t DetId = 0; // is 0 since long time Cluster->geographicalId();
1268  int FirstStrip = Cluster->firstStrip();
1269  int APVId = FirstStrip / 128;
1270  stAPVGain* APV = APVsColl[(DetId << 3) | APVId];
1271  int Saturation = 0;
1272  bool Overlaping = false;
1273  int Charge = 0;
1274  unsigned int NHighStrip = 0;
1275 
1276  if (!IsFarFromBorder(trajState, DetId, iSetup))
1277  return -1;
1278 
1279  if (FirstStrip == 0)
1280  Overlaping = true;
1281  if (FirstStrip == 128)
1282  Overlaping = true;
1283  if (FirstStrip == 256)
1284  Overlaping = true;
1285  if (FirstStrip == 384)
1286  Overlaping = true;
1287  if (FirstStrip == 512)
1288  Overlaping = true;
1289  if (FirstStrip == 640)
1290  Overlaping = true;
1291 
1292  if (FirstStrip <= 127 && FirstStrip + Ampls.size() > 127)
1293  Overlaping = true;
1294  if (FirstStrip <= 255 && FirstStrip + Ampls.size() > 255)
1295  Overlaping = true;
1296  if (FirstStrip <= 383 && FirstStrip + Ampls.size() > 383)
1297  Overlaping = true;
1298  if (FirstStrip <= 511 && FirstStrip + Ampls.size() > 511)
1299  Overlaping = true;
1300  if (FirstStrip <= 639 && FirstStrip + Ampls.size() > 639)
1301  Overlaping = true;
1302 
1303  if (FirstStrip + Ampls.size() == 127)
1304  Overlaping = true;
1305  if (FirstStrip + Ampls.size() == 255)
1306  Overlaping = true;
1307  if (FirstStrip + Ampls.size() == 383)
1308  Overlaping = true;
1309  if (FirstStrip + Ampls.size() == 511)
1310  Overlaping = true;
1311  if (FirstStrip + Ampls.size() == 639)
1312  Overlaping = true;
1313  if (FirstStrip + Ampls.size() == 767)
1314  Overlaping = true;
1315  if (Overlaping)
1316  return -1;
1317 
1318  /*
1319  if(FirstStrip==0 )Overlaping=true;
1320  if(FirstStrip<=255 && FirstStrip+Ampls.size()>255)Overlaping=true;
1321  if(FirstStrip<=511 && FirstStrip+Ampls.size()>511)Overlaping=true;
1322  if(FirstStrip+Ampls.size()==511 )Overlaping=true;
1323  if(FirstStrip+Ampls.size()==767 )Overlaping=true;
1324  if(Overlaping)return -1;
1325 */
1326 
1327  for (unsigned int a = 0; a < Ampls.size(); a++) {
1328  Charge += Ampls[a];
1329  if (Ampls[a] >= 254)
1330  Saturation++;
1331  if (Ampls[a] >= 20)
1332  NHighStrip++;
1333  }
1334  double path = (10.0 * APV->Thickness) / fabs(cosine);
1335  double ClusterChargeOverPath = (double)Charge / path;
1336 
1337  NSatStripInCluster->Fill(Saturation);
1338 
1339  if (Ampls.size() > MaxNrStrips)
1340  return -1;
1341  if (Saturation > 0 && !AllowSaturation)
1342  return -1;
1343  Charge_Vs_PathLength->Fill(path, Charge);
1344  if (APV->Thickness < 0.04)
1345  Charge_Vs_PathLength320->Fill(path, Charge);
1346  if (APV->Thickness > 0.04)
1347  Charge_Vs_PathLength500->Fill(path, Charge);
1348  if (APV->SubDet == StripSubdetector::TIB)
1349  Charge_Vs_PathTIB->Fill(path, Charge);
1350  if (APV->SubDet == StripSubdetector::TID)
1351  Charge_Vs_PathTID->Fill(path, Charge);
1352  if (APV->SubDet == StripSubdetector::TOB)
1353  Charge_Vs_PathTOB->Fill(path, Charge);
1354  if (APV->SubDet == StripSubdetector::TEC) {
1355  Charge_Vs_PathTEC->Fill(path, Charge);
1356  if (APV->Thickness < 0.04)
1357  Charge_Vs_PathTEC1->Fill(path, Charge);
1358  if (APV->Thickness > 0.04)
1359  Charge_Vs_PathTEC2->Fill(path, Charge);
1360  }
1361 
1362  double trans = atan2(trackDirection.y(), trackDirection.x()) * (180 / 3.14159265);
1363  double alpha =
1364  acos(trackDirection.x() / sqrt(pow(trackDirection.x(), 2) + pow(trackDirection.z(), 2))) * (180 / 3.14159265);
1365  double beta =
1366  acos(trackDirection.y() / sqrt(pow(trackDirection.x(), 2) + pow(trackDirection.z(), 2))) * (180 / 3.14159265);
1367 
1368  if (path > 0.4 && path < 0.45) {
1369  Charge_Vs_TransversAngle->Fill(trans, Charge / path);
1370  Charge_Vs_Alpha->Fill(alpha, Charge / path);
1371  Charge_Vs_Beta->Fill(beta, Charge / path);
1372  }
1373 
1374  NStrips_Vs_TransversAngle->Fill(trans, Ampls.size());
1375  NStrips_Vs_Alpha->Fill(alpha, Ampls.size());
1376  NStrips_Vs_Beta->Fill(beta, Ampls.size());
1377 
1378  NHighStripInCluster->Fill(NHighStrip);
1379  // if(NHighStrip==1) Charge_Vs_PathLength_CS1->Fill(path, Charge );
1380  // if(NHighStrip==2) Charge_Vs_PathLength_CS2->Fill(path, Charge );
1381  // if(NHighStrip==3) Charge_Vs_PathLength_CS3->Fill(path, Charge );
1382  // if(NHighStrip==4) Charge_Vs_PathLength_CS4->Fill(path, Charge );
1383  // if(NHighStrip==5) Charge_Vs_PathLength_CS5->Fill(path, Charge );
1384 
1385  HFirstStrip->Fill(FirstStrip);
1386 
1387  if (Validation) {
1388  ClusterChargeOverPath = ClusterChargeOverPath / APV->PreviousGain;
1389  }
1390 
1391  APV_Charge->Fill(APV->Index, ClusterChargeOverPath);
1392  APV_Momentum->Fill(APV->Index, trajState.globalMomentum().mag());
1393  APV_PathLength->Fill(APV->Index, path);
1394 
1395  return ClusterChargeOverPath;
1396 }
static constexpr auto TEC
float alpha
Definition: AMPTWrapper.h:105
LocalVector localDirection() const
float Thickness
Definition: APVGainStruct.h:19
SiStripCluster const & amplitudes() const
bool IsFarFromBorder(TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
T y() const
Definition: PV3DBase.h:60
uint16_t firstStrip() const
T mag() const
Definition: PV3DBase.h:64
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
GlobalVector globalMomentum() const
double a
Definition: hdecay.h:119
T x() const
Definition: PV3DBase.h:59
unsigned int SubDet
Definition: APVGainStruct.h:12
static constexpr auto TID
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
std::unique_ptr< SiStripApvGain > SiStripGainFromData::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1488 of file SiStripGainFromData.cc.

References a, AlgoMode, sistrip::APV, stAPVGain::APVId, APVsCollOrdered, gather_cfg::cout, stAPVGain::DetId, stAPVGain::Gain, getGTfromDQMFile::obj, stAPVGain::PreviousGain, gpuVertexFinder::printf(), and sistrip::SpyUtilities::range().

1488  {
1489  cout << "START getNewObject\n";
1490 
1491  // if( !(strcmp(AlgoMode.c_str(),"WriteOnDB")==0 || strcmp(AlgoMode.c_str(),"SingleJob")==0) )return NULL;
1492  if (!(strcmp(AlgoMode.c_str(), "WriteOnDB") == 0 || strcmp(AlgoMode.c_str(), "SingleJob") == 0))
1493  return std::make_unique<SiStripApvGain>();
1494 
1495  auto obj = std::make_unique<SiStripApvGain>();
1496  std::vector<float>* theSiStripVector = nullptr;
1497  int PreviousDetId = -1;
1498  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1500  if (APV == nullptr) {
1501  printf("Bug\n");
1502  continue;
1503  }
1504  if (APV->DetId != PreviousDetId) {
1505  if (theSiStripVector != nullptr) {
1506  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1507  if (!obj->put(PreviousDetId, range))
1508  printf("Bug to put detId = %i\n", PreviousDetId);
1509  }
1510 
1511  theSiStripVector = new std::vector<float>;
1512  PreviousDetId = APV->DetId;
1513  }
1514  printf("%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId, APV->APVId, APV->PreviousGain, APV->Gain);
1515  theSiStripVector->push_back(APV->Gain);
1516  // theSiStripVector->push_back(APV->Gain);
1517  }
1518 
1519  if (theSiStripVector != nullptr) {
1520  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1521  if (!obj->put(PreviousDetId, range))
1522  printf("Bug to put detId = %i\n", PreviousDetId);
1523  }
1524 
1525  cout << "END getNewObject\n";
1526  return obj;
1527 }
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
unsigned int DetId
Definition: APVGainStruct.h:10
const uint16_t range(const Frame &aFrame)
double Gain
Definition: APVGainStruct.h:26
double PreviousGain
Definition: APVGainStruct.h:28
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
std::pair< ContainerIterator, ContainerIterator > Range
double a
Definition: hdecay.h:119
tuple cout
Definition: gather_cfg.py:144
void SiStripGainFromData::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 0,
double  HighRange = 5400 
)
private

Definition at line 1439 of file SiStripGainFromData.cc.

References MaxChi2OverNDF, and MinNrEntries.

Referenced by algoEndJob().

1439  {
1440  double adcs = -0.5;
1441  double adcs_err = 0.;
1442  double width = -0.5;
1443  double width_err = 0;
1444  double chi2overndf = -0.5;
1445 
1446  double nr_of_entries = InputHisto->GetEntries();
1447 
1448  if ((unsigned int)nr_of_entries < MinNrEntries) {
1449  FitResults[0] = adcs;
1450  FitResults[1] = adcs_err;
1451  FitResults[2] = width;
1452  FitResults[3] = width_err;
1453  FitResults[4] = chi2overndf;
1454  return;
1455  }
1456 
1457  // perform fit with standard landau
1458  TF1* MyLandau = new TF1("MyLandau", "landau", LowRange, HighRange);
1459  MyLandau->SetParameter("MPV", 300);
1460 
1461  InputHisto->Fit(MyLandau, "QR WW");
1462 
1463  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
1464  adcs = MyLandau->GetParameter("MPV");
1465  adcs_err = MyLandau->GetParError(1);
1466  width = MyLandau->GetParameter(2);
1467  width_err = MyLandau->GetParError(2);
1468  chi2overndf = MyLandau->GetChisquare() / MyLandau->GetNDF();
1469 
1470  // if still wrong, give up
1471  if (adcs < 2. || chi2overndf > MaxChi2OverNDF) {
1472  adcs = -0.5;
1473  adcs_err = 0.;
1474  width = -0.5;
1475  width_err = 0;
1476  chi2overndf = -0.5;
1477  }
1478 
1479  FitResults[0] = adcs;
1480  FitResults[1] = adcs_err;
1481  FitResults[2] = width;
1482  FitResults[3] = width_err;
1483  FitResults[4] = chi2overndf;
1484 
1485  delete MyLandau;
1486 }
bool SiStripGainFromData::IsFarFromBorder ( TrajectoryStateOnSurface  trajState,
const uint32_t  detid,
const edm::EventSetup iSetup 
)
private

Definition at line 1398 of file SiStripGainFromData.cc.

References Surface::bounds(), gather_cfg::cout, edm::EventSetup::getData(), Bounds::length(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LocalTrajectoryError::positionError(), GeomDet::surface(), tkGeomToken_, PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by ComputeChargeOverPath().

1400  {
1401  const auto& tkGeom = iSetup->getData(tkGeomToken_);
1402 
1403  LocalPoint HitLocalPos = trajState.localPosition();
1404  LocalError HitLocalError = trajState.localError().positionError();
1405 
1406  const GeomDetUnit* it = tkGeom.idToDetUnit(DetId(detid));
1407  if (dynamic_cast<const StripGeomDetUnit*>(it) == nullptr && dynamic_cast<const PixelGeomDetUnit*>(it) == nullptr) {
1408  std::cout << "this detID doesn't seem to belong to the Tracker" << std::endl;
1409  return false;
1410  }
1411 
1412  const BoundPlane plane = it->surface();
1413  const TrapezoidalPlaneBounds* trapezoidalBounds(dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
1414  const RectangularPlaneBounds* rectangularBounds(dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds())));
1415 
1416  double DistFromBorder = 1.0;
1417  //double HalfWidth = it->surface().bounds().width() /2.0;
1418  double HalfLength = it->surface().bounds().length() / 2.0;
1419 
1420  if (trapezoidalBounds) {
1421  std::array<const float, 4> const& parameters = (*trapezoidalBounds).parameters();
1422  HalfLength = parameters[3];
1423  //double t = (HalfLength + HitLocalPos.y()) / (2*HalfLength) ;
1424  //HalfWidth = parameters[0] + (parameters[1]-parameters[0]) * t;
1425  } else if (rectangularBounds) {
1426  //HalfWidth = it->surface().bounds().width() /2.0;
1427  HalfLength = it->surface().bounds().length() / 2.0;
1428  } else {
1429  return false;
1430  }
1431 
1432  // if (fabs(HitLocalPos.x())+HitLocalError.xx() >= (HalfWidth - DistFromBorder) ) return false;//Don't think is really necessary
1433  if (fabs(HitLocalPos.y()) + HitLocalError.yy() >= (HalfLength - DistFromBorder))
1434  return false;
1435 
1436  return true;
1437 }
virtual float length() const =0
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
T y() const
Definition: PV3DBase.h:60
const Bounds & bounds() const
Definition: Surface.h:87
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalError positionError() const
bool getData(T &iHolder) const
Definition: EventSetup.h:128
float yy() const
Definition: LocalError.h:24
const LocalTrajectoryError & localError() const
Definition: DetId.h:17
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

std::string SiStripGainFromData::AlgoMode
private
bool SiStripGainFromData::AllowSaturation
private

Definition at line 126 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

TH2F* SiStripGainFromData::APV_Charge
private

Definition at line 202 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::APV_CumulGain
private

Definition at line 207 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_DetId
private

Definition at line 196 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Eta
private

Definition at line 198 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Gain
private

Definition at line 206 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_Id
private

Definition at line 197 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH2F* SiStripGainFromData::APV_Momentum
private

Definition at line 201 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::APV_MPV
private

Definition at line 205 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::APV_PathLength
private

Definition at line 203 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::APV_PathLengthM
private

Definition at line 204 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_PrevGain
private

Definition at line 208 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoBeginRun().

TH1F* SiStripGainFromData::APV_R
private

Definition at line 199 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_SubDet
private

Definition at line 200 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Thickness
private

Definition at line 209 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

std::unordered_map<unsigned int, stAPVGain*> SiStripGainFromData::APVsColl
private

Definition at line 293 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

std::vector<stAPVGain*> SiStripGainFromData::APVsCollOrdered
private

Definition at line 292 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoBeginRun(), algoEndJob(), and getNewObject().

int SiStripGainFromData::CalibrationLevel
private

Definition at line 129 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

TH1F* SiStripGainFromData::Charge_TEC
private

Definition at line 183 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TEC1
private

Definition at line 184 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TEC2
private

Definition at line 185 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TECM
private

Definition at line 187 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TECP
private

Definition at line 186 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIB
private

Definition at line 178 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TID
private

Definition at line 179 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIDM
private

Definition at line 181 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIDP
private

Definition at line 180 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TOB
private

Definition at line 182 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Charge_Vs_Alpha
private

Definition at line 253 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_Beta
private

Definition at line 257 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathLength
private

Definition at line 237 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathLength320
private

Definition at line 238 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathLength500
private

Definition at line 239 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTEC
private

Definition at line 167 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTEC1
private

Definition at line 168 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTEC2
private

Definition at line 169 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTIB
private

Definition at line 164 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTID
private

Definition at line 165 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTOB
private

Definition at line 166 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_TransversAngle
private

Definition at line 249 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

bool SiStripGainFromData::CheckIfFileExist
private

Definition at line 130 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

bool SiStripGainFromData::CheckLocalAngle
private

Definition at line 115 of file SiStripGainFromData.cc.

Referenced by SiStripGainFromData().

DQMStore* SiStripGainFromData::dqmStore_
private

Definition at line 101 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::EEvent
private

Definition at line 280 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Entries
private

Definition at line 262 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Eta
private

Definition at line 263 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_MPV
private

Definition at line 261 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Phi
private

Definition at line 264 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::ERun
private

Definition at line 279 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TimeValue_t SiStripGainFromData::ETimestamp
private

Definition at line 281 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

bool SiStripGainFromData::FirstSetOfConstants
private

Definition at line 127 of file SiStripGainFromData.cc.

Referenced by algoBeginRun(), algoEndJob(), and SiStripGainFromData().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength
private

Definition at line 245 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength320
private

Definition at line 246 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength500
private

Definition at line 247 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

edm::ESGetToken<SiStripGain, SiStripGainRcd> SiStripGainFromData::gainToken_
private

Definition at line 297 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoBeginRun(), and SiStripGainFromData().

TH1F* SiStripGainFromData::HChi2OverNDF
private

Definition at line 146 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::HFirstStrip
private

Definition at line 273 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::HitLocalPosition
private

Definition at line 268 of file SiStripGainFromData.cc.

TH2F* SiStripGainFromData::HitLocalPositionBefCut
private

Definition at line 269 of file SiStripGainFromData.cc.

TH1F* SiStripGainFromData::HTrackChi2OverNDF
private

Definition at line 147 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::HTrackHits
private

Definition at line 148 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

const edm::Event* SiStripGainFromData::iEvent_
private

Definition at line 113 of file SiStripGainFromData.cc.

Referenced by algoAnalyze().

const edm::EventSetup* SiStripGainFromData::iSetup_
private

Definition at line 112 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::JobInfo
private

Definition at line 271 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

double SiStripGainFromData::MaxChi2OverNDF
private

Definition at line 118 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

double SiStripGainFromData::MaxMPVError
private

Definition at line 117 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MaxNrStrips
private

Definition at line 123 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackChiOverNdf
private

Definition at line 125 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackEta
private

Definition at line 122 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackMomentum
private

Definition at line 120 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MinNrEntries
private

Definition at line 116 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

double SiStripGainFromData::MinTrackEta
private

Definition at line 121 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MinTrackHits
private

Definition at line 124 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MinTrackMomentum
private

Definition at line 119 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

TH1F* SiStripGainFromData::MPV_Vs_Alpha
private

Definition at line 254 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_Beta
private

Definition at line 258 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_Eta
private

Definition at line 190 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC
private

Definition at line 153 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC1
private

Definition at line 154 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC2
private

Definition at line 155 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTIB
private

Definition at line 150 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTID
private

Definition at line 151 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTOB
private

Definition at line 152 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength
private

Definition at line 241 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength320
private

Definition at line 242 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength500
private

Definition at line 243 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC
private

Definition at line 174 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC1
private

Definition at line 175 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC2
private

Definition at line 176 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTIB
private

Definition at line 171 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTID
private

Definition at line 172 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTOB
private

Definition at line 173 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_Phi
private

Definition at line 189 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC
private

Definition at line 160 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC1
private

Definition at line 161 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC2
private

Definition at line 162 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTIB
private

Definition at line 157 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTID
private

Definition at line 158 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTOB
private

Definition at line 159 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_R
private

Definition at line 191 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_TransversAngle
private

Definition at line 250 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs
private

Definition at line 211 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs320
private

Definition at line 212 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs500
private

Definition at line 213 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::NEvent
private

Definition at line 275 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::NHighStripInCluster
private

Definition at line 218 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NoMPV_Vs_EtaPhi
private

Definition at line 266 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::NSatStripInCluster
private

Definition at line 217 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_Alpha
private

Definition at line 255 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_Beta
private

Definition at line 259 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_TransversAngle
private

Definition at line 251 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::NumberOfEntriesByAPV
private

Definition at line 145 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

std::string SiStripGainFromData::OutputGains
private

Definition at line 133 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

std::string SiStripGainFromData::OutputHistos
private

Definition at line 134 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::SEvent
private

Definition at line 277 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::SRun
private

Definition at line 276 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TimeValue_t SiStripGainFromData::STimestamp
private

Definition at line 278 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripGainFromData::tkGeomToken_
private

Definition at line 296 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), IsFarFromBorder(), and SiStripGainFromData().

MonitorElement* SiStripGainFromData::tmp
private

Definition at line 140 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH2F* SiStripGainFromData::Tracks_P_Vs_Eta
private

Definition at line 142 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Tracks_Pt_Vs_Eta
private

Definition at line 143 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

std::string SiStripGainFromData::TrajToTrackLabel
private

Definition at line 136 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

std::string SiStripGainFromData::TrajToTrackProducer
private

Definition at line 135 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainFromData::tTopoToken_
private

Definition at line 295 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and SiStripGainFromData().

bool SiStripGainFromData::Validation
private
vector<string> SiStripGainFromData::VInputFiles
private

Definition at line 138 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().